public class XMLFragment extends java.lang.Object implements javax.xml.namespace.NamespaceContext, XBRLRelationshipPoint, java.lang.Cloneable, XMLHasParent, Thinable, HasAdditionalEqualityForReassignation
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.
| Modifier and Type | Field and Description |
|---|---|
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 int |
EASY_TO_READ
Implemented for contexts, returns a text representation of the context period and optional dimensions.
|
static int |
ELEMENT_LABEL
if the element has an element-label relationship use it before any other label.
|
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 int |
HIDE_COMMON_ACCURACY
Implemented on XBRLFactNumeric to hide d(0) and d(INF) p(INF) and all other suffixes that makes the number fully readable.
|
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 java.util.Comparator<XBRLRelationship> |
OrderComparator2
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 and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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)
Adds the from relationship.
|
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)
Adds the to relationship.
|
void |
addXMLChild(XMLHasParent newChild)
Adds the xml child.
|
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)
Clone.
|
void |
delAttribute(javax.xml.namespace.QName attributeQName)
Removes an attribute from the attributes defined for this XMLFragment.
|
void |
delAttribute(XBRLAttribute attribute)
Del 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)
Generate node value.
|
static java.lang.String |
generatePrefix(java.lang.String namespace)
Returns a prefix that is created automatically and bounds it to the namespace.
|
java.util.Iterator<XBRLAttribute> |
getAllAttributes()
Access to all attributes defined in this XMLFragment
without any filter to remove attributes that belongs to
a parent class in the class hierarchy.
|
XBRLAttribute |
getAttribute(javax.xml.namespace.QName attributeName)
Obtains an XBRLAttribute object that is defined in this XMLFragment or null if not found.
|
boolean |
getAttributeBooleanValue(javax.xml.namespace.QName attributeName,
boolean _default)
Returns a boolean value of the attribute indicated. if the attribute does
not exists, the default value is returned
|
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 a resolved URI considering the content of the xml:base in ancestor nodes and the
document 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()
Gets the base uri.
|
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
This method may be overwriten by other classes in the hierarchy.
|
int |
getElementsHashCode()
Computes the Hashcode of children elements only.
|
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.Collection<XBRLRelationship> |
getFromRelationships(XBRLArcroleType arcrole,
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 regardless the base set the relationship belongs to.
|
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 |
getGenericLabelText()
Returns the text in the first generic label attached to this XMLFragment if any exist
or the empty string if none are found.
|
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 |
getNumberOfAttributes()
Returns the number of attributes defined on this node.
|
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.
|
net.sf.saxon.expr.StaticContext |
getStaticContext()
Returns a StaticContext from this XMLFragment.
|
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.lang.String |
getToolTipText()
Returns a small text with HTML code that can be represented in a tool tip with
information about this XMLFragment.
|
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.Collection<XBRLRelationship> |
getToRelationships(XBRLArcroleType arcrole,
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 regardless the base set the relationship belongs to.
|
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.s9api.XPathExecutable |
getXPathExecutable(java.lang.String strXPath)
Prepares an XPathExecutable from an XPath string that uses this XMLFragment properties
for evaluation.
|
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 |
isXdmDocumentAttached()
This method returns true if this node contains a XdmNode node attached from which
the object was created.
|
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)
Removes the from relationship.
|
void |
removeToRelationship(XBRLRelationship rel)
Removes the to relationship.
|
void |
removeXMLChild(XMLHasParent child)
Removes the xml child.
|
void |
resetElements()
Reset elements.
|
void |
resetHash()
Resets the internal value of the cachedHash to null.
|
boolean |
resolve_equal2(net.sf.saxon.s9api.XdmNode otherXdmNode)
resolves content that is added by this XMLFragment during XMLNode serialization
and may not be available to the lower levels in the hierarchy.
|
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.
|
static boolean |
s_equal2(net.sf.saxon.om.ValueRepresentation<?> item1,
net.sf.saxon.om.ValueRepresentation<?> item2)
Compares two ValueRepresentation instances for equality.
|
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)
Sets the elements.
|
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.
|
static void |
setRegenerateNodeIfnotFound(boolean newValue)
This method sets or resets a flag to change behavior of getDocument() method.
|
void |
setValue(net.sf.saxon.value.AtomicValue value)
Sets the 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
|
int |
size()
For complex type resources this returns the number of children elements that all are XML fragments
This method may be overwriten by other classes in the hierarchy.
|
void |
thin()
Removes from memory all objects that can be obtained back from the surrounding XML
nodes or can be calculated again from other sources.
|
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
|
public static final int XPOINTER
public static final int XPATH
public static final int NO_POSITION
public static int SOURCE_DOCUMENT
getFriendlyName(int, LabelsProvider)public static final int CONCEPT_QNAME
public static final int CONCEPT_LABEL
public static final int FACT_QNAME
public static final int FACT_CONCEPT_LABEL
public static final int FACT_CONCEPT_DATATYPE
public static final int SHORT_TEXT
public static final int ELEMENT_LABEL
public static final int EASY_TO_READ
public static final int HIDE_COMMON_ACCURACY
public static final int PERIOD_TYPE
public static final int PERIOD_VALUE
public static final EmptyIterator<XBRLRelationship> EMPTYRELATIONSHIPSITERATORINSTANCE
public static final EmptyIterator<XMLFragment> EMPTYXMLFRAGMENTITERATORINSTANCE
public static final java.util.Comparator<XBRLRelationship> OrderComparator
public static final java.util.Comparator<XBRLRelationship> OrderComparator2
public static final javax.xml.namespace.QName idQName
the id QName is in the no namespace and has no prefix.
public XMLFragment(DTSContainer dts)
dts - the dtspublic XMLFragment(XMLFragment other)
other - the otherpublic XMLFragment(DTSContainer newDTS, XMLFragment other)
newDTS - the new dtsother - the otherpublic int objHashCode()
public boolean objEquals(java.lang.Object other)
other - Objectpublic XMLFragment clone()
clone in class java.lang.Objectpublic XMLFragment clone(DTSContainer newDTS)
newDTS - the new dtspublic 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 getToolTipText()
public java.lang.String getGenericLabelText()
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 - integerlp - the lppublic static java.lang.String qNameToString(javax.xml.namespace.QName q)
q - the qpublic final void setDocument(net.sf.saxon.s9api.XdmNode doc)
doc - the new document, null is allowed and resets the surrounding document node to nullpublic 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 XdmNodeXBRLInconsistentDTSException - the XBRL inconsistent dts exceptioncom.rs.lic.LicenseVerificationException - the license verification exceptionpublic net.sf.saxon.expr.StaticContext getStaticContext()
public java.lang.String getXPathToRoot()
public java.net.URI getContainerDocumentURI()
In case a document URI cannot be obtained the URI "file:///Unkown" is returned.
public static void setRegenerateNodeIfnotFound(boolean newValue)
if the value is set to true, and the node contains no docNode (it is null because the API has updated the value) the NodeInfo will be regenerated from parent document
if the value is set to false (which is the normal case) the returned value will be null if the fragment contains no NodeInfo node.
newValue - the new value to setgetDocument()public net.sf.saxon.s9api.XdmNode getDocument()
public boolean isXdmDocumentAttached()
public DTSContainer getContainer()
public net.sf.saxon.s9api.XdmValue getValue()
public javax.xml.namespace.QName getQNameValue()
public boolean getBooleanValue()
public java.lang.String getStringValue()
throws XBRLSerializationException
XBRLSerializationException - the XBRL serialization exceptionpublic void setValue(net.sf.saxon.s9api.XdmValue value)
value - the new valuepublic void setValue(net.sf.saxon.value.AtomicValue value)
value - the new valuepublic javax.xml.namespace.QName getNodeName()
public void setNodeName(javax.xml.namespace.QName nodeName)
nodeName - the new node namepublic java.lang.String getId()
public void setId(java.lang.String id)
throws XBRLInconsistentDTSException
id - the new IDXBRLInconsistentDTSException - 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 contentpublic java.net.URI resolveHRef(java.net.URI href,
net.sf.saxon.s9api.XdmNode objS)
href - the href attribute contentobjS - the element with the base-uripublic java.lang.String getFragment(java.lang.String href)
href - the hrefpublic 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.XPathExecutable getXPathExecutable(java.lang.String strXPath)
throws net.sf.saxon.s9api.SaxonApiException
strXPath - the str x pathnet.sf.saxon.s9api.SaxonApiException - the saxon api exceptionpublic net.sf.saxon.s9api.XdmValue evaluateList(java.lang.String strXPath)
strXPath - the str x pathpublic java.lang.String evaluateString(java.lang.String strXPath)
strXPath - the str x pathpublic net.sf.saxon.s9api.XdmItem evaluateNode(java.lang.String strXPath)
strXPath - the str x pathpublic java.lang.Boolean evaluateBoolean(java.lang.String strXPath)
strXPath - the str x pathpublic java.lang.Double evaluateNumber(java.lang.String strXPath)
strXPath - the str x pathpublic net.sf.saxon.value.AtomicValue getAttributeValue(javax.xml.namespace.QName attributeName)
attributeName - Attribute QNamepublic javax.xml.namespace.QName getAttributeQNameValue(javax.xml.namespace.QName attributeName)
attributeName - Attribute QNamepublic boolean getAttributeBooleanValue(javax.xml.namespace.QName attributeName,
boolean _default)
attributeName - the attribute name_default - the _defaultpublic 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 QNamepublic XBRLAttribute getAttribute(javax.xml.namespace.QName attributeName)
attributeName - the attribute namepublic java.lang.String getNamespaceURI(java.lang.String prefix)
getNamespaceURI in interface javax.xml.namespace.NamespaceContextprefix - the prefixpublic java.lang.String getPrefix(java.lang.String namespaceURI)
getPrefix in interface javax.xml.namespace.NamespaceContextnamespaceURI - the namespace uripublic void addNamespace(java.lang.String prefix,
java.lang.String uri)
prefix - the prefixuri - the uripublic 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 - the nodepublic java.lang.String getXPointerElementScheme()
public static java.lang.String getXPointerElementScheme(net.sf.saxon.s9api.XdmNode ni)
ni - the nipublic java.lang.String getXPointerShorthandScheme()
public static java.lang.String generatePrefix(java.lang.String namespace)
namespace - the namespacepublic static java.lang.String getStaticNamespace(java.lang.String prefix)
prefix - Stringpublic java.lang.String getXPathToNode(net.sf.saxon.om.NodeInfo node)
node - the nodepublic void setVariablesDefined(XBRLVariableResolver res)
res - XBRLVariableResolverpublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectother - the otherpublic boolean valueEquals(XMLFragment o)
o - the opublic 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 XBRLRelationshipPointarcrole - the arcrolebase - the basepublic 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 relationshipspublic java.util.Collection<XBRLRelationship> getFromRelationships(XBRLArcroleType arcrole, java.util.Comparator<XBRLRelationship> comparator)
arcrole - the arcrole to filtercomparator - the compataror to order relationshipspublic 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 relationshipspublic java.util.Collection<XBRLRelationship> getToRelationships(XBRLArcroleType arcrole, java.util.Comparator<XBRLRelationship> comparator)
arcrole - the arcrole to filtercomparator - the compataror to order relationshipspublic java.util.Iterator<XBRLRelationship> getFromRelationships(XBRLArcroleType arcrole)
arcrole - XBRLArcroleTypepublic java.util.Iterator<XBRLRelationship> getToRelationships(XBRLArcroleType arcrole)
arcrole - XBRLArcroleTypepublic java.util.Iterator<XBRLRelationship> getFromRelationships()
public int getNumberOfFromRelationships()
public java.util.Iterator<XBRLRelationship> getToRelationships(XBRLArcroleType arcrole, DTSBase base)
getToRelationships in interface XBRLRelationshipPointarcrole - the arcrolebase - the basepublic java.util.Iterator<XBRLRelationship> getToRelationships()
public int getNumberOfToRelationships()
public void addFromRelationship(XBRLRelationship rel) throws XBRLInconsistentDTSException
XBRLRelationshipPointaddFromRelationship in interface XBRLRelationshipPointrel - the relXBRLInconsistentDTSException - the XBRL inconsistent dts exceptionpublic void addToRelationship(XBRLRelationship rel) throws XBRLInconsistentDTSException
XBRLRelationshipPointaddToRelationship in interface XBRLRelationshipPointrel - the relXBRLInconsistentDTSException - the XBRL inconsistent dts exceptionpublic void removeFromRelationship(XBRLRelationship rel) throws XBRLInconsistentDTSException
XBRLRelationshipPointremoveFromRelationship in interface XBRLRelationshipPointrel - the relXBRLInconsistentDTSException - the XBRL inconsistent dts exceptionpublic void removeToRelationship(XBRLRelationship rel) throws XBRLInconsistentDTSException
XBRLRelationshipPointremoveToRelationship in interface XBRLRelationshipPointrel - the relXBRLInconsistentDTSException - the XBRL inconsistent dts exceptionpublic void changeBase(DTSBase oldBase, DTSBase newBase)
oldBase - DTSBase cannot be nullnewBase - DTSBase can be nullpublic java.util.Iterator<DTSBase> getRelationshipsBases() throws XBRLValidationException
XBRLValidationException - the XBRL validation exceptionpublic java.util.Iterator<javax.xml.namespace.QName> getRelationshipTypes(DTSBase base) throws XBRLValidationException
base - the baseXBRLValidationException - the XBRL validation exceptionpublic java.util.Iterator<XBRLRelationshipsChainLink> getRelationshipsChain(DTSBase base, javax.xml.namespace.QName type)
base - the basetype - the typepublic java.lang.String getLang()
public java.net.URI getBase(java.net.URI base)
base - the basepublic java.net.URI getBase()
getBase in interface XMLHasParentpublic void setBase(java.net.URI uri)
uri - as URIpublic void setLang(java.lang.String lang)
lang - the new langpublic static void checkBase(boolean relativize,
java.net.URI base)
throws XBRLSerializationException
relativize - the relativizebase - the baseXBRLSerializationException - the XBRL serialization exceptionpublic 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 relatividedXBRLSerializationException - the XBRL serialization exceptionpublic boolean resolve_equal2(net.sf.saxon.s9api.XdmNode otherXdmNode)
HasAdditionalEqualityForReassignationresolve_equal2 in interface HasAdditionalEqualityForReassignationotherXdmNode - the other xdm nodepublic void setNode(org.jdom.Content node)
node - the new nodepublic 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)
attribute - the attributepublic void setAttributes(java.util.Set<XBRLAttribute> attributeSet)
attributeSet - set of attributes to add or set to this objectpublic void removeAttribute(XBRLAttribute attribute)
attribute - the attributepublic static XBRLAttribute[] getAttributes(DTSContainer dts, net.sf.saxon.s9api.XdmNode node)
dts - DTSContainernode - XdmNode that contains attributespublic java.util.Iterator<XBRLAttribute> getAttributes()
The id attribute is skiped as there is a specific method to access to it and set a value.
This method is overriten by super classes and shall add additional filters to exclude other attributes that belongs to the superclass
getAllAttributes()public final java.util.Iterator<XBRLAttribute> getAllAttributes()
getAttributes()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 scopepublic int getNumberOfElements()
public int getNumberOfAttributes()
at the XMLFragment node element this is not filtered so the id is an attribute and all other attibutes count.
public XMLFragment getChild(int index)
index - integer, 0 basedpublic java.util.Iterator<XMLFragment> getElements()
public int size()
public int getElementsHashCode()
public void setElements(java.util.Iterator<XMLFragment> elementsIter)
elementsIter - Iteratorpublic void addChild(XMLFragment f)
f - the fpublic void resetElements()
public void removeChild(int index)
index - the indexpublic void removeChild(XMLFragment f)
f - the fpublic void generateNodeNamespacesAndAttributes(org.jdom.Content jdomNode)
throws XBRLInconsistentDTSException
jdomNode - org.jom.Content nodeXBRLInconsistentDTSException - the XBRL inconsistent dts exceptionpublic void generateNodeValue(org.jdom.Element jdomNode)
throws XBRLSerializationException
jdomNode - the jdom nodeXBRLSerializationException - the XBRL serialization exceptionpublic static boolean xEqual(net.sf.saxon.value.AtomicValue param1,
net.sf.saxon.value.AtomicValue param2,
boolean bXBRLSpecCompliant)
param1 - the param1param2 - the param2bXBRLSpecCompliant - 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 - the new parentXBRLInconsistentDTSException - the XBRL inconsistent dts exceptionpublic void addXMLChild(XMLHasParent newChild) throws XBRLInconsistentDTSException
XMLHasParentaddXMLChild in interface XMLHasParentnewChild - the childXBRLInconsistentDTSException - the XBRL inconsistent dts exceptionpublic void removeXMLChild(XMLHasParent child)
XMLHasParentremoveXMLChild in interface XMLHasParentchild - the childpublic 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 XMLHasParentpublic 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.Throwable - the throwablepublic boolean isDead()
public static boolean equalXdmValues(net.sf.saxon.s9api.XdmValue val,
net.sf.saxon.s9api.XdmValue val2)
val - XdmValueval2 - XdmValues_equal2(Item, Item, boolean),
s_equal2(ValueRepresentation, ValueRepresentation)public static boolean s_equal2(net.sf.saxon.om.ValueRepresentation<?> item1,
net.sf.saxon.om.ValueRepresentation<?> item2)
item1 - the item1item2 - the item2public void thin()
Thinable