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.
 DTSContainer getContainer()
          Returns the DTSContainer associated to this object
 java.util.Iterator<XBRLExtendedLink> getExtendedLinks()
           
 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

getBaseSet

public DTSBaseSet getBaseSet(XBRLArcroleType arcrole)
                      throws XBRLValidationException
Returns the DTSBaseSet object for this arcrole Type The DTSBaseSet is a HashSet of XBRLRelationshpis

Parameters:
arcrole - or the arcs to filter
Returns:
a DTSBaseSet
Throws:
XBRLValidationException

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