org.apache.abdera.parser.stax
Class FOMLink

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
                  extended by org.apache.abdera.parser.stax.FOMLink
All Implemented Interfaces:
Cloneable, Iterable<Element>, Base, Element, ExtensibleElement, Link, 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

public class FOMLink
extends FOMExtensibleElement
implements Link


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.abdera.model.Link
IANA_BASE, REL_ALTERNATE, REL_ALTERNATE_IANA, REL_CURRENT, REL_CURRENT_IANA, REL_EDIT, REL_EDIT_IANA, REL_EDIT_MEDIA, REL_EDIT_MEDIA_IANA, REL_ENCLOSURE, REL_ENCLOSURE_IANA, REL_FIRST, REL_FIRST_IANA, REL_LAST, REL_LAST_IANA, REL_LICENSE, REL_LICENSE_IANA, REL_NEXT, REL_NEXT_IANA, REL_PAYMENT, REL_PAYMENT_IANA, REL_PREVIOUS, REL_PREVIOUS_IANA, REL_RELATED, REL_RELATED_IANA, REL_REPLIES, REL_REPLIES_IANA, REL_SELF, REL_SELF_IANA, REL_SERVICE, REL_SERVICE_IANA, REL_VIA, REL_VIA_IANA
 
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
  FOMLink()
           
protected FOMLink(org.apache.axiom.om.OMContainer parent, org.apache.axiom.om.OMFactory factory)
           
protected FOMLink(org.apache.axiom.om.OMContainer parent, org.apache.axiom.om.OMFactory factory, org.apache.axiom.om.OMXMLParserWrapper builder)
           
protected FOMLink(QName qname, org.apache.axiom.om.OMContainer parent, org.apache.axiom.om.OMFactory factory)
           
protected FOMLink(QName qname, org.apache.axiom.om.OMContainer parent, org.apache.axiom.om.OMFactory factory, org.apache.axiom.om.OMXMLParserWrapper builder)
           
  FOMLink(String href)
           
protected FOMLink(String name, org.apache.axiom.om.OMNamespace namespace, org.apache.axiom.om.OMContainer parent, org.apache.axiom.om.OMFactory factory)
           
  FOMLink(String href, String rel)
           
 
Method Summary
 IRI getHref()
          RFC4287: The "href" attribute contains the link's IRI.
 String getHrefLang()
          RFC4287: The "hreflang" attribute's content describes the language of the resource pointed to by the href attribute.
 long getLength()
          RFC4287: The "length" attribute indicates an advisory length of the linked content in octets; it is a hint about the content length of the representation returned when the URI in the href attribute is mapped to a IRI and dereferenced.
 javax.activation.MimeType getMimeType()
          RFC4287: On the link element, the "type" attribute's value is an advisory media type: it is a hint about the type of the representation that is expected to be returned when the value of the href attribute is dereferenced.
 String getRel()
           RFC4287: atom:link elements MAY have a "rel" attribute that indicates the link relation type.
static String getRelEquiv(String val)
           
 IRI getResolvedHref()
          Returns the value of the link's href attribute resolved against the in-scope Base IRI
 String getTitle()
          RFC4287: The "title" attribute conveys human-readable information about the link.
 String getValue()
           
 Link setHref(String href)
          RFC4287: The "href" attribute contains the link's IRI.
 Link setHrefLang(String lang)
          RFC4287: The "hreflang" attribute's content describes the language of the resource pointed to by the href attribute.
 Link setLength(long length)
          RFC4287: The "length" attribute indicates an advisory length of the linked content in octets; it is a hint about the content length of the representation returned when the IRI in the href attribute is mapped to a URI and dereferenced.
 void setMimeType(javax.activation.MimeType type)
           
 Link setMimeType(String type)
          RFC4287: On the link element, the "type" attribute's value is an advisory media type: it is a hint about the type of the representation that is expected to be returned when the value of the href attribute is dereferenced.
 Link setRel(String rel)
           RFC4287: atom:link elements MAY have a "rel" attribute that indicates the link relation type.
 Link setTitle(String title)
          RFC4287: The "title" attribute conveys human-readable information about the link.
 void setValue(String value)
           
 
Methods inherited from class org.apache.abdera.parser.stax.FOMExtensibleElement
addExtension, addExtension, addExtension, addExtension, addExtension, addExtensions, addSimpleExtension, addSimpleExtension, getExtension, getExtension, getExtensions, getExtensions, getExtensions, getSimpleExtension, getSimpleExtension
 
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.ExtensibleElement
addExtension, addExtension, addExtension, addExtension, addExtension, addSimpleExtension, addSimpleExtension, getExtension, getExtension, getExtensions, getExtensions, getExtensions, getSimpleExtension, getSimpleExtension
 
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

FOMLink

public FOMLink()

FOMLink

public FOMLink(String href)

FOMLink

public FOMLink(String href,
               String rel)

FOMLink

protected FOMLink(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

FOMLink

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

FOMLink

protected FOMLink(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

FOMLink

protected FOMLink(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

FOMLink

protected FOMLink(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

getHref

public IRI getHref()
Description copied from interface: Link
RFC4287: The "href" attribute contains the link's IRI. atom:link elements MUST have an href attribute, whose value MUST be a IRI reference [RFC3987].

Specified by:
getHref in interface Link
Returns:
The href IRI value

getResolvedHref

public IRI getResolvedHref()
Description copied from interface: Link
Returns the value of the link's href attribute resolved against the in-scope Base IRI

Specified by:
getResolvedHref in interface Link
Returns:
The href IRI value

setHref

public Link setHref(String href)
Description copied from interface: Link
RFC4287: The "href" attribute contains the link's IRI. atom:link elements MUST have an href attribute, whose value MUST be a IRI reference [RFC3987].

Specified by:
setHref in interface Link
Parameters:
href - The href IRI

getRel

public String getRel()
Description copied from interface: Link

RFC4287: atom:link elements MAY have a "rel" attribute that indicates the link relation type. If the "rel" attribute is not present, the link element MUST be interpreted as if the link relation type is "alternate"... The value of "rel" MUST be a string that is non-empty and matches either the "isegment-nz-nc" or the "IRI" production in [RFC3987]. Note that use of a relative reference other than a simple name is not allowed. If a name is given, implementations MUST consider the link relation type equivalent to the same name registered within the IANA Registry of Link Relations (Section 7), and thus to the IRI that would be obtained by appending the value of the rel attribute to the string "http://www.iana.org/assignments/relation/". The value of "rel" describes the meaning of the link, but does not impose any behavioral requirements on Atom Processors.

Specified by:
getRel in interface Link
Returns:
The rel attribute value

setRel

public Link setRel(String rel)
Description copied from interface: Link

RFC4287: atom:link elements MAY have a "rel" attribute that indicates the link relation type. If the "rel" attribute is not present, the link element MUST be interpreted as if the link relation type is "alternate"... The value of "rel" MUST be a string that is non-empty and matches either the "isegment-nz-nc" or the "IRI" production in [RFC3987]. Note that use of a relative reference other than a simple name is not allowed. If a name is given, implementations MUST consider the link relation type equivalent to the same name registered within the IANA Registry of Link Relations (Section 7), and thus to the IRI that would be obtained by appending the value of the rel attribute to the string "http://www.iana.org/assignments/relation/". The value of "rel" describes the meaning of the link, but does not impose any behavioral requirements on Atom Processors.

Specified by:
setRel in interface Link
Parameters:
rel - The rel attribute value

getMimeType

public javax.activation.MimeType getMimeType()
Description copied from interface: Link
RFC4287: On the link element, the "type" attribute's value is an advisory media type: it is a hint about the type of the representation that is expected to be returned when the value of the href attribute is dereferenced. Note that the type attribute does not override the actual media type returned with the representation. Link elements MAY have a type attribute, whose value MUST conform to the syntax of a MIME media type [MIMEREG].

Specified by:
getMimeType in interface Link
Returns:
The value of the type attribute

setMimeType

public void setMimeType(javax.activation.MimeType type)

setMimeType

public Link setMimeType(String type)
Description copied from interface: Link
RFC4287: On the link element, the "type" attribute's value is an advisory media type: it is a hint about the type of the representation that is expected to be returned when the value of the href attribute is dereferenced. Note that the type attribute does not override the actual media type returned with the representation. Link elements MAY have a type attribute, whose value MUST conform to the syntax of a MIME media type [MIMEREG].

Specified by:
setMimeType in interface Link
Parameters:
type - The link type

getHrefLang

public String getHrefLang()
Description copied from interface: Link
RFC4287: The "hreflang" attribute's content describes the language of the resource pointed to by the href attribute. When used together with the rel="alternate", it implies a translated version of the entry. Link elements MAY have an hreflang attribute, whose value MUST be a language tag [RFC3066].

Specified by:
getHrefLang in interface Link
Returns:
The hreflang value

setHrefLang

public Link setHrefLang(String lang)
Description copied from interface: Link
RFC4287: The "hreflang" attribute's content describes the language of the resource pointed to by the href attribute. When used together with the rel="alternate", it implies a translated version of the entry. Link elements MAY have an hreflang attribute, whose value MUST be a language tag [RFC3066].

Specified by:
setHrefLang in interface Link
Parameters:
lang - The hreflang value

getTitle

public String getTitle()
Description copied from interface: Link
RFC4287: The "title" attribute conveys human-readable information about the link. The content of the "title" attribute is Language-Sensitive. Entities such as "&amp;" and "&lt;" represent their corresponding characters ("&" and "<", respectively), not markup. Link elements MAY have a title attribute.

Specified by:
getTitle in interface Link
Returns:
The title attribute

setTitle

public Link setTitle(String title)
Description copied from interface: Link
RFC4287: The "title" attribute conveys human-readable information about the link. The content of the "title" attribute is Language-Sensitive. Entities such as "&amp;" and "&lt;" represent their corresponding characters ("&" and "<", respectively), not markup. Link elements MAY have a title attribute.

Specified by:
setTitle in interface Link
Parameters:
title - The title attribute

getLength

public long getLength()
Description copied from interface: Link
RFC4287: The "length" attribute indicates an advisory length of the linked content in octets; it is a hint about the content length of the representation returned when the URI in the href attribute is mapped to a IRI and dereferenced. Note that the length attribute does not override the actual content length of the representation as reported by the underlying protocol. Link elements MAY have a length attribute.

Specified by:
getLength in interface Link
Returns:
The length attribute value

setLength

public Link setLength(long length)
Description copied from interface: Link
RFC4287: The "length" attribute indicates an advisory length of the linked content in octets; it is a hint about the content length of the representation returned when the IRI in the href attribute is mapped to a URI and dereferenced. Note that the length attribute does not override the actual content length of the representation as reported by the underlying protocol. Link elements MAY have a length attribute.

Specified by:
setLength in interface Link
Parameters:
length - The length attribute value

getRelEquiv

public static final String getRelEquiv(String val)

getValue

public String getValue()

setValue

public void setValue(String value)


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