XBRLAPI

A Java API for XBRL


org.xbrlapi.xdt
Class HypercubeImpl

java.lang.Object
  extended by org.xbrlapi.impl.XMLImpl
      extended by org.xbrlapi.impl.FragmentImpl
          extended by org.xbrlapi.impl.SchemaContentImpl
              extended by org.xbrlapi.impl.SchemaDeclarationImpl
                  extended by org.xbrlapi.impl.SchemaContentDeclarationImpl
                      extended by org.xbrlapi.impl.ElementDeclarationImpl
                          extended by org.xbrlapi.impl.ConceptImpl
                              extended by org.xbrlapi.xdt.XDTConceptImpl
                                  extended by org.xbrlapi.xdt.HypercubeImpl
All Implemented Interfaces:
Serializable, Comparable<XML>, Concept, ElementDeclaration, Fragment, SchemaContent, SchemaContentDeclaration, SchemaDeclaration, HCI, Hypercube, XDTConcept, XML

public class HypercubeImpl
extends XDTConceptImpl
implements Hypercube, HCI

This class also provides a range of static methods to explore the hypercubes that are "had" by a given concept.

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

Field Summary
 
Fields inherited from class org.xbrlapi.impl.XMLImpl
logger
 
Constructor Summary
HypercubeImpl()
           
 
Method Summary
static SortedSet<Relationship> getAncestorDomainMemberRelationships(Relationship relationship)
          Recursive implementation
 List<Dimension> getDimensions()
           
 List<Dimension> getDimensions(URI linkRole)
           
static SortedSet<Relationship> getDomainMemberRelationshipsTo(Concept concept)
           
static Set<Concept> getHypercubeInheritanceConcepts(Concept concept)
           
static SortedSet<Relationship> getInheritedDomainMemberRelationships(Concept concept)
           
static com.google.common.collect.ListMultimap<URI,Relationship> getInheritedHasHypercubeRelationships(Concept concept)
           
static com.google.common.collect.ListMultimap<URI,Hypercube> getInheritedHypercubes(Concept concept)
           
static com.google.common.collect.ListMultimap<URI,Relationship> getOwnHasHypercubeRelationships(Concept concept)
           
static com.google.common.collect.ListMultimap<URI,Hypercube> getOwnHypercubes(Concept concept)
           
static SortedSet<Relationship> getPreviousDomainMemberRelationships(Relationship relationship)
           
 SortedSet<Relationship> getRelationshipsToDimensions(URI linkRole)
           
 
Methods inherited from class org.xbrlapi.impl.ConceptImpl
getBalance, getFactCount, getFactIndices, getFacts, getPeriodType, getPresentationNetworkLinkroles, getRootFacts, getSchema, isNumeric
 
Methods inherited from class org.xbrlapi.impl.ElementDeclarationImpl
getLocalComplexType, getMaxOccurs, getMinOccurs, getSubstitutionGroupDeclaration, getSubstitutionGroupLocalname, getSubstitutionGroupNamespace, getSubstitutionGroupNamespaceAlias, getSubstitutionGroupQName, hasLocalComplexType, hasSubstitutionGroup, isAbstract, isBlockingExtension, isBlockingRestriction, isBlockingSubstitution, isFinalForExtension, isFinalForRestriction, isItem, isNillable, isTuple, substitutesFor
 
Methods inherited from class org.xbrlapi.impl.SchemaContentDeclarationImpl
getDefault, getFixed, getForm, getLocalType, getTypeDeclaration, getTypeLocalname, getTypeNamespace, getTypeNamespaceAlias, getTypeQName, hasLocalType, hasTypeReference, isFixed, isGlobal
 
Methods inherited from class org.xbrlapi.impl.SchemaDeclarationImpl
getName, getReferencedSchemaDeclaration, getReferenceLocalname, getReferenceNamespace, getReferenceNamespaceAlias, getReferenceQName, hasReference
 
Methods inherited from class org.xbrlapi.impl.SchemaContentImpl
getAnnotations, getOtherAttribute, getOtherAttributes, getSchemaId, getTargetNamespace, hasOtherAttribute
 
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.Concept
getBalance, getFactCount, getFactIndices, getFacts, getPeriodType, getPresentationNetworkLinkroles, getRootFacts, isNumeric
 
Methods inherited from interface org.xbrlapi.ElementDeclaration
getLocalComplexType, getMaxOccurs, getMinOccurs, getSubstitutionGroupDeclaration, getSubstitutionGroupLocalname, getSubstitutionGroupNamespace, getSubstitutionGroupNamespaceAlias, getSubstitutionGroupQName, hasLocalComplexType, hasSubstitutionGroup, isAbstract, isBlockingExtension, isBlockingRestriction, isBlockingSubstitution, isFinalForExtension, isFinalForRestriction, isItem, isNillable, isTuple, substitutesFor
 
Methods inherited from interface org.xbrlapi.SchemaContentDeclaration
getDefault, getFixed, getForm, getLocalType, getTypeDeclaration, getTypeLocalname, getTypeNamespace, getTypeNamespaceAlias, getTypeQName, hasLocalType, hasTypeReference, isFixed, isGlobal
 
Methods inherited from interface org.xbrlapi.SchemaDeclaration
getName, getReferencedSchemaDeclaration, getReferenceLocalname, getReferenceNamespace, getReferenceNamespaceAlias, getReferenceQName, hasReference
 
Methods inherited from interface org.xbrlapi.SchemaContent
getAnnotations, getOtherAttribute, getOtherAttributes, getSchema, getSchemaId, getTargetNamespace, hasOtherAttribute
 
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

HypercubeImpl

public HypercubeImpl()
Method Detail

getDimensions

public List<Dimension> getDimensions()
                              throws XBRLException
Specified by:
getDimensions in interface Hypercube
Returns:
a list of the hypercube's XDT dimensions. This gets all of the dimensions associated with the hypercube, regardless of the link role that the relationship to the dimension is defined in.
Throws:
XBRLException
See Also:
Hypercube.getDimensions()

getDimensions

public List<Dimension> getDimensions(URI linkRole)
                              throws XBRLException
Specified by:
getDimensions in interface Hypercube
Parameters:
linkRole - the link role URI to use when selecting the dimensions of the hypercube.
Returns:
a list of the hypercube's XDT dimensions defined by hypercube-dimension relationships with link role values as specified.
Throws:
XBRLException
See Also:
Hypercube.getDimensions(URI)

getRelationshipsToDimensions

public SortedSet<Relationship> getRelationshipsToDimensions(URI linkRole)
                                                     throws XBRLException
Specified by:
getRelationshipsToDimensions in interface Hypercube
Parameters:
linkRole - the link role URI to use when selecting the dimensions of the hypercube.
Returns:
a list of the active (not prohibited or overridden) relationships to the hypercube's XDT dimensions with link role values as specified.
Throws:
XBRLException
See Also:
Hypercube.getRelationshipsToDimensions(URI)

getInheritedHypercubes

public static com.google.common.collect.ListMultimap<URI,Hypercube> getInheritedHypercubes(Concept concept)
                                                                                    throws XBRLException
Parameters:
concept - The concept of interest
Returns:
the hypercubes inherited by this concept, grouped based on the link role of the relationships to the hypercube from the concept. This includes the hypercubes directly related to the concept of interest.
Throws:
XBRLException

getOwnHypercubes

public static com.google.common.collect.ListMultimap<URI,Hypercube> getOwnHypercubes(Concept concept)
                                                                              throws XBRLException
Parameters:
concept - The concept of interest
Returns:
the hypercubes directly related to this concept by has-hypercube relationships.
Throws:
XBRLException

getInheritedHasHypercubeRelationships

public static com.google.common.collect.ListMultimap<URI,Relationship> getInheritedHasHypercubeRelationships(Concept concept)
                                                                                                      throws XBRLException
Parameters:
concept - The concept of interest
Returns:
the has-hypercube relationships inherited by this concept, grouped based on the link role of the relationships. This includes the relationships from the concept itself.
Throws:
XBRLException

getOwnHasHypercubeRelationships

public static com.google.common.collect.ListMultimap<URI,Relationship> getOwnHasHypercubeRelationships(Concept concept)
                                                                                                throws XBRLException
Parameters:
concept - The concept of interest
Returns:
the active has-hypercube relationships directly from this concept.
Throws:
XBRLException

getDomainMemberRelationshipsTo

public static SortedSet<Relationship> getDomainMemberRelationshipsTo(Concept concept)
                                                              throws XBRLException
Parameters:
concept - The concept.
Returns:
the concepts that are parents of the given concept, via, domain-member relationships in any linkrole.
Throws:
XBRLException

getPreviousDomainMemberRelationships

public static SortedSet<Relationship> getPreviousDomainMemberRelationships(Relationship relationship)
                                                                    throws XBRLException
Parameters:
relationship - The consecutive domain-member relationship
Returns:
the set of domain-member relationships that have this relationship as a consecutive domain member relationship. This is useful for tracing hypercube inheritance.
Throws:
XBRLException

getAncestorDomainMemberRelationships

public static SortedSet<Relationship> getAncestorDomainMemberRelationships(Relationship relationship)
                                                                    throws XBRLException
Recursive implementation

Parameters:
relationship - The domain-member relationship of interest.
Returns:
The ancestor domain-member relationships of this relationship.
Throws:
XBRLException

getHypercubeInheritanceConcepts

public static Set<Concept> getHypercubeInheritanceConcepts(Concept concept)
                                                    throws XBRLException
Parameters:
concept - The concept of interest
Returns:
The set of concepts that this concept inherits hypercubes from (including itself).
Throws:
XBRLException

getInheritedDomainMemberRelationships

public static SortedSet<Relationship> getInheritedDomainMemberRelationships(Concept concept)
                                                                     throws XBRLException
Parameters:
concept - The concept of interest
Returns:
The ancestor domain-member relationships of this concept.
Throws:
XBRLException

Get Java XBRL API implementation at SourceForge.net.