org.apache.abdera.model
Interface ExtensibleElement

All Superinterfaces:
Base, Cloneable, Element, Iterable<Element>
All Known Subinterfaces:
Categories, Category, Collection, Control, Div, Entry, Feed, Link, Person, Service, Source, Workspace
All Known Implementing Classes:
Bar, Error, ExtensibleElementWrapper, PersonWrapper

public interface ExtensibleElement
extends Element

An abstract element that can be extended with namespaced child elements


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
 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)
          Find an extension by Class rather than 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 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
 

Method Detail

getExtensions

List<Element> getExtensions()
Returns the complete set of extension elements

Returns:
a listing of extensions

getExtensions

List<Element> getExtensions(String uri)
Returns the complete set of extension elements using the specified XML Namespace URI

Parameters:
uri - A namespace URI
Returns:
A listing of extensions using the specified XML namespace

getExtensions

<T extends Element> List<T> getExtensions(QName qname)
Returns the complete set of extension elements using the specified XML qualified name

Parameters:
qname - An XML QName
Returns:
A listing of extensions with the specified QName

getExtension

<T extends Element> T getExtension(QName qname)
Returns the first extension element with the XML qualified name

Parameters:
qname - An XML QName
Returns:
An extension with the specified qname

addExtension

<T extends ExtensibleElement> T addExtension(Element extension)
Adds an individual extension element

Parameters:
extension - An extension element to add

addExtension

<T extends ExtensibleElement> T addExtension(Element extension,
                                             Element before)
Adds an individual extension element before the specified element


addExtension

<T extends Element> T addExtension(QName qname)
Adds an individual extension element

Parameters:
qname - An extension element to create
Returns:
The newly created extension element

addExtension

<T extends Element> T addExtension(QName qname,
                                   QName before)
Adds an individual extension element

Parameters:
qname - An extension element to create
Returns:
The newly created extension element

addExtension

<T extends Element> T addExtension(String namespace,
                                   String localPart,
                                   String prefix)
Adds an individual extension element

Parameters:
namespace - An XML namespace
localPart - A localname
prefix - A XML namespace prefix
Returns:
The newly creatd extension element

addSimpleExtension

Element addSimpleExtension(QName qname,
                           String value)
Adds a simple extension (text content only)

Parameters:
qname - An XML QName
value - The simple text value of the element
Returns:
The newly created extension element

addSimpleExtension

Element addSimpleExtension(String namespace,
                           String localPart,
                           String prefix,
                           String value)
Adds a simple extension (text content only)

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

String getSimpleExtension(QName qname)
Gets the value of a simple extension

Parameters:
qname - An XML QName
Returns:
The string value of the extension

getSimpleExtension

String getSimpleExtension(String namespace,
                          String localPart,
                          String prefix)
Gets the value of a simple extension

Parameters:
namespace - An XML namespace
localPart - A localname
prefix - A namespace prefix
Returns:
The string value of the extension

getExtension

<T extends Element> T getExtension(Class<T> _class)
Find an extension by Class rather than QName

Parameters:
_class - The implementation class of the extension
Returns:
The extension element


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