com.ihr.xbrl.om.exLinks
Class XLinkElement

java.lang.Object
  extended by com.ihr.xbrl.om.XMLFragment
      extended by com.ihr.xbrl.om.exLinks.XLinkElement
All Implemented Interfaces:
XBRLRelationshipPoint, XMLHasParent, java.lang.Cloneable, javax.xml.namespace.NamespaceContext
Direct Known Subclasses:
XBRLArc, XBRLExtendedLink, XBRLPointerOfARelationship, XBRLRelationship, XBRLSimpleLink

public abstract class XLinkElement
extends XMLFragment

Base class for elements that contains attributes according to the XLink Specification.

In release 2.6.5 of the API the local variables has been replaced by the content of the attributes hash table in the parent XMLFragment object in order to avoid double storage of values.

Author:
Ignacio

Field Summary
static javax.xml.namespace.QName actuate
           
static int ACTUATE
           
static int ARC
           
static javax.xml.namespace.QName arcrole
           
static int ARCROLE
           
static int ETITLE
           
static int EXTENDED
           
static javax.xml.namespace.QName from
           
static int FROM
           
static javax.xml.namespace.QName href
           
static int HREF
           
static javax.xml.namespace.QName label
           
static int LABEL
           
static int LOCATOR
           
static int RESOURCE
           
static javax.xml.namespace.QName role
           
static int ROLE
           
static javax.xml.namespace.QName show
           
static int SHOW
           
static int SIMPLE
           
static javax.xml.namespace.QName title
           
static int TITLE
           
static javax.xml.namespace.QName to
           
static int TO
           
static javax.xml.namespace.QName type
           
static int 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
XLinkElement(DTSContainer dts)
          Creates an XLinkElement object for a DTS without assigning it to a node
XLinkElement(DTSContainer dts, net.sf.saxon.s9api.XdmNode node)
          Creates an XLinkElement object that exist in a DTS and assign it to a node returned by saxonica processor
XLinkElement(XLinkElement other)
          Creates an XLinkElement object by copying another XLinkElement object
 
Method Summary
 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
 java.lang.String getActuate()
          Access to the value of the xlink:actuate property on simple link elements null is returned if the value is not set and there is no actuate attribute on the node
 java.lang.String getArcrole()
          Access to the value of the xlink:arcrole attribute on simple link elements
 java.lang.String getFromTxt()
          Access to the value of the xlink:from attibute on simple link elements (arcs only)
 java.net.URI getHRef()
          Access to the value of the xlink:href attribute on simple link elements The value is not converted to an absolute URI in this function.
 java.lang.String getLabel()
          Access to the value of the xlink:label attribute on simple link elements
 java.lang.String getRole()
          Access to the content of the xlink:role attribute on the XLinkElement returns null if there is no xlink:role attribute on the element
 java.lang.String getShow()
          Access to the value of the xlink:show attribute on simple link elements, null is returned if the value is not set or there is no show attribute on the node
static java.lang.String getStaticLabel()
          Creates a unique string to be used in xlink:label attributes
 java.lang.String getSType()
          Returns a string representation of the xlink:type attribute on simple links.
 java.lang.String getTitle()
          Returns the value of the xlink:title attribute on simple link elements
 java.lang.String getToTxt()
          Access to the value of the xlink:to attribute on simple link elements (arcs only).
static boolean isRequiredAttribute(int elementType, int attributeType)
          Checks whether or not an attribute code is required for an xlink element
static boolean isValidAttribute(int elementType, int attributeType)
          Checks whether or not an attribute code is valid in an xlink element
 void setActuate(java.lang.String actuate)
          Sets the value of the xlink:actuate attribute on simple link elements
 void setArcrole(java.lang.String arcrole)
          Sets the value of the xlink:arcrole attribute on simple link elements
 void setFrom(java.lang.String from)
          Sets the value of the xlink:from attribute on simple link elements (arcs only) since 2.6.5 setting this attribute updates all xlink:label attributes for existing elements in the source of the arc or the element that is the source of the relationship
 void setHRef(java.lang.String href)
          Sets the value of the xlink:href attribute on simple link elements
 void setLabel(java.lang.String label)
          Sets the value of the xlink:label attribute on simple link elements starting with version 2.6.5 setting the value of the label here updates also the value of the xlink:from and xlink:to attributes on relationships.
 void setRole(java.lang.String role)
          Sets the value of the xlink:role attribute to a specific value
 void setShow(java.lang.String show)
          Sets the value of the xlink:show attribute on simple link elements
 void setSType(java.lang.String type)
          Sets the value of the xlink:type attribute on simple links
 void setTitle(java.lang.String title)
          Sets the value for the xlink:title attribute
 void setTo(java.lang.String to)
          Sets the value of the xlink:to attribute on simple link elements (arcs only) since 2.6.5 setting this attribute updates all xlink:label attributes for existing elements in the target of the arc or the element that is the target of the relationship
 
Methods inherited from class com.ihr.xbrl.om.XMLFragment
addAttribute, addChild, addFromRelationship, addNamespace, addNamespace, addToRelationship, addXMLChild, changeBase, checkBase, clear, clone, clone, delAttribute, delAttribute, equals, equalXdmValues, evaluateBoolean, evaluateList, evaluateNode, evaluateNumber, evaluateString, generateId, generateNodeNamespacesAndAttributes, generateNodeValue, generatePrefix, getAttribute, getAttributeQNameValue, getAttributes, getAttributes, getAttributeStringValue, getAttributeValue, getBase, getBase, getBaseURI, getBooleanValue, getChild, getContainer, getContainerDocumentURI, getDeclaredNamespaces, getDocument, getElements, getFragment, getFriendlyName, getFriendlyName, getFromRelationships, getFromRelationships, getFromRelationships, getFromRelationships, getId, getLang, getNamespaceURI, getNodeName, getNumberOfElements, getNumberOfFromRelationships, getNumberOfToRelationships, getOrGenerateId, getParent, getPrefix, getPrefixes, getQNameValue, getRelationshipsBases, getRelationshipsChain, getRelationshipTypes, getStaticNamespace, getStringValue, getToRelationships, getToRelationships, getToRelationships, getToRelationships, getValue, getXPathNamespaceContext, getXPathToNode, getXPathToRoot, getXPointerElementScheme, getXPointerElementScheme, getXPointerShorthandScheme, getXPointerToNode, hashCode, isDead, isNamespaceDefined, objEquals, objHashCode, qNameToString, removeAttribute, removeChild, removeChild, removeFromRelationship, removeToRelationship, removeXMLChild, resetElements, resetHash, resolveHRef, resolveHRef, s_equal2, s_equal2, setAttributes, setBase, setDocument, setDocumentAndReload, setElements, setId, 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

LOCATOR

public static final int LOCATOR
See Also:
Constant Field Values

ARC

public static final int ARC
See Also:
Constant Field Values

RESOURCE

public static final int RESOURCE
See Also:
Constant Field Values

EXTENDED

public static final int EXTENDED
See Also:
Constant Field Values

SIMPLE

public static final int SIMPLE
See Also:
Constant Field Values

ETITLE

public static final int ETITLE
See Also:
Constant Field Values

TYPE

public static final int TYPE
See Also:
Constant Field Values

ROLE

public static final int ROLE
See Also:
Constant Field Values

ARCROLE

public static final int ARCROLE
See Also:
Constant Field Values

TITLE

public static final int TITLE
See Also:
Constant Field Values

SHOW

public static final int SHOW
See Also:
Constant Field Values

ACTUATE

public static final int ACTUATE
See Also:
Constant Field Values

LABEL

public static final int LABEL
See Also:
Constant Field Values

FROM

public static final int FROM
See Also:
Constant Field Values

TO

public static final int TO
See Also:
Constant Field Values

HREF

public static final int HREF
See Also:
Constant Field Values

type

public static final javax.xml.namespace.QName type

role

public static final javax.xml.namespace.QName role

arcrole

public static final javax.xml.namespace.QName arcrole

title

public static final javax.xml.namespace.QName title

show

public static final javax.xml.namespace.QName show

actuate

public static final javax.xml.namespace.QName actuate

label

public static final javax.xml.namespace.QName label

from

public static final javax.xml.namespace.QName from

to

public static final javax.xml.namespace.QName to

href

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

XLinkElement

public XLinkElement(DTSContainer dts,
                    net.sf.saxon.s9api.XdmNode node)
Creates an XLinkElement object that exist in a DTS and assign it to a node returned by saxonica processor

Parameters:
dts -
node -

XLinkElement

public XLinkElement(XLinkElement other)
Creates an XLinkElement object by copying another XLinkElement object

Parameters:
other -

XLinkElement

public XLinkElement(DTSContainer dts)
Creates an XLinkElement object for a DTS without assigning it to a node

Parameters:
dts -
Method Detail

isValidAttribute

public static boolean isValidAttribute(int elementType,
                                       int attributeType)
Checks whether or not an attribute code is valid in an xlink element

Parameters:
elementType -
attributeType -
Returns:
boolean

isRequiredAttribute

public static boolean isRequiredAttribute(int elementType,
                                          int attributeType)
Checks whether or not an attribute code is required for an xlink element

Parameters:
elementType -
attributeType -
Returns:
boolean

getTitle

public final java.lang.String getTitle()
                                throws XBRLRuntimeException
Returns the value of the xlink:title attribute on simple link elements

Returns:
String
Throws:
XBRLRuntimeException

setTitle

public void setTitle(java.lang.String title)
              throws XBRLValidationException
Sets the value for the xlink:title attribute

Parameters:
title -
Throws:
XBRLRuntimeException
XBRLValidationException

getRole

public final java.lang.String getRole()
                               throws XBRLRuntimeException
Access to the content of the xlink:role attribute on the XLinkElement returns null if there is no xlink:role attribute on the element

Returns:
String
Throws:
XBRLRuntimeException

setRole

public void setRole(java.lang.String role)
             throws XBRLValidationException
Sets the value of the xlink:role attribute to a specific value

Parameters:
role -
Throws:
XBRLRuntimeException - if the element type does not accept the xlink:role attribute
XBRLValidationException

getStaticLabel

public static java.lang.String getStaticLabel()
Creates a unique string to be used in xlink:label attributes

Returns:
String

getLabel

public final java.lang.String getLabel()
                                throws XBRLRuntimeException
Access to the value of the xlink:label attribute on simple link elements

Returns:
String
Throws:
XBRLRuntimeException

setLabel

public void setLabel(java.lang.String label)
              throws XBRLRuntimeException
Sets the value of the xlink:label attribute on simple link elements

starting with version 2.6.5 setting the value of the label here updates also the value of the xlink:from and xlink:to attributes on relationships.

Parameters:
label -
Throws:
XBRLRuntimeException

getHRef

public final java.net.URI getHRef()
                           throws XBRLRuntimeException
Access to the value of the xlink:href attribute on simple link elements The value is not converted to an absolute URI in this function.

Returns:
URI with the value of the xlink:href attribute
Throws:
XBRLRuntimeException

setHRef

public void setHRef(java.lang.String href)
             throws XBRLValidationException
Sets the value of the xlink:href attribute on simple link elements

Parameters:
href -
Throws:
XBRLRuntimeException
XBRLValidationException

getArcrole

public final java.lang.String getArcrole()
                                  throws XBRLRuntimeException
Access to the value of the xlink:arcrole attribute on simple link elements

Returns:
String
Throws:
XBRLRuntimeException

setArcrole

public void setArcrole(java.lang.String arcrole)
                throws XBRLValidationException
Sets the value of the xlink:arcrole attribute on simple link elements

Parameters:
arcrole -
Throws:
XBRLRuntimeException
XBRLValidationException

getFromTxt

public final java.lang.String getFromTxt()
                                  throws XBRLRuntimeException
Access to the value of the xlink:from attibute on simple link elements (arcs only)

Returns:
String
Throws:
XBRLRuntimeException

setFrom

public void setFrom(java.lang.String from)
             throws XBRLValidationException
Sets the value of the xlink:from attribute on simple link elements (arcs only)

since 2.6.5 setting this attribute updates all xlink:label attributes for existing elements in the source of the arc or the element that is the source of the relationship

Parameters:
from -
Throws:
XBRLRuntimeException
XBRLValidationException

getToTxt

public final java.lang.String getToTxt()
                                throws XBRLRuntimeException
Access to the value of the xlink:to attribute on simple link elements (arcs only).

Returns:
String
Throws:
XBRLRuntimeException

setTo

public void setTo(java.lang.String to)
           throws XBRLValidationException
Sets the value of the xlink:to attribute on simple link elements (arcs only)

since 2.6.5 setting this attribute updates all xlink:label attributes for existing elements in the target of the arc or the element that is the target of the relationship

Parameters:
to -
Throws:
XBRLRuntimeException
XBRLValidationException

getSType

public final java.lang.String getSType()
                                throws XBRLRuntimeException
Returns a string representation of the xlink:type attribute on simple links. This is "locator" "arc" "resource" ... null would be returned if the value is not set or there is no xlink:type attribute on the node

Returns:
String
Throws:
XBRLRuntimeException

setSType

public void setSType(java.lang.String type)
              throws XBRLRuntimeException
Sets the value of the xlink:type attribute on simple links

Parameters:
type -
Throws:
XBRLRuntimeException

getShow

public final java.lang.String getShow()
                               throws XBRLRuntimeException
Access to the value of the xlink:show attribute on simple link elements, null is returned if the value is not set or there is no show attribute on the node

Returns:
String
Throws:
XBRLRuntimeException

setShow

public void setShow(java.lang.String show)
             throws XBRLValidationException
Sets the value of the xlink:show attribute on simple link elements

Parameters:
show -
Throws:
XBRLRuntimeException
XBRLValidationException

getActuate

public final java.lang.String getActuate()
                                  throws XBRLRuntimeException
Access to the value of the xlink:actuate property on simple link elements null is returned if the value is not set and there is no actuate attribute on the node

Returns:
String
Throws:
XBRLRuntimeException

setActuate

public void setActuate(java.lang.String actuate)
                throws XBRLValidationException
Sets the value of the xlink:actuate attribute on simple link elements

Parameters:
actuate -
Throws:
XBRLRuntimeException
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 XMLFragment
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


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