|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ihr.xbrl.om.XMLFragment
public class XMLFragment
This is the bottom class of almost every object on this API that represents a node in an XML document.
Methods of this class allows to execute XPath expressions using this node as the context for the XPath expressions. Other methods allows to obtain the XPointers in different formats. Other set of methods keeps track of XLink relationships between the nodes.
| Field Summary | |
|---|---|
static int |
CONCEPT_LABEL
Constant used to indicate formatting options for the friendly name of an object |
static int |
CONCEPT_QNAME
Constant used to indicate formatting options for the friendly name of an object |
static EmptyIterator<XBRLRelationship> |
EMPTYRELATIONSHIPSITERATORINSTANCE
Implements an empty Iterator over relationships returned when there are no relationships to iterate over |
static EmptyIterator<XMLFragment> |
EMPTYXMLFRAGMENTITERATORINSTANCE
Implements an empty Iterator over XMLFragments returned when there are no XMLFragments to iterate over |
static int |
FACT_CONCEPT_DATATYPE
Includes the fact data type in the fact friendly name string. |
static int |
FACT_CONCEPT_LABEL
Constant used to indicate formatting options for the friendly name of an object |
static int |
FACT_QNAME
Constant used to indicate formatting options for the friendly name of an object |
static javax.xml.namespace.QName |
idQName
This is the name of the attribute id defined here for convenience the id QName is in the no namespace and has no prefix |
static int |
NO_POSITION
Constant used to indicate formatting options for the friendly name of an object |
static java.util.Comparator<XBRLRelationship> |
OrderComparator
class to compare two relationships based on the value of the order attribute and order a set of arcs accordingly |
static int |
PERIOD_TYPE
Includes the period type description after the period value |
static int |
PERIOD_VALUE
Includes the period value on XBRLPeriod instances |
static int |
SHORT_TEXT
for resources, this returns the resource text, the id, the xlink:label or the node name in that order |
static int |
SOURCE_DOCUMENT
Constant used to indicate formatting options for the friendly name of an object |
static int |
XPATH
Constant used to indicate formatting options for the friendly name of an object |
static int |
XPOINTER
Constant used to indicate formatting options for the friendly name of an object |
| Constructor Summary | |
|---|---|
XMLFragment(DTSContainer dts)
Creates a new XMLFragment object in a DTS |
|
XMLFragment(DTSContainer newDTS,
XMLFragment other)
Copy all properties from the other object but sets the DTS to a new one. |
|
XMLFragment(XMLFragment other)
Copy constructor for an XMLFragment |
|
| Method Summary | |
|---|---|
void |
addAttribute(XBRLAttribute value)
Adds a new attribute to the set of attributes for this XMLFragment |
void |
addChild(XMLFragment f)
Sets the resource value to a comples type value and adds a fragment to it |
void |
addFromRelationship(XBRLRelationship rel)
|
void |
addNamespace(org.jdom.Namespace ns)
Adds a namespace declaration that will be in the scope of namespaces declared in this node. |
void |
addNamespace(java.lang.String prefix,
java.lang.String uri)
Adds a new namespace and prefix to this object's namespace context. |
void |
addToRelationship(XBRLRelationship rel)
|
void |
addXMLChild(XMLHasParent newChild)
|
void |
changeBase(DTSBase oldBase,
DTSBase newBase)
This object is informed that a DTSBase is going to be deleted. |
static void |
checkBase(boolean relativize,
java.net.URI base)
For internal use only. |
void |
clear()
Frees-up used memory This method should not be invoqued on live objects in the DTS. |
XMLFragment |
clone()
|
XMLFragment |
clone(DTSContainer newDTS)
|
void |
delAttribute(javax.xml.namespace.QName attributeQName)
Removes an attribute from the attributes defined for this XMLFragment |
void |
delAttribute(XBRLAttribute attribute)
|
boolean |
equals(java.lang.Object other)
Sets a new XPathFunctionResolver for this object |
static boolean |
equalXdmValues(net.sf.saxon.s9api.XdmValue val,
net.sf.saxon.s9api.XdmValue val2)
Compares two XdmValue objects and return true if both are the same atomicValues or the same XML nodes. |
java.lang.Boolean |
evaluateBoolean(java.lang.String strXPath)
Evaluates an XPath 2.0 expression using this node as the evaluation conetxt. |
net.sf.saxon.s9api.XdmValue |
evaluateList(java.lang.String strXPath)
Evaluates an XPath 2.0 expression using this node as the evaluation context. |
net.sf.saxon.s9api.XdmItem |
evaluateNode(java.lang.String strXPath)
Evaluates an XPath 2.0 expression using this node as the evaluation conetxt. |
java.lang.Double |
evaluateNumber(java.lang.String strXPath)
Evaluates an XPath 2.0 expression using this node as the evaluation context. |
java.lang.String |
evaluateString(java.lang.String strXPath)
Evaluates an XPath 2.0 expression using this node as the evaluation conetxt. |
static java.lang.String |
generateId()
Generates a new unique ID that can be used during the serialization of objects |
org.jdom.Content |
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 |
void |
generateNodeNamespacesAndAttributes(org.jdom.Content jdomNode)
Adds namespaces and attributes in this node to the Content node supplied as a parameter |
void |
generateNodeValue(org.jdom.Element jdomNode)
|
static java.lang.String |
generatePrefix(java.lang.String namespace)
Returns a prefix that is created automatically and bounds it to the namespace |
XBRLAttribute |
getAttribute(javax.xml.namespace.QName attributeName)
Obtains an XBRLAttribute object that is defined in this XMLFragment or null if not found |
javax.xml.namespace.QName |
getAttributeQNameValue(javax.xml.namespace.QName attributeName)
Returns a Value object with the value of the attribute on this node. |
java.util.Iterator<XBRLAttribute> |
getAttributes()
Access to attributes defined in this node. |
static XBRLAttribute[] |
getAttributes(DTSContainer dts,
net.sf.saxon.s9api.XdmNode node)
Returns an array of attributes in the node supplied as a parameter |
java.lang.String |
getAttributeStringValue(javax.xml.namespace.QName attributeName)
Returns a String with the value of the attribute on this node. |
net.sf.saxon.value.AtomicValue |
getAttributeValue(javax.xml.namespace.QName attributeName)
Returns a Value object with the value of the attribute on this node. |
java.net.URI |
getBase()
Search for an attribute called xml:base on this node and returns the resulting URI |
java.net.URI |
getBase(java.net.URI base)
Search for an attribute called xml:base on this node if set, then resolves the base URI against that attribute and returns the resulting URI |
java.lang.String |
getBaseURI()
|
boolean |
getBooleanValue()
If the value is a Boolean type value then Boolean value is extracted and returned as a boolean. |
XMLFragment |
getChild(int index)
Direct access to the nth child node from this node as parent. |
DTSContainer |
getContainer()
Returns the DTS Container object |
java.net.URI |
getContainerDocumentURI()
Try to obtain this document URI. |
java.util.Iterator<org.jdom.Namespace> |
getDeclaredNamespaces()
Access to the set of declared namespaces in this node. |
net.sf.saxon.s9api.XdmNode |
getDocument()
Returns the surrounding XML Node |
java.util.Iterator<XMLFragment> |
getElements()
For complex type resources this returns an iterator with all children XML fragments Tthis method may be overwriten by other classes in the hierarchy |
java.lang.String |
getFragment(java.lang.String href)
Returns the fragment part of an href. |
java.lang.String |
getFriendlyName()
Returns a string description that represents the element content in a form that users can understand. |
java.lang.String |
getFriendlyName(int modifiers,
LabelsProvider lp)
Returns a string description that represents the element content in a form that users can understand. |
java.util.Iterator<XBRLRelationship> |
getFromRelationships()
Returns the relationship objects that contains this element in the source of the relationship |
java.util.Iterator<XBRLRelationship> |
getFromRelationships(XBRLArcroleType arcrole)
Obtains an iterator over all relationships where this fragment is the source of the relationship and the arcrole corresponds to the parameter indicated. |
java.util.Iterator<XBRLRelationship> |
getFromRelationships(XBRLArcroleType arcrole,
DTSBase base)
Returns the relationship objects that contains this element in the source of the relationship using a filter on the arcrole value |
java.util.Collection<XBRLRelationship> |
getFromRelationships(XBRLArcroleType arcrole,
DTSBase base,
java.util.Comparator<XBRLRelationship> comparator)
Returns a collection of relationship objects that contains this element in the source of the relationship using a filter on the arcrole value and that belongs to a specific base. |
java.lang.String |
getId()
Access to the element's id. |
java.lang.String |
getLang()
Returns the value of the xml:lang attribute on this node or on a parent node Returns null if not specified on this or any parent node |
java.lang.String |
getNamespaceURI(java.lang.String prefix)
Returns the namespace URI for the specified prefix as defined in this node |
javax.xml.namespace.QName |
getNodeName()
Returns this node's name as a QName. |
int |
getNumberOfElements()
If this node has child nodes this method returns how many nodes are there. |
int |
getNumberOfFromRelationships()
Returns the number of relationships this fragment is in its source |
int |
getNumberOfToRelationships()
Returns the number of relationships this fragment is in its target |
java.lang.String |
getOrGenerateId()
Obtain the id for this XMLFragment. if not set then this method will create one unique ID and will set it as the ID for this XMLFragment. |
XMLHasParent |
getParent()
The parent XMLFragment node of this XMLFragment node. |
java.lang.String |
getPrefix(java.lang.String namespaceURI)
Returns the prefix String associated to the given URI as defined in this node |
java.util.Iterator<?> |
getPrefixes(java.lang.String namespaceURI)
|
javax.xml.namespace.QName |
getQNameValue()
Returns this XMLFragment value as a QName If the value is a QName type value the QName is extracted and returned as a QName. |
java.util.Iterator<DTSBase> |
getRelationshipsBases()
Returns an iterator over all DTSBases this object has relationships from |
java.util.Iterator<XBRLRelationshipsChainLink> |
getRelationshipsChain(DTSBase base,
javax.xml.namespace.QName type)
Process all relationships this item is source and returns an iterator over all XBRLRelationshipsChainLink(s) |
java.util.Iterator<javax.xml.namespace.QName> |
getRelationshipTypes(DTSBase base)
Returns an iterator over all QNames of relationship types that exists in a specific base |
static java.lang.String |
getStaticNamespace(java.lang.String prefix)
Returns the namespace URI for a prefix. |
java.lang.String |
getStringValue()
Returns a string representation of the value of this XMLFragment if value is null the function returns null |
java.util.Iterator<XBRLRelationship> |
getToRelationships()
Returns the relationship objects that contains this element in the target of the relationship |
java.util.Iterator<XBRLRelationship> |
getToRelationships(XBRLArcroleType arcrole)
Obtains an iterator over all relationships where this fragment is the target of the relationship and the arcrole corresponds to the parameter indicated. |
java.util.Iterator<XBRLRelationship> |
getToRelationships(XBRLArcroleType arcrole,
DTSBase base)
Returns the relationship objects that contains this element in the target of the relationship or null if there is none |
java.util.Collection<XBRLRelationship> |
getToRelationships(XBRLArcroleType arcrole,
DTSBase base,
java.util.Comparator<XBRLRelationship> comparator)
Returns a collection of relationship objects that contains this element in the target of the relationship using a filter on the arcrole value and that belongs to a specific base. |
net.sf.saxon.s9api.XdmValue |
getValue()
Returns the value of this node. |
net.sf.saxon.om.NamespaceResolver |
getXPathNamespaceContext()
Access to the NamespaceResolver attached to this XMLFragment |
java.lang.String |
getXPathToNode(net.sf.saxon.om.NodeInfo node)
Builds an XPath2 expression that points to the node received as a parameter. |
java.lang.String |
getXPathToRoot()
Returns an XPath 2.0 expression to locate this document's node starting at this document's root This function updates the local namespace context if nodes in the path requires new namespaces to be declared. |
java.lang.String |
getXPointerElementScheme()
generates an XPointer of the form element(/n/m/...) pointing to the node that is the nodeInfo of this fragment |
static java.lang.String |
getXPointerElementScheme(net.sf.saxon.s9api.XdmNode ni)
generates an XPointer of the form element(/n/m/...) pointing to the node that is the nodeInfo of this fragment This is a very slow function and the use is discouraged except for producing logs when the log is necessary. |
java.lang.String |
getXPointerShorthandScheme()
generates an XPointer of the form document-uri#id pointing to the node that is the nodeInfo of this fragment returns null if the element does not have an ID. |
java.lang.String |
getXPointerToNode(net.sf.saxon.om.NodeInfo node)
Generates an xpointer syntax that points to this XMLFragment |
int |
hashCode()
|
boolean |
isDead()
Returns true if the clear method has been called on this object. |
boolean |
isNamespaceDefined(org.jdom.Namespace ns)
Checks if the namespace in the parameter is defined in this node |
boolean |
objEquals(java.lang.Object other)
Access to the equals method on the Object object in the class hierarchy. |
int |
objHashCode()
Access to the hashCode form this object. |
static java.lang.String |
qNameToString(javax.xml.namespace.QName q)
Creates a string representation of a QName following some rules: If the QName has a prefix, the prefix:localName format is used otherwise only localName is returned |
void |
removeAttribute(XBRLAttribute attribute)
Removes an attribute to the set of attributes of this XMLFragment |
void |
removeChild(int index)
Removes an XMLFragment from the list of children elements of this resource |
void |
removeChild(XMLFragment f)
Removes an XMLFragment from the list of children elements of this resource |
void |
removeFromRelationship(XBRLRelationship rel)
|
void |
removeToRelationship(XBRLRelationship rel)
|
void |
removeXMLChild(XMLHasParent child)
|
void |
resetElements()
|
void |
resetHash()
Resets the internal value of the cachedHash to null. |
java.net.URI |
resolveHRef(java.net.URI href)
Resolves an HRef by returning the absolute URI of the document pointed to by the href. |
java.net.URI |
resolveHRef(java.net.URI href,
net.sf.saxon.s9api.XdmNode objS)
Resolves an HRef by returning the absolute URI of the document pointed to by the href. |
static boolean |
s_equal2(net.sf.saxon.om.Item node1,
net.sf.saxon.om.Item node2,
boolean bIncludeIdAttributes)
Resolves s_equal2 comparison of the two nodes. |
boolean |
s_equal2(java.lang.Object other)
Resolves s_equal2 comparison of this node against the other node. |
void |
setAttributes(java.util.Set<XBRLAttribute> attributeSet)
Adds or replaces the attributes of this object with attributes in the set received as a parameter to this method. |
void |
setBase(java.net.URI uri)
Sets an attribute called xml:base on this node or changes the value of that node if it exists |
void |
setDocument(net.sf.saxon.s9api.XdmNode doc)
Changes this object's root node. |
void |
setDocumentAndReload(net.sf.saxon.s9api.XdmNode doc)
This method is called by the XMLFragment object each time the surrounding XdmNode object is set. |
void |
setElements(java.util.Iterator<XMLFragment> elementsIter)
|
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. |
void |
setLang(java.lang.String lang)
Sets the language for this element |
void |
setNamespaceContext(net.sf.saxon.om.NamespaceResolver ns)
Replace the namespace context of this XMLDocument by the new one provided as a parameter |
void |
setNamespaces(java.util.Collection<org.jdom.Namespace> colNamespaces)
One by one add the namespaces in the collection received as a parameter |
void |
setNode(org.jdom.Content node)
Set's this XMLFragment jdomNode to a specific node. |
void |
setNodeName(javax.xml.namespace.QName nodeName)
Sets a new nodeName to this XMLFragment |
void |
setParent(XMLHasParent parent)
Sets the parent of this node to the specific XMLFragment |
void |
setValue(net.sf.saxon.value.AtomicValue value)
|
void |
setValue(net.sf.saxon.s9api.XdmValue value)
Sets the value of this node |
void |
setVariablesDefined(XBRLVariableResolver res)
Sets the object that will serve as a variable resolver for variables in the scope of this object |
java.lang.String |
toString()
Returns the XML representation of this object as an String |
boolean |
valueEquals(XMLFragment o)
Returns true if this elements' values is equal to the parameters' element value. |
static boolean |
xEqual(net.sf.saxon.value.AtomicValue param1,
net.sf.saxon.value.AtomicValue param2,
boolean bXBRLSpecCompliant)
performs the x-equality comparison of two strings as indicated in the XBRL 2.1 specification |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int XPOINTER
getFriendlyName(int, LabelsProvider),
Constant Field Valuespublic static final int XPATH
getFriendlyName(int, LabelsProvider),
Constant Field Valuespublic static final int NO_POSITION
getFriendlyName(int, LabelsProvider),
Constant Field Valuespublic static int SOURCE_DOCUMENT
getFriendlyName(int, LabelsProvider)public static final int CONCEPT_QNAME
getFriendlyName(int, LabelsProvider),
Constant Field Valuespublic static final int CONCEPT_LABEL
getFriendlyName(int, LabelsProvider),
Constant Field Valuespublic static final int FACT_QNAME
getFriendlyName(int, LabelsProvider),
Constant Field Valuespublic static final int FACT_CONCEPT_LABEL
getFriendlyName(int, LabelsProvider),
Constant Field Valuespublic static final int FACT_CONCEPT_DATATYPE
getFriendlyName(int, LabelsProvider),
Constant Field Valuespublic static final int SHORT_TEXT
public static final int PERIOD_TYPE
getFriendlyName(int, LabelsProvider),
Constant Field Valuespublic static final int PERIOD_VALUE
getFriendlyName(int, LabelsProvider),
Constant Field Valuespublic static final EmptyIterator<XBRLRelationship> EMPTYRELATIONSHIPSITERATORINSTANCE
public static final EmptyIterator<XMLFragment> EMPTYXMLFRAGMENTITERATORINSTANCE
public static final java.util.Comparator<XBRLRelationship> OrderComparator
public static final javax.xml.namespace.QName idQName
the id QName is in the no namespace and has no prefix
| Constructor Detail |
|---|
public XMLFragment(DTSContainer dts)
public XMLFragment(XMLFragment other)
other -
XBRLValidationException
public XMLFragment(DTSContainer newDTS,
XMLFragment other)
newDTS - other -
XBRLValidationException| Method Detail |
|---|
public int objHashCode()
public boolean objEquals(java.lang.Object other)
other - Object
public XMLFragment clone()
clone in class java.lang.Objectpublic XMLFragment clone(DTSContainer newDTS)
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getFriendlyName()
Remarks, this method may return very long names not suitable for user interface
public java.lang.String getFriendlyName(int modifiers,
LabelsProvider lp)
This function accepts flags that are defined as constants in XMLFragment in order to modify the output.
modifiers - integer
public static java.lang.String qNameToString(javax.xml.namespace.QName q)
q -
public final void setDocument(net.sf.saxon.s9api.XdmNode doc)
doc -
public void setDocumentAndReload(net.sf.saxon.s9api.XdmNode doc)
throws XBRLInconsistentDTSException,
com.rs.lic.LicenseVerificationException
Overwrite this method in parent objects in order to refresh objects that depends on the surrounding XML nodes.
doc - the new XdmNode
XBRLInconsistentDTSException
com.rs.lic.LicenseVerificationExceptionpublic java.lang.String getXPathToRoot()
public java.net.URI getContainerDocumentURI()
In case a document URI cannot be obtained the URI "file:///Unkown" is returned.
public net.sf.saxon.s9api.XdmNode getDocument()
public DTSContainer getContainer()
public net.sf.saxon.s9api.XdmValue getValue()
public javax.xml.namespace.QName getQNameValue()
org.jdom.IllegalNameException - (RuntimeException) if the value is an illegal QNamepublic boolean getBooleanValue()
public java.lang.String getStringValue()
throws XBRLSerializationException
XBRLSerializationExceptionpublic void setValue(net.sf.saxon.s9api.XdmValue value)
value -
org.jdom.IllegalNameException - (RuntimeException) if value is a QName and the prefix and uri forms an illegal namespace namepublic void setValue(net.sf.saxon.value.AtomicValue value)
public javax.xml.namespace.QName getNodeName()
public void setNodeName(javax.xml.namespace.QName nodeName)
nodeName - public java.lang.String getId()
public void setId(java.lang.String id)
throws XBRLInconsistentDTSException
id - the new ID
XBRLInconsistentDTSException - if the id is not lexicographically validpublic java.lang.String getOrGenerateId()
public static java.lang.String generateId()
public java.net.URI resolveHRef(java.net.URI href)
href - the href attribute content
public java.net.URI resolveHRef(java.net.URI href,
net.sf.saxon.s9api.XdmNode objS)
href - the href attribute contentobjS - the element with the base-uri
public java.lang.String getFragment(java.lang.String href)
href -
public void setNamespaceContext(net.sf.saxon.om.NamespaceResolver ns)
ns - The new namespace context to use in XPath evaluationspublic net.sf.saxon.om.NamespaceResolver getXPathNamespaceContext()
public net.sf.saxon.s9api.XdmValue evaluateList(java.lang.String strXPath)
strXPath -
java.lang.RuntimeException - encapsulating any SaxonApiException produced during XPath evaluation.public java.lang.String evaluateString(java.lang.String strXPath)
strXPath -
public net.sf.saxon.s9api.XdmItem evaluateNode(java.lang.String strXPath)
strXPath -
public java.lang.Boolean evaluateBoolean(java.lang.String strXPath)
strXPath -
public java.lang.Double evaluateNumber(java.lang.String strXPath)
strXPath -
public net.sf.saxon.value.AtomicValue getAttributeValue(javax.xml.namespace.QName attributeName)
attributeName - Attribute QName
public javax.xml.namespace.QName getAttributeQNameValue(javax.xml.namespace.QName attributeName)
attributeName - Attribute QName
public java.lang.String getAttributeStringValue(javax.xml.namespace.QName attributeName)
Unless the getStringValue() method on XMLFragment, this method does not raise an XBRLSerializationException when the value cannot be obtained. If that exception is produced it is encapsulated inside an XBRLRuntimeException instead.
attributeName - Attribute QName
XBRLRuntimeException - encapsulating an XBRLSerializationException (very rare)public XBRLAttribute getAttribute(javax.xml.namespace.QName attributeName)
attributeName -
public java.lang.String getNamespaceURI(java.lang.String prefix)
getNamespaceURI in interface javax.xml.namespace.NamespaceContextpublic java.lang.String getPrefix(java.lang.String namespaceURI)
getPrefix in interface javax.xml.namespace.NamespaceContext
public void addNamespace(java.lang.String prefix,
java.lang.String uri)
prefix - uri -
org.jdom.IllegalNameException - (RuntimeException) if the prefix and uri forms an illegal namespace namepublic java.util.Iterator<?> getPrefixes(java.lang.String namespaceURI)
getPrefixes in interface javax.xml.namespace.NamespaceContextpublic java.lang.String getBaseURI()
public java.lang.String getXPointerToNode(net.sf.saxon.om.NodeInfo node)
node -
public java.lang.String getXPointerElementScheme()
public static java.lang.String getXPointerElementScheme(net.sf.saxon.s9api.XdmNode ni)
public java.lang.String getXPointerShorthandScheme()
public static java.lang.String generatePrefix(java.lang.String namespace)
namespace -
public static java.lang.String getStaticNamespace(java.lang.String prefix)
prefix - String
public java.lang.String getXPathToNode(net.sf.saxon.om.NodeInfo node)
node -
public void setVariablesDefined(XBRLVariableResolver res)
res - XBRLVariableResolverpublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic boolean valueEquals(XMLFragment o)
o -
public int hashCode()
hashCode in class java.lang.Objectpublic void resetHash()
This method is called when the elements to create the hashCode for an XMLFragment has been changed and the old hashCode is no longer valid and must be calculated again.
Sometimes it is not desired to change the old hashValue if the document is persistent and the changes we are made are just temporary.
use with care.
public boolean s_equal2(java.lang.Object other)
other - The other node (preferably an XMLFragment) that contains a non null NodeInfo document.
public static boolean s_equal2(net.sf.saxon.om.Item node1,
net.sf.saxon.om.Item node2,
boolean bIncludeIdAttributes)
node1 - Itemnode2 - ItembIncludeIdAttributes - boolean when nodes are elements, if the elements have id attributes, they may or may not be skiped.
public java.util.Iterator<XBRLRelationship> getFromRelationships(XBRLArcroleType arcrole,
DTSBase base)
getFromRelationships in interface XBRLRelationshipPoint
public java.util.Collection<XBRLRelationship> getFromRelationships(XBRLArcroleType arcrole,
DTSBase base,
java.util.Comparator<XBRLRelationship> comparator)
arcrole - the arcrole to filterbase - the role to filtercomparator - the compataror to order relationships
public java.util.Collection<XBRLRelationship> getToRelationships(XBRLArcroleType arcrole,
DTSBase base,
java.util.Comparator<XBRLRelationship> comparator)
arcrole - the arcrole to filterbase - the role to filtercomparator - the compataror to order relationships
public java.util.Iterator<XBRLRelationship> getFromRelationships(XBRLArcroleType arcrole)
arcrole - XBRLArcroleType
public java.util.Iterator<XBRLRelationship> getToRelationships(XBRLArcroleType arcrole)
arcrole - XBRLArcroleType
public java.util.Iterator<XBRLRelationship> getFromRelationships()
public int getNumberOfFromRelationships()
throws XBRLValidationException
XBRLValidationException
public java.util.Iterator<XBRLRelationship> getToRelationships(XBRLArcroleType arcrole,
DTSBase base)
getToRelationships in interface XBRLRelationshipPointpublic java.util.Iterator<XBRLRelationship> getToRelationships()
XBRLValidationException
public int getNumberOfToRelationships()
throws XBRLValidationException
XBRLValidationException
public void addFromRelationship(XBRLRelationship rel)
throws XBRLInconsistentDTSException
addFromRelationship in interface XBRLRelationshipPointXBRLInconsistentDTSException
public void addToRelationship(XBRLRelationship rel)
throws XBRLInconsistentDTSException
addToRelationship in interface XBRLRelationshipPointXBRLInconsistentDTSException
public void removeFromRelationship(XBRLRelationship rel)
throws XBRLInconsistentDTSException
removeFromRelationship in interface XBRLRelationshipPointXBRLInconsistentDTSException
public void removeToRelationship(XBRLRelationship rel)
throws XBRLInconsistentDTSException
removeToRelationship in interface XBRLRelationshipPointXBRLInconsistentDTSException
public void changeBase(DTSBase oldBase,
DTSBase newBase)
oldBase - DTSBase cannot be nullnewBase - DTSBase can be null
public java.util.Iterator<DTSBase> getRelationshipsBases()
throws XBRLValidationException
XBRLValidationException
public java.util.Iterator<javax.xml.namespace.QName> getRelationshipTypes(DTSBase base)
throws XBRLValidationException
base -
XBRLValidationException
public java.util.Iterator<XBRLRelationshipsChainLink> getRelationshipsChain(DTSBase base,
javax.xml.namespace.QName type)
XBRLValidationExceptionpublic java.lang.String getLang()
public java.net.URI getBase(java.net.URI base)
base -
public java.net.URI getBase()
getBase in interface XMLHasParentbase -
public void setBase(java.net.URI uri)
uri - as URIpublic void setLang(java.lang.String lang)
lang -
public static void checkBase(boolean relativize,
java.net.URI base)
throws XBRLSerializationException
relativize - base -
XBRLSerializationException
public org.jdom.Content generateNode(boolean relativize,
java.net.URI base)
throws XBRLSerializationException
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
XBRLSerializationExceptionpublic void setNode(org.jdom.Content node)
node - public void addAttribute(XBRLAttribute value)
value - the new attribute to be added to this XMLFragmentpublic void delAttribute(javax.xml.namespace.QName attributeQName)
attributeQName - QName of the attribute to removepublic void delAttribute(XBRLAttribute attribute)
public void setAttributes(java.util.Set<XBRLAttribute> attributeSet)
attributeSet - set of attributes to add or set to this objectpublic void removeAttribute(XBRLAttribute attribute)
attribute -
public static XBRLAttribute[] getAttributes(DTSContainer dts,
net.sf.saxon.s9api.XdmNode node)
dts - DTSContainernode - XdmNode that contains attributes
public java.util.Iterator<XBRLAttribute> getAttributes()
The id attribute is skiped as there is a specific method to access to it and set a value.
public void addNamespace(org.jdom.Namespace ns)
ns - Namespacepublic void setNamespaces(java.util.Collection<org.jdom.Namespace> colNamespaces)
colNamespaces - a Collection<Namespace> typepublic java.util.Iterator<org.jdom.Namespace> getDeclaredNamespaces()
Note, declared namespaces are those phisically declared, not the set of in-scope namespaces declared on parent nodes of this node.
public boolean isNamespaceDefined(org.jdom.Namespace ns)
ns - Namespace to check if it is in scope
public int getNumberOfElements()
public XMLFragment getChild(int index)
index - integer, 0 based
IndexArrayOutOfBoundsException - if the element does not have a child at the indicated indexpublic java.util.Iterator<XMLFragment> getElements()
public void setElements(java.util.Iterator<XMLFragment> elementsIter)
elementsIter - Iteratorpublic void addChild(XMLFragment f)
f - public void resetElements()
public void removeChild(int index)
index - public void removeChild(XMLFragment f)
f -
public void generateNodeNamespacesAndAttributes(org.jdom.Content jdomNode)
throws XBRLInconsistentDTSException
jdomNode - org.jom.Content node
XBRLValidationException - in very rare cases (if this node has relationships and an id is not defined and a new id cannot be generated on this node)
XBRLInconsistentDTSException
public void generateNodeValue(org.jdom.Element jdomNode)
throws XBRLSerializationException
XBRLSerializationException
public static boolean xEqual(net.sf.saxon.value.AtomicValue param1,
net.sf.saxon.value.AtomicValue param2,
boolean bXBRLSpecCompliant)
param1 - param2 - bXBRLSpecCompliant - The functions specification requires this parameter to be set to false
because the comformance suite of the functions specification IS NOT XBRL 2.1 compliant. If this
value is set to false, strings are trim() before comparison. if this parameter is set to true
this value obtained as it appears in the XML node (as indicated in secion 4.10 of the XBRL 2.1
specification).
public void setParent(XMLHasParent parent)
throws XBRLInconsistentDTSException
setParent in interface XMLHasParentparent -
XBRLInconsistentDTSException
public void addXMLChild(XMLHasParent newChild)
throws XBRLInconsistentDTSException
addXMLChild in interface XMLHasParentXBRLInconsistentDTSExceptionpublic void removeXMLChild(XMLHasParent child)
removeXMLChild in interface XMLHasParentpublic XMLHasParent getParent()
For XBRLAttribute nodes, the parent is the element node.
For Document nodes the returned value is null
For Embedded document nodes, the returned value is the parent element node.
getParent in interface XMLHasParent
public void clear()
throws java.lang.Throwable
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.
java.lang.Throwablepublic boolean isDead()
public static boolean equalXdmValues(net.sf.saxon.s9api.XdmValue val,
net.sf.saxon.s9api.XdmValue val2)
#s_equal2(Item, Item, true) to compare nodes and s_equal2(ValueRepresentation, ValueRepresentation) for
comparing values.
val - XdmValueval2 - XdmValue
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||