XBRLAPI

A Java API for XBRL


org.xbrlapi.impl
Class SchemaContentDeclarationImpl

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

public class SchemaContentDeclarationImpl
extends SchemaDeclarationImpl
implements SchemaContentDeclaration

Base interface for XML Schema element and attribute declaration fragments.

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

Field Summary
 
Fields inherited from class org.xbrlapi.impl.XMLImpl
logger
 
Constructor Summary
SchemaContentDeclarationImpl()
           
 
Method Summary
 String getDefault()
           
 String getFixed()
           
 String getForm()
           
 TypeDeclaration getLocalType()
           
 TypeDeclaration getTypeDeclaration()
           
 String getTypeLocalname()
          Retrieve the type local name.
 URI getTypeNamespace()
          Retrieve the type namespace.
 String getTypeNamespaceAlias()
          Retrieve the type namespace alias.
 String getTypeQName()
          Retrieve the type QName.
 boolean hasLocalType()
           
 boolean hasTypeReference()
           
 boolean isFixed()
           
 boolean 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.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

SchemaContentDeclarationImpl

public SchemaContentDeclarationImpl()
Method Detail

isGlobal

public boolean isGlobal()
                 throws XBRLException
Specified by:
isGlobal in interface SchemaContentDeclaration
Returns:
true iff the element declaration is global rather than part of a complex type declaration.
Throws:
XBRLException
See Also:
SchemaContentDeclaration.isGlobal()

getForm

public String getForm()
               throws XBRLException
Specified by:
getForm in interface SchemaContentDeclaration
Returns:
the value of the form attribute if it is on the attribute declaration and returns null otherwise.
Throws:
XBRLException
See Also:
SchemaContentDeclaration.getForm()

getDefault

public String getDefault()
                  throws XBRLException
Specified by:
getDefault in interface SchemaContentDeclaration
Returns:
null if there is no default attribute, otherwise return its value.
Throws:
XBRLException
See Also:
SchemaContentDeclaration.getDefault()

getFixed

public String getFixed()
                throws XBRLException
Specified by:
getFixed in interface SchemaContentDeclaration
Returns:
null if there is no fixed attribute, otherwise return its value.
Throws:
XBRLException
See Also:
SchemaContentDeclaration.getFixed()

isFixed

public boolean isFixed()
                throws XBRLException
Specified by:
isFixed in interface SchemaContentDeclaration
Returns:
true iff the element or attribute is fixed and false otherwise.
Throws:
XBRLException
See Also:
SchemaContentDeclaration.isFixed()

hasTypeReference

public boolean hasTypeReference()
                         throws XBRLException
Specified by:
hasTypeReference in interface SchemaContentDeclaration
Returns:
true if the content declaration has a named data type and false otherwise.
Throws:
XBRLException - if the datatype is not declared by a type attribute.
See Also:
SchemaContentDeclaration.hasTypeReference()

getTypeNamespace

public URI getTypeNamespace()
                     throws XBRLException
Description copied from interface: SchemaContentDeclaration
Retrieve the type namespace.

Specified by:
getTypeNamespace in interface SchemaContentDeclaration
Returns:
the namespace for the data type.
Throws:
XBRLException - if the datatype is not declared by a type attribute.
See Also:
SchemaContentDeclaration.getTypeNamespace()

getTypeNamespaceAlias

public String getTypeNamespaceAlias()
                             throws XBRLException
Description copied from interface: SchemaContentDeclaration
Retrieve the type namespace alias.

Specified by:
getTypeNamespaceAlias in interface SchemaContentDeclaration
Returns:
the namespace alias (prefix) or the empty string if there is no namespace prefix used in the QName.
Throws:
XBRLException - if the datatype is not declared.
See Also:
SchemaContentDeclaration.getTypeNamespaceAlias()

getTypeQName

public String getTypeQName()
                    throws XBRLException
Description copied from interface: SchemaContentDeclaration
Retrieve the type QName.

Specified by:
getTypeQName in interface SchemaContentDeclaration
Returns:
the QName used to specify the data type or null if the element has no type attribute.
Throws:
XBRLException - if the data root element is not available.
See Also:
SchemaContentDeclaration.getTypeQName()

getTypeLocalname

public String getTypeLocalname()
                        throws XBRLException
Description copied from interface: SchemaContentDeclaration
Retrieve the type local name.

Specified by:
getTypeLocalname in interface SchemaContentDeclaration
Returns:
the local name for the datatype.
Throws:
XBRLException - if the datatype is not declared.
See Also:
SchemaContentDeclaration.getTypeLocalname()

getTypeDeclaration

public TypeDeclaration getTypeDeclaration()
                                   throws XBRLException
Specified by:
getTypeDeclaration in interface SchemaContentDeclaration
Returns:
The fragment that is the type declaration referred to by the schema content declaration or null if there is no type declaration.
Throws:
XBRLException - if the fragment cannot be found in the data store.
See Also:
SchemaContentDeclaration.getTypeDeclaration()

hasLocalType

public boolean hasLocalType()
                     throws XBRLException
Specified by:
hasLocalType in interface SchemaContentDeclaration
Returns:
true iff the content declaration has its own local simple or complex type declaration.
Throws:
XBRLException - if the content declaration has more than one local type declaration.
See Also:
SchemaContentDeclaration.hasLocalType()

getLocalType

public TypeDeclaration getLocalType()
                             throws XBRLException
Specified by:
getLocalType in interface SchemaContentDeclaration
Returns:
The local type declaration or null if the content declaration does not have its own local type declaration.
Throws:
XBRLException
See Also:
SchemaContentDeclaration.getLocalType()

Get Java XBRL API implementation at SourceForge.net.