XBRLAPI

A Java API for XBRL


org.xbrlapi.impl
Class EntityResourceImpl

java.lang.Object
  extended by org.xbrlapi.impl.XMLImpl
      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
                          extended by org.xbrlapi.impl.EntityResourceImpl
All Implemented Interfaces:
Serializable, Comparable<XML>, ArcEnd, EntityResource, ExtendedLinkContent, Fragment, MixedContentResource, Resource, Xlink, XML

public class EntityResourceImpl
extends MixedContentResourceImpl
implements EntityResource

Entity resource implementation.

Author:
Geoffrey Shuetrim (geoff@galexy.net)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.xbrlapi.impl.XMLImpl
logger
 
Constructor Summary
EntityResourceImpl()
           
 
Method Summary
 String getAttribute(String name)
          Get a no-namespace attribute value.
 String getAttribute(URI namespace, String localname)
          Get a non-xlink attribute value.
protected  List<EntityResource> getChildEquivalents()
           
protected  List<EntityResource> getDirectEquivalents()
           
 List<Entity> getEntities()
           
 List<Entity> getEntities(URI uri)
           
 Set<EntityResource> getEquivalents()
           
protected  void getEquivalentsSet(Set<EntityResource> set)
          Augments a map of equivalent entities
 String getIdentifierScheme()
           
 String getIdentifierValue()
           
protected  List<EntityResource> getParentEquivalents()
           
protected  String getStringIdentifier()
           
protected  URI getTargetDocumentURI(URI uri)
          Get the URI of the document containing the fragment targeted 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 list of titles (The xlink:title children elements).
 List<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.MixedContentResourceImpl
getContentAsNodeList, getContentAsXHTMLString
 
Methods inherited from class org.xbrlapi.impl.ResourceImpl
getExtendedLink, getResourceRole
 
Methods inherited from class org.xbrlapi.impl.ArcEndImpl
getArcEndId, getArcsFrom, getArcsFromWithArcrole, getArcsTo, getArcsToWithArcrole, getLabel, getRole
 
Methods inherited from class org.xbrlapi.impl.FragmentImpl
appendElementSchemeXPointer, appendID, getAllChildren, getAllChildrenIndices, getAncestorOrSelf, getChild, getChildren, getChildren, getChildrenIndices, getDataRootElement, getElementSchemeXPointerExpression, getIDXPointerExpression, getLabels, getLabels, getLabels, getLabelsWithLanguage, getLabelsWithLanguageAndResourceRole, getLabelsWithLanguageAndResourceRoleAndLinkRole, getLabelsWithResourceRole, getLanguage, getLanguage, getLanguageName, getLanguageName, getLocalname, getLocalnameFromQName, getNamespace, getNamespaceFromQName, getParent, getParentElement, getParentIndex, getPrefixFromQName, getReferences, getReferencesWithLanguage, getReferencesWithLanguageAndResourceRoleAndLinkRole, getReferencesWithLanguageAndRole, getReferencesWithResourceRole, getReferencingLocators, getSequenceToParentElement, getSequenceToParentElementAsString, getSimpleLinks, getURI, getXPath, getXPointerExpression, isAncestorOf, isChild, isNewFragment, isRoot, setParentIndex, setSequenceToParentElement, setURI
 
Methods inherited from class org.xbrlapi.impl.XMLImpl
appendMetadataElement, compareTo, equals, finalize, getBuilder, getDocumentNode, getIndex, getMetaAttribute, getMetadataRootElement, getStore, getType, hashCode, hasMetaAttribute, isa, isa, removeMetaAttribute, removeMetadataElement, serialize, serialize, serialize, setBuilder, setIndex, setMetaAttribute, setResource, setStore, updateInStore
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xbrlapi.MixedContentResource
getContentAsNodeList, getContentAsXHTMLString
 
Methods inherited from interface org.xbrlapi.Resource
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, getAllChildren, getAllChildrenIndices, getAncestorOrSelf, getChild, getChildren, getChildren, getChildrenIndices, getDataRootElement, getElementSchemeXPointerExpression, getIDXPointerExpression, getLabels, getLabels, getLabels, getLabelsWithLanguage, getLabelsWithLanguageAndResourceRole, getLabelsWithLanguageAndResourceRoleAndLinkRole, getLabelsWithResourceRole, getLanguage, getLanguage, getLanguageName, getLanguageName, getLocalname, getLocalnameFromQName, getNamespace, getNamespaceFromQName, getParent, getParentElement, getParentIndex, getPrefixFromQName, getReferences, getReferencesWithLanguage, getReferencesWithLanguageAndResourceRoleAndLinkRole, getReferencesWithLanguageAndRole, getReferencesWithResourceRole, getReferencingLocators, getSequenceToParentElement, getSequenceToParentElementAsString, getSimpleLinks, getURI, getXPath, getXPointerExpression, isAncestorOf, isChild, isNewFragment, isRoot, setParentIndex, setSequenceToParentElement, setURI
 
Methods inherited from interface org.xbrlapi.XML
appendMetadataElement, equals, getBuilder, getDocumentNode, getIndex, getMetaAttribute, getMetadataRootElement, getStore, getType, hashCode, hasMetaAttribute, isa, isa, removeMetaAttribute, removeMetadataElement, serialize, serialize, serialize, setBuilder, setIndex, setMetaAttribute, setResource, setStore, updateInStore
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

EntityResourceImpl

public EntityResourceImpl()
Method Detail

getIdentifierScheme

public String getIdentifierScheme()
                           throws XBRLException
Specified by:
getIdentifierScheme in interface EntityResource
Returns:
the entity identifier scheme URI
Throws:
XBRLException
See Also:
EntityResource.getIdentifierScheme()

getIdentifierValue

public String getIdentifierValue()
                          throws XBRLException
Specified by:
getIdentifierValue in interface EntityResource
Returns:
the entity identifier value token
Throws:
XBRLException
See Also:
EntityResource.getIdentifierValue()

getEquivalents

public Set<EntityResource> getEquivalents()
                                   throws XBRLException
Specified by:
getEquivalents in interface EntityResource
Returns:
a list of all equivalent entity resources, including this entity resource that is naturally equivalent to itself.
Throws:
XBRLException
See Also:
EntityResource.getEquivalents()

getStringIdentifier

protected String getStringIdentifier()
                              throws XBRLException
Returns:
a string identifier for the entity resource
Throws:
XBRLException

getDirectEquivalents

protected List<EntityResource> getDirectEquivalents()
                                             throws XBRLException
Returns:
a list of entity resources that are parent or children of equivalent-entity relationships to this entity resource.
Throws:
XBRLException

getParentEquivalents

protected List<EntityResource> getParentEquivalents()
                                             throws XBRLException
Returns:
a list of entity resources that are parents of equivalent-entity relationships with this entity resource as a target.
Throws:
XBRLException

getChildEquivalents

protected List<EntityResource> getChildEquivalents()
                                            throws XBRLException
Returns:
a list of entity resources that are children of equivalent-entity relationships with this entity resource as a source.
Throws:
XBRLException

getEquivalentsSet

protected void getEquivalentsSet(Set<EntityResource> set)
                          throws XBRLException
Augments a map of equivalent entities

Throws:
XBRLException

getEntities

public List<Entity> getEntities()
                         throws XBRLException
Specified by:
getEntities in interface EntityResource
Returns:
a list of entity identifier fragments from the contexts the data store (or an empty fragment list if there are none matching this entity resource).
Throws:
XBRLException
See Also:
EntityResource.getEntities()

getEntities

public List<Entity> getEntities(URI uri)
                         throws XBRLException
Specified by:
getEntities in interface EntityResource
Parameters:
uri - The URI of the document to get the entities from
Returns:
a list of entity identifier fragments from the contexts in the specified document (or an empty fragment list if there are none matching this entity resource).
Throws:
XBRLException
See Also:
EntityResource.getEntities(URI)

getXlinkType

public String getXlinkType()
                    throws XBRLException
Description copied from interface: Xlink
Get the xlink type (The xxlink:type attribute value). This is one of simple or extended

Specified by:
getXlinkType in interface Xlink
Throws:
XBRLException
See Also:
Xlink.getXlinkType()

getTitleAttribute

public String getTitleAttribute()
                         throws XBRLException
Description copied from interface: Xlink
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 List<Title> getTitleElements()
                             throws XBRLException
Description copied from interface: Xlink
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
Description copied from interface: Xlink
Get a list of titles (The xlink:title children elements). Returns null if there are no title children elements.

Specified by:
getTitleElement in interface Xlink
Parameters:
index - The index of the required title element
Returns:
The specified title fragment
Throws:
XBRLException
See Also:
Xlink.getTitleElement(int)

getAttribute

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

Specified by:
getAttribute in interface Xlink
Parameters:
namespace - 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(URI, 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 targeted by the supplied URI.

Parameters:
uri - The supplied URI for decomposition.
Returns:
The URI of the the document containing the fragment targeted 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

Get Java XBRL API implementation at SourceForge.net.