|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.axiom.om.impl.llom.OMNodeImpl
org.apache.axiom.om.impl.llom.OMElementImpl
org.apache.abdera.parser.stax.FOMElement
public class FOMElement
Field Summary |
---|
Fields inherited from class org.apache.axiom.om.impl.llom.OMElementImpl |
---|
attributes, DEFAULT_DEFAULT_NS_OBJECT, firstChild, lastChild, localName, namespaces, noPrefixNamespaceCounter, ns, qName |
Fields inherited from class org.apache.axiom.om.impl.llom.OMNodeImpl |
---|
builder, done, factory, nextSibling, nodeType, parent, previousSibling |
Fields inherited from interface org.apache.axiom.om.OMNode |
---|
CDATA_SECTION_NODE, COMMENT_NODE, DTD_NODE, ELEMENT_NODE, ENTITY_REFERENCE_NODE, PI_NODE, SPACE_NODE, TEXT_NODE |
Fields inherited from interface org.apache.axiom.om.OMConstants |
---|
ARRAY_ITEM_LOCALNAME, ARRAY_ITEM_NS_PREFIX, ARRAY_ITEM_NSURI, ARRAY_ITEM_QNAME, DATA_HANDLER, DEFAULT_CHAR_SET_ENCODING, DEFAULT_DEFAULT_NAMESPACE, DEFAULT_XML_VERSION, IS_BINARY, IS_DATA_HANDLERS_AWARE, PULL_TYPE_BUILDER, PUSH_TYPE_BUILDER, XMLATTRTYPE_CDATA, XMLATTRTYPE_ENTITIES, XMLATTRTYPE_ENTITY, XMLATTRTYPE_ID, XMLATTRTYPE_IDREF, XMLATTRTYPE_IDREFS, XMLATTRTYPE_NMTOKEN, XMLATTRTYPE_NMTOKENS, XMLATTRTYPE_NOTATION, XMLNS_NS_PREFIX, XMLNS_NS_URI, XMLNS_PREFIX, XMLNS_URI |
Constructor Summary | |
---|---|
|
FOMElement(QName qname)
|
protected |
FOMElement(QName qname,
org.apache.axiom.om.OMContainer parent,
org.apache.axiom.om.OMFactory factory)
|
protected |
FOMElement(QName qname,
org.apache.axiom.om.OMContainer parent,
org.apache.axiom.om.OMFactory factory,
org.apache.axiom.om.OMXMLParserWrapper builder)
|
protected |
FOMElement(String name,
org.apache.axiom.om.OMNamespace namespace,
org.apache.axiom.om.OMContainer parent,
org.apache.axiom.om.OMFactory factory)
|
Method Summary | ||
---|---|---|
protected org.apache.axiom.om.OMElement |
_copyElement(org.apache.axiom.om.OMElement src,
org.apache.axiom.om.OMElement dest)
|
|
protected org.apache.axiom.om.OMElement |
_create(org.apache.axiom.om.OMElement src)
|
|
protected
|
_getChildrenAsSet(QName qname)
|
|
protected String |
_getElementValue(QName qname)
|
|
protected String |
_getStringValue(IRI uri)
|
|
protected IRI |
_getUriValue(String v)
|
|
protected Element |
_parse(String value,
IRI baseUri)
|
|
protected void |
_removeAllChildren()
|
|
protected void |
_removeChildren(QName qname,
boolean many)
|
|
protected IRI |
_resolve(IRI base,
IRI value)
|
|
protected void |
_setChild(QName qname,
org.apache.axiom.om.OMElement element)
|
|
protected void |
_setElementValue(QName qname,
String value)
|
|
|
addComment(String value)
Add an XML comment to this Base |
|
Object |
clone()
Clone this Base |
|
|
complete()
Ensure that the underlying streams are fully parsed. |
|
protected void |
declareIfNecessary(String ns,
String prefix)
|
|
|
declareNS(String uri,
String prefix)
Declare a namespace |
|
List<QName> |
getAttributes()
Returns a listing of all attributes on this element |
|
String |
getAttributeValue(QName qname)
Returns the value of the named attribute |
|
String |
getAttributeValue(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 |
|
|
getDocument()
Returns the document to which this element belongs |
|
|
getElements()
Return a listing of this elements child elements |
|
List<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 |
|
|
getFirstChild()
Get the first child element |
|
|
getFirstChild(QName qname)
Get the first child element with the given QName |
|
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 |
|
Locale |
getLocale()
Returns a Locale object created from the xml:lang attribute |
|
boolean |
getMustPreserveWhitespace()
Return true if insignificant whitespace must be preserved |
|
Map<String,String> |
getNamespaces()
Return a map listing the xml namespaces declared for this element |
|
|
getNextSibling()
Get the element following this one |
|
|
getNextSibling(QName qname)
Get the first following sibling with the specified QName |
|
|
getParentElement()
Return this Element's parent element or document |
|
|
getPreviousSibling()
Get the element preceding this one |
|
|
getPreviousSibling(QName qname)
Get the first previous sibling with the specified QName |
|
IRI |
getResolvedBaseUri()
Returns the current in-scope, fully qualified Base URI for this element. |
|
String |
getText()
Returns the Text value of this element |
|
protected String |
getText(QName qname)
|
|
protected
|
getTextElement(QName qname)
|
|
protected Element |
getWrapped(Element internal)
|
|
protected boolean |
isDeclared(String ns,
String prefix)
|
|
Iterator<Element> |
iterator()
Iterate over all child elements |
|
|
removeAttribute(QName qname)
Remove the named Attribute |
|
|
removeAttribute(String name)
Remove the named attribute |
|
protected Link |
selectLink(List<Link> links,
String type,
String hreflang)
|
|
|
setAttributeValue(QName qname,
String value)
Sets the value of the named attribute |
|
|
setAttributeValue(String name,
String value)
Sets the value of the named attribute |
|
|
setBaseUri(IRI base)
Sets the value of this element's xml:base attribute. |
|
|
setBaseUri(String base)
Sets the value of this element's xml:base attribute. |
|
protected Text |
setHtmlText(QName qname,
String value,
IRI baseUri)
|
|
|
setLanguage(String language)
Sets the value of this elements xml:lang attribute. |
|
|
setMustPreserveWhitespace(boolean preserve)
Set to true to preserve insignificant whitespace |
|
protected void |
setParentDocument(Document parent)
|
|
|
setParentElement(Element parent)
Set this Element's parent element |
|
|
setText(javax.activation.DataHandler handler)
Set the Text value of this element using the data handler |
|
void |
setText(String text)
Set the Text value of this element |
|
protected
|
setTextElement(QName qname,
T text,
boolean many)
|
|
protected Text |
setTextText(QName qname,
String value)
|
|
protected Text |
setXhtmlText(QName qname,
Div value,
IRI baseUri)
|
|
protected Text |
setXhtmlText(QName qname,
String value,
IRI baseUri)
|
|
String |
toFormattedString()
|
|
void |
writeTo(OutputStream out)
Serializes the model component out to the specified stream |
|
void |
writeTo(OutputStream out,
WriterOptions options)
Serializes the model component out to the specified stream |
|
void |
writeTo(String writer,
OutputStream out)
Serializes the model component out to the specified stream using the given Abdera writer |
|
void |
writeTo(String writer,
OutputStream out,
WriterOptions options)
Serializes the model component out to the specified stream using the given abdera writer |
|
void |
writeTo(String writer,
Writer out)
Serializes the model component out to the specified java.io.Writer using the given Abdera writer |
|
void |
writeTo(String writer,
Writer out,
WriterOptions options)
Serializes the model component out to the specified java.io.Writer using the given abdera writer |
|
void |
writeTo(Writer writer)
Serializes the model component out to the specified writer |
|
void |
writeTo(Writer writer,
OutputStream out)
Serializes the model component out to the specified stream using the given Abdera writer |
|
void |
writeTo(Writer writer,
OutputStream out,
WriterOptions options)
Serializes the model component out to the specified stream using the given abdera writer |
|
void |
writeTo(Writer writer,
Writer out)
Serializes the model component out to the specified java.io.Writer using the given Abdera writer |
|
void |
writeTo(Writer out,
WriterOptions options)
Serializes the model component out to the specified java.io.Writer |
|
void |
writeTo(Writer writer,
Writer out,
WriterOptions options)
Serializes the model component out to the specified java.io.Writer using the given abdera writer |
Methods inherited from class org.apache.axiom.om.impl.llom.OMElementImpl |
---|
addAttribute, addAttribute, addChild, build, buildNext, buildWithAttachments, cloneOMElement, declareDefaultNamespace, declareNamespace, declareNamespace, detach, discard, findNamespace, findNamespaceURI, getAllAttributes, getAllDeclaredNamespaces, getAttribute, getBuilder, getChildElements, getChildren, getChildrenWithLocalName, getChildrenWithName, getChildrenWithNamespaceURI, getDefaultNamespace, getFirstChildWithName, getFirstElement, getFirstOMChild, getLineNumber, getLocalName, getNamespace, getNextOMSibling, getQName, getTextAsQName, getTrimmedText, getType, getXMLStreamReader, getXMLStreamReaderWithoutCaching, internalSerialize, internalSerialize, internalSerializeAndConsume, isComplete, notifyChildComplete, removeAttribute, resolveQName, setBuilder, setFirstChild, setLastChild, setLineNumber, setLocalName, setNamespace, setNamespaceWithNoFindInCurrentScope, setText, toString, toStringWithConsume |
Methods inherited from class org.apache.axiom.om.impl.llom.OMNodeImpl |
---|
close, getOMFactory, getParent, getPreviousOMSibling, importNode, insertSiblingAfter, insertSiblingBefore, serialize, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, setComplete, setNextOMSibling, setParent, setPreviousOMSibling, setType |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.abdera.model.Element |
---|
discard, getQName |
Methods inherited from interface org.apache.axiom.om.OMElement |
---|
addAttribute, addAttribute, cloneOMElement, declareDefaultNamespace, declareNamespace, declareNamespace, findNamespace, findNamespaceURI, getAllAttributes, getAllDeclaredNamespaces, getAttribute, getBuilder, getChildElements, getDefaultNamespace, getFirstElement, getLineNumber, getLocalName, getNamespace, getQName, getTextAsQName, getXMLStreamReader, getXMLStreamReaderWithoutCaching, removeAttribute, resolveQName, setBuilder, setFirstChild, setLineNumber, setLocalName, setNamespace, setNamespaceWithNoFindInCurrentScope, setText, toString, toStringWithConsume |
Methods inherited from interface org.apache.axiom.om.OMNode |
---|
build, buildWithAttachments, close, detach, discard, getNextOMSibling, getOMFactory, getParent, getPreviousOMSibling, getType, insertSiblingAfter, insertSiblingBefore, isComplete, serialize, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume |
Methods inherited from interface org.apache.axiom.om.OMContainer |
---|
addChild, buildNext, getChildren, getChildrenWithLocalName, getChildrenWithName, getChildrenWithNamespaceURI, getFirstChildWithName, getFirstOMChild, isComplete |
Methods inherited from interface org.apache.axiom.om.impl.OMContainerEx |
---|
setComplete |
Constructor Detail |
---|
public FOMElement(QName qname)
protected FOMElement(String name, org.apache.axiom.om.OMNamespace namespace, org.apache.axiom.om.OMContainer parent, org.apache.axiom.om.OMFactory factory) throws org.apache.axiom.om.OMException
org.apache.axiom.om.OMException
protected FOMElement(QName qname, org.apache.axiom.om.OMContainer parent, org.apache.axiom.om.OMFactory factory) throws org.apache.axiom.om.OMException
org.apache.axiom.om.OMException
protected FOMElement(QName qname, org.apache.axiom.om.OMContainer parent, org.apache.axiom.om.OMFactory factory, org.apache.axiom.om.OMXMLParserWrapper builder)
Method Detail |
---|
protected Element getWrapped(Element internal)
public <T extends Base> T getParentElement()
Element
getParentElement
in interface Element
protected void setParentDocument(Document parent)
public <T extends Element> T setParentElement(Element parent)
Element
setParentElement
in interface Element
parent
- The parent elementpublic <T extends Element> T getPreviousSibling()
Element
getPreviousSibling
in interface Element
public <T extends Element> T getNextSibling()
Element
getNextSibling
in interface Element
public <T extends Element> T getFirstChild()
Element
getFirstChild
in interface Element
public <T extends Element> T getPreviousSibling(QName qname)
Element
getPreviousSibling
in interface Element
qname
- The XML QName of the sibling to find
public <T extends Element> T getNextSibling(QName qname)
Element
getNextSibling
in interface Element
qname
- The XML QName of the sibling to find
public <T extends Element> T getFirstChild(QName qname)
Element
getFirstChild
in interface Element
qname
- The XML QName of the sibling to find
public Lang getLanguageTag()
Element
getLanguageTag
in interface Element
public String getLanguage()
Element
xml:lang
attribute or null if xml:lang
is undefined.
getLanguage
in interface Element
public <T extends Element> T setLanguage(String language)
Element
xml:lang
attribute.
setLanguage
in interface Element
language
- the value of the xml:lang elementpublic IRI getBaseUri()
Element
xml:base
attribute or null if xml:base
is
undefined.
getBaseUri
in interface Element
public IRI getResolvedBaseUri()
Element
getResolvedBaseUri
in interface Element
public <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(String base)
Element
xml:base
attribute.
setBaseUri
in interface Element
base
- The Base IRIpublic String getAttributeValue(QName qname)
Element
getAttributeValue
in interface Element
getAttributeValue
in interface org.apache.axiom.om.OMElement
getAttributeValue
in class org.apache.axiom.om.impl.llom.OMElementImpl
qname
- The XML QName of the attribute
public <T extends Element> T setAttributeValue(QName qname, String value)
Element
setAttributeValue
in interface Element
qname
- The XML QName of the attributevalue
- The value of the attributeprotected <E extends Element> List<E> _getChildrenAsSet(QName qname)
protected void _setChild(QName qname, org.apache.axiom.om.OMElement element)
protected IRI _getUriValue(String v)
protected String _getStringValue(IRI uri)
protected IRI _resolve(IRI base, IRI value)
public void writeTo(OutputStream out, WriterOptions options) throws IOException
Base
writeTo
in interface Base
out
- The target output streamoptions
- The WriterOptions to use
IOException
public void writeTo(Writer out, WriterOptions options) throws IOException
Base
writeTo
in interface Base
out
- The target output writeroptions
- The WriterOptions to use
IOException
public void writeTo(Writer writer, OutputStream out) throws IOException
Base
writeTo
in interface Base
writer
- The Abdera writer to useout
- The target output stream
IOException
public void writeTo(Writer writer, Writer out) throws IOException
Base
writeTo
in interface Base
writer
- The Abdera writer to useout
- The target output writer
IOException
public void writeTo(Writer writer, OutputStream out, WriterOptions options) throws IOException
Base
writeTo
in interface Base
writer
- The Abdera writer to useout
- The target output streamoptions
- The WriterOptions to use
IOException
public void writeTo(Writer writer, Writer out, WriterOptions options) throws IOException
Base
writeTo
in interface Base
writer
- The Abdera writer to useout
- The target output writeroptions
- The WriterOptions to use
IOException
public void writeTo(OutputStream out) throws IOException
Base
writeTo
in interface Base
out
- The java.io.OutputStream to use when serializing the Base. The charset encoding specified for the
document will be used
IOException
public void writeTo(Writer writer) throws IOException
Base
writeTo
in interface Base
writer
- The java.io.Writer to use when serializing the Base
IOException
public <T extends Element> Document<T> getDocument()
Element
getDocument
in interface Element
public String getAttributeValue(String name)
Element
getAttributeValue
in interface Element
name
- The name of the attribute
public <T extends Element> T setAttributeValue(String name, String value)
Element
setAttributeValue
in interface Element
name
- The name of the attributevalue
- The value of the attributeprotected void _setElementValue(QName qname, String value)
protected String _getElementValue(QName qname)
protected <T extends Text> T getTextElement(QName qname)
protected <T extends Text> void setTextElement(QName qname, T text, boolean many)
protected Text setTextText(QName qname, String value)
protected Text setHtmlText(QName qname, String value, IRI baseUri)
protected Text setXhtmlText(QName qname, String value, IRI baseUri)
protected Text setXhtmlText(QName qname, Div value, IRI baseUri)
public void setText(String text)
Element
setText
in interface Element
setText
in interface org.apache.axiom.om.OMElement
setText
in class org.apache.axiom.om.impl.llom.OMElementImpl
text
- The text valuepublic String getText()
Element
getText
in interface Element
getText
in interface org.apache.axiom.om.OMElement
getText
in class org.apache.axiom.om.impl.llom.OMElementImpl
protected String getText(QName qname)
public List<QName> getAttributes()
Element
getAttributes
in interface Element
public List<QName> getExtensionAttributes()
Element
getExtensionAttributes
in interface Element
protected Element _parse(String value, IRI baseUri) throws ParseException, UnsupportedEncodingException
ParseException
UnsupportedEncodingException
public <T extends Element> T removeAttribute(QName qname)
Element
removeAttribute
in interface Element
qname
- The XML QName of the attribute to removepublic <T extends Element> T removeAttribute(String name)
Element
removeAttribute
in interface Element
name
- The name of the attribute to removeprotected void _removeChildren(QName qname, boolean many)
protected void _removeAllChildren()
public Object clone()
Base
clone
in interface Base
clone
in class Object
protected org.apache.axiom.om.OMElement _copyElement(org.apache.axiom.om.OMElement src, org.apache.axiom.om.OMElement dest)
protected org.apache.axiom.om.OMElement _create(org.apache.axiom.om.OMElement src)
public Factory getFactory()
Base
getFactory
in interface Base
public <T extends Base> T addComment(String value)
Base
addComment
in interface Base
value
- The text value of the commentpublic Locale getLocale()
Element
xml:lang
attribute
getLocale
in interface Element
protected Link selectLink(List<Link> links, String type, String hreflang)
public <T extends Element> T declareNS(String uri, String prefix)
Element
declareNS
in interface Element
protected boolean isDeclared(String ns, String prefix)
protected void declareIfNecessary(String ns, String prefix)
public Map<String,String> getNamespaces()
Element
getNamespaces
in interface Element
public <T extends Element> List<T> getElements()
Element
getElements
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 <T extends Element> T setText(javax.activation.DataHandler handler)
Element
setText
in interface Element
public WriterOptions getDefaultWriterOptions()
Base
getDefaultWriterOptions
in interface Base
public <T extends Base> T complete()
complete
in interface Base
public Iterator<Element> iterator()
iterator
in interface Iterable<Element>
public void writeTo(String writer, OutputStream out) throws IOException
Base
writeTo
in interface Base
writer
- The Abdera writer to useout
- The target output stream
IOException
public void writeTo(String writer, Writer out) throws IOException
Base
writeTo
in interface Base
writer
- The Abdera writer to useout
- The target output writer
IOException
public void writeTo(String writer, OutputStream out, WriterOptions options) throws IOException
Base
writeTo
in interface Base
writer
- The name of the Abdera writer to useout
- The target output streamoptions
- The WriterOptions to use
IOException
public void writeTo(String writer, Writer out, WriterOptions options) throws IOException
Base
writeTo
in interface Base
writer
- The name of the Abdera writer to useout
- The target output writeroptions
- The WriterOptions to use
IOException
public String toFormattedString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |