XBRLAPI

A Java API for XBRL


org.xbrlapi.impl
Class CustomTypeImpl

java.lang.Object
  extended by org.xbrlapi.impl.XMLImpl
      extended by org.xbrlapi.impl.FragmentImpl
          extended by org.xbrlapi.impl.CustomTypeImpl
All Implemented Interfaces:
Serializable, Comparable<XML>, CustomType, Fragment, XML
Direct Known Subclasses:
ArcroleTypeImpl, RoleTypeImpl

public class CustomTypeImpl
extends FragmentImpl
implements CustomType

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

Field Summary
 
Fields inherited from class org.xbrlapi.impl.XMLImpl
logger
 
Constructor Summary
CustomTypeImpl()
           
 
Method Summary
 String getCustomTypeId()
          Get the id of the customType.
 URI getCustomURI()
          Get the custom URI being defined.
 String getDefinition()
           
 List<UsedOn> getUsedOns()
           
 boolean isUsedCorrectly(Fragment fragment)
           
 boolean isUsedOn(URI namespace, String localname)
          Returns true only if the arcrole can be used on the specified element
 
Methods inherited from class org.xbrlapi.impl.FragmentImpl
appendElementSchemeXPointer, appendID, getAllChildren, getAllChildrenIndices, getAncestorOrSelf, getChild, getChildren, getChildren, getChildrenIndices, getDataRootElement, getElementSchemeXPointerExpression, getIDXPointerExpression, getLabels, getLabels, getLabelsWithLanguage, getLabelsWithLanguageAndResourceRole, getLabelsWithLanguageAndResourceRoleAndLinkRole, getLabelsWithResourceRole, 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, 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.Fragment
appendElementSchemeXPointer, appendID, getAllChildren, getAllChildrenIndices, getAncestorOrSelf, getChild, getChildren, getChildren, getChildrenIndices, getDataRootElement, getElementSchemeXPointerExpression, getIDXPointerExpression, getLabels, getLabels, getLabelsWithLanguage, getLabelsWithLanguageAndResourceRole, getLabelsWithLanguageAndResourceRoleAndLinkRole, getLabelsWithResourceRole, 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, serialize, setBuilder, setIndex, setMetaAttribute, setResource, setStore, updateInStore
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

CustomTypeImpl

public CustomTypeImpl()
Method Detail

getCustomTypeId

public String getCustomTypeId()
                       throws XBRLException
Get the id of the customType.

Specified by:
getCustomTypeId in interface CustomType
Returns:
the id of the custom type or null if none is provided
Throws:
XBRLException
See Also:
CustomType.getCustomTypeId()

getCustomURI

public URI getCustomURI()
                 throws XBRLException
Get the custom URI being defined.

Specified by:
getCustomURI in interface CustomType
Returns:
the custom URI being defined.
Throws:
XBRLExceptio - if the custom URI is not specified or is not a valid URI.
XBRLException
See Also:
CustomType.getCustomURI()

getDefinition

public String getDefinition()
                     throws XBRLException
Specified by:
getDefinition in interface CustomType
Returns:
the string value of the role definition element or null if none is provided.
Throws:
XBRLException
See Also:
CustomType.getDefinition()

isUsedCorrectly

public boolean isUsedCorrectly(Fragment fragment)
                        throws XBRLException
Specified by:
isUsedCorrectly in interface CustomType
Parameters:
fragment - The fragment to be tested to determine if the custom role has been used correctly based on usedOn constraints.
Returns:
true if the custom role has been used correctly on the fragment being checked. Returns false otherwise.
Throws:
XBRLException
See Also:
CustomType.isUsedCorrectly(Fragment)

isUsedOn

public boolean isUsedOn(URI namespace,
                        String localname)
                 throws XBRLException
Description copied from interface: CustomType
Returns true only if the arcrole can be used on the specified element

Specified by:
isUsedOn in interface CustomType
Parameters:
namespace - The namespace of the element being tested for
localname - The local name of the element being tested for
Throws:
XBRLException
See Also:
CustomType.isUsedOn(URI,String)

getUsedOns

public List<UsedOn> getUsedOns()
                        throws XBRLException
Specified by:
getUsedOns in interface CustomType
Returns:
the list of usedOn child fragments.
Throws:
XBRLException
See Also:
CustomType.getUsedOns()

Get Java XBRL API implementation at SourceForge.net. Fast, secure and Free Open Source software downloads