org.apache.abdera.parser.stax
Class FOMExtensibleElement

java.lang.Object
  extended by org.apache.axiom.om.impl.llom.OMNodeImpl
      extended by org.apache.axiom.om.impl.llom.OMElementImpl
          extended by org.apache.abdera.parser.stax.FOMElement
              extended by org.apache.abdera.parser.stax.FOMExtensibleElement
All Implemented Interfaces:
Cloneable, Iterable<Element>, Base, Element, ExtensibleElement, Constants, org.apache.axiom.om.impl.OMContainerEx, org.apache.axiom.om.impl.OMNodeEx, org.apache.axiom.om.OMConstants, org.apache.axiom.om.OMContainer, org.apache.axiom.om.OMElement, org.apache.axiom.om.OMNode
Direct Known Subclasses:
FOMCategories, FOMCategory, FOMCollection, FOMContent, FOMControl, FOMDiv, FOMEntry, FOMLink, FOMPerson, FOMService, FOMSource, FOMWorkspace

public class FOMExtensibleElement
extends FOMElement
implements ExtensibleElement


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.abdera.util.Constants
ACCEPT, AID, ALTERNATE, APP_MEDIA_TYPE, APP_NS, APP_NS_PRE_RFC, APP_PREFIX, ATITLE, ATOM_MEDIA_TYPE, ATOM_NS, AURI, AUTHOR, BASE, CAT_MEDIA_TYPE, CATEGORIES, CATEGORY, CLASS, COLLECTION, CONFIG_FACTORY, CONFIG_PARSER, CONFIG_PARSERFACTORY, CONFIG_STREAMWRITER, CONFIG_WRITER, CONFIG_WRITERFACTORY, CONFIG_XPATH, CONTENT, CONTRIBUTOR, CONTROL, CONTROL_NS, CONTROL_PREFIX, DEFAULT_FACTORY, DEFAULT_PARSER, DEFAULT_PARSERFACTORY, DEFAULT_STREAMWRITER, DEFAULT_WRITER, DEFAULT_WRITERFACTORY, DEFAULT_XPATH, DIV, DRAFT, EDITED, EMAIL, ENTRY, ENTRY_MEDIA_TYPE, FEED, FEED_MEDIA_TYPE, FIXED, GENERATOR, HREF, HREFLANG, HTML, ICON, ID, LABEL, LANG, LENGTH, LINK, LN_ACCEPT, LN_ALTERNATE, LN_ALTERNATE_MULTIPART_RELATED, LN_AUTHOR, LN_BASE, LN_CATEGORIES, LN_CATEGORY, LN_CLASS, LN_COLLECTION, LN_CONTENT, LN_CONTRIBUTOR, LN_CONTROL, LN_DIV, LN_DRAFT, LN_EDITED, LN_EMAIL, LN_ENTRY, LN_FEED, LN_FIXED, LN_GENERATOR, LN_HREF, LN_HREFLANG, LN_ICON, LN_ID, LN_LABEL, LN_LANG, LN_LENGTH, LN_LINK, LN_LOGO, LN_NAME, LN_PUBLISHED, LN_REL, LN_RIGHTS, LN_SCHEME, LN_SERVICE, LN_SOURCE, LN_SPACE, LN_SRC, LN_SUBTITLE, LN_SUMMARY, LN_TERM, LN_TITLE, LN_TYPE, LN_UPDATED, LN_URI, LN_VERSION, LN_WORKSPACE, LOGO, MULTIPART_RELATED_TYPE, NAME, NAMED_PARSER, NAMED_WRITER, NO, PRE_RFC_ACCEPT, PRE_RFC_CATEGORIES, PRE_RFC_COLLECTION, PRE_RFC_CONTROL, PRE_RFC_DRAFT, PRE_RFC_EDITED, PRE_RFC_SERVICE, PRE_RFC_WORKSPACE, PREFIX, PREFIXED_TITLE, PUBLISHED, REL, RIGHTS, SCHEME, SERVICE, SOURCE, SPACE, SRC, STREAM_WRITER, SUBTITLE, SUMMARY, TERM, TEXT, TITLE, TYPE, UPDATED, URI, VERSION, WORKSPACE, XHTML, XHTML_NS, XML, XML_MEDIA_TYPE, XML_NS, YES
 
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
  FOMExtensibleElement(QName qname)
           
protected FOMExtensibleElement(QName qname, org.apache.axiom.om.OMContainer parent, org.apache.axiom.om.OMFactory factory)
           
protected FOMExtensibleElement(QName qname, org.apache.axiom.om.OMContainer parent, org.apache.axiom.om.OMFactory factory, org.apache.axiom.om.OMXMLParserWrapper builder)
           
protected FOMExtensibleElement(String name, org.apache.axiom.om.OMNamespace namespace, org.apache.axiom.om.OMContainer parent, org.apache.axiom.om.OMFactory factory)
           
 
Method Summary
<T extends ExtensibleElement>
T
addExtension(Element extension)
          Adds an individual extension element
<T extends ExtensibleElement>
T
addExtension(Element extension, Element before)
          Adds an individual extension element before the specified element
<T extends Element>
T
addExtension(QName qname)
          Adds an individual extension element
<T extends Element>
T
addExtension(QName qname, QName before)
          Adds an individual extension element
<T extends Element>
T
addExtension(String namespace, String localpart, String prefix)
          Adds an individual extension element
 void addExtensions(List<Element> extensions)
           
 Element addSimpleExtension(QName qname, String value)
          Adds a simple extension (text content only)
 Element addSimpleExtension(String namespace, String localPart, String prefix, String value)
          Adds a simple extension (text content only)
<T extends Element>
T
getExtension(Class<T> _class)
          Trick using Generics to find an extension element without having to pass in it's QName
<T extends Element>
T
getExtension(QName qname)
          Returns the first extension element with the XML qualified name
 List<Element> getExtensions()
          Returns the complete set of extension elements
<T extends Element>
List<T>
getExtensions(QName qname)
          Returns the complete set of extension elements using the specified XML qualified name
 List<Element> getExtensions(String uri)
          Returns the complete set of extension elements using the specified XML Namespace URI
 String getSimpleExtension(QName qname)
          Gets the value of a simple extension
 String getSimpleExtension(String namespace, String localPart, String prefix)
          Gets the value of a simple extension
 
Methods inherited from class org.apache.abdera.parser.stax.FOMElement
_copyElement, _create, _getChildrenAsSet, _getElementValue, _getStringValue, _getUriValue, _parse, _removeAllChildren, _removeChildren, _resolve, _setChild, _setElementValue, addComment, clone, complete, declareIfNecessary, declareNS, getAttributes, getAttributeValue, getAttributeValue, getBaseUri, getDefaultWriterOptions, getDocument, getElements, getExtensionAttributes, getFactory, getFirstChild, getFirstChild, getLanguage, getLanguageTag, getLocale, getMustPreserveWhitespace, getNamespaces, getNextSibling, getNextSibling, getParentElement, getPreviousSibling, getPreviousSibling, getResolvedBaseUri, getText, getText, getTextElement, getWrapped, isDeclared, iterator, removeAttribute, removeAttribute, selectLink, setAttributeValue, setAttributeValue, setBaseUri, setBaseUri, setHtmlText, setLanguage, setMustPreserveWhitespace, setParentDocument, setParentElement, setText, setText, setTextElement, setTextText, setXhtmlText, setXhtmlText, toFormattedString, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo
 
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
declareNS, discard, getAttributes, getAttributeValue, getAttributeValue, getBaseUri, getDocument, getElements, getExtensionAttributes, getFirstChild, getFirstChild, getLanguage, getLanguageTag, getLocale, getMustPreserveWhitespace, getNamespaces, getNextSibling, getNextSibling, getParentElement, getPreviousSibling, getPreviousSibling, getQName, getResolvedBaseUri, getText, removeAttribute, removeAttribute, setAttributeValue, setAttributeValue, setBaseUri, setBaseUri, setLanguage, setMustPreserveWhitespace, setParentElement, setText, setText
 
Methods inherited from interface org.apache.abdera.model.Base
addComment, clone, complete, getDefaultWriterOptions, getFactory, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo
 
Methods inherited from interface java.lang.Iterable
iterator
 
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

FOMExtensibleElement

public FOMExtensibleElement(QName qname)

FOMExtensibleElement

protected FOMExtensibleElement(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
Throws:
org.apache.axiom.om.OMException

FOMExtensibleElement

protected FOMExtensibleElement(QName qname,
                               org.apache.axiom.om.OMContainer parent,
                               org.apache.axiom.om.OMFactory factory)
                        throws org.apache.axiom.om.OMException
Throws:
org.apache.axiom.om.OMException

FOMExtensibleElement

protected FOMExtensibleElement(QName qname,
                               org.apache.axiom.om.OMContainer parent,
                               org.apache.axiom.om.OMFactory factory,
                               org.apache.axiom.om.OMXMLParserWrapper builder)
                        throws org.apache.axiom.om.OMException
Throws:
org.apache.axiom.om.OMException
Method Detail

getExtensions

public List<Element> getExtensions()
Description copied from interface: ExtensibleElement
Returns the complete set of extension elements

Specified by:
getExtensions in interface ExtensibleElement
Returns:
a listing of extensions

getExtensions

public List<Element> getExtensions(String uri)
Description copied from interface: ExtensibleElement
Returns the complete set of extension elements using the specified XML Namespace URI

Specified by:
getExtensions in interface ExtensibleElement
Parameters:
uri - A namespace URI
Returns:
A listing of extensions using the specified XML namespace

getExtensions

public <T extends Element> List<T> getExtensions(QName qname)
Description copied from interface: ExtensibleElement
Returns the complete set of extension elements using the specified XML qualified name

Specified by:
getExtensions in interface ExtensibleElement
Parameters:
qname - An XML QName
Returns:
A listing of extensions with the specified QName

getExtension

public <T extends Element> T getExtension(QName qname)
Description copied from interface: ExtensibleElement
Returns the first extension element with the XML qualified name

Specified by:
getExtension in interface ExtensibleElement
Parameters:
qname - An XML QName
Returns:
An extension with the specified qname

addExtension

public <T extends ExtensibleElement> T addExtension(Element extension)
Description copied from interface: ExtensibleElement
Adds an individual extension element

Specified by:
addExtension in interface ExtensibleElement
Parameters:
extension - An extension element to add

addExtension

public <T extends Element> T addExtension(QName qname)
Description copied from interface: ExtensibleElement
Adds an individual extension element

Specified by:
addExtension in interface ExtensibleElement
Parameters:
qname - An extension element to create
Returns:
The newly created extension element

addExtension

public <T extends Element> T addExtension(String namespace,
                                          String localpart,
                                          String prefix)
Description copied from interface: ExtensibleElement
Adds an individual extension element

Specified by:
addExtension in interface ExtensibleElement
Parameters:
namespace - An XML namespace
localpart - A localname
prefix - A XML namespace prefix
Returns:
The newly creatd extension element

addSimpleExtension

public Element addSimpleExtension(QName qname,
                                  String value)
Description copied from interface: ExtensibleElement
Adds a simple extension (text content only)

Specified by:
addSimpleExtension in interface ExtensibleElement
Parameters:
qname - An XML QName
value - The simple text value of the element
Returns:
The newly created extension element

addSimpleExtension

public Element addSimpleExtension(String namespace,
                                  String localPart,
                                  String prefix,
                                  String value)
Description copied from interface: ExtensibleElement
Adds a simple extension (text content only)

Specified by:
addSimpleExtension in interface ExtensibleElement
Parameters:
namespace - An XML namespace
localPart - A local name
prefix - A namespace prefix
value - The simple text value
Returns:
The newly created extension element

getSimpleExtension

public String getSimpleExtension(QName qname)
Description copied from interface: ExtensibleElement
Gets the value of a simple extension

Specified by:
getSimpleExtension in interface ExtensibleElement
Parameters:
qname - An XML QName
Returns:
The string value of the extension

getSimpleExtension

public String getSimpleExtension(String namespace,
                                 String localPart,
                                 String prefix)
Description copied from interface: ExtensibleElement
Gets the value of a simple extension

Specified by:
getSimpleExtension in interface ExtensibleElement
Parameters:
namespace - An XML namespace
localPart - A localname
prefix - A namespace prefix
Returns:
The string value of the extension

addExtensions

public void addExtensions(List<Element> extensions)

getExtension

public <T extends Element> T getExtension(Class<T> _class)
Trick using Generics to find an extension element without having to pass in it's QName

Specified by:
getExtension in interface ExtensibleElement
Parameters:
_class - The implementation class of the extension
Returns:
The extension element

addExtension

public <T extends ExtensibleElement> T addExtension(Element extension,
                                                    Element before)
Description copied from interface: ExtensibleElement
Adds an individual extension element before the specified element

Specified by:
addExtension in interface ExtensibleElement

addExtension

public <T extends Element> T addExtension(QName qname,
                                          QName before)
Description copied from interface: ExtensibleElement
Adds an individual extension element

Specified by:
addExtension in interface ExtensibleElement
Parameters:
qname - An extension element to create
Returns:
The newly created extension element


Copyright © 2006-2012 Apache Software Foundation. All Rights Reserved.