public abstract class ElementWrapper extends java.lang.Object implements Element
Modifier and Type | Method and Description |
---|---|
<T extends Base> |
addComment(java.lang.String value)
Add an XML comment to this Base
|
java.lang.Object |
clone()
Clone this Base
|
<T extends Base> |
complete()
Ensure that the underlying streams are fully parsed.
|
<T extends Element> |
declareNS(java.lang.String uri,
java.lang.String prefix)
Declare a namespace
|
void |
discard()
Removes this element from its current document
|
boolean |
equals(java.lang.Object other) |
java.util.List<javax.xml.namespace.QName> |
getAttributes()
Returns a listing of all attributes on this element
|
java.lang.String |
getAttributeValue(javax.xml.namespace.QName qname)
Returns the value of the named attribute
|
java.lang.String |
getAttributeValue(java.lang.String name)
Returns the value of the named attribute
|
IRI |
getBaseUri()
Returns the value of this element's
xml:base attribute or
null if xml:base is undefined. |
WriterOptions |
getDefaultWriterOptions()
Get the default WriterOptions for this object
|
<T extends Element> |
getDocument()
Returns the document to which this element belongs
|
<T extends Element> |
getElements()
Return a listing of this elements child elements
|
java.util.List<javax.xml.namespace.QName> |
getExtensionAttributes()
Returns a listing of extension attributes on this element
(extension attributes are attributes whose namespace URI
is different than the elements)
|
Factory |
getFactory()
Get the Factory used to create this Base
|
<T extends Element> |
getFirstChild()
Get the first child element
|
<T extends Element> |
getFirstChild(javax.xml.namespace.QName qname)
Get the first child element with the given QName
|
Element |
getInternal() |
java.lang.String |
getLanguage()
Returns the value of this elements
xml:lang attribute or
null if xml:lang is undefined. |
Lang |
getLanguageTag()
Returns the value of the xml:lang attribute as a Lang object
|
java.util.Locale |
getLocale()
Returns a Locale object created from the
xml:lang attribute |
boolean |
getMustPreserveWhitespace()
Return true if insignificant whitespace must be preserved
|
java.util.Map<java.lang.String,java.lang.String> |
getNamespaces()
Return a map listing the xml namespaces declared for this element
|
<T extends Element> |
getNextSibling()
Get the element following this one
|
<T extends Element> |
getNextSibling(javax.xml.namespace.QName qname)
Get the first following sibling with the specified QName
|
<T extends Base> |
getParentElement()
Return this Element's parent element or document
|
<T extends Element> |
getPreviousSibling()
Get the element preceding this one
|
<T extends Element> |
getPreviousSibling(javax.xml.namespace.QName qname)
Get the first previous sibling with the specified QName
|
javax.xml.namespace.QName |
getQName()
Return the XML QName of this element
|
IRI |
getResolvedBaseUri()
Returns the current in-scope, fully qualified Base URI for this element.
|
java.lang.String |
getText()
Returns the Text value of this element
|
int |
hashCode() |
java.util.Iterator<Element> |
iterator() |
<T extends Element> |
removeAttribute(javax.xml.namespace.QName qname)
Remove the named Attribute
|
<T extends Element> |
removeAttribute(java.lang.String name)
Remove the named attribute
|
<T extends Element> |
setAttributeValue(javax.xml.namespace.QName qname,
java.lang.String value)
Sets the value of the named attribute
|
<T extends Element> |
setAttributeValue(java.lang.String name,
java.lang.String value)
Sets the value of the named attribute
|
<T extends Element> |
setBaseUri(IRI base)
Sets the value of this element's
xml:base attribute. |
<T extends Element> |
setBaseUri(java.lang.String base)
Sets the value of this element's
xml:base attribute. |
<T extends Element> |
setLanguage(java.lang.String language)
Sets the value of this elements
xml:lang attribute. |
<T extends Element> |
setMustPreserveWhitespace(boolean preserve)
Set to true to preserve insignificant whitespace
|
<T extends Element> |
setParentElement(Element parent)
Set this Element's parent element
|
<T extends Element> |
setText(javax.activation.DataHandler handler)
Set the Text value of this element using the data handler
|
void |
setText(java.lang.String text)
Set the Text value of this element
|
java.lang.String |
toString() |
void |
writeTo(java.io.OutputStream out)
Serializes the model component out to the specified stream
|
void |
writeTo(java.io.OutputStream out,
WriterOptions options)
Serializes the model component out to the specified stream
|
void |
writeTo(java.lang.String writer,
java.io.OutputStream out)
Serializes the model component out to the specified stream using the given Abdera writer
|
void |
writeTo(java.lang.String writer,
java.io.OutputStream out,
WriterOptions options)
Serializes the model component out to the specified stream using the
given abdera writer
|
void |
writeTo(java.lang.String writer,
java.io.Writer out)
Serializes the model component out to the specified java.io.Writer using the
given Abdera writer
|
void |
writeTo(java.lang.String writer,
java.io.Writer out,
WriterOptions options)
Serializes the model component out to the specified java.io.Writer using the
given abdera writer
|
void |
writeTo(java.io.Writer writer)
Serializes the model component out to the specified writer
|
void |
writeTo(Writer writer,
java.io.OutputStream out)
Serializes the model component out to the specified stream using the given Abdera writer
|
void |
writeTo(Writer writer,
java.io.OutputStream out,
WriterOptions options)
Serializes the model component out to the specified stream using the
given abdera writer
|
void |
writeTo(Writer writer,
java.io.Writer out)
Serializes the model component out to the specified java.io.Writer using the
given Abdera writer
|
void |
writeTo(java.io.Writer out,
WriterOptions options)
Serializes the model component out to the specified java.io.Writer
|
void |
writeTo(Writer writer,
java.io.Writer out,
WriterOptions options)
Serializes the model component out to the specified java.io.Writer using the
given abdera writer
|
public <T extends Base> T addComment(java.lang.String value)
Base
addComment
in interface Base
value
- The text value of the commentpublic java.lang.Object clone()
Base
public <T extends Element> T declareNS(java.lang.String uri, java.lang.String prefix)
Element
public void discard()
Element
public java.util.List<javax.xml.namespace.QName> getAttributes()
Element
getAttributes
in interface Element
public java.lang.String getAttributeValue(javax.xml.namespace.QName qname)
Element
getAttributeValue
in interface Element
qname
- The XML QName of the attributepublic java.lang.String getAttributeValue(java.lang.String name)
Element
getAttributeValue
in interface Element
name
- The name of the attributepublic IRI getBaseUri()
Element
xml:base
attribute or
null if xml:base
is undefined.getBaseUri
in interface Element
public <T extends Element> Document<T> getDocument()
Element
getDocument
in interface Element
public java.util.List<javax.xml.namespace.QName> getExtensionAttributes()
Element
getExtensionAttributes
in interface Element
public Factory getFactory()
Base
getFactory
in interface Base
public <T extends Element> T getFirstChild()
Element
getFirstChild
in interface Element
public <T extends Element> T getFirstChild(javax.xml.namespace.QName qname)
Element
getFirstChild
in interface Element
qname
- The XML QName of the sibling to findpublic java.lang.String getLanguage()
Element
xml:lang
attribute or
null if xml:lang
is undefined.getLanguage
in interface Element
public Lang getLanguageTag()
Element
getLanguageTag
in interface Element
public java.util.Locale getLocale()
Element
xml:lang
attributepublic <T extends Element> T getNextSibling()
Element
getNextSibling
in interface Element
public <T extends Element> T getNextSibling(javax.xml.namespace.QName qname)
Element
getNextSibling
in interface Element
qname
- The XML QName of the sibling to findpublic <T extends Base> T getParentElement()
Element
getParentElement
in interface Element
public <T extends Element> T getPreviousSibling()
Element
getPreviousSibling
in interface Element
public <T extends Element> T getPreviousSibling(javax.xml.namespace.QName qname)
Element
getPreviousSibling
in interface Element
qname
- The XML QName of the sibling to findpublic javax.xml.namespace.QName getQName()
Element
public IRI getResolvedBaseUri()
Element
getResolvedBaseUri
in interface Element
public java.lang.String getText()
Element
public <T extends Element> T removeAttribute(javax.xml.namespace.QName qname)
Element
removeAttribute
in interface Element
qname
- The XML QName of the attribute to removepublic <T extends Element> T removeAttribute(java.lang.String name)
Element
removeAttribute
in interface Element
name
- The name of the attribute to removepublic <T extends Element> T setAttributeValue(javax.xml.namespace.QName qname, java.lang.String value)
Element
setAttributeValue
in interface Element
qname
- The XML QName of the attributevalue
- The value of the attributepublic <T extends Element> T setAttributeValue(java.lang.String name, java.lang.String value)
Element
setAttributeValue
in interface Element
name
- The name of the attributevalue
- The value of the attributepublic <T extends Element> T setBaseUri(IRI base)
Element
xml:base
attribute.setBaseUri
in interface Element
base
- The IRI base valuepublic <T extends Element> T setBaseUri(java.lang.String base)
Element
xml:base
attribute.setBaseUri
in interface Element
base
- The Base IRIpublic <T extends Element> T setLanguage(java.lang.String language)
Element
xml:lang
attribute.setLanguage
in interface Element
language
- the value of the xml:lang elementpublic <T extends Element> T setParentElement(Element parent)
Element
setParentElement
in interface Element
parent
- The parent elementpublic void setText(java.lang.String text)
Element
public <T extends Element> T setText(javax.activation.DataHandler handler)
Element
public void writeTo(java.io.OutputStream out) throws java.io.IOException
Base
public void writeTo(java.io.Writer writer) throws java.io.IOException
Base
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public Element getInternal()
public <T extends Element> java.util.List<T> getElements()
Element
getElements
in interface Element
public java.util.Map<java.lang.String,java.lang.String> getNamespaces()
Element
getNamespaces
in interface Element
public boolean getMustPreserveWhitespace()
Element
getMustPreserveWhitespace
in interface Element
public <T extends Element> T setMustPreserveWhitespace(boolean preserve)
Element
setMustPreserveWhitespace
in interface Element
public void writeTo(java.io.OutputStream out, WriterOptions options) throws java.io.IOException
Base
public void writeTo(Writer writer, java.io.OutputStream out, WriterOptions options) throws java.io.IOException
Base
public void writeTo(Writer writer, java.io.OutputStream out) throws java.io.IOException
Base
public void writeTo(Writer writer, java.io.Writer out, WriterOptions options) throws java.io.IOException
Base
public void writeTo(Writer writer, java.io.Writer out) throws java.io.IOException
Base
public void writeTo(java.lang.String writer, java.io.OutputStream out, WriterOptions options) throws java.io.IOException
Base
public void writeTo(java.lang.String writer, java.io.OutputStream out) throws java.io.IOException
Base
public void writeTo(java.lang.String writer, java.io.Writer out, WriterOptions options) throws java.io.IOException
Base
public void writeTo(java.lang.String writer, java.io.Writer out) throws java.io.IOException
Base
public void writeTo(java.io.Writer out, WriterOptions options) throws java.io.IOException
Base
public WriterOptions getDefaultWriterOptions()
Base
getDefaultWriterOptions
in interface Base
public <T extends Base> T complete()
Base
Copyright © 2010 - 2020 Adobe. All Rights Reserved