XBRLAPI

A Java API for XBRL


org.xbrlapi.impl
Class SchemaContentImpl

java.lang.Object
  extended by org.xbrlapi.impl.XMLImpl
      extended by org.xbrlapi.impl.FragmentImpl
          extended by org.xbrlapi.impl.SchemaContentImpl
All Implemented Interfaces:
Serializable, Comparable<XML>, Fragment, SchemaContent, XML
Direct Known Subclasses:
SchemaCompositorImpl, SchemaDeclarationImpl, SchemaImpl

public class SchemaContentImpl
extends FragmentImpl
implements SchemaContent

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

Field Summary
 
Fields inherited from class org.xbrlapi.impl.XMLImpl
logger
 
Constructor Summary
SchemaContentImpl()
           
 
Method Summary
 List<Element> getAnnotations()
           
 String getOtherAttribute(URI namespace, String localname)
          Mirrors the getAttributeNS method of the org.w3c.dom.Element class.
 LinkedList<Node> getOtherAttributes()
           
 Schema getSchema()
           
 String getSchemaId()
           
 URI getTargetNamespace()
           
 boolean hasOtherAttribute(URI namespace, String localname)
          Mirrors the hasAttributeNS method of the org.w3c.dom.Element class.
 
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.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

SchemaContentImpl

public SchemaContentImpl()
Method Detail

getSchema

public Schema getSchema()
                 throws XBRLException
Specified by:
getSchema in interface SchemaContent
Returns:
the schema fragment that is the schema containing this element declaration.
Throws:
XBRLException - if the schema content is not inside a schema.
See Also:
SchemaContent.getSchema()

getTargetNamespace

public URI getTargetNamespace()
                       throws XBRLException
Specified by:
getTargetNamespace in interface SchemaContent
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()

getAnnotations

public List<Element> getAnnotations()
                             throws XBRLException
Specified by:
getAnnotations in interface SchemaContent
Returns:
a list of annotation child elements for the given fragment or the empty list if there are no child annotations.
Throws:
XBRLException
See Also:
SchemaContent.getAnnotations()

hasOtherAttribute

public boolean hasOtherAttribute(URI namespace,
                                 String localname)
                          throws XBRLException
Description copied from interface: SchemaContent
Mirrors the hasAttributeNS method of the org.w3c.dom.Element class.

Specified by:
hasOtherAttribute in interface SchemaContent
Parameters:
namespace - The namespace of the attribute being tested for
localname - The local name of the attribute being tested for
Returns:
true if the root element of the fragment has the specified attribute and false otherwise.
Throws:
XBRLException
See Also:
SchemaContent.hasOtherAttribute(URI,String), Element.hasAttributeNS(String, String)

getOtherAttributes

public LinkedList<Node> getOtherAttributes()
                                    throws XBRLException
Specified by:
getOtherAttributes in interface SchemaContent
Returns:
a list of other (non XML Schema defined ) attributes on the root element of the Schema declaration. The list is empty if there are no other attributes.
Throws:
XBRLException
See Also:
SchemaContent.getOtherAttributes()

getOtherAttribute

public String getOtherAttribute(URI namespace,
                                String localname)
                         throws XBRLException
Description copied from interface: SchemaContent
Mirrors the getAttributeNS method of the org.w3c.dom.Element class.

Specified by:
getOtherAttribute in interface SchemaContent
Parameters:
namespace - The namespace of the attribute being tested for
localname - The local name of the attribute being tested for
Returns:
the value of the attribute if it occurs on the root element of the fragment and null otherwise.
Throws:
XBRLException
See Also:
Element.getAttributeNS(String, String), SchemaContent.getOtherAttribute(URI,String)

getSchemaId

public String getSchemaId()
                   throws XBRLException
Specified by:
getSchemaId in interface SchemaContent
Returns:
the the XML Schema ID attribute value or null if the schema content root element has no XML Schema ID attribute.
Throws:
XBRLException
See Also:
SchemaContent.getSchemaId()

Get Java XBRL API implementation at SourceForge.net.