com.ihr.xbrl.om.exLinks
Class DTSBase

java.lang.Object
  extended by com.ihr.xbrl.om.exLinks.DTSBase
All Implemented Interfaces:
java.io.Serializable

public class DTSBase
extends java.lang.Object
implements java.io.Serializable

a DTSBase is a container of all Extended links with the same value in the xlink:role attribute It doesn't matter in which XBRLLinkbase the Extended links are going to be serialized

Author:
Ignacio
See Also:
Serialized Form

Constructor Summary
DTSBase(DTSContainer dts, javax.xml.namespace.QName linkbaseType, XBRLRoleType role)
          Creates an empty base (no extended links)
 
Method Summary
 void addExtendedLink(XBRLExtendedLink extendedLink)
          An optimization of this strategy would be to write down the relationships not the extended links one by one.
 void addRelationship(XBRLRelationship relationship)
           
 void clear()
           
 boolean equals(java.lang.Object obj)
           
 java.util.Iterator<XBRLArcroleType> getArcroles(XBRLExtendedLink filter)
          An iterator over arcroles in one extended link
 DTSBaseSet getBaseSet(XBRLArcroleType arcrole)
          Returns the DTSBaseSet object for this arcrole Type The DTSBaseSet is a HashSet of XBRLRelationshpis.
 java.util.Iterator<XBRLArcroleType> getBaseSetArcroles()
          An iterator over arcroles in all base sets inside this DTSBase
 java.util.Iterator<XBRLRelationship> getBaseSetRelationshipsIterator(XBRLArcroleType arcrole)
          Returns an iterator over the relationships in the base set.
 java.util.Iterator<XBRLRelationship> getBaseSetRelationshipsIterator(XBRLArcroleType arcrole, XBRLValidationReport rep)
          Returns an iterator over the relationships in the base set.
 DTSContainer getContainer()
          Returns the DTSContainer associated to this object
 java.util.Iterator<XBRLExtendedLink> getExtendedLinks()
           
 DTSBaseSet getIneffectualBaseSet(XBRLArcroleType arcrole, EFMProcessor proc, XBRLValidationReport rep)
          This method processes all arcs in a DTSBase and returns all ineffectual relationships in a new constructed instance of a DTSBaseSet.
 javax.xml.namespace.QName getLinkbaseType()
           
 XBRLRoleType getRole()
           
 java.util.Iterator<XBRLResource> getVectorResources(java.lang.String extraXPath)
           
 int hashCode()
           
 boolean removeExtendedLink(XBRLExtendedLink extendedLink)
          Removes an extended link from this base
 boolean removeRelationship(XBRLRelationship relationship)
           
 void serialize(XBRLRelationship rel, XBRLDocument document)
          This function makes sure that: 1- the relationship exists in the appropriate ExtendedLink or creates the extended link 2- If the target is a resource, the resource is included in the ExtendedLink as well
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DTSBase

public DTSBase(DTSContainer dts,
               javax.xml.namespace.QName linkbaseType,
               XBRLRoleType role)
Creates an empty base (no extended links)

Parameters:
dts - DTSContainer object
linkbaseType - QName
role - XBRLRoleType
Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

addExtendedLink

public void addExtendedLink(XBRLExtendedLink extendedLink)
                     throws XBRLInconsistentDTSException
An optimization of this strategy would be to write down the relationships not the extended links one by one. But it is necessary to deal with duplicate arcs before

Parameters:
extendedLink -
Throws:
XBRLInconsistentDTSException

removeExtendedLink

public boolean removeExtendedLink(XBRLExtendedLink extendedLink)
Removes an extended link from this base

Parameters:
extendedLink - to remove
Returns:
boolean. true if it has been removed false if no changes were made

getContainer

public DTSContainer getContainer()
Returns the DTSContainer associated to this object

Returns:
DTSContainer instance associated to this DTSBase

getBaseSetArcroles

public java.util.Iterator<XBRLArcroleType> getBaseSetArcroles()
An iterator over arcroles in all base sets inside this DTSBase

Returns:
Iterator<XBRLArcroleType>

getArcroles

public java.util.Iterator<XBRLArcroleType> getArcroles(XBRLExtendedLink filter)
An iterator over arcroles in one extended link

Parameters:
filter - the extended link to explore for arcroles
Returns:
Iterator<XBRLArcroleType>

getBaseSetRelationshipsIterator

public java.util.Iterator<XBRLRelationship> getBaseSetRelationshipsIterator(XBRLArcroleType arcrole)
Returns an iterator over the relationships in the base set. Arcs are resolved to return only those that are not prohibiting other arcs

Parameters:
arcrole - or the arcs to filter
Returns:
an Iterator object
Throws:
XBRLRuntimeException - encapsulating an XBRLValidationException

getBaseSetRelationshipsIterator

public java.util.Iterator<XBRLRelationship> getBaseSetRelationshipsIterator(XBRLArcroleType arcrole,
                                                                            XBRLValidationReport rep)
Returns an iterator over the relationships in the base set. Arcs are resolved to return only those that are not prohibiting other arcs. This method receives an XBRLValidationReport instance. All errors will be added to that XBRLValidationReport.

Parameters:
arcrole - or the arcs to filter
rep - instance of the XBRLValidationReport where errors will be added.
Returns:
an Iterator object

getBaseSet

public DTSBaseSet getBaseSet(XBRLArcroleType arcrole)
                      throws XBRLRuntimeException
Returns the DTSBaseSet object for this arcrole Type The DTSBaseSet is a HashSet of XBRLRelationshpis. This method may return null under certain conditions such as when another thread has informed this processor to stop operations.

Parameters:
arcrole - or the arcs to filter
Returns:
a DTSBaseSet
Throws:
XBRLRuntimeException - if there were XBRLValidationExceptions that cannot be added to an existing XBRLValidationReport

getIneffectualBaseSet

public DTSBaseSet getIneffectualBaseSet(XBRLArcroleType arcrole,
                                        EFMProcessor proc,
                                        XBRLValidationReport rep)
                                 throws XBRLValidationException
This method processes all arcs in a DTSBase and returns all ineffectual relationships in a new constructed instance of a DTSBaseSet. The only reason for this method to exist is to allow EFM (Edgar Filer Manual) to detect such condition as it is indicated as one error but it is not used for any other reason in the API. Even more, ineffectual relationships shall not be considered as errors by the US SEC as the existing XBRL Specifications already handles all possible situations where a relationship shall be used in combination with other relationships. The existence of such error condition just requires processors to detect things that are not errors in the specification. The existence of this condition could be just a consequence of low quality software written by the SEC or by SEC contractors. We encourage the SEC to properly use the XBRL specifications and concentrate on elaborate EFM rules that are not simply syntactical XBRL rules.

Parameters:
arcrole - the XBRLArcroleType for which relationships are going to be processed
proc - instance of the EFMProcessor in order to recognize if the relationship belongs to an official taxonomy or an extension taxonomy
Returns:
DTSBaseSet
Throws:
XBRLValidationException
Since:
2.7.4

addRelationship

public void addRelationship(XBRLRelationship relationship)
                     throws XBRLValidationException
Parameters:
relationship -
Throws:
XBRLValidationException

removeRelationship

public boolean removeRelationship(XBRLRelationship relationship)
                           throws XBRLInconsistentDTSException
Parameters:
relationship -
Throws:
XBRLInconsistentDTSException
XBRLValidationException

getVectorResources

public java.util.Iterator<XBRLResource> getVectorResources(java.lang.String extraXPath)
                                                    throws javax.xml.xpath.XPathExpressionException,
                                                           XBRLValidationException
Throws:
javax.xml.xpath.XPathExpressionException
XBRLValidationException

getLinkbaseType

public javax.xml.namespace.QName getLinkbaseType()
Returns:
the linkbase type

getRole

public XBRLRoleType getRole()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getExtendedLinks

public java.util.Iterator<XBRLExtendedLink> getExtendedLinks()
Returns:
Iterator<XBRLExtendedLink>

serialize

public void serialize(XBRLRelationship rel,
                      XBRLDocument document)
               throws XBRLSerializationException
This function makes sure that: 1- the relationship exists in the appropriate ExtendedLink or creates the extended link 2- If the target is a resource, the resource is included in the ExtendedLink as well

Parameters:
rel - The Relationship. MUST be a relationship created in this base
document - XBRLDocument MUST be an XBRLIntance or an XBRLLinkbase
Throws:
XBRLValidationException
XBRLSerializationException

clear

public void clear()


Copyright 2006-2009 Reporting Standard S.L., C/ Torrecilla del Puerto 1, 28043, Madrid, Espaņa