XBRLAPI

A Java API for XBRL


org.xbrlapi.impl
Class MixedContentResourceImpl

java.lang.Object
  extended by org.xbrlapi.impl.FragmentImpl
      extended by org.xbrlapi.impl.ExtendedLinkContentImpl
          extended by org.xbrlapi.impl.ArcEndImpl
              extended by org.xbrlapi.impl.ResourceImpl
                  extended by org.xbrlapi.impl.MixedContentResourceImpl
All Implemented Interfaces:
Comparable<Fragment>, ArcEnd, ExtendedLinkContent, Fragment, MixedContentResource, Resource, Xlink
Direct Known Subclasses:
EntityResourceImpl, FootnoteResourceImpl, LabelResourceImpl, ReferenceResourceImpl

public class MixedContentResourceImpl
extends ResourceImpl
implements MixedContentResource

Author:
Geoffrey Shuetrim (geoff@galexy.net)

Field Summary
 
Fields inherited from class org.xbrlapi.impl.FragmentImpl
logger
 
Constructor Summary
MixedContentResourceImpl()
           
 
Method Summary
 String getAttribute(String name)
          Get a no-namespace attribute value.
 String getAttribute(String namespaceURI, String localname)
          Get a non-xlink attribute value.
 NodeList getContent()
          Get the value of the resource as a NodeList containing all of the children elements and text nodes nested in the resource.
 String getLanguage()
          Get the value of the xml:lang attribute on the resource.
protected  URI getTargetDocumentURI(URI uri)
          Get the URI of the document containing the fragment targetted by the supplied URI.
protected  String getTargetPointerValue(String pointer)
          Get the value of the XPointer that corresponds to the XPointer information stored in the metadata of all fragments.
 String getTitleAttribute()
          Get the title (The xlink:title attribute value).
 Title getTitleElement(int index)
          Get a specific title fragment
 FragmentList<Title> getTitleElements()
          Get a list of titles (The xlink:title children elements).
 String getXlinkType()
          Get the xlink type (The xxlink:type attribute value).
 
Methods inherited from class org.xbrlapi.impl.ResourceImpl
getLanguage, getResourceRole
 
Methods inherited from class org.xbrlapi.impl.ArcEndImpl
getArcEndId, getArcsFrom, getArcsFromWithArcrole, getArcsTo, getArcsToWithArcrole, getLabel, getRole
 
Methods inherited from class org.xbrlapi.impl.ExtendedLinkContentImpl
getExtendedLink
 
Methods inherited from class org.xbrlapi.impl.FragmentImpl
appendElementSchemeXPointer, appendID, appendMetadataElement, compareTo, equals, getAllChildren, getAncestorOrSelf, getBuilder, getChild, getChildren, getDataRootElement, getDocumentNode, getFragmentIndex, getLabels, getLabels, getLabelsWithLanguage, getLabelsWithLanguage, getLabelsWithLanguageAndRole, getLabelsWithLanguageAndRole, getLabelsWithRole, getLabelsWithRole, getLocalname, getLocalnameFromQName, getMetaAttribute, getMetadataRootElement, getNamespaceFromQName, getNamespaceURI, getNetworks, getNetworksFromWithArcrole, getNetworksFromWithRoleAndArcrole, getNetworksWithArcrole, getParent, getParentElement, getParentIndex, getPrecedingSiblings, getPrefixFromQName, getReferences, getReferencingLocators, getRelationshipsToWithArcrole, getRelatives, getResource, getSequenceToParentElement, getSequenceToParentElementAsString, getSimpleLinks, getStore, getType, getURI, getXPath, hashCode, isa, isNewFragment, removeElementSchemeXPointer, removeID, removeMetaAttribute, removeMetadataElement, removeRelationship, setBuilder, setFragmentIndex, setMetaAttribute, setParentIndex, setPrecedingSiblings, setResource, setSequenceToParentElement, setStore, setURI
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xbrlapi.Resource
getLanguage, getResourceRole
 
Methods inherited from interface org.xbrlapi.ArcEnd
getArcEndId, getArcsFrom, getArcsFromWithArcrole, getArcsTo, getArcsToWithArcrole, getLabel, getRole
 
Methods inherited from interface org.xbrlapi.ExtendedLinkContent
getExtendedLink
 
Methods inherited from interface org.xbrlapi.Xlink
getAttribute, getAttribute, getTitleAttribute, getTitleElement, getTitleElements, getXlinkType
 
Methods inherited from interface org.xbrlapi.Fragment
appendElementSchemeXPointer, appendID, appendMetadataElement, equals, getAllChildren, getAncestorOrSelf, getBuilder, getDataRootElement, getDocumentNode, getFragmentIndex, getLabels, getLabels, getLabelsWithLanguage, getLabelsWithLanguage, getLabelsWithLanguageAndRole, getLabelsWithLanguageAndRole, getLabelsWithRole, getLabelsWithRole, getLocalname, getLocalnameFromQName, getMetaAttribute, getMetadataRootElement, getNamespaceFromQName, getNamespaceURI, getNetworks, getNetworksFromWithArcrole, getNetworksFromWithRoleAndArcrole, getNetworksWithArcrole, getParent, getParentElement, getParentIndex, getPrecedingSiblings, getPrefixFromQName, getReferences, getReferencingLocators, getRelationshipsToWithArcrole, getRelatives, getResource, getSequenceToParentElement, getSequenceToParentElementAsString, getSimpleLinks, getStore, getType, getURI, getXPath, hashCode, isa, isNewFragment, removeElementSchemeXPointer, removeID, removeMetaAttribute, removeMetadataElement, removeRelationship, setBuilder, setFragmentIndex, setMetaAttribute, setParentIndex, setPrecedingSiblings, setResource, setSequenceToParentElement, setStore, setURI
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

MixedContentResourceImpl

public MixedContentResourceImpl()
Method Detail

getContent

public NodeList getContent()
                    throws XBRLException
Get the value of the resource as a NodeList containing all of the children elements and text nodes nested in the resource.

Specified by:
getContent in interface MixedContentResource
Returns:
a list of child nodes of the resource including attributes, XHTML elements, and text nodes.
Throws:
XBRLException
See Also:
MixedContentResource.getContent()

getLanguage

public String getLanguage()
                   throws XBRLException
Get the value of the xml:lang attribute on the resource.

Specified by:
getLanguage in interface MixedContentResource
Specified by:
getLanguage in interface Resource
Overrides:
getLanguage in class ResourceImpl
Returns:
the string value of the XML language attribute on the label resource or null if no such attribute is provided.
Throws:
XBRLException
See Also:
MixedContentResource.getLanguage()

getXlinkType

public String getXlinkType()
                    throws XBRLException
Get the xlink type (The xxlink:type attribute value).

Specified by:
getXlinkType in interface Xlink
Returns:
the value of the xlink:type attribute.
Throws:
XBRLException
See Also:
Xlink.getXlinkType()

getTitleAttribute

public String getTitleAttribute()
                         throws XBRLException
Get the title (The xlink:title attribute value).

Specified by:
getTitleAttribute in interface Xlink
Returns:
the value of the xlink:title attribute or null if none is supplied.
Throws:
XBRLException
See Also:
Xlink.getTitleAttribute()

getTitleElements

public FragmentList<Title> getTitleElements()
                                     throws XBRLException
Get a list of titles (The xlink:title children elements).

Specified by:
getTitleElements in interface Xlink
Returns:
a fragment list of title elements or null if there are none.
Throws:
XBRLException
See Also:
Xlink.getTitleElements()

getTitleElement

public Title getTitleElement(int index)
                      throws XBRLException
Get a specific title fragment

Specified by:
getTitleElement in interface Xlink
Parameters:
index - The index of the required title element
Returns:
the title fragment or null if there are no title children elements.
Throws:
XBRLException - if the index is out of bounds
See Also:
Xlink.getTitleElement(int)

getAttribute

public String getAttribute(String namespaceURI,
                           String localname)
                    throws XBRLException
Description copied from interface: Xlink
Get a non-xlink attribute value.

Specified by:
getAttribute in interface Xlink
Parameters:
namespaceURI - The namespace of the attribute to retrieve
localname - The local name of the attribute to retrieve
Throws:
XBRLException - if the namespace URI is for the XLink namespace.
See Also:
Xlink.getAttribute(String, String)

getAttribute

public String getAttribute(String name)
                    throws XBRLException
Description copied from interface: Xlink
Get a no-namespace attribute value.

Specified by:
getAttribute in interface Xlink
Parameters:
name - The name of the no-namespace attribute to retrieve
Throws:
XBRLException
See Also:
Xlink.getAttribute(String)

getTargetDocumentURI

protected URI getTargetDocumentURI(URI uri)
                            throws XBRLException
Get the URI of the document containing the fragment targetted by the supplied URI.

Parameters:
uri - The supplied URI for decomposition.
Returns:
The URI of the the document containing the fragment targetted by the supplied URI.
Throws:
XBRLException

getTargetPointerValue

protected String getTargetPointerValue(String pointer)
                                throws XBRLException
Get the value of the XPointer that corresponds to the XPointer information stored in the metadata of all fragments.

Parameters:
pointer - The String value of the XPointer supplied in the URI.
Returns:
The value of the XPointer corresponding to the XPointer information stored in the metadata of all fragments. Returns the empty string if the XPointer does not specify an element scheme or ID based shorthand pointer value.
Throws:
XBRLException

SourceForge Logo