com.ihr.xbrl.om.exLinks
Class XBRLRelationship

java.lang.Object
  extended by com.ihr.xbrl.om.XMLFragment
      extended by com.ihr.xbrl.om.exLinks.XLinkElement
          extended by com.ihr.xbrl.om.exLinks.XBRLRelationship
All Implemented Interfaces:
XBRLRelationshipPoint, XMLHasParent, java.io.Serializable, java.lang.Cloneable, javax.xml.namespace.NamespaceContext

public class XBRLRelationship
extends XLinkElement
implements java.io.Serializable

Author:
Ignacio
See Also:
Serialized Form

Field Summary
static javax.xml.namespace.QName orderQName
           
static javax.xml.namespace.QName priorityQName
           
static javax.xml.namespace.QName useQName
           
 
Fields inherited from class com.ihr.xbrl.om.exLinks.XLinkElement
actuate, ACTUATE, ARC, arcrole, ARCROLE, ETITLE, EXTENDED, FROM, href, HREF, label, LABEL, LOCATOR, RESOURCE, role, ROLE, show, SHOW, SIMPLE, title, TITLE, TO, type, TYPE
 
Fields inherited from class com.ihr.xbrl.om.XMLFragment
CONCEPT_LABEL, CONCEPT_QNAME, EMPTYRELATIONSHIPSITERATORINSTANCE, EMPTYXMLFRAGMENTITERATORINSTANCE, FACT_CONCEPT_DATATYPE, FACT_CONCEPT_LABEL, FACT_QNAME, idQName, NO_POSITION, OrderComparator, PERIOD_TYPE, PERIOD_VALUE, SHORT_TEXT, SOURCE_DOCUMENT, XPATH, XPOINTER
 
Constructor Summary
XBRLRelationship(XBRLExtendedLink parent, DTSContainer dts, XBRLArcroleType arcroleType, XMLFragment from, XMLFragment to, net.sf.saxon.s9api.XdmNode document, XBRLAttribute[] attributes)
          Creates a new relationship object from a XdmNode in a file parent linkbaseType - QName returned by the baseArc.getLinkbaseType()
XBRLRelationship(XBRLExtendedLink parent, javax.xml.namespace.QName type, XMLFragment from, XMLFragment to, XBRLArcroleType arcroleType, XBRLAttribute[] attributes, boolean bValidate)
          Creates a new relationship object programatically.
XBRLRelationship(XBRLRelationship other)
           
 
Method Summary
 void clear()
          Frees-up used memory This method should not be invoqued on live objects in the DTS.
 boolean equals(java.lang.Object obj)
          Sets a new XPathFunctionResolver for this object
 org.jdom.Element generateNode(boolean relativize, java.net.URI base)
          Serializes to a jdom Element the representation of the properties of this Information Item This method should be called from classes derived from this class
 XBRLArcroleType getArcroleType()
          Access to the [Arcrole] property.
 java.util.Iterator<XBRLAttribute> getAttributes()
          Access to the [Attributes] property
 XBRLRelationshipsChainLink getChain()
           
 DTSBase getDTSBase()
          Returns the base property of this relationship
 java.lang.String getFriendlyName()
          Returns a string description that represents the element content in a form that users can understand.
 XMLFragment getFrom()
          Access to the [From] property of a relationship
 java.util.Iterator<XBRLRelationship> getNext()
          Access to the [Following] property of the chain of relationships
 java.lang.Double getOrder()
           
 XBRLExtendedLink getParent()
          Access to the [Parent] property.
 java.util.Iterator<XBRLRelationship> getPrevious()
          Access to the [Preceding] property of the chain of relationships
 int getPriority()
          Access to the [Priority] property
 XMLFragment getTo()
          Access to the [To] property of a relationship
 javax.xml.namespace.QName getType()
          Access to the [Type] property The [Type] property of a relationship is the node name of the surrounding arc link:presentationArc, link:labelArc, link:calculationArc are some examples of values for the [Type] property
 java.lang.Integer getUse()
          Access to the [Use] property
static java.lang.String getUse(int useCode)
           
static int getUse(java.lang.String code)
          Used to convert from string value of use to the integer value.
 int hashCode()
           
 boolean isValidated()
           
 void setArcrole(java.lang.String arcrole)
          Sets the value of the xlink:arcrole attribute on simple link elements
 void setArcroleType(XBRLArcroleType arcrole)
          Sets the value of the [Arcrole] property of this relationship
 void setChain(XBRLRelationshipsChainLink chain)
           
 void setDTSBase(DTSBase base)
          Sets the base property of this relationship
 void setFrom(XMLFragment newFrom)
          sets the [From] property of this relationship
 void setId(java.lang.String id)
          Sets the content of the id attribute of this element the ID MUST not have any space, but null is allowed and removes an id from an XML Fragment.
 java.lang.Double setOrder(java.lang.Double newValue)
          Set the value of the order attribute
 void setParent(XBRLExtendedLink parent)
          Sets the parent of this relationship to a new extended link
 java.lang.Integer setPriority(java.lang.Integer newValue)
          Sets the value of the [Priority] property or resets it if null is used as the new value
 void setTo(XMLFragment newTo)
          Sets the [To] property of this relationship
 void setType(javax.xml.namespace.QName type)
          Sets the [Type] property of this relationship
 java.lang.Integer setUse(java.lang.Integer newValue)
          Sets the value of the [Use] property to XBRLArc.OPTIONAL or XBRLArc.PROHIBITED or reset the value if null is used
 XBRLValidationReport validate(XBRLCoreProcessor proc)
          Performs XLink valiadtion at the arcs level
 
Methods inherited from class com.ihr.xbrl.om.exLinks.XLinkElement
getActuate, getArcrole, getFromTxt, getHRef, getLabel, getRole, getShow, getStaticLabel, getSType, getTitle, getToTxt, isRequiredAttribute, isValidAttribute, setActuate, setFrom, setHRef, setLabel, setRole, setShow, setSType, setTitle, setTo
 
Methods inherited from class com.ihr.xbrl.om.XMLFragment
addAttribute, addChild, addFromRelationship, addNamespace, addNamespace, addToRelationship, addXMLChild, changeBase, checkBase, clone, clone, delAttribute, delAttribute, equalXdmValues, evaluateBoolean, evaluateList, evaluateNode, evaluateNumber, evaluateString, generateId, generateNodeNamespacesAndAttributes, generateNodeValue, generatePrefix, getAttribute, getAttributeQNameValue, getAttributes, getAttributeValue, getBase, getBase, getBaseURI, getBooleanValue, getChild, getContainer, getDeclaredNamespaces, getDocument, getElements, getFragment, getFriendlyName, getFromRelationships, getFromRelationships, getFromRelationships, getId, getLang, getNamespaceURI, getNodeName, getNumberOfElements, getNumberOfFromRelationships, getNumberOfToRelationships, getOrGenerateId, getPrefix, getPrefixes, getQNameValue, getRelationshipsBases, getRelationshipsChain, getRelationshipTypes, getStaticNamespace, getStringValue, getToRelationships, getToRelationships, getToRelationships, getValue, getXPathNamespaceContext, getXPathToNode, getXPathToRoot, getXPointerElementScheme, getXPointerElementScheme, getXPointerShorthandScheme, getXPointerToNode, isNamespaceDefined, objEquals, objHashCode, qNameToString, removeAttribute, removeChild, removeChild, removeFromRelationship, removeToRelationship, removeXMLChild, resetElements, resetHash, resolveHRef, resolveHRef, s_equal2, s_equal2, setAttributes, setBase, setDocument, setDocumentAndReload, setElements, setLang, setNamespaceContext, setNamespaces, setNode, setNodeName, setParent, setValue, setValue, setVariablesDefined, toString, valueEquals, xEqual
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

useQName

public static final javax.xml.namespace.QName useQName

orderQName

public static final javax.xml.namespace.QName orderQName

priorityQName

public static final javax.xml.namespace.QName priorityQName
Constructor Detail

XBRLRelationship

public XBRLRelationship(XBRLExtendedLink parent,
                        DTSContainer dts,
                        XBRLArcroleType arcroleType,
                        XMLFragment from,
                        XMLFragment to,
                        net.sf.saxon.s9api.XdmNode document,
                        XBRLAttribute[] attributes)
                 throws XBRLValidationException
Creates a new relationship object from a XdmNode in a file parent linkbaseType - QName returned by the baseArc.getLinkbaseType()

Parameters:
parent - XBRLExtendedLink of the base arc
dts - DTSContainer
arcroleType - XBRLArcroleType object
from - XMLFragment in the from extreme of this relationship
to - XMLFragment in the to extreme of this relationship
document - NodeInfo surounding node
attributes - XBRLAttribute[] Array of attributes to add to the attributes in the XdmNode. null is a valid value
Throws:
XBRLValidationException

XBRLRelationship

public XBRLRelationship(XBRLExtendedLink parent,
                        javax.xml.namespace.QName type,
                        XMLFragment from,
                        XMLFragment to,
                        XBRLArcroleType arcroleType,
                        XBRLAttribute[] attributes,
                        boolean bValidate)
                 throws XBRLValidationException
Creates a new relationship object programatically. parent linkbaseType - QName returned by the baseArc.getLinkbaseType()

Parameters:
parent - XBRLExtendedLink of the base arc
type - QName relationship node of the arc
from - XMLFragment in the from extreme of this relationship
to - XMLFragment in the to extreme of this relationship
arcroleType - XBRLArcroleType object
attributes - XBRLAttribute[] Array of attributes. Attributes will be "cloned" before linked to this relationship. May be null
bValidate - if this is false then the new relationship will not be validated agsint XBRL 2.1 specification
Throws:
XBRLValidationException

XBRLRelationship

public XBRLRelationship(XBRLRelationship other)
                 throws XBRLValidationException
Throws:
XBRLValidationException
Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class XMLFragment

equals

public boolean equals(java.lang.Object obj)
Description copied from class: XMLFragment
Sets a new XPathFunctionResolver for this object

Overrides:
equals in class XMLFragment

clear

public void clear()
           throws java.lang.Throwable
Description copied from class: XMLFragment
Frees-up used memory

This method should not be invoqued on live objects in the DTS. It is automatically invoqued by the API when an object is no longer used and referenced by other objects. It is save not to call it directly.

Overrides:
clear in class XMLFragment
Throws:
XBRLValidationException
java.lang.Throwable

setId

public void setId(java.lang.String id)
           throws XBRLInconsistentDTSException
Description copied from class: XMLFragment
Sets the content of the id attribute of this element the ID MUST not have any space, but null is allowed and removes an id from an XML Fragment. This method may be overwritten by other classes that require storing an indexed table of elements and IDs in order to prevent duplicate IDs to exist

Overrides:
setId in class XMLFragment
Parameters:
id - the new ID
Throws:
XBRLInconsistentDTSException - if the id is not lexicographically valid

getFrom

public XMLFragment getFrom()
Access to the [From] property of a relationship

Returns:
XMLFragment

getTo

public XMLFragment getTo()
Access to the [To] property of a relationship

Returns:
XMLFragment

getParent

public XBRLExtendedLink getParent()
Access to the [Parent] property. if the relationship does not have a base arc and parent was not set this method returns null

Specified by:
getParent in interface XMLHasParent
Overrides:
getParent in class XMLFragment
Returns:
XBRLExtendedLink

setParent

public void setParent(XBRLExtendedLink parent)
               throws XBRLInconsistentDTSException
Sets the parent of this relationship to a new extended link

Throws:
XBRLInconsistentDTSException
XBRLValidationException

getType

public javax.xml.namespace.QName getType()
Access to the [Type] property The [Type] property of a relationship is the node name of the surrounding arc link:presentationArc, link:labelArc, link:calculationArc are some examples of values for the [Type] property

Returns:
QName

setType

public void setType(javax.xml.namespace.QName type)
Sets the [Type] property of this relationship


getArcroleType

public XBRLArcroleType getArcroleType()
Access to the [Arcrole] property. Returns null if the relationship has a null DTSContainer.

Throws:
XBRLValidationException

setArcroleType

public void setArcroleType(XBRLArcroleType arcrole)
Sets the value of the [Arcrole] property of this relationship

Parameters:
arcrole -
Throws:
XBRLValidationException

setArcrole

public void setArcrole(java.lang.String arcrole)
Description copied from class: XLinkElement
Sets the value of the xlink:arcrole attribute on simple link elements

Overrides:
setArcrole in class XLinkElement

getNext

public java.util.Iterator<XBRLRelationship> getNext()
Access to the [Following] property of the chain of relationships

Throws:
XBRLValidationException

getPrevious

public java.util.Iterator<XBRLRelationship> getPrevious()
Access to the [Preceding] property of the chain of relationships

Throws:
XBRLValidationException

setFrom

public void setFrom(XMLFragment newFrom)
             throws XBRLInconsistentDTSException
sets the [From] property of this relationship

Parameters:
newFrom - XMLFragment
Throws:
XBRLInconsistentDTSException

setTo

public void setTo(XMLFragment newTo)
           throws XBRLInconsistentDTSException
Sets the [To] property of this relationship

Parameters:
newTo - XMLFragment
Throws:
XBRLInconsistentDTSException

getUse

public java.lang.Integer getUse()
Access to the [Use] property


getUse

public static int getUse(java.lang.String code)
Used to convert from string value of use to the integer value. "prohibited" is returned as XBRLArc.PROHIBITED constant and anything else is returned as XBRLArc.OPTIONAL

Parameters:
code - string value to convert to integer value
Returns:
the integer representing the use
Since:
2.6.5

getUse

public static java.lang.String getUse(int useCode)

setUse

public java.lang.Integer setUse(java.lang.Integer newValue)
Sets the value of the [Use] property to XBRLArc.OPTIONAL or XBRLArc.PROHIBITED or reset the value if null is used

Parameters:
newValue -
Returns:
old value
Since:
2.6.5

getPriority

public int getPriority()
Access to the [Priority] property


setPriority

public java.lang.Integer setPriority(java.lang.Integer newValue)
Sets the value of the [Priority] property or resets it if null is used as the new value

Parameters:
newValue - as an Integer
Returns:
old value
Since:
2.6.5

getAttributes

public java.util.Iterator<XBRLAttribute> getAttributes()
Access to the [Attributes] property

Overrides:
getAttributes in class XMLFragment
Returns:
Iterator

getDTSBase

public DTSBase getDTSBase()
Returns the base property of this relationship

Returns:
DTSBase

setDTSBase

public void setDTSBase(DTSBase base)
Sets the base property of this relationship

Parameters:
base -

getOrder

public java.lang.Double getOrder()
Returns:
Double

setOrder

public java.lang.Double setOrder(java.lang.Double newValue)
Set the value of the order attribute

Parameters:
newValue -
Returns:
Double, the old value of the order attribute
Since:
1.0

setChain

public void setChain(XBRLRelationshipsChainLink chain)
Parameters:
chain -

getChain

public XBRLRelationshipsChainLink getChain()
                                    throws XBRLValidationException
Throws:
XBRLValidationException

generateNode

public org.jdom.Element generateNode(boolean relativize,
                                     java.net.URI base)
                              throws XBRLSerializationException
Description copied from class: XMLFragment
Serializes to a jdom Element the representation of the properties of this Information Item This method should be called from classes derived from this class

Overrides:
generateNode in class XLinkElement
Parameters:
relativize - boolean indicating if URIs should be relativized to the base URI (see next argument)
base - the URI to which some attributes of this object should be relativided
Returns:
a clone of the surrounding jdom Element so it can be incorporated into multiple trees
Throws:
XBRLSerializationException

getFriendlyName

public java.lang.String getFriendlyName()
Description copied from class: XMLFragment
Returns a string description that represents the element content in a form that users can understand. This method may be overridden by parent classes.

Remarks, this method may return very long names not suitable for user interface

Overrides:
getFriendlyName in class XMLFragment
Returns:
Non empty String. Internationalization is enabled

validate

public XBRLValidationReport validate(XBRLCoreProcessor proc)
Performs XLink valiadtion at the arcs level


isValidated

public boolean isValidated()


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