Package org.apache.abdera.model
Class ElementWrapper
- java.lang.Object
-
- org.apache.abdera.model.ElementWrapper
-
- Direct Known Subclasses:
DateTimeWrapper
,ExtensibleElementWrapper
,MediaAdult
,MediaCategory
,MediaCopyright
,MediaCredit
,MediaDescription
,MediaHash
,MediaKeywords
,MediaPlayer
,MediaRating
,MediaRestriction
,MediaText
,MediaThumbnail
,MediaTitle
@Deprecated(since="2021-07-29") public abstract class ElementWrapper extends java.lang.Object implements Element
Deprecated.This API is deprecated as Apache Abdera is a retired project since 2017.Base implementation used for static extensions.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description <T extends Base>
TaddComment(java.lang.String value)
Deprecated.Add an XML comment to this Basejava.lang.Object
clone()
Deprecated.Clone this Base<T extends Base>
Tcomplete()
Deprecated.Ensure that the underlying streams are fully parsed.<T extends Element>
TdeclareNS(java.lang.String uri, java.lang.String prefix)
Deprecated.Declare a namespacevoid
discard()
Deprecated.Removes this element from its current documentboolean
equals(java.lang.Object other)
Deprecated.java.util.List<javax.xml.namespace.QName>
getAttributes()
Deprecated.Returns a listing of all attributes on this elementjava.lang.String
getAttributeValue(java.lang.String name)
Deprecated.Returns the value of the named attributejava.lang.String
getAttributeValue(javax.xml.namespace.QName qname)
Deprecated.Returns the value of the named attributeIRI
getBaseUri()
Deprecated.Returns the value of this element'sxml:base
attribute or null ifxml:base
is undefined.WriterOptions
getDefaultWriterOptions()
Deprecated.Get the default WriterOptions for this object<T extends Element>
Document<T>getDocument()
Deprecated.Returns the document to which this element belongs<T extends Element>
java.util.List<T>getElements()
Deprecated.Return a listing of this elements child elementsjava.util.List<javax.xml.namespace.QName>
getExtensionAttributes()
Deprecated.Returns a listing of extension attributes on this element (extension attributes are attributes whose namespace URI is different than the elements)Factory
getFactory()
Deprecated.Get the Factory used to create this Base<T extends Element>
TgetFirstChild()
Deprecated.Get the first child element<T extends Element>
TgetFirstChild(javax.xml.namespace.QName qname)
Deprecated.Get the first child element with the given QNameElement
getInternal()
Deprecated.java.lang.String
getLanguage()
Deprecated.Returns the value of this elementsxml:lang
attribute or null ifxml:lang
is undefined.Lang
getLanguageTag()
Deprecated.Returns the value of the xml:lang attribute as a Lang objectjava.util.Locale
getLocale()
Deprecated.Returns a Locale object created from thexml:lang
attributeboolean
getMustPreserveWhitespace()
Deprecated.Return true if insignificant whitespace must be preservedjava.util.Map<java.lang.String,java.lang.String>
getNamespaces()
Deprecated.Return a map listing the xml namespaces declared for this element<T extends Element>
TgetNextSibling()
Deprecated.Get the element following this one<T extends Element>
TgetNextSibling(javax.xml.namespace.QName qname)
Deprecated.Get the first following sibling with the specified QName<T extends Base>
TgetParentElement()
Deprecated.Return this Element's parent element or document<T extends Element>
TgetPreviousSibling()
Deprecated.Get the element preceding this one<T extends Element>
TgetPreviousSibling(javax.xml.namespace.QName qname)
Deprecated.Get the first previous sibling with the specified QNamejavax.xml.namespace.QName
getQName()
Deprecated.Return the XML QName of this elementIRI
getResolvedBaseUri()
Deprecated.Returns the current in-scope, fully qualified Base URI for this element.java.lang.String
getText()
Deprecated.Returns the Text value of this elementint
hashCode()
Deprecated.java.util.Iterator<Element>
iterator()
Deprecated.<T extends Element>
TremoveAttribute(java.lang.String name)
Deprecated.Remove the named attribute<T extends Element>
TremoveAttribute(javax.xml.namespace.QName qname)
Deprecated.Remove the named Attribute<T extends Element>
TsetAttributeValue(java.lang.String name, java.lang.String value)
Deprecated.Sets the value of the named attribute<T extends Element>
TsetAttributeValue(javax.xml.namespace.QName qname, java.lang.String value)
Deprecated.Sets the value of the named attribute<T extends Element>
TsetBaseUri(java.lang.String base)
Deprecated.Sets the value of this element'sxml:base
attribute.<T extends Element>
TsetBaseUri(IRI base)
Deprecated.Sets the value of this element'sxml:base
attribute.<T extends Element>
TsetLanguage(java.lang.String language)
Deprecated.Sets the value of this elementsxml:lang
attribute.<T extends Element>
TsetMustPreserveWhitespace(boolean preserve)
Deprecated.Set to true to preserve insignificant whitespace<T extends Element>
TsetParentElement(Element parent)
Deprecated.Set this Element's parent elementvoid
setText(java.lang.String text)
Deprecated.Set the Text value of this element<T extends Element>
TsetText(javax.activation.DataHandler handler)
Deprecated.Set the Text value of this element using the data handlerjava.lang.String
toString()
Deprecated.void
writeTo(java.io.OutputStream out)
Deprecated.Serializes the model component out to the specified streamvoid
writeTo(java.io.OutputStream out, WriterOptions options)
Deprecated.Serializes the model component out to the specified streamvoid
writeTo(java.io.Writer writer)
Deprecated.Serializes the model component out to the specified writervoid
writeTo(java.io.Writer out, WriterOptions options)
Deprecated.Serializes the model component out to the specified java.io.Writervoid
writeTo(java.lang.String writer, java.io.OutputStream out)
Deprecated.Serializes the model component out to the specified stream using the given Abdera writervoid
writeTo(java.lang.String writer, java.io.OutputStream out, WriterOptions options)
Deprecated.Serializes the model component out to the specified stream using the given abdera writervoid
writeTo(java.lang.String writer, java.io.Writer out)
Deprecated.Serializes the model component out to the specified java.io.Writer using the given Abdera writervoid
writeTo(java.lang.String writer, java.io.Writer out, WriterOptions options)
Deprecated.Serializes the model component out to the specified java.io.Writer using the given abdera writervoid
writeTo(Writer writer, java.io.OutputStream out)
Deprecated.Serializes the model component out to the specified stream using the given Abdera writervoid
writeTo(Writer writer, java.io.OutputStream out, WriterOptions options)
Deprecated.Serializes the model component out to the specified stream using the given abdera writervoid
writeTo(Writer writer, java.io.Writer out)
Deprecated.Serializes the model component out to the specified java.io.Writer using the given Abdera writervoid
writeTo(Writer writer, java.io.Writer out, WriterOptions options)
Deprecated.Serializes the model component out to the specified java.io.Writer using the given abdera writer
-
-
-
Method Detail
-
addComment
public <T extends Base> T addComment(java.lang.String value)
Deprecated.Description copied from interface:Base
Add an XML comment to this Base- Specified by:
addComment
in interfaceBase
- Parameters:
value
- The text value of the comment
-
clone
public java.lang.Object clone()
Deprecated.Description copied from interface:Base
Clone this Base
-
declareNS
public <T extends Element> T declareNS(java.lang.String uri, java.lang.String prefix)
Deprecated.Description copied from interface:Element
Declare a namespace
-
discard
public void discard()
Deprecated.Description copied from interface:Element
Removes this element from its current document
-
getAttributes
public java.util.List<javax.xml.namespace.QName> getAttributes()
Deprecated.Description copied from interface:Element
Returns a listing of all attributes on this element- Specified by:
getAttributes
in interfaceElement
- Returns:
- The listing of attributes for this element
-
getAttributeValue
public java.lang.String getAttributeValue(javax.xml.namespace.QName qname)
Deprecated.Description copied from interface:Element
Returns the value of the named attribute- Specified by:
getAttributeValue
in interfaceElement
- Parameters:
qname
- The XML QName of the attribute- Returns:
- The value of the attribute
-
getAttributeValue
public java.lang.String getAttributeValue(java.lang.String name)
Deprecated.Description copied from interface:Element
Returns the value of the named attribute- Specified by:
getAttributeValue
in interfaceElement
- Parameters:
name
- The name of the attribute- Returns:
- The value of the attribute
-
getBaseUri
public IRI getBaseUri()
Deprecated.Description copied from interface:Element
Returns the value of this element'sxml:base
attribute or null ifxml:base
is undefined.- Specified by:
getBaseUri
in interfaceElement
- Returns:
- The Base URI
-
getDocument
public <T extends Element> Document<T> getDocument()
Deprecated.Description copied from interface:Element
Returns the document to which this element belongs- Specified by:
getDocument
in interfaceElement
- Returns:
- The Document to which this element belongs
-
getExtensionAttributes
public java.util.List<javax.xml.namespace.QName> getExtensionAttributes()
Deprecated.Description copied from interface:Element
Returns a listing of extension attributes on this element (extension attributes are attributes whose namespace URI is different than the elements)- Specified by:
getExtensionAttributes
in interfaceElement
- Returns:
- The listing non-Atom attributes
-
getFactory
public Factory getFactory()
Deprecated.Description copied from interface:Base
Get the Factory used to create this Base- Specified by:
getFactory
in interfaceBase
- Returns:
- The Factory used to create this object
-
getFirstChild
public <T extends Element> T getFirstChild()
Deprecated.Description copied from interface:Element
Get the first child element- Specified by:
getFirstChild
in interfaceElement
- Returns:
- The first child
-
getFirstChild
public <T extends Element> T getFirstChild(javax.xml.namespace.QName qname)
Deprecated.Description copied from interface:Element
Get the first child element with the given QName- Specified by:
getFirstChild
in interfaceElement
- Parameters:
qname
- The XML QName of the sibling to find- Returns:
- The matching element
-
getLanguage
public java.lang.String getLanguage()
Deprecated.Description copied from interface:Element
Returns the value of this elementsxml:lang
attribute or null ifxml:lang
is undefined.- Specified by:
getLanguage
in interfaceElement
- Returns:
- The xml:lang value
-
getLanguageTag
public Lang getLanguageTag()
Deprecated.Description copied from interface:Element
Returns the value of the xml:lang attribute as a Lang object- Specified by:
getLanguageTag
in interfaceElement
-
getLocale
public java.util.Locale getLocale()
Deprecated.Description copied from interface:Element
Returns a Locale object created from thexml:lang
attribute
-
getNextSibling
public <T extends Element> T getNextSibling()
Deprecated.Description copied from interface:Element
Get the element following this one- Specified by:
getNextSibling
in interfaceElement
- Returns:
- The following sibling
-
getNextSibling
public <T extends Element> T getNextSibling(javax.xml.namespace.QName qname)
Deprecated.Description copied from interface:Element
Get the first following sibling with the specified QName- Specified by:
getNextSibling
in interfaceElement
- Parameters:
qname
- The XML QName of the sibling to find- Returns:
- The matching element
-
getParentElement
public <T extends Base> T getParentElement()
Deprecated.Description copied from interface:Element
Return this Element's parent element or document- Specified by:
getParentElement
in interfaceElement
- Returns:
- The parent
-
getPreviousSibling
public <T extends Element> T getPreviousSibling()
Deprecated.Description copied from interface:Element
Get the element preceding this one- Specified by:
getPreviousSibling
in interfaceElement
- Returns:
- The preceding sibling
-
getPreviousSibling
public <T extends Element> T getPreviousSibling(javax.xml.namespace.QName qname)
Deprecated.Description copied from interface:Element
Get the first previous sibling with the specified QName- Specified by:
getPreviousSibling
in interfaceElement
- Parameters:
qname
- The XML QName of the sibling to find- Returns:
- The matching element
-
getQName
public javax.xml.namespace.QName getQName()
Deprecated.Description copied from interface:Element
Return the XML QName of this element
-
getResolvedBaseUri
public IRI getResolvedBaseUri()
Deprecated.Description copied from interface:Element
Returns the current in-scope, fully qualified Base URI for this element.- Specified by:
getResolvedBaseUri
in interfaceElement
-
getText
public java.lang.String getText()
Deprecated.Description copied from interface:Element
Returns the Text value of this element
-
removeAttribute
public <T extends Element> T removeAttribute(javax.xml.namespace.QName qname)
Deprecated.Description copied from interface:Element
Remove the named Attribute- Specified by:
removeAttribute
in interfaceElement
- Parameters:
qname
- The XML QName of the attribute to remove
-
removeAttribute
public <T extends Element> T removeAttribute(java.lang.String name)
Deprecated.Description copied from interface:Element
Remove the named attribute- Specified by:
removeAttribute
in interfaceElement
- Parameters:
name
- The name of the attribute to remove
-
setAttributeValue
public <T extends Element> T setAttributeValue(javax.xml.namespace.QName qname, java.lang.String value)
Deprecated.Description copied from interface:Element
Sets the value of the named attribute- Specified by:
setAttributeValue
in interfaceElement
- Parameters:
qname
- The XML QName of the attributevalue
- The value of the attribute
-
setAttributeValue
public <T extends Element> T setAttributeValue(java.lang.String name, java.lang.String value)
Deprecated.Description copied from interface:Element
Sets the value of the named attribute- Specified by:
setAttributeValue
in interfaceElement
- Parameters:
name
- The name of the attributevalue
- The value of the attribute
-
setBaseUri
public <T extends Element> T setBaseUri(IRI base)
Deprecated.Description copied from interface:Element
Sets the value of this element'sxml:base
attribute.- Specified by:
setBaseUri
in interfaceElement
- Parameters:
base
- The IRI base value
-
setBaseUri
public <T extends Element> T setBaseUri(java.lang.String base)
Deprecated.Description copied from interface:Element
Sets the value of this element'sxml:base
attribute.- Specified by:
setBaseUri
in interfaceElement
- Parameters:
base
- The Base IRI
-
setLanguage
public <T extends Element> T setLanguage(java.lang.String language)
Deprecated.Description copied from interface:Element
Sets the value of this elementsxml:lang
attribute.- Specified by:
setLanguage
in interfaceElement
- Parameters:
language
- the value of the xml:lang element
-
setParentElement
public <T extends Element> T setParentElement(Element parent)
Deprecated.Description copied from interface:Element
Set this Element's parent element- Specified by:
setParentElement
in interfaceElement
- Parameters:
parent
- The parent element
-
setText
public void setText(java.lang.String text)
Deprecated.Description copied from interface:Element
Set the Text value of this element
-
setText
public <T extends Element> T setText(javax.activation.DataHandler handler)
Deprecated.Description copied from interface:Element
Set the Text value of this element using the data handler
-
writeTo
public void writeTo(java.io.OutputStream out) throws java.io.IOException
Deprecated.Description copied from interface:Base
Serializes the model component out to the specified stream
-
writeTo
public void writeTo(java.io.Writer writer) throws java.io.IOException
Deprecated.Description copied from interface:Base
Serializes the model component out to the specified writer
-
equals
public boolean equals(java.lang.Object other)
Deprecated.- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
Deprecated.- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
Deprecated.- Overrides:
hashCode
in classjava.lang.Object
-
getInternal
public Element getInternal()
Deprecated.
-
getElements
public <T extends Element> java.util.List<T> getElements()
Deprecated.Description copied from interface:Element
Return a listing of this elements child elements- Specified by:
getElements
in interfaceElement
-
getNamespaces
public java.util.Map<java.lang.String,java.lang.String> getNamespaces()
Deprecated.Description copied from interface:Element
Return a map listing the xml namespaces declared for this element- Specified by:
getNamespaces
in interfaceElement
-
getMustPreserveWhitespace
public boolean getMustPreserveWhitespace()
Deprecated.Description copied from interface:Element
Return true if insignificant whitespace must be preserved- Specified by:
getMustPreserveWhitespace
in interfaceElement
-
setMustPreserveWhitespace
public <T extends Element> T setMustPreserveWhitespace(boolean preserve)
Deprecated.Description copied from interface:Element
Set to true to preserve insignificant whitespace- Specified by:
setMustPreserveWhitespace
in interfaceElement
-
writeTo
public void writeTo(java.io.OutputStream out, WriterOptions options) throws java.io.IOException
Deprecated.Description copied from interface:Base
Serializes the model component out to the specified stream
-
writeTo
public void writeTo(Writer writer, java.io.OutputStream out, WriterOptions options) throws java.io.IOException
Deprecated.Description copied from interface:Base
Serializes the model component out to the specified stream using the given abdera writer
-
writeTo
public void writeTo(Writer writer, java.io.OutputStream out) throws java.io.IOException
Deprecated.Description copied from interface:Base
Serializes the model component out to the specified stream using the given Abdera writer
-
writeTo
public void writeTo(Writer writer, java.io.Writer out, WriterOptions options) throws java.io.IOException
Deprecated.Description copied from interface:Base
Serializes the model component out to the specified java.io.Writer using the given abdera writer
-
writeTo
public void writeTo(Writer writer, java.io.Writer out) throws java.io.IOException
Deprecated.Description copied from interface:Base
Serializes the model component out to the specified java.io.Writer using the given Abdera writer
-
writeTo
public void writeTo(java.lang.String writer, java.io.OutputStream out, WriterOptions options) throws java.io.IOException
Deprecated.Description copied from interface:Base
Serializes the model component out to the specified stream using the given abdera writer
-
writeTo
public void writeTo(java.lang.String writer, java.io.OutputStream out) throws java.io.IOException
Deprecated.Description copied from interface:Base
Serializes the model component out to the specified stream using the given Abdera writer
-
writeTo
public void writeTo(java.lang.String writer, java.io.Writer out, WriterOptions options) throws java.io.IOException
Deprecated.Description copied from interface:Base
Serializes the model component out to the specified java.io.Writer using the given abdera writer
-
writeTo
public void writeTo(java.lang.String writer, java.io.Writer out) throws java.io.IOException
Deprecated.Description copied from interface:Base
Serializes the model component out to the specified java.io.Writer using the given Abdera writer
-
writeTo
public void writeTo(java.io.Writer out, WriterOptions options) throws java.io.IOException
Deprecated.Description copied from interface:Base
Serializes the model component out to the specified java.io.Writer
-
getDefaultWriterOptions
public WriterOptions getDefaultWriterOptions()
Deprecated.Description copied from interface:Base
Get the default WriterOptions for this object- Specified by:
getDefaultWriterOptions
in interfaceBase
-
complete
public <T extends Base> T complete()
Deprecated.Description copied from interface:Base
Ensure that the underlying streams are fully parsed. Calling complete on an Element does not necessarily mean that the underlying stream is fully consumed, only that that particular element has been completely parsed.
-
-