XBRLAPI

A Java API for XBRL


org.xbrlapi.impl
Class SchemaImpl

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.SchemaImpl
All Implemented Interfaces:
Serializable, Comparable<XML>, Fragment, Schema, SchemaContent, XML

public class SchemaImpl
extends SchemaContentImpl
implements Schema

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

Field Summary
 
Fields inherited from class org.xbrlapi.impl.XMLImpl
logger
 
Constructor Summary
SchemaImpl()
           
 
Method Summary
 List<ArcroleType> getArcroleTypes()
           
 Concept getConceptByName(String name)
          Get a specific concept by its name.
 long getConceptCount()
          Get the number of concepts defined in the schema.
 List<Concept> getConcepts()
          Get the fragment list of concepts in the schema.
 List<Concept> getConceptsBySubstitutionGroup(URI namespace, String localname)
          Get a list concepts based on their substitution group.
 List<Concept> getConceptsByType(URI namespace, String localName)
          Get a list of concepts based on their type.
 List<ExtendedLink> getExtendedLinks()
           
 List<ComplexTypeDeclaration> getGlobalComplexTypes()
           
<D extends SchemaDeclaration>
D
getGlobalDeclaration(String name)
           
 List<SimpleTypeDeclaration> getGlobalSimpleTypes()
           
 List<Schema> getImporters()
           
 List<SimpleLink> getImports()
           
 List<SimpleLink> getIncludes()
           
 List<Concept> getOtherElementDeclarations()
          Get the fragment list of element declarations (that are not concepts) in the schema.
 ReferencePartDeclaration getReferencePartDeclaration(String name)
          Get a reference part declaration in a schema.
 List<ReferencePartDeclaration> getReferencePartDeclarations()
          Get a list of the reference part declarations in a schema.
 List<RoleType> getRoleTypes()
           
 URI getTargetNamespace()
           
 boolean isElementFormQualified()
          Checks if the element form is qualified.
 
Methods inherited from class org.xbrlapi.impl.SchemaContentImpl
getAnnotations, getOtherAttribute, getOtherAttributes, getSchema, getSchemaId, 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.SchemaContent
getAnnotations, getOtherAttribute, getOtherAttributes, getSchema, getSchemaId, 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

SchemaImpl

public SchemaImpl()
Method Detail

getTargetNamespace

public URI getTargetNamespace()
                       throws XBRLException
Specified by:
getTargetNamespace in interface SchemaContent
Overrides:
getTargetNamespace in class SchemaContentImpl
Returns:
the target namespace of the schema that contains this fragment or null if no targetNamespace attribute is defined for the containing schema fragment.
Throws:
XBRLException
See Also:
SchemaContent.getTargetNamespace()

isElementFormQualified

public boolean isElementFormQualified()
                               throws XBRLException
Description copied from interface: Schema
Checks if the element form is qualified.

Specified by:
isElementFormQualified in interface Schema
Returns:
true if the element form is qualified and false otherwise.
Throws:
XBRLException
See Also:
Schema.isElementFormQualified()

getImports

public List<SimpleLink> getImports()
                            throws XBRLException
Specified by:
getImports in interface Schema
Returns:
a list of SimpleLink fragments, one per XML Schema import used by this schema.
Throws:
XBRLException
See Also:
Schema.getImports()

getImporters

public List<Schema> getImporters()
                          throws XBRLException
Specified by:
getImporters in interface Schema
Returns:
the list of schemas that import this schema.
Throws:
XBRLException
See Also:
Schema.getImporters()

getIncludes

public List<SimpleLink> getIncludes()
                             throws XBRLException
Specified by:
getIncludes in interface Schema
Returns:
a list of SimpleLink fragments, one per XML Schema include used by this schema.
Throws:
XBRLException
See Also:
Schema.getIncludes()

getExtendedLinks

public List<ExtendedLink> getExtendedLinks()
                                    throws XBRLException
Specified by:
getExtendedLinks in interface Schema
Returns:
a list of the extended links contained by the schema.
Throws:
XBRLException
See Also:
Schema.getExtendedLinks()

getConcepts

public List<Concept> getConcepts()
                          throws XBRLException
Description copied from interface: Schema
Get the fragment list of concepts in the schema.

Specified by:
getConcepts in interface Schema
Returns:
the list of concepts in the schema.
Throws:
XBRLException
See Also:
Schema.getConcepts()

getConceptCount

public long getConceptCount()
                     throws XBRLException
Description copied from interface: Schema
Get the number of concepts defined in the schema.

Specified by:
getConceptCount in interface Schema
Returns:
the number of XBRL concepts defined in the schema. Note that concepts that are overloaded with and XBRL Dimensions interpretation are excluded from this count if the XBRL Dimensions loader is being used.
Throws:
XBRLException
See Also:
Schema.getConceptCount()

getOtherElementDeclarations

public List<Concept> getOtherElementDeclarations()
                                          throws XBRLException
Description copied from interface: Schema
Get the fragment list of element declarations (that are not concepts) in the schema.

Specified by:
getOtherElementDeclarations in interface Schema
Returns:
the list of element declarations in the schema.
Throws:
XBRLException
See Also:
Schema.getOtherElementDeclarations()

getConceptByName

public Concept getConceptByName(String name)
                         throws XBRLException
Description copied from interface: Schema
Get a specific concept by its name. return the chosen concept or null if the concept does not exist.

Specified by:
getConceptByName in interface Schema
Parameters:
name - The name of the concept
Throws:
XBRLException
See Also:
Schema.getConceptByName(String)

getConceptsByType

public List<Concept> getConceptsByType(URI namespace,
                                       String localName)
                                throws XBRLException
Description copied from interface: Schema
Get a list of concepts based on their type. Returns null if no concepts match the selection criteria.

Specified by:
getConceptsByType in interface Schema
Parameters:
namespace - The namespaceURI of the concept type
localName - The local name of the concept type
Returns:
A list of concept fragments in the containing schema that match the specified element type.
Throws:
XBRLException
See Also:
Schema.getConceptsByType(URI, String)

getConceptsBySubstitutionGroup

public List<Concept> getConceptsBySubstitutionGroup(URI namespace,
                                                    String localname)
                                             throws XBRLException
Description copied from interface: Schema
Get a list concepts based on their substitution group. Returns null if no concepts match the selection criteria.

Specified by:
getConceptsBySubstitutionGroup in interface Schema
Parameters:
namespace - The namespaceURI of the concept type
localname - The local name of the concept type
Returns:
a list of concepts in the schema that match the specified substitution group
Throws:
XBRLException
See Also:
Schema.getConceptsBySubstitutionGroup(URI, String)

getReferencePartDeclaration

public ReferencePartDeclaration getReferencePartDeclaration(String name)
                                                     throws XBRLException
Description copied from interface: Schema
Get a reference part declaration in a schema. Returns null if the reference part does not exist in the schema.

Specified by:
getReferencePartDeclaration in interface Schema
Parameters:
name - The name attribute value of the reference part to be retrieved.
Throws:
XBRLException
See Also:
Schema.getReferencePartDeclaration(String)

getReferencePartDeclarations

public List<ReferencePartDeclaration> getReferencePartDeclarations()
                                                            throws XBRLException
Description copied from interface: Schema
Get a list of the reference part declarations in a schema.

Specified by:
getReferencePartDeclarations in interface Schema
Returns:
a list of reference part declarations in the schema.
Throws:
XBRLException
See Also:
Schema.getReferencePartDeclarations()

getArcroleTypes

public List<ArcroleType> getArcroleTypes()
                                  throws XBRLException
Specified by:
getArcroleTypes in interface Schema
Returns:
the list of arcrole type definitions in the schema
Throws:
XBRLException
See Also:
Schema.getArcroleTypes()

getRoleTypes

public List<RoleType> getRoleTypes()
                            throws XBRLException
Specified by:
getRoleTypes in interface Schema
Returns:
the list of role type definitions in the schema
Throws:
XBRLException
See Also:
Schema.getRoleTypes()

getGlobalComplexTypes

public List<ComplexTypeDeclaration> getGlobalComplexTypes()
                                                   throws XBRLException
Specified by:
getGlobalComplexTypes in interface Schema
Returns:
the list of global complex type declarations in this schema.
Throws:
XBRLException
See Also:
Schema.getGlobalComplexTypes()

getGlobalDeclaration

public <D extends SchemaDeclaration> D getGlobalDeclaration(String name)
                                                 throws XBRLException
Specified by:
getGlobalDeclaration in interface Schema
Type Parameters:
D - The type of the declaration being retrieved.
Parameters:
name - The name of the declaration being retrieved.
Returns:
the fragment representing the global schema declaration or null if none exists.
Throws:
XBRLException - if the name is null or if the specified type of the global declaration is not consistent with the actual type of the declaration.
See Also:
Schema.getGlobalDeclaration(java.lang.String)

getGlobalSimpleTypes

public List<SimpleTypeDeclaration> getGlobalSimpleTypes()
                                                 throws XBRLException
Specified by:
getGlobalSimpleTypes in interface Schema
Returns:
the list of global simple type declarations in this schema.
Throws:
XBRLException
See Also:
Schema.getGlobalSimpleTypes()

Get Java XBRL API implementation at SourceForge.net.