XBRLAPI

A Java API for XBRL


org.xbrlapi.impl
Class FragmentImpl

java.lang.Object
  extended by org.xbrlapi.impl.FragmentImpl
All Implemented Interfaces:
Comparable<Fragment>, Fragment
Direct Known Subclasses:
ContextComponentImpl, CustomTypeImpl, ExtendedLinkContentImpl, FactDimensionContainerImpl, FactImpl, InstanceImpl, LanguageImpl, LinkbaseImpl, LinkImpl, MockFragmentImpl, ReferencePartImpl, SchemaContentImpl, TitleImpl, UsedOnImpl, XlinkDocumentationImpl

public class FragmentImpl
extends Object
implements Fragment

Implements the functionality that is common to all types of XBRL fragments.

Author:
Geoffrey Shuetrim (geoff@galexy.net)

Field Summary
protected static org.apache.log4j.Logger logger
           
 
Constructor Summary
FragmentImpl()
          No argument constructor
 
Method Summary
 void appendElementSchemeXPointer(String expression)
          Add an element Scheme XPointer Expression to the metadata.
 void appendID(String id)
          Add an ID (used in XPointer resolution) to the metadata.
 void appendMetadataElement(String eName, HashMap<String,String> attributes)
          Appends a child element to the root metadata element.
 int compareTo(Fragment other)
          Comparison is based upon the fragment index.
 boolean equals(Object o1)
          Override the Object equals method to base equality on the fragment index.
 FragmentList<Fragment> getAllChildren()
          Gets all child fragments.
 Fragment getAncestorOrSelf(String type)
          Gets the ancestor (or self) fragment with the specified fragment type.
 Builder getBuilder()
          Get the fragment builder.
protected  Fragment getChild(String type, int index)
          Get a specific child fragment.
protected
<F extends Fragment>
FragmentList<F>
getChildren(String type)
          Gets the child fragments with the specified fragment type.
 Element getDataRootElement()
          Get the root element of the fragment data.
 Document getDocumentNode()
          Get the XML DOM Document for the fragment data.
 String getFragmentIndex()
          Get the fragment index from the fragment metadata.
 FragmentList<LabelResource> getLabels()
          TODO Add methods to get labels based on language and role.
 FragmentList<LabelResource> getLabels(Networks networks)
           
 FragmentList<LabelResource> getLabelsWithLanguage(Networks networks, String language)
           
 FragmentList<LabelResource> getLabelsWithLanguage(String language)
           
 FragmentList<LabelResource> getLabelsWithLanguageAndRole(Networks networks, String language, String role)
           
 FragmentList<LabelResource> getLabelsWithLanguageAndRole(String language, String role)
           
 FragmentList<LabelResource> getLabelsWithRole(Networks networks, String role)
           
 FragmentList<LabelResource> getLabelsWithRole(String role)
           
 String getLocalname()
          Get the local name of the fragment's root element
 String getLocalnameFromQName(String qname)
          Returns the local name for a QName
 String getMetaAttribute(String name)
          Get a fragment metadata attribute.
 Element getMetadataRootElement()
          Get the root element of the fragment data.
 String getNamespaceFromQName(String qname, Node node)
          Returns the Namespace for a QName in the context of a node in the fragment.
 String getNamespaceURI()
          Get the namespace of the fragment root element.
 Networks getNetworks()
           
 Networks getNetworksFromWithArcrole(String arcrole)
           
 Networks getNetworksFromWithRoleAndArcrole(String linkrole, String arcrole)
           
 Networks getNetworksWithArcrole(String arcrole)
           
 Fragment getParent()
          Get the parent fragment of this fragment or null if there is none.
 Element getParentElement(Element parentDataRootElement)
          Get the element in the parent fragment that has this fragment as its child.
 String getParentIndex()
          Get the index of the parent fragment or null if the fragment does not have a parent fragment.
 String getPrecedingSiblings()
          Get the number of children that precede this fragment's root element in document order in the element that contains it (in the parent element).
 String getPrefixFromQName(String qname)
          Returns the Namespace prefix for a QName
 FragmentList<ReferenceResource> getReferences()
          TODO Add methods to get references based on language and role.
 FragmentList<Locator> getReferencingLocators()
          Retrieves a list of all locators that target this fragment.
 List<Relationship> getRelationshipsToWithArcrole(String arcrole)
           
<F extends Fragment>
FragmentList<F>
getRelatives(String arcrole, String linkrole, String resourcerole, String language, boolean getTargets)
           
 Element getResource()
          Get the XML resource that is the fragment from the data store.
 String[] getSequenceToParentElement()
          Get the sequence of steps through the parent fragment DOM to the parent element.
 String getSequenceToParentElementAsString()
          Get the sequence of steps through the parent fragment DOM to the parent element as a string.
 FragmentList<SimpleLink> getSimpleLinks()
           
 Store getStore()
          Get the data store that manages this fragment.
 String getType()
          Get the Fragment type.
 String getURI()
          Get the URI of the document containing this fragment.
 String getXPath()
          Get the XPath to the element in the parent fragment that is the parent element of this fragment's root element.
 int hashCode()
          Override the Object hashCode method to provide for equality comparisons that are based on the fragment index.
 boolean isa(String superType)
           
 boolean isNewFragment()
          Tests if a fragment is new in the sense that it does not have a root data element.
 void removeElementSchemeXPointer(String expression)
          Remove an element Scheme XPointer Expression from the metadata.
 void removeID(String id)
          Remove an ID from the metadata.
 void removeMetaAttribute(String name)
          Removes a metadata attribute
 void removeMetadataElement(String eName, HashMap<String,String> attributes)
          removes a child element from the metadata root element by specifying the name of the child and the value of the element's text content and/or the value of a named attribute.
 void removeRelationship(String index)
          Remove a DTS relationship to the fragment, identifying another DTS fragment that this fragment is no longer related to.
 void setBuilder(Builder builder)
          Set the builder that constructs the fragment XML during parsing.
 void setFragmentIndex(String index)
          Set the fragment index.
 void setMetaAttribute(String name, String value)
          Set a fragment metadata attribute.
 void setParentIndex(String index)
          Set the index of the parent fragment.
 void setPrecedingSiblings(Vector<Long> children)
          Set the number of children that precede this fragment's root element in document order in the element that contains it (in the parent element).
 void setResource(Element rootElement)
          Closes down the fragment builder and sets the data and metadata resources for the fragment.
 void setSequenceToParentElement(Vector<Long> children)
          Sets the sequence of child element counts that describe the path through the parent fragment from its root to the element that has this fragment's root as a child element.
 void setStore(Store store)
          Set the data store that manages this fragment.
 void setURI(String uri)
          Set the URI of the fragment's document.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static org.apache.log4j.Logger logger
Constructor Detail

FragmentImpl

public FragmentImpl()
No argument constructor

Throws:
XBRLEception
Method Detail

setStore

public void setStore(Store store)
              throws XBRLException
Description copied from interface: Fragment
Set the data store that manages this fragment.

Specified by:
setStore in interface Fragment
Parameters:
store - The data store.
Throws:
XBRLException - if the data store has already been set.
See Also:
Fragment.setStore(Store)

setBuilder

public void setBuilder(Builder builder)
Description copied from interface: Fragment
Set the builder that constructs the fragment XML during parsing.

Specified by:
setBuilder in interface Fragment
Parameters:
builder - The builder object used to construct the fragment XML.
See Also:
Fragment.setBuilder(Builder)

getStore

public Store getStore()
Description copied from interface: Fragment
Get the data store that manages this fragment.

Specified by:
getStore in interface Fragment
Returns:
the data store that manages this fragment or null if the fragment has not been stored.
See Also:
Fragment.getStore()

getAncestorOrSelf

public Fragment getAncestorOrSelf(String type)
                           throws XBRLException
Description copied from interface: Fragment
Gets the ancestor (or self) fragment with the specified fragment type.

Specified by:
getAncestorOrSelf in interface Fragment
Parameters:
type - The required fragment type of the ancestor (or self).
Returns:
the first ancestor (or self) fragment that matches the specified fragment type working up the XML document structure from the supplied fragment to the root of the XML document. TODO Modify to use Generics so the fragment returned can be of a specific type.
Throws:
XBRLException - if no such ancestor fragment exists.
See Also:
Fragment.getAncestorOrSelf(String)

getChildren

protected <F extends Fragment> FragmentList<F> getChildren(String type)
                                                throws XBRLException
Gets the child fragments with the specified fragment type.

Parameters:
type - The required fragment type of the child.
Returns:
the fragment list of children fragments that match the specified fragment type
Throws:
XBRLException

getSimpleLinks

public FragmentList<SimpleLink> getSimpleLinks()
                                        throws XBRLException
Specified by:
getSimpleLinks in interface Fragment
Returns:
the list of simple links that are children of this fragment.
Throws:
XBRLException
See Also:
Fragment.getSimpleLinks()

getAllChildren

public FragmentList<Fragment> getAllChildren()
                                      throws XBRLException
Description copied from interface: Fragment
Gets all child fragments.

Specified by:
getAllChildren in interface Fragment
Returns:
the fragment list of children fragments or the empty list if no child fragments exist in the data store.
Throws:
XBRLException
See Also:
Fragment.getAllChildren()

getChild

protected Fragment getChild(String type,
                            int index)
                     throws XBRLException
Get a specific child fragment.

Parameters:
type - The fragment type of the required child
index - The index of the required child fragment (among other children of the same type).
Returns:
the child fragment or null if there are no children fragments of the specified type.
Throws:
XBRLException - if the index is out of bounds

getBuilder

public Builder getBuilder()
Description copied from interface: Fragment
Get the fragment builder. Note that the builder is null if the fragment has already been stored in a data store. TODO Should fragments hide the builder property?

Specified by:
getBuilder in interface Fragment
Returns:
the fragment builder or null if one is not available.
See Also:
Fragment.getBuilder()

getResource

public Element getResource()
                    throws XBRLException
Description copied from interface: Fragment
Get the XML resource that is the fragment from the data store.

Specified by:
getResource in interface Fragment
Returns:
the DOM root element of the fragment or null if the resource has not been initialised to a DOM root element.
Throws:
XBRLException
See Also:
Fragment.getResource()

setResource

public void setResource(Element rootElement)
                 throws XBRLException
Description copied from interface: Fragment
Closes down the fragment builder and sets the data and metadata resources for the fragment. This should only be used by Store implementations at the point where a newly built fragment is stored.

Specified by:
setResource in interface Fragment
Parameters:
rootElement - The fragment data.
Throws:
XBRLException - If the builder cannot be shut down or if the resource cannot be set or is null.
See Also:
Fragment.setResource(Element)

getDataRootElement

public Element getDataRootElement()
                           throws XBRLException
Description copied from interface: Fragment
Get the root element of the fragment data.

Specified by:
getDataRootElement in interface Fragment
Returns:
an XML DOM Element that is the root of the fragment data or null if none exists.
Throws:
XBRLException
See Also:
Fragment.getDataRootElement()

getMetadataRootElement

public Element getMetadataRootElement()
                               throws XBRLException
Description copied from interface: Fragment
Get the root element of the fragment data.

Specified by:
getMetadataRootElement in interface Fragment
Returns:
an XML Element that is the root of the fragment data or null if none exists.
Throws:
XBRLException
See Also:
Fragment.getMetadataRootElement()

getDocumentNode

public Document getDocumentNode()
                         throws XBRLException
Description copied from interface: Fragment
Get the XML DOM Document for the fragment data.

Specified by:
getDocumentNode in interface Fragment
Returns:
an XML DOM document for the fragment or null if none exists.
Throws:
XBRLException - if the fragment has not yet been stored.
See Also:
Fragment.getDocumentNode()

isNewFragment

public boolean isNewFragment()
                      throws XBRLException
Description copied from interface: Fragment
Tests if a fragment is new in the sense that it does not have a root data element. This is only used by the SAX content builder to keep track of where the fragment construction process is at. TODO Decide if this can be eliminated by better decoupling the SAX content handler from the fragment implementation.

Specified by:
isNewFragment in interface Fragment
Returns:
true if the fragment is new.
Throws:
XBRLException
See Also:
Fragment.isNewFragment()

getFragmentIndex

public String getFragmentIndex()
Description copied from interface: Fragment
Get the fragment index from the fragment metadata.

Specified by:
getFragmentIndex in interface Fragment
See Also:
Fragment.getFragmentIndex()

setFragmentIndex

public void setFragmentIndex(String index)
                      throws XBRLException
Description copied from interface: Fragment
Set the fragment index. Note that no checks are performed to ensure that the fragment index is unique within the data store. This method instantiates a fragment builder for fragments that do not have a resource property.

Specified by:
setFragmentIndex in interface Fragment
Throws:
XBRLException
See Also:
Fragment.setFragmentIndex(String)

getType

public String getType()
Description copied from interface: Fragment
Get the Fragment type. The fragment type is immutable. No public method is available to set the fragment type.

Specified by:
getType in interface Fragment
Returns:
The full class name of the fragment.
See Also:
Fragment.getType()

setMetaAttribute

public void setMetaAttribute(String name,
                             String value)
                      throws XBRLException
Description copied from interface: Fragment
Set a fragment metadata attribute.

Specified by:
setMetaAttribute in interface Fragment
Parameters:
name - the name of the attribute
value - the value to give to the metadata attribute
Throws:
XBRLException
See Also:
Fragment.setMetaAttribute(String, String)

removeMetaAttribute

public void removeMetaAttribute(String name)
                         throws XBRLException
Description copied from interface: Fragment
Removes a metadata attribute

Specified by:
removeMetaAttribute in interface Fragment
Parameters:
name - The name of the attribute to remove
Throws:
XBRLException
See Also:
Fragment.removeMetaAttribute(String)

getMetaAttribute

public String getMetaAttribute(String name)
                        throws XBRLException
Description copied from interface: Fragment
Get a fragment metadata attribute.

Specified by:
getMetaAttribute in interface Fragment
Parameters:
name - the name of the attribute.
Returns:
The value of the metadata attribute or null if none exists.
Throws:
XBRLException
See Also:
Fragment.getMetaAttribute(String)

appendMetadataElement

public void appendMetadataElement(String eName,
                                  HashMap<String,String> attributes)
                           throws XBRLException
Description copied from interface: Fragment
Appends a child element to the root metadata element.

Specified by:
appendMetadataElement in interface Fragment
Parameters:
eName - Name of the element to be added (no namespaces are used).
attributes - A hashmap from attribute name keys to attribute values.
Throws:
XBRLException
See Also:
Fragment.appendMetadataElement(String, HashMap)

removeMetadataElement

public void removeMetadataElement(String eName,
                                  HashMap<String,String> attributes)
                           throws XBRLException
Description copied from interface: Fragment
removes a child element from the metadata root element by specifying the name of the child and the value of the element's text content and/or the value of a named attribute. All specified information must match for the deletion to succeed.

Specified by:
removeMetadataElement in interface Fragment
Parameters:
eName - Name of the element to be added (no namespaces are used).
attributes - A hashmap from attribute name keys to attribute values.
Throws:
XBRLException - If no deletion happens.
See Also:
Fragment.removeMetadataElement(String, HashMap)

getURI

public String getURI()
              throws XBRLException
Description copied from interface: Fragment
Get the URI of the document containing this fragment.

Specified by:
getURI in interface Fragment
Throws:
XBRLException
See Also:
Fragment.getURI()

setURI

public void setURI(String uri)
            throws XBRLException
Description copied from interface: Fragment
Set the URI of the fragment's document.

Specified by:
setURI in interface Fragment
Parameters:
uri - The string value of the document's absolute URI
Throws:
XBRLException
See Also:
Fragment.setURI(String)

getReferencingLocators

public FragmentList<Locator> getReferencingLocators()
                                             throws XBRLException
Description copied from interface: Fragment
Retrieves a list of all locators that target this fragment.

Specified by:
getReferencingLocators in interface Fragment
Returns:
a list of all locators that target this fragment. The list can be empty.
Throws:
XBRLException
See Also:
Fragment.getReferencingLocators()

getLabels

public FragmentList<LabelResource> getLabels(Networks networks)
                                      throws XBRLException
Specified by:
getLabels in interface Fragment
Parameters:
networks - The networks to use to obtain the labels.
Returns:
a list of label resources for the fragment.
Throws:
XBRLException
See Also:
Fragment.getLabels(org.xbrlapi.networks.Networks)

getLabels

public FragmentList<LabelResource> getLabels()
                                      throws XBRLException
TODO Add methods to get labels based on language and role.

Specified by:
getLabels in interface Fragment
Returns:
a list of label resources for the fragment.
Throws:
XBRLException
See Also:
Fragment.getLabels()

getLabelsWithRole

public FragmentList<LabelResource> getLabelsWithRole(Networks networks,
                                                     String role)
                                              throws XBRLException
Specified by:
getLabelsWithRole in interface Fragment
Parameters:
networks - The networks to get the labels from.
role - The XLink role value
Returns:
the list of labels for this fragment with the specified XLink role.
Throws:
XBRLException
See Also:
Fragment.getLabelsWithRole(Networks, String)

getLabelsWithRole

public FragmentList<LabelResource> getLabelsWithRole(String role)
                                              throws XBRLException
Specified by:
getLabelsWithRole in interface Fragment
Parameters:
role - The XLink role value
Returns:
the list of labels for this fragment with the specified XLink role.
Throws:
XBRLException
See Also:
Fragment.getLabelsWithRole(String)

getLabelsWithLanguage

public FragmentList<LabelResource> getLabelsWithLanguage(Networks networks,
                                                         String language)
                                                  throws XBRLException
Specified by:
getLabelsWithLanguage in interface Fragment
Parameters:
networks - The networks to get the labels from.
language - The xml:lang language codevalue
Returns:
the list of labels for this fragment with the specified language code.
Throws:
XBRLException
See Also:
Fragment.getLabelsWithLanguage(Networks, String)

getLabelsWithLanguage

public FragmentList<LabelResource> getLabelsWithLanguage(String language)
                                                  throws XBRLException
Specified by:
getLabelsWithLanguage in interface Fragment
Parameters:
language - The xml:lang language codevalue
Returns:
the list of labels for this fragment with the specified language code.
Throws:
XBRLException
See Also:
Fragment.getLabelsWithLanguage(String)

getLabelsWithLanguageAndRole

public FragmentList<LabelResource> getLabelsWithLanguageAndRole(Networks networks,
                                                                String language,
                                                                String role)
                                                         throws XBRLException
Specified by:
getLabelsWithLanguageAndRole in interface Fragment
Parameters:
networks - The networks to get the labels from.
language - The xml:lang language codevalue
role - The XLink role value
Returns:
the list of labels for this fragment with the specified language code and XLink role.
Throws:
XBRLException
See Also:
Fragment.getLabelsWithLanguageAndRole(Networks, String, String)

getLabelsWithLanguageAndRole

public FragmentList<LabelResource> getLabelsWithLanguageAndRole(String language,
                                                                String role)
                                                         throws XBRLException
Specified by:
getLabelsWithLanguageAndRole in interface Fragment
Parameters:
language - The xml:lang language codevalue
role - The XLink role value
Returns:
the list of labels for this fragment with the specified language code and XLink role.
Throws:
XBRLException
See Also:
Fragment.getLabelsWithLanguageAndRole(String, String)

getReferences

public FragmentList<ReferenceResource> getReferences()
                                              throws XBRLException
TODO Add methods to get references based on language and role.

Specified by:
getReferences in interface Fragment
Returns:
a list of references for the fragment based on XBRL 2.1 reference arcs.
Throws:
XBRLException
See Also:
Fragment.getReferences()

getNetworks

public Networks getNetworks()
                     throws XBRLException
Specified by:
getNetworks in interface Fragment
Returns:
the collection of networks including relationships that involve this node as a source or a target. Note that the networks are not completed in the sense that arcs are followed to nodes that are then used to gather further relationships.
Throws:
XBRLException
See Also:
Fragment.getNetworks()

getNetworksWithArcrole

public Networks getNetworksWithArcrole(String arcrole)
                                throws XBRLException
Specified by:
getNetworksWithArcrole in interface Fragment
Parameters:
arcrole - the required arcrole value.
Returns:
the collection of networks including relationships that involve this node as a source or a target and that are expressed by arcs with the given arcrole value. Note that the networks are not completed in the sense that arcs are followed to nodes that are then used to gather further relationships.
Throws:
XBRLException
See Also:
Fragment.getNetworksWithArcrole(String)

getNetworksFromWithArcrole

public Networks getNetworksFromWithArcrole(String arcrole)
                                    throws XBRLException
Specified by:
getNetworksFromWithArcrole in interface Fragment
Parameters:
arcrole - the required arcrole value.
Returns:
the collection of networks including relationships that involve this node as a source (not a target) and that are expressed by arcs with the given arcrole value. Note that the networks are not completed in the sense that arcs are followed to nodes that are then used to gather further relationships.
Throws:
XBRLException
See Also:
Fragment.getNetworksFromWithArcrole(String)

getNetworksFromWithRoleAndArcrole

public Networks getNetworksFromWithRoleAndArcrole(String linkrole,
                                                  String arcrole)
                                           throws XBRLException
Specified by:
getNetworksFromWithRoleAndArcrole in interface Fragment
Parameters:
linkrole - the required linkrole value.
arcrole - the required arcrole value.
Returns:
the collection of networks including relationships that involve this node as a source (not a target) and that are expressed by arcs with the given arcrole value in extended links with the given linkrole value. Note that the networks are not completed in the sense that arcs are followed to nodes that are then used to gather further relationships.
Throws:
XBRLException
See Also:
Fragment.getNetworksFromWithRoleAndArcrole(String, String)

getRelatives

public <F extends Fragment> FragmentList<F> getRelatives(String arcrole,
                                                         String linkrole,
                                                         String resourcerole,
                                                         String language,
                                                         boolean getTargets)
                                              throws XBRLException
Specified by:
getRelatives in interface Fragment
Parameters:
arcrole - The xlink:arcrole attribute on the arcs expressing the relationships to the relative fragments.
linkrole - The xlink:role attribute on the extended links containing the relationships to the relative fragments. This criteria is not used if the value is null.
resourcerole - The required xlink:role attribute value on the related fragments. This criteria is not used if the value is null.
language - The required value of the xml:language language encoding on the relative fragments. This criteria is not used if the value is null.
getTargets - The boolean value that is set to true if the relatives are required to be targets of relationships from this fragment and that is set to false otherwise.
Returns:
a list of fragments that meet the specified selection criteria.
Throws:
XBRLException
See Also:
Fragment.getRelatives(String, String, String, String, boolean)

isa

public boolean isa(String superType)
            throws XBRLException
Specified by:
isa in interface Fragment
Parameters:
superType - The specified fragment type to test against.
Returns:
true if the fragment is an extension of the specified fragment type.
Throws:
XBRLException
See Also:
Fragment.isa(String)

getParentIndex

public String getParentIndex()
                      throws XBRLException
Description copied from interface: Fragment
Get the index of the parent fragment or null if the fragment does not have a parent fragment.

Specified by:
getParentIndex in interface Fragment
Returns:
The index of the parent fragment or null if the fragment does not have a parent fragment.
Throws:
XBRLException - if the parent fragment index is not available.
See Also:
Fragment.getParentIndex()

setParentIndex

public void setParentIndex(String index)
                    throws XBRLException
Description copied from interface: Fragment
Set the index of the parent fragment.

Specified by:
setParentIndex in interface Fragment
Parameters:
index - The index of the parent fragment.
Throws:
XBRLException - if the parent fragment index cannot be set.
See Also:
Fragment.setParentIndex(String)

getXPath

public String getXPath()
                throws XBRLException
Description copied from interface: Fragment
Get the XPath to the element in the parent fragment that is the parent element of this fragment's root element.

Specified by:
getXPath in interface Fragment
Returns:
The required xpath.
Throws:
XBRLException
See Also:
Fragment.getXPath()

setSequenceToParentElement

public void setSequenceToParentElement(Vector<Long> children)
                                throws XBRLException
Description copied from interface: Fragment
Sets the sequence of child element counts that describe the path through the parent fragment from its root to the element that has this fragment's root as a child element.

Specified by:
setSequenceToParentElement in interface Fragment
Parameters:
children - The vector of long integers giving the children counts for the parent fragment.
Throws:
XBRLException
See Also:
Fragment.setSequenceToParentElement(Vector)

getSequenceToParentElement

public String[] getSequenceToParentElement()
                                    throws XBRLException
Description copied from interface: Fragment
Get the sequence of steps through the parent fragment DOM to the parent element.

Specified by:
getSequenceToParentElement in interface Fragment
Returns:
The sequence through the parent fragment data to the parent element of this fragment.
Throws:
XBRLException
See Also:
Fragment.getSequenceToParentElement()

getSequenceToParentElementAsString

public String getSequenceToParentElementAsString()
                                          throws XBRLException
Description copied from interface: Fragment
Get the sequence of steps through the parent fragment DOM to the parent element as a string.

Specified by:
getSequenceToParentElementAsString in interface Fragment
Returns:
The sequence through the parent fragment data to the parent element of this fragment.
Throws:
XBRLException
See Also:
Fragment.getSequenceToParentElementAsString()

getPrecedingSiblings

public String getPrecedingSiblings()
                            throws XBRLException
Description copied from interface: Fragment
Get the number of children that precede this fragment's root element in document order in the element that contains it (in the parent element).

Specified by:
getPrecedingSiblings in interface Fragment
Returns:
The required number of preceding siblings.
Throws:
XBRLException
See Also:
Fragment.getPrecedingSiblings()

setPrecedingSiblings

public void setPrecedingSiblings(Vector<Long> children)
                          throws XBRLException
Description copied from interface: Fragment
Set the number of children that precede this fragment's root element in document order in the element that contains it (in the parent element).

Specified by:
setPrecedingSiblings in interface Fragment
Parameters:
children - The list of children counts for the parent fragment.
Throws:
XBRLException - if the parent fragment index cannot be set.
See Also:
Fragment.setPrecedingSiblings(Vector)

removeRelationship

public void removeRelationship(String index)
                        throws XBRLException
Description copied from interface: Fragment
Remove a DTS relationship to the fragment, identifying another DTS fragment that this fragment is no longer related to.

Specified by:
removeRelationship in interface Fragment
Parameters:
index - The index of the target of the relationship to be removed.
Throws:
XBRLException
See Also:
Fragment.removeRelationship(String)

appendID

public void appendID(String id)
              throws XBRLException
Description copied from interface: Fragment
Add an ID (used in XPointer resolution) to the metadata.

Specified by:
appendID in interface Fragment
Parameters:
id - The value of the ID.
Throws:
XBRLException
See Also:
TODO Eliminate the ID metadata element given the existence of the xptr elements.

removeID

public void removeID(String id)
              throws XBRLException
Description copied from interface: Fragment
Remove an ID from the metadata.

Specified by:
removeID in interface Fragment
Parameters:
id - The id to remove.
Throws:
XBRLException
See Also:
TODO remove the redundant parameter from this method.

appendElementSchemeXPointer

public void appendElementSchemeXPointer(String expression)
                                 throws XBRLException
Description copied from interface: Fragment
Add an element Scheme XPointer Expression to the metadata.

Specified by:
appendElementSchemeXPointer in interface Fragment
Parameters:
expression - The XPointer expression
Throws: