XBRLAPI

A Java API for XBRL


org.xbrlapi.impl
Class TypeDeclarationImpl

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.TypeDeclarationImpl
All Implemented Interfaces:
Serializable, Comparable<XML>, Fragment, SchemaContent, SchemaDeclaration, TypeDeclaration, XML
Direct Known Subclasses:
ComplexTypeDeclarationImpl, SimpleTypeDeclarationImpl

public class TypeDeclarationImpl
extends SchemaDeclarationImpl
implements TypeDeclaration

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

Field Summary
 
Fields inherited from class org.xbrlapi.impl.XMLImpl
logger
 
Constructor Summary
TypeDeclarationImpl()
           
 
Method Summary
 String getFinal()
           
 TypeDeclaration getParentType()
           
 String getParentTypeLocalname()
           
 URI getParentTypeNamespace()
           
 boolean isDerivedFrom(TypeDeclaration candidate)
           
 boolean isDerivedFrom(URI namespace, String name)
           
 boolean isFinal()
           
 boolean isFinalForExtension()
           
 boolean isFinalForRestriction()
           
 boolean isNumericItemType()
           
 
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

TypeDeclarationImpl

public TypeDeclarationImpl()
Method Detail

getFinal

public String getFinal()
                throws XBRLException
Specified by:
getFinal in interface TypeDeclaration
Returns:
the final attribute value or null if there is none. One of #all or list of extension and restriction
Throws:
XBRLException
See Also:
TypeDeclaration.getFinal()

isFinal

public boolean isFinal()
                throws XBRLException
Specified by:
isFinal in interface TypeDeclaration
Returns:
true iff the type declaration cannot be extended or restricted.
Throws:
XBRLException
See Also:
TypeDeclaration.isFinal()

isFinalForExtension

public boolean isFinalForExtension()
                            throws XBRLException
Specified by:
isFinalForExtension in interface TypeDeclaration
Returns:
true iff the type declaration cannot be extended.
Throws:
XBRLException
See Also:
TypeDeclaration.isFinalForExtension()

isFinalForRestriction

public boolean isFinalForRestriction()
                              throws XBRLException
Specified by:
isFinalForRestriction in interface TypeDeclaration
Returns:
true iff the type declaration cannot be restricted.
Throws:
XBRLException
See Also:
TypeDeclaration.isFinalForRestriction()

isDerivedFrom

public boolean isDerivedFrom(TypeDeclaration candidate)
                      throws XBRLException
Specified by:
isDerivedFrom in interface TypeDeclaration
Parameters:
candidate - the type declaration that this type may be derived from.
Returns:
true if this type declaration is or is derived from the specified ancestor type declaration.
Throws:
XBRLException
See Also:
TypeDeclaration.isDerivedFrom(org.xbrlapi.TypeDeclaration)

isDerivedFrom

public boolean isDerivedFrom(URI namespace,
                             String name)
                      throws XBRLException
Specified by:
isDerivedFrom in interface TypeDeclaration
Parameters:
namespace - The namespace of the prospective type.
name - The local name of the prospective type.
Returns:
true if this type declaration is or is derived from the specified type declaration.
Throws:
XBRLException - if there is no type declaration with the given namespace and name.
See Also:
TypeDeclaration.isDerivedFrom(java.net.URI, java.lang.String)

getParentType

public TypeDeclaration getParentType()
                              throws XBRLException
Specified by:
getParentType in interface TypeDeclaration
Returns:
the type that this type extends or restricts or null if the type that is extended or restricted is a type defined in the XML Schema specifications.
Throws:
XBRLException
See Also:
TypeDeclaration.getParentType()

getParentTypeLocalname

public String getParentTypeLocalname()
                              throws XBRLException
Specified by:
getParentTypeLocalname in interface TypeDeclaration
Returns:
the local name of the type that this type declaration extends or restricts.
Throws:
XBRLException
See Also:
TypeDeclaration.getParentTypeLocalname()

getParentTypeNamespace

public URI getParentTypeNamespace()
                           throws XBRLException
Specified by:
getParentTypeNamespace in interface TypeDeclaration
Returns:
the namespace of the type that this type declaration extends or restricts.
Throws:
XBRLException
See Also:
TypeDeclaration.getParentTypeNamespace()

isNumericItemType

public boolean isNumericItemType()
                          throws XBRLException
Specified by:
isNumericItemType in interface TypeDeclaration
Returns:
true if the type is derived from or is an XBRL numeric item type.
Throws:
XBRLException
See Also:
TypeDeclaration.isNumericItemType()

Get Java XBRL API implementation at SourceForge.net.