XBRLAPI

A Java API for XBRL


org.xbrlapi.impl
Class ElementDeclarationImpl

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
All Implemented Interfaces:
Serializable, Comparable<XML>, ElementDeclaration, Fragment, SchemaContent, SchemaContentDeclaration, SchemaDeclaration, XML
Direct Known Subclasses:
ConceptImpl, ReferencePartDeclarationImpl

public class ElementDeclarationImpl
extends SchemaContentDeclarationImpl
implements ElementDeclaration

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

Field Summary
 
Fields inherited from class org.xbrlapi.impl.XMLImpl
logger
 
Constructor Summary
ElementDeclarationImpl()
           
 
Method Summary
 ComplexTypeDeclaration getLocalComplexType()
           
 String getMaxOccurs()
           
 String getMinOccurs()
           
 ElementDeclaration getSubstitutionGroupDeclaration()
           
 String getSubstitutionGroupLocalname()
          Retrieve the substitution group local name.
 URI getSubstitutionGroupNamespace()
          Retrieve the substitution group namespace.
 String getSubstitutionGroupNamespaceAlias()
          Retrieve the substitution group namespace alias (also known as a namespace prefix).
 String getSubstitutionGroupQName()
          Retrieve the substitution group QName.
 boolean hasLocalComplexType()
           
 boolean hasSubstitutionGroup()
           
 boolean isAbstract()
           
 boolean isBlockingExtension()
           
 boolean isBlockingRestriction()
           
 boolean isBlockingSubstitution()
           
 boolean isFinalForExtension()
           
 boolean isFinalForRestriction()
           
 boolean isItem()
           
 boolean isNillable()
          Determine if a concept is nillable
 boolean isTuple()
           
 boolean substitutesFor(ElementDeclaration candidate)
           
 
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, getSchema, 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.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

ElementDeclarationImpl

public ElementDeclarationImpl()
Method Detail

isAbstract

public boolean isAbstract()
                   throws XBRLException
Specified by:
isAbstract in interface ElementDeclaration
Returns:
true if the element is abstract and false otherwise.
Throws:
XBRLException
See Also:
ElementDeclaration.isAbstract()

isNillable

public boolean isNillable()
                   throws XBRLException
Description copied from interface: ElementDeclaration
Determine if a concept is nillable

Specified by:
isNillable in interface ElementDeclaration
Returns:
true if the concept is nillable and false otherwise.
Throws:
XBRLException
See Also:
ElementDeclaration.isNillable()

isItem

public boolean isItem()
               throws XBRLException
Specified by:
isItem in interface ElementDeclaration
Returns:
true if the element declaration is for an element in the substitution group for the XBRL item element and false otherwise.
Throws:
XBRLException
See Also:
ElementDeclaration.isItem()

isTuple

public boolean isTuple()
                throws XBRLException
Specified by:
isTuple in interface ElementDeclaration
Returns:
true if the element declaration is for an element in the substitution group for the XBRL tuple element and false otherwise.
Throws:
XBRLException
See Also:
ElementDeclaration.isTuple()

substitutesFor

public boolean substitutesFor(ElementDeclaration candidate)
                       throws XBRLException
Specified by:
substitutesFor in interface ElementDeclaration
Parameters:
candidate - The candidate element declaration.
Returns:
true if this element substitutes for the candidate element declaration and false otherwise.
Throws:
XBRLException
See Also:
ElementDeclaration.substitutesFor(ElementDeclaration)

hasSubstitutionGroup

public boolean hasSubstitutionGroup()
                             throws XBRLException
Specified by:
hasSubstitutionGroup in interface ElementDeclaration
Returns:
true if the content declaration has a named substitution group and false otherwise.
Throws:
XBRLException
See Also:
ElementDeclaration.hasSubstitutionGroup()

getSubstitutionGroupNamespace

public URI getSubstitutionGroupNamespace()
                                  throws XBRLException
Description copied from interface: ElementDeclaration
Retrieve the substitution group namespace.

Specified by:
getSubstitutionGroupNamespace in interface ElementDeclaration
Returns:
the namespace for the element substitution group.
Throws:
XBRLException - if the substitution group is not declared by a substitution group attribute.
See Also:
ElementDeclaration.getSubstitutionGroupNamespace()

getSubstitutionGroupNamespaceAlias

public String getSubstitutionGroupNamespaceAlias()
                                          throws XBRLException
Description copied from interface: ElementDeclaration
Retrieve the substitution group namespace alias (also known as a namespace prefix).

Specified by:
getSubstitutionGroupNamespaceAlias in interface ElementDeclaration
Returns:
the namespace alias for the element substitution group or the empty string if the default namespace prefix is used.
Throws:
XBRLException - if the substitution group is not declared by a substitution group attribute.
See Also:
ElementDeclaration.getSubstitutionGroupNamespaceAlias()

getSubstitutionGroupQName

public String getSubstitutionGroupQName()
                                 throws XBRLException
Description copied from interface: ElementDeclaration
Retrieve the substitution group QName.

Specified by:
getSubstitutionGroupQName in interface ElementDeclaration
Returns:
the QName used to specify the substitution group or null if the element has no substitutionGroup attribute.
Throws:
XBRLException - if the data root element is not available.
See Also:
ElementDeclaration.getSubstitutionGroupQName()

getSubstitutionGroupDeclaration

public ElementDeclaration getSubstitutionGroupDeclaration()
                                                   throws XBRLException
Specified by:
getSubstitutionGroupDeclaration in interface ElementDeclaration
Returns:
The fragment that is the declaration of the substitution group element.
Throws:
XBRLException - if there is no such declaration in the data store or if the fragment is not an XML Schema element declaration.
See Also:
ElementDeclaration.getSubstitutionGroupDeclaration()

getSubstitutionGroupLocalname

public String getSubstitutionGroupLocalname()
                                     throws XBRLException
Description copied from interface: ElementDeclaration
Retrieve the substitution group local name.

Specified by:
getSubstitutionGroupLocalname in interface ElementDeclaration
Returns:
the local name for the substitution group.
Throws:
XBRLException - if the substitution group is not declared.
See Also:
ElementDeclaration.getSubstitutionGroupLocalname()

hasLocalComplexType

public boolean hasLocalComplexType()
                            throws XBRLException
Specified by:
hasLocalComplexType in interface ElementDeclaration
Returns:
true iff the element declaration has a single local complex type.
Throws:
XBRLException
See Also:
ElementDeclaration.hasLocalComplexType()

getLocalComplexType

public ComplexTypeDeclaration getLocalComplexType()
                                           throws XBRLException
Specified by:
getLocalComplexType in interface ElementDeclaration
Returns:
the local complex type definition.
Throws:
XBRLException - if there is no local complex type declaration or if there is more than one local complex type declaration (an XML Schema error).
See Also:
ElementDeclaration.getLocalComplexType()

isFinalForRestriction

public boolean isFinalForRestriction()
                              throws XBRLException
Specified by:
isFinalForRestriction in interface ElementDeclaration
Returns:
true iff the element is final for restriction.
Throws:
XBRLException
See Also:
ElementDeclaration.isFinalForRestriction()

isFinalForExtension

public boolean isFinalForExtension()
                            throws XBRLException
Specified by:
isFinalForExtension in interface ElementDeclaration
Returns:
true iff the element is final for extension.
Throws:
XBRLException
See Also:
ElementDeclaration.isFinalForRestriction()

isBlockingSubstitution

public boolean isBlockingSubstitution()
                               throws XBRLException
Specified by:
isBlockingSubstitution in interface ElementDeclaration
Returns:
true iff the element is blocking substitution.
Throws:
XBRLException
See Also:
ElementDeclaration.isBlockingSubstitution()

isBlockingRestriction

public boolean isBlockingRestriction()
                              throws XBRLException
Specified by:
isBlockingRestriction in interface ElementDeclaration
Returns:
true iff the element is blocking restriction.
Throws:
XBRLException
See Also:
ElementDeclaration.isBlockingRestriction()

isBlockingExtension

public boolean isBlockingExtension()
                            throws XBRLException
Specified by:
isBlockingExtension in interface ElementDeclaration
Returns:
true iff the element is blocking extension.
Throws:
XBRLException
See Also:
ElementDeclaration.isBlockingRestriction()

getMaxOccurs

public String getMaxOccurs()
                    throws XBRLException
Specified by:
getMaxOccurs in interface ElementDeclaration
Returns:
the maximum number of times that the element can occur within a complex type definition.
Throws:
XBRLException - if the element declaration is global.
See Also:
ElementDeclaration.getMaxOccurs()

getMinOccurs

public String getMinOccurs()
                    throws XBRLException
Specified by:
getMinOccurs in interface ElementDeclaration
Returns:
the minimum number of times that the element can occur within a complex type definition.
Throws:
XBRLException - if the element declaration is global.
See Also:
ElementDeclaration.getMinOccurs()

Get Java XBRL API implementation at SourceForge.net.