public class XMLFragment extends net.sf.saxon.tree.linked.ElementImpl implements java.io.Serializable, javax.xml.namespace.NamespaceContext, XBRLRelationshipPoint, java.lang.Cloneable, HasChangeHashSupport, HasDTSContainer
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 | Class and Description |
---|---|
static class |
XMLFragment.NodeNameIterator<T extends XMLFragment>
A node name iterator to retrieve all children XMLFragments that are
whose node name matches.
|
static class |
XMLFragment.NodeTypeIterator<T extends XMLFragment>
A node type iterator to retrieve all instances of a specific class that are
child of a indicated node.
|
Modifier and Type | Field and Description |
---|---|
static boolean |
ADD_NAMESPACE_INHERIT
The Constant ADD_NAMESPACE_INHERIT.
|
static javax.xml.namespace.QName |
baseQName
The Constant baseQName.
|
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 |
FACT_VALUE
Includes only the fact value.
|
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 javax.xml.namespace.QName |
langQName
The Constant langQName.
|
static javax.xml.namespace.QName |
nil
The Constant nil.
|
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 java.util.Comparator<XBRLRelationship> |
OrderComparatorReverse
The Constant OrderComparatorReverse.
|
static int |
PERIOD_BOP
Includes the period value on XBRLPeriod instances.
|
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 |
RELATIONSHIP_TYPE
if the element is a relationship this generates a string of type "presentation relationship" where "presentation" is
generated from the arc type and other possibilities are recognized as well.
|
static int |
RESOURCE_TYPE
if the element is a resource this generates a string of type "footnote"
generated from the well known resource types.
|
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 dts,
javax.xml.namespace.QName nodeName)
Instantiates a new XML fragment.
|
XMLFragment(DTSContainer dts,
java.lang.String nodeName)
Instantiates a new XML fragment.
|
XMLFragment(DTSContainer dts,
java.lang.String nodeName,
net.sf.saxon.om.NamespaceBinding namespace)
Instantiates a new XML fragment.
|
XMLFragment(DTSContainer dts,
java.lang.String nodeName,
java.lang.String namespaceURI)
Instantiates a new XML fragment.
|
XMLFragment(DTSContainer dts,
java.lang.String nodeName,
java.lang.String prefix,
java.lang.String namespaceURI)
Instantiates a new XML fragment.
|
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 |
---|---|
boolean |
addAttribute(javax.xml.namespace.QName attrName,
net.sf.saxon.value.AnyURIValue uriValue)
Adds the attribute.
|
boolean |
addAttribute(javax.xml.namespace.QName attrName,
net.sf.saxon.value.AtomicValue atomicValue)
Adds the attribute.
|
boolean |
addAttribute(javax.xml.namespace.QName attrName,
boolean booleanValue)
Adds the attribute.
|
boolean |
addAttribute(javax.xml.namespace.QName attrName,
net.sf.saxon.value.BooleanValue booleanValue)
Adds the attribute.
|
boolean |
addAttribute(javax.xml.namespace.QName attrName,
javax.xml.namespace.QName qnameValue)
Adds the attribute.
|
boolean |
addAttribute(javax.xml.namespace.QName attrName,
net.sf.saxon.value.QNameValue qnameValue)
Adds the attribute.
|
boolean |
addAttribute(javax.xml.namespace.QName attrName,
net.sf.saxon.type.SimpleType type,
net.sf.saxon.om.GroundedValue gValue)
Adds the attribute.
|
boolean |
addAttribute(javax.xml.namespace.QName attrName,
java.lang.String strValue)
Adds the attribute.
|
boolean |
addAttribute(javax.xml.namespace.QName attrName,
net.sf.saxon.value.StringValue strValue)
Adds the attribute.
|
boolean |
addAttribute(javax.xml.namespace.QName attrName,
java.net.URI uriValue)
Adds the attribute.
|
boolean |
addAttribute(net.sf.saxon.type.SchemaType schemaType,
java.lang.String attrName,
java.lang.String attrValue,
java.lang.String attrPrefix,
java.lang.String attrNamespace)
Adds the attribute.
|
boolean |
addAttribute(java.lang.String attrName,
net.sf.saxon.value.BooleanValue booleanValue)
Adds the attribute.
|
boolean |
addAttribute(java.lang.String attrName,
net.sf.saxon.value.DecimalValue decimalValue)
Adds the attribute.
|
boolean |
addAttribute(java.lang.String attrName,
net.sf.saxon.value.DoubleValue doubleValue)
Adds the attribute.
|
boolean |
addAttribute(java.lang.String attrName,
net.sf.saxon.value.IntegerValue integerValue)
Adds the attribute.
|
boolean |
addAttribute(java.lang.String attrName,
javax.xml.namespace.QName qnValue)
Adds the attribute.
|
boolean |
addAttribute(java.lang.String attrName,
net.sf.saxon.value.QNameValue qnValue)
Adds the attribute.
|
boolean |
addAttribute(java.lang.String attrName,
net.sf.saxon.type.SimpleType type,
net.sf.saxon.om.GroundedValue gValue)
Adds the attribute.
|
boolean |
addAttribute(java.lang.String attrName,
java.lang.String attrValue)
Adds the attribute.
|
boolean |
addAttribute(XBRLAttribute attr)
Adds the attribute.
|
void |
addChild(XMLFragment f)
Adds a child XMLFragment to this XMLFragment.
|
void |
addChildArray(XMLFragment[] childArray)
Adds an array of XMLFragment to this XMLFragment.
|
void |
addChildAt(XMLFragment f,
int pos)
Adds a child XMLFragment to this XMLFragment at index position.
|
static void |
addChildNode(net.sf.saxon.tree.linked.NodeImpl nodeParent,
net.sf.saxon.tree.linked.NodeImpl childNode)
Adds a child node to the node.
|
static void |
addChildNodeArray(XMLFragment nodeParent,
XMLFragment[] childArray)
Adds an array of XMLFragment to the parent node.
|
static void |
addChildNodeAt(XMLFragment nodeParent,
net.sf.saxon.tree.linked.NodeImpl childNode,
int index)
Adds a child node to the node at index position.
|
void |
addChildNodeInBatch(XMLFragment childNode)
Adds the child node in batch.
|
void |
addComment(java.lang.String commentValue)
Adds the comment.
|
boolean |
addFromRelationship(XBRLRelationship rel)
Adds the from relationship.
|
void |
addNamespace(net.sf.saxon.om.NamespaceBinding 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 |
addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
Adds the property change listener.
|
boolean |
addToRelationship(XBRLRelationship rel)
Adds the to relationship.
|
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.
|
boolean |
childExists(net.sf.saxon.tree.linked.NodeImpl node)
Returns true if the child node exists.
|
void |
clear()
Frees-up used memory
This method should not be invoqued on live objects in the DTS.
|
XMLFragment |
clone()
Clone.
|
XMLFragment |
clone(DTSContainer newDTS)
Clone.
|
void |
commitBatch()
Commit batch.
|
void |
copy(net.sf.saxon.event.Receiver out,
int copyOptions,
int locationId)
This is a copy of the copy method in the ElementImpl class except
that it is able to skip the attributes that shall not be
included in output element because they are added during
XML Schema validation
Copy this node to a given outputter (supporting xsl:copy-of).
|
static net.sf.saxon.tree.linked.CommentImpl |
createComment(java.lang.String commentValue)
Creates a comment node from a String.
|
boolean |
delAttribute(javax.xml.namespace.QName attributeQName)
Removes an attribute from the attributes defined for this XMLFragment.
|
boolean |
delAttribute(java.lang.String attributeName)
Del attribute.
|
void |
delete()
Delete.
|
boolean |
equals(java.lang.Object other)
Equals.
|
static boolean |
equalXdmValues(net.sf.saxon.s9api.XdmValue val,
net.sf.saxon.s9api.XdmValue val2,
AtomicComparerHelper ach)
Compares two XdmValue objects and returns true if both are the same atomicValues or the same XML nodes.
|
<T> T |
findFirstNodeOfClass(java.util.Collection<java.lang.Class<? extends XMLFragment>> nodeSeq)
This method finds a node using a sequence of node classes.
|
int |
findPosition(java.util.Collection<java.lang.Class<? extends XMLFragment>> nodeSeq)
This method finds the position of the child node on this node
after searching for nodes in the nodeSeq sequence.
|
void |
firePropertyChangeEvent(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
Fire property change event.
|
static java.lang.String |
generateId()
Generates a new unique ID that can be used during the serialization of objects.
|
XBRLLocator |
generateLocatorToNode(XMLFragment parent)
Generate locator pointing to this node.
|
XMLFragment |
generateNode()
Serializes to a XMLFragment the representation of the properties of this Information Item
This method should be called from classes derived from this class
|
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.
|
net.sf.saxon.value.AtomicValue |
getAttributeAtomicValue(javax.xml.namespace.QName attributeName)
Gets the attribute atomic value.
|
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
|
net.sf.saxon.om.GroundedValue |
getAttributeGroundedValue(javax.xml.namespace.QName attributeName)
Gets the attribute atomic sequence.
|
javax.xml.namespace.QName |
getAttributeQNameValue(javax.xml.namespace.QName attributeName)
Returns a QName Value object with the value of the attribute on this node.
|
java.util.Iterator<XBRLAttribute> |
getAttributes()
Access to attributes defined in this node.
|
java.lang.String |
getAttributeValue(javax.xml.namespace.QName attributeName)
Returns a String 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.
|
boolean |
getBooleanValue()
If the value is a Boolean type value then Boolean value is extracted and returned
as a boolean.
|
java.util.Collection<net.sf.saxon.om.NodeInfo> |
getChildren()
Returns all children nodes of current node in a Collection.
|
java.lang.String |
getChildStringValue()
This is similar to getStringValue().
|
net.sf.saxon.Configuration |
getConfiguration()
Must override this method in order to access the surrounding configuration on a
node that has no parent document but DTSContainer attached.
|
DTSContainer |
getContainer()
Returns the DTS Container object.
|
java.net.URI |
getContainerDocumentURI()
Try to obtain this document URI.
|
net.sf.saxon.s9api.XdmNode |
getDocument()
Returns the surrounding XML Node.
|
XMLFragment |
getElement(javax.xml.namespace.QName nodeName)
Gets the element.
|
XMLFragment |
getElement(java.lang.String nodeName,
java.lang.String namespace)
Gets the element.
|
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.
|
net.sf.saxon.tree.linked.NodeImpl |
getFirstChild() |
XMLFragment |
getFirstChildNoComment()
NodeImpl contains an useful method called getFirstChild but that
method returns NodeImpl and might return a comment instead of
just Elements.
|
static 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)
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.Collection<XBRLRelationship> |
getFromRelationships(java.util.Comparator<XBRLRelationship> comparator)
Returns the relationship objects that contains this element in the source of the relationship.
|
java.util.Iterator<XBRLRelationship> |
getFromRelationships(int 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(int 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(int 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(int 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.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 |
getId()
Access to the element's id.
|
java.util.List<net.sf.saxon.om.NamespaceBinding> |
getInScopeNamespaces()
Returns a list of namespaces defined in scope of current element, means,
this method explore namespace declarations up to the root element and
collects all them in the returned list.
|
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.
|
net.sf.saxon.tree.linked.NodeImpl |
getLastChild() |
XMLFragment |
getLastChildNoComment()
NodeImpl contains an useful method called getLastChild but that
method returns NodeImpl and might return a comment instead of
just Elements.
|
net.sf.saxon.om.NamePool |
getNamePool()
Gets the saxonica name pool of the node.
|
net.sf.saxon.om.NamespaceBinding |
getNamespaceBinding()
Gets the namespace binding.
|
java.lang.String |
getNamespaceURI(java.lang.String prefix)
Returns the namespace URI for the specified prefix as defined in this node.
|
XMLFragment |
getNextSiblingNoComment()
NodeImpl contains an useful method called getNextSibling but that
method returns NodeImpl and might return a comment instead of
just Elements.
|
javax.xml.namespace.QName |
getNodeName()
Returns this node's name as a QName.
|
XMLFragment |
getNthElement(int index)
Gets the nth child XMLFragment node from this node (numbering from 0).
|
int |
getNumberOfChildren() |
int |
getNumberOfElements()
Returns the number of children elements that are instances of
XMLFragment.
|
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.
|
XBRLDocument |
getParentDocument()
Access to the parent document for this node.
|
XMLFragment |
getParentXBRL()
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<java.lang.String> |
getPrefixes(java.lang.String namespaceURI)
Gets the prefixes.
|
java.util.Set<java.beans.PropertyChangeListener> |
getPropertyChangeListeners(java.lang.String propertyName)
Returns a set of PropertyChangeListeners registered for the corresponding propertyName.
|
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.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.Collection<XBRLRelationship> |
getToRelationships(java.util.Comparator<XBRLRelationship> comparator)
Returns the relationship objects that contains this element in the target of the relationship.
|
java.util.Iterator<XBRLRelationship> |
getToRelationships(int 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(int 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(int 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(int 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.
|
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.
|
XPathOnXMLFragment |
getXPath()
Returns an instance of a class where it is possible to evaluate XPath expressions
using current fragment as XPath context.
|
static java.lang.String |
getXPathFromXPointer(java.lang.String fragment)
Converts an URI Fragment of the form
element(1/2/3/4) or #element(1/2/3/4) into
an XPath expression that shall return the indicated node when evaluated.
|
net.sf.saxon.om.NamespaceResolver |
getXPathNamespaceContext()
Access to the NamespaceResolver attached to this XMLFragment.
|
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 document-uri#element(/n/m/...) pointing to the
node that is the nodeInfo of this fragment
|
static java.lang.String |
getXPointerElementScheme(net.sf.saxon.om.NodeInfo 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 |
getXPointerXPath2Scheme()
generates an XPointer of the form //xbrli:xbrl/tx:Revenues that locates
the node Revenues that exists as the first child of the root element
of an XBRL instance document.
|
boolean |
hasChildNodes() |
int |
hashCode()
Hash code.
|
void |
initialise(net.sf.saxon.om.NodeName elemName,
net.sf.saxon.type.SchemaType elementType,
net.sf.saxon.tree.util.AttributeCollectionImpl atts,
net.sf.saxon.om.NodeInfo parent,
int sequenceNumber)
Initialise.
|
static java.lang.String |
internalToString(DTSContainer dts,
net.sf.saxon.tree.linked.NodeImpl node)
Provides a text representation of this XMLFragment.
|
boolean |
isAttribute(javax.xml.namespace.QName attributeName)
Returns true if the attribute is defined on this node.
|
boolean |
isChangeHashEnabled()
Checks if is change hash enabled.
|
boolean |
isDead()
Returns true if the clear method has been called on this object.
|
boolean |
isEmpty()
Returns true when this XMLFragment has no children XMLFragments.
|
boolean |
isHashDependsOnAtribute(javax.xml.namespace.QName attributeName)
returns true if the hashCode depends on this attribute name.
|
boolean |
isNamespaceDefined(net.sf.saxon.om.NamespaceBinding ns)
Checks if the namespace in the parameter is defined in this node available namespaces
and the prefix matches.
|
boolean |
isNil()
Return true if the fact is nil
it MUST contain a @xsi:nil attribute with value = true.
|
static void |
moveNamespacesUp(XMLFragment root,
XMLFragment elem,
boolean remove)
Deprecated.
|
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.
|
void |
reindex(int newIndex)
Re sets index number of all children nodes
There is a bug in saxonica when elements are deleted from
a node.
|
void |
removeChild(XMLFragment f)
Removes an XMLFragment from the list of children elements of this resource.
|
static void |
removeChildNode(net.sf.saxon.tree.linked.NodeImpl nodeParent,
net.sf.saxon.tree.linked.NodeImpl childNode)
Removes a child node from the list of children elements of this resource.
|
boolean |
removeFromRelationship(XBRLRelationship rel)
Removes the from relationship.
|
void |
removeNamespace(net.sf.saxon.om.NamespaceBinding oldNs)
Removes the namespace.
|
void |
removePropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
Removes the property change listener.
|
boolean |
removeToRelationship(XBRLRelationship rel)
Removes the to relationship.
|
void |
replace(XMLFragment node)
Replaces this fragment in the XML tree with another node.
|
void |
replaceChild(XMLFragment oldFragment,
XMLFragment newFragment)
Replaces a child fragment with a new child fragment.
|
void |
replaceStringValue(java.lang.CharSequence stringValue)
Better use setValue(...).
|
void |
resetElements()
Removes all child nodes from this node and resets the cached hash if the call to
isChangeHashEnabled() returns true. |
java.net.URI |
resolveHRef(java.net.URI href)
Resolves an HRef by returning the absolute URI of the document pointed to by the href.
|
static boolean |
s_equal2_xp2(net.sf.saxon.om.Item node1,
net.sf.saxon.om.Item node2,
boolean bIncludeIdAttributes,
DTSContainer dts,
AtomicComparerHelper ach)
Resolves s_equal2 comparison of the two nodes.
|
boolean |
s_equal2_xp2(java.lang.Object other)
Resolves s_equal2 comparison of this node against the other node. using XPath 2.0 rules
|
static boolean |
s_equal2(net.sf.saxon.om.Item item1,
net.sf.saxon.om.Item item2)
Compares two Item instances for equality.
|
static boolean |
s_equal2(net.sf.saxon.om.Item node1,
net.sf.saxon.om.Item node2,
boolean bIncludeIdAttributes,
DTSContainer dts,
AtomicComparerHelper ach)
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.Sequence item1,
net.sf.saxon.om.Sequence item2)
Compares two Item instances for equality.
|
void |
setAttributeList(net.sf.saxon.om.AttributeCollection atts)
Sets the attribute list.
|
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 |
setChildrenClone(DTSContainer newDTS,
java.util.Collection<net.sf.saxon.om.NodeInfo> childrenVector)
Sets the children clone.
|
void |
setDirty()
Sets the document is dirty and the XML nodes must be rebuild
on the next call to updateXML.
|
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 |
setModified(boolean value)
Sets a flag on the XBRLDocumentRootNode to indicate the document content has been edited.
|
void |
setNamespaceDeclarations(net.sf.saxon.om.NamespaceBinding[] namespaces,
int namespacesUsed)
Sets the namespace declarations.
|
void |
setNamespaces(java.util.Collection<net.sf.saxon.om.NamespaceBinding> colNamespaces)
One by one add the namespaces in the collection received as a parameter.
|
boolean |
setNil(boolean newValue)
Sets the nil attribute to true or false according to the param value.
|
void |
setNodeName(javax.xml.namespace.QName nodeName)
Sets a new nodeName to this XMLFragment.
|
boolean |
setRawParentXBRL(XMLFragment parent)
Sets the parent of this node to the specific XMLFragment.
|
void |
setValue(net.sf.saxon.value.AtomicValue value)
Sets the value of this node as a AtomicValue.
|
void |
setValue(net.sf.saxon.s9api.QName value)
Sets the value of this node as a net.sf.saxon.s9api.QName.
|
void |
setValue(javax.xml.namespace.QName value)
Sets the value of this node as a javax.xml.namespace.QName.
|
void |
setValue(java.lang.String value)
Sets the value of this node.
|
void |
setValue(java.lang.String value,
net.sf.saxon.type.BuiltInAtomicType type)
Sets the value of this node.
|
void |
setValue(net.sf.saxon.s9api.XdmAtomicValue value)
Sets the value of this node as a XdmAtomicValue.
|
void |
setValue(net.sf.saxon.s9api.XdmNode value)
Sets the value of this node as a XdmNode.
|
void |
setValue(net.sf.saxon.s9api.XdmValue value)
Sets the value of this node as a XdmValue.
|
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
|
addAttribute, addNamespace, generateId, getAttributeList, getAttributeValue, getAttributeValue, getBaseURI, getColumnNumber, getDeclaredNamespaces, getDocumentRoot, getLineNumber, getNameCode, getNamespaceList, getNodeKind, getRoot, getSchemaType, getSystemId, getTypeAnnotation, getURIForPrefix, gsetAttributeCollection, isId, isInScopeNamespace, isNilled, iteratePrefixes, removeAttribute, removeTypeAnnotation, rename, setLocation, setNameCode, setNamespaceList, setSystemId, setTypeAnnotation
atomize, compareOrder, comparePosition, getDisplayName, getDocumentNumber, getFingerprint, getLocalPart, getNextInDocument, getNextSibling, getParent, getPhysicalRoot, getPrefix, getPreviousInDocument, getPreviousSibling, getPublicId, getSiblingPosition, getSuccessorElement, getURI, head, insertSiblings, isDeleted, isIdref, isSameNodeInfo, iterate, iterateAxis, iterateAxis, newBuilder, replace
public static final boolean ADD_NAMESPACE_INHERIT
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 FACT_VALUE
public static final int RELATIONSHIP_TYPE
public static final int RESOURCE_TYPE
public static final int PERIOD_TYPE
public static final int PERIOD_VALUE
public static final int PERIOD_BOP
public static final javax.xml.namespace.QName idQName
the id QName is in the no namespace and has no prefix.
public static final javax.xml.namespace.QName nil
public static final javax.xml.namespace.QName langQName
public static final javax.xml.namespace.QName baseQName
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> OrderComparatorReverse
public static final java.util.Comparator<XBRLRelationship> OrderComparator2
public XMLFragment(DTSContainer dts)
dts
- the dtspublic XMLFragment(XMLFragment other)
other
- the otherpublic XMLFragment(DTSContainer newDTS, XMLFragment other)
newDTS
- the new dts, maybe nullother
- the other objectpublic XMLFragment(DTSContainer dts, java.lang.String nodeName, net.sf.saxon.om.NamespaceBinding namespace)
dts
- the dtsnodeName
- the node namenamespace
- the namespacepublic XMLFragment(DTSContainer dts, java.lang.String nodeName, java.lang.String namespaceURI)
dts
- the dtsnodeName
- the node namenamespaceURI
- the namespace URIpublic XMLFragment(DTSContainer dts, java.lang.String nodeName)
dts
- the dtsnodeName
- the node namepublic XMLFragment(DTSContainer dts, java.lang.String nodeName, java.lang.String prefix, java.lang.String namespaceURI)
dts
- the dtsnodeName
- the node nameprefix
- the prefixnamespaceURI
- the namespace URIpublic XMLFragment(DTSContainer dts, javax.xml.namespace.QName nodeName)
dts
- the dtsnodeName
- the node namepublic boolean childExists(net.sf.saxon.tree.linked.NodeImpl node)
node
- the nodefindFirstNodeOfClass(Collection)
,
findPosition(Collection)
public static void addChildNodeAt(XMLFragment nodeParent, net.sf.saxon.tree.linked.NodeImpl childNode, int index)
nodeParent
- the parent nodechildNode
- the node to addindex
- the position before which they are to be inserted: 0 indicates insertion before the
first child, 1 insertion before the second child, and so on.public static void addChildNode(net.sf.saxon.tree.linked.NodeImpl nodeParent, net.sf.saxon.tree.linked.NodeImpl childNode)
nodeParent
- the parent nodechildNode
- the node to addpublic static void addChildNodeArray(XMLFragment nodeParent, XMLFragment[] childArray)
nodeParent
- the node parentchildArray
- the child arraypublic void addChildNodeInBatch(XMLFragment childNode)
childNode
- the child nodepublic void commitBatch()
public int objHashCode()
public boolean objEquals(java.lang.Object other)
other
- Objectpublic void delete()
delete
in interface net.sf.saxon.om.MutableNodeInfo
delete
in class net.sf.saxon.tree.linked.ElementImpl
public java.util.List<net.sf.saxon.om.NamespaceBinding> getInScopeNamespaces()
Elements at the beginning of the list are "closer" to the node than element for same namespaces farther in the list. this might be important when dealing for multiple prefixes defined for the same namespace URI
public XMLFragment clone()
clone
in class java.lang.Object
public XMLFragment clone(DTSContainer newDTS)
newDTS
- the new dtspublic net.sf.saxon.Configuration getConfiguration()
getConfiguration
in interface net.sf.saxon.om.NodeInfo
getConfiguration
in class net.sf.saxon.tree.linked.NodeImpl
public net.sf.saxon.om.NamePool getNamePool()
getNamePool
in interface net.sf.saxon.om.NodeInfo
getNamePool
in class net.sf.saxon.tree.linked.NodeImpl
public void setChildrenClone(DTSContainer newDTS, java.util.Collection<net.sf.saxon.om.NodeInfo> childrenVector)
newDTS
- the new DTSchildrenVector
- the children vectorpublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getFriendlyName()
Remarks, this method may return very long names not suitable for user interface
public java.lang.String getFriendlyName(int modifiers)
Remarks, this method may return very long names not suitable for user interface
modifiers
- allows to modify the text representationpublic java.lang.String getToolTipText()
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 java.lang.String getXPathToRoot()
public java.net.URI getContainerDocumentURI()
In case a document URI cannot be obtained the URI "file:///Unknown" is returned.
public XBRLLocator generateLocatorToNode(XMLFragment parent) throws java.net.URISyntaxException
parent
- the XMLFragment element that will be this node parentjava.net.URISyntaxException
- the URI syntax exceptionpublic net.sf.saxon.s9api.XdmNode getDocument()
public static java.lang.String internalToString(DTSContainer dts, net.sf.saxon.tree.linked.NodeImpl node)
This method can be used in the GUI or in error messages that shows a single XML fragment.
dts
- the DTS that will be used to obtain parameters about the output format. If the
dts parameter is null, the output format will use default valuesnode
- the node to represent@Deprecated public static void moveNamespacesUp(XMLFragment root, XMLFragment elem, boolean remove)
root
- the rootelem
- the elemremove
- the removepublic void copy(net.sf.saxon.event.Receiver out, int copyOptions, int locationId) throws net.sf.saxon.trans.XPathException
copy
in interface net.sf.saxon.om.NodeInfo
copy
in class net.sf.saxon.tree.linked.ElementImpl
out
- The outputtercopyOptions
- the copy optionslocationId
- the location idnet.sf.saxon.trans.XPathException
- the x path exceptionpublic DTSContainer getContainer()
getContainer
in interface HasDTSContainer
public net.sf.saxon.s9api.XdmValue getValue()
When the XMLFragment data type is not simple type and is not mixed content and is not the empty content the getValue() returns null
When the value is against the schema type, this method can fire a RuntimeException encapsulating an XPathException
public javax.xml.namespace.QName getQNameValue()
public boolean getBooleanValue()
public java.lang.String getChildStringValue()
public java.lang.String getStringValue()
getStringValue
in interface net.sf.saxon.om.Item
getStringValue
in interface net.sf.saxon.om.NodeInfo
getStringValue
in class net.sf.saxon.tree.linked.ElementImpl
public void setValue(java.lang.String value)
value
- the new valuepublic void setValue(java.lang.String value, net.sf.saxon.type.BuiltInAtomicType type)
value
- the valuetype
- the typepublic void setValue(net.sf.saxon.s9api.QName value)
value
- the new valuepublic void setValue(javax.xml.namespace.QName value)
value
- the new valuepublic void setValue(net.sf.saxon.s9api.XdmAtomicValue value)
value
- the new valuepublic void setValue(net.sf.saxon.s9api.XdmNode value)
value
- the new valuepublic 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 void initialise(net.sf.saxon.om.NodeName elemName, net.sf.saxon.type.SchemaType elementType, net.sf.saxon.tree.util.AttributeCollectionImpl atts, net.sf.saxon.om.NodeInfo parent, int sequenceNumber)
initialise
in class net.sf.saxon.tree.linked.ElementImpl
elemName
- the elem nameelementType
- the element typeatts
- the attsparent
- the parentsequenceNumber
- the sequence numberpublic java.lang.String getId()
public void setId(java.lang.String id) throws XBRLInconsistentDTSException
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
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 static java.lang.String getFragment(java.lang.String href)
href
- the hrefpublic void setNamespaceDeclarations(net.sf.saxon.om.NamespaceBinding[] namespaces, int namespacesUsed)
setNamespaceDeclarations
in class net.sf.saxon.tree.linked.ElementImpl
namespaces
- the namespacesnamespacesUsed
- the namespaces usedpublic net.sf.saxon.om.NamespaceResolver getXPathNamespaceContext()
public XPathOnXMLFragment getXPath()
public net.sf.saxon.om.GroundedValue getAttributeGroundedValue(javax.xml.namespace.QName attributeName)
attributeName
- the attribute namepublic net.sf.saxon.value.AtomicValue getAttributeAtomicValue(javax.xml.namespace.QName attributeName)
attributeName
- the attribute namepublic java.lang.String getAttributeValue(javax.xml.namespace.QName attributeName)
attributeName
- Attribute QNamepublic boolean isAttribute(javax.xml.namespace.QName attributeName)
attributeName
- the attribute namepublic 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 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.NamespaceContext
prefix
- the prefixpublic java.lang.String getPrefix(java.lang.String namespaceURI)
getInScopeNamespaces()
insteadgetPrefix
in interface javax.xml.namespace.NamespaceContext
namespaceURI
- the namespace uripublic void addNamespace(java.lang.String prefix, java.lang.String uri)
prefix
- the prefixuri
- the uripublic java.util.Iterator<java.lang.String> getPrefixes(java.lang.String namespaceURI)
getPrefixes
in interface javax.xml.namespace.NamespaceContext
namespaceURI
- the namespace URIpublic java.lang.String getXPointerElementScheme()
public static java.lang.String getXPointerElementScheme(net.sf.saxon.om.NodeInfo ni)
ni
- the nipublic static java.lang.String getXPathFromXPointer(java.lang.String fragment)
Note, the returned XPath expression is still using the node numbers, not the node names. In the previous example, the returned XPath expression is /*[1]/*[2]/*[3]/*[4]
fragment
- the fragmentpublic java.lang.String getXPointerShorthandScheme()
public java.lang.String getXPointerXPath2Scheme()
Note, the use of this method is discouraged for hash codes or things like that because the XPath to obtain a node might change if another node with the same name is inserted before the current node. So this method shall be used only to show error messages when the document will not change.
Note2, on very large documents this method might perform bad because in order to know if a node name is unique in the list of sibling nodes all other nodes must be explored.
public static java.lang.String generatePrefix(java.lang.String namespace)
namespace
- the namespacepublic static java.lang.String getStaticNamespace(java.lang.String prefix)
prefix
- Stringpublic boolean equals(java.lang.Object other)
equals
in interface net.sf.saxon.om.NodeInfo
equals
in class net.sf.saxon.tree.linked.NodeImpl
other
- the otherpublic boolean valueEquals(XMLFragment o)
o
- the opublic int hashCode()
hashCode
in interface net.sf.saxon.om.NodeInfo
hashCode
in class java.lang.Object
public void setModified(boolean value)
If this node is an instance of XBRLDocumentRootNode then the modified flag on the root XBRLDocument is set to
the value
parameter. If this node is an instance of the XMLFragment the event is forwarded up to
the parent.
NOTE: A modified document might not be in dirty status; setDirty()
is called when the surrounding
XML requires to be rebuild
value
- boolean true to set the flag as Modified state or false to indicate not modifiedpublic boolean s_equal2(java.lang.Object other)
other
- The other node (preferably an XMLFragment) that contains a non null NodeInfo document.public boolean s_equal2_xp2(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, DTSContainer dts, AtomicComparerHelper ach)
node1
- Itemnode2
- ItembIncludeIdAttributes
- boolean when nodes are elements, if the elements have id attributes, they may or may not be skiped.dts
- the DTSContainer under with the comparison is performed. Note this might be null when comparing XMLFragments that are out of a DTS
in that case dts can be null and proc must not be nullach
- the achpublic static boolean s_equal2_xp2(net.sf.saxon.om.Item node1, net.sf.saxon.om.Item node2, boolean bIncludeIdAttributes, DTSContainer dts, AtomicComparerHelper ach)
node1
- Itemnode2
- ItembIncludeIdAttributes
- boolean when nodes are elements, if the elements have id attributes, they may or may not be skiped.dts
- the DTSContainer under with the comparison is performed. Note this might be null when comparing XMLFragments that are out of a DTS
in that case dts can be null and proc must not be nullach
- the achpublic java.util.Iterator<XBRLRelationship> getFromRelationships(XBRLArcroleType arcrole, DTSBase base)
getFromRelationships
in interface XBRLRelationshipPoint
arcrole
- the arcrolebase
- the basepublic java.util.Iterator<XBRLRelationship> getFromRelationships(int arcrole, DTSBase base)
getFromRelationships
in interface XBRLRelationshipPoint
arcrole
- 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(int 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> getFromRelationships(int 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(int 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.Collection<XBRLRelationship> getToRelationships(int arcrole, java.util.Comparator<XBRLRelationship> comparator)
arcrole
- the arcrole to filtercomparator
- the compataror to order relationshipspublic java.util.Iterator<XBRLRelationship> getFromRelationships(XBRLArcroleType arcrole)
getFromRelationships
in interface XBRLRelationshipPoint
arcrole
- XBRLArcroleTypepublic java.util.Iterator<XBRLRelationship> getFromRelationships(int arcrole)
getFromRelationships
in interface XBRLRelationshipPoint
arcrole
- XBRLArcroleType codepublic java.util.Iterator<XBRLRelationship> getToRelationships(XBRLArcroleType arcrole)
getToRelationships
in interface XBRLRelationshipPoint
arcrole
- XBRLArcroleTypepublic java.util.Iterator<XBRLRelationship> getToRelationships(int arcrole)
getToRelationships
in interface XBRLRelationshipPoint
arcrole
- XBRLArcroleTypepublic java.util.Iterator<XBRLRelationship> getFromRelationships()
getFromRelationships
in interface XBRLRelationshipPoint
public java.util.Collection<XBRLRelationship> getFromRelationships(java.util.Comparator<XBRLRelationship> comparator)
comparator
- the compataror to order relationshipspublic int getNumberOfFromRelationships()
getNumberOfFromRelationships
in interface XBRLRelationshipPoint
public java.util.Iterator<XBRLRelationship> getToRelationships(XBRLArcroleType arcrole, DTSBase base)
getToRelationships
in interface XBRLRelationshipPoint
arcrole
- the arcrolebase
- the basepublic java.util.Iterator<XBRLRelationship> getToRelationships(int arcrole, DTSBase base)
getToRelationships
in interface XBRLRelationshipPoint
arcrole
- the arcrolebase
- the basepublic java.util.Iterator<XBRLRelationship> getToRelationships()
getToRelationships
in interface XBRLRelationshipPoint
public java.util.Collection<XBRLRelationship> getToRelationships(java.util.Comparator<XBRLRelationship> comparator)
comparator
- the compataror to order relationshipspublic int getNumberOfToRelationships()
getNumberOfToRelationships
in interface XBRLRelationshipPoint
public boolean addFromRelationship(XBRLRelationship rel) throws XBRLInconsistentDTSException
addFromRelationship
in interface XBRLRelationshipPoint
rel
- the relXBRLInconsistentDTSException
- the XBRL inconsistent DTS exceptionpublic boolean addToRelationship(XBRLRelationship rel) throws XBRLInconsistentDTSException
addToRelationship
in interface XBRLRelationshipPoint
rel
- the relXBRLInconsistentDTSException
- the XBRL inconsistent DTS exceptionpublic boolean removeFromRelationship(XBRLRelationship rel) throws XBRLInconsistentDTSException
removeFromRelationship
in interface XBRLRelationshipPoint
rel
- the relXBRLInconsistentDTSException
- the XBRL inconsistent DTS exceptionpublic boolean removeToRelationship(XBRLRelationship rel) throws XBRLInconsistentDTSException
removeToRelationship
in interface XBRLRelationshipPoint
rel
- 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
getRelationshipsBases
in interface XBRLRelationshipPoint
XBRLValidationException
- the XBRL validation exceptionpublic java.util.Iterator<javax.xml.namespace.QName> getRelationshipTypes(DTSBase base) throws XBRLValidationException
getRelationshipTypes
in interface XBRLRelationshipPoint
base
- the baseXBRLValidationException
- the XBRL validation exceptionpublic java.util.Iterator<XBRLRelationshipsChainLink> getRelationshipsChain(DTSBase base, javax.xml.namespace.QName type)
getRelationshipsChain
in interface XBRLRelationshipPoint
base
- the basetype
- the typepublic java.lang.String getLang()
public java.net.URI getBase(java.net.URI base)
Can return null if base is null and the document has not been added to a proper parent document otherwise, if the node has no a proper parent and base is not null base is returned
base
- the basepublic java.net.URI getBase()
Can return null if the document has not been added to a proper parent document
public 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 XMLFragment generateNode() throws XBRLSerializationException
XBRLSerializationException
- the XBRL serialization exceptionpublic boolean delAttribute(javax.xml.namespace.QName attributeQName)
attributeQName
- QName of the attribute to removepublic boolean delAttribute(java.lang.String attributeName)
attributeName
- the attribute namepublic XMLFragment getFirstChildNoComment()
public XMLFragment getLastChildNoComment()
public XMLFragment getNextSiblingNoComment()
public void setAttributeList(net.sf.saxon.om.AttributeCollection atts)
setAttributeList
in class net.sf.saxon.tree.linked.ElementImpl
atts
- the new attribute listpublic void setAttributes(java.util.Set<XBRLAttribute> attributeSet)
attributeSet
- set of attributes to add or set to this objectpublic java.util.Iterator<XBRLAttribute> getAttributes()
The id attribute is skipped as there is a specific method to access to it and set a value.
This method is overridden 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(net.sf.saxon.om.NamespaceBinding ns)
ns
- Namespacepublic void setNamespaces(java.util.Collection<net.sf.saxon.om.NamespaceBinding> colNamespaces)
colNamespaces
- a Collection<Namespace> typepublic boolean isNamespaceDefined(net.sf.saxon.om.NamespaceBinding ns)
ns
- Namespace to check if it is in scopepublic XMLFragment getNthElement(int index)
index
- integer, 0 basedpublic java.util.Iterator<XMLFragment> getElements()
public int getNumberOfElements()
public java.util.Collection<net.sf.saxon.om.NodeInfo> getChildren()
public void setElements(java.util.Iterator<XMLFragment> elementsIter)
elementsIter
- Iterator<XBRLFragment>public boolean addAttribute(XBRLAttribute attr)
attr
- the attrpublic boolean addAttribute(java.lang.String attrName, javax.xml.namespace.QName qnValue)
attrName
- the attr nameqnValue
- the qn valuepublic boolean addAttribute(java.lang.String attrName, net.sf.saxon.value.QNameValue qnValue)
attrName
- the attr nameqnValue
- the qn valuepublic boolean addAttribute(java.lang.String attrName, net.sf.saxon.type.SimpleType type, net.sf.saxon.om.GroundedValue gValue)
attrName
- the attr nametype
- the typegValue
- the g valuepublic boolean addAttribute(java.lang.String attrName, net.sf.saxon.value.BooleanValue booleanValue)
attrName
- the attr namebooleanValue
- the boolean valuepublic boolean addAttribute(javax.xml.namespace.QName attrName, net.sf.saxon.type.SimpleType type, net.sf.saxon.om.GroundedValue gValue)
attrName
- the attr nametype
- the typegValue
- the g valuepublic boolean addAttribute(javax.xml.namespace.QName attrName, net.sf.saxon.value.BooleanValue booleanValue)
attrName
- the attr namebooleanValue
- the boolean valuepublic boolean addAttribute(javax.xml.namespace.QName attrName, net.sf.saxon.value.QNameValue qnameValue)
attrName
- the attr nameqnameValue
- the QNameValue valuepublic boolean addAttribute(javax.xml.namespace.QName attrName, javax.xml.namespace.QName qnameValue)
attrName
- the attr nameqnameValue
- the QNameValue valuepublic boolean addAttribute(javax.xml.namespace.QName attrName, net.sf.saxon.value.AnyURIValue uriValue)
attrName
- the attr nameuriValue
- the uri valuepublic boolean addAttribute(javax.xml.namespace.QName attrName, net.sf.saxon.value.StringValue strValue)
attrName
- the attr namestrValue
- the str valuepublic boolean addAttribute(java.lang.String attrName, net.sf.saxon.value.DecimalValue decimalValue)
attrName
- the attr namedecimalValue
- the decimal valuepublic boolean addAttribute(javax.xml.namespace.QName attrName, net.sf.saxon.value.AtomicValue atomicValue)
attrName
- the attr nameatomicValue
- the atomic valuepublic boolean addAttribute(java.lang.String attrName, net.sf.saxon.value.DoubleValue doubleValue)
attrName
- the attr namedoubleValue
- the double valuepublic boolean addAttribute(java.lang.String attrName, net.sf.saxon.value.IntegerValue integerValue)
attrName
- the attr nameintegerValue
- the integer valuepublic boolean addAttribute(javax.xml.namespace.QName attrName, boolean booleanValue)
attrName
- the attr namebooleanValue
- the boolean valuepublic boolean addAttribute(javax.xml.namespace.QName attrName, java.net.URI uriValue)
attrName
- the attr nameuriValue
- the uri valuepublic boolean addAttribute(javax.xml.namespace.QName attrName, java.lang.String strValue)
attrName
- the attr namestrValue
- the str valuepublic boolean addAttribute(java.lang.String attrName, java.lang.String attrValue)
attrName
- the attr nameattrValue
- the attr valuepublic boolean addAttribute(net.sf.saxon.type.SchemaType schemaType, java.lang.String attrName, java.lang.String attrValue, java.lang.String attrPrefix, java.lang.String attrNamespace)
schemaType
- the schema typeattrName
- the attr nameattrValue
- the attr valueattrPrefix
- the attr prefixattrNamespace
- the attr namespacepublic void addChild(XMLFragment f)
This method shall be overridden by subclasses that knows where the child goes in respect with the children
f
- the fpublic void addChildArray(XMLFragment[] childArray)
childArray
- the child arraypublic void addChildAt(XMLFragment f, int pos)
This method shall be overridden by subclasses that knows where the child goes in respect with the children
f
- the fpos
- the pospublic int findPosition(java.util.Collection<java.lang.Class<? extends XMLFragment>> nodeSeq)
nodeSeq
- sequence of node types to searchfindFirstNodeOfClass(Collection)
,
childExists(NodeImpl)
public <T> T findFirstNodeOfClass(java.util.Collection<java.lang.Class<? extends XMLFragment>> nodeSeq)
Note: the last node in the nodeSeq parameter must match the return type
T
- the generic typenodeSeq
- the node seqfindPosition(Collection)
,
childExists(NodeImpl)
public static net.sf.saxon.tree.linked.CommentImpl createComment(java.lang.String commentValue)
commentValue
- the comments valuepublic void replace(XMLFragment node)
node
- the node that will be replacedpublic void replaceChild(XMLFragment oldFragment, XMLFragment newFragment)
oldFragment
- the old child fragment, can be null if newFragment does not replace an existing fragmentnewFragment
- the new child fragment, can be null, oldFragment will be deletedpublic void replaceStringValue(java.lang.CharSequence stringValue)
replaceStringValue
in interface net.sf.saxon.om.MutableNodeInfo
replaceStringValue
in class net.sf.saxon.tree.linked.ElementImpl
stringValue
- the new string valuepublic void resetElements()
isChangeHashEnabled()
returns true.public void removeChild(XMLFragment f)
f
- the fpublic static void removeChildNode(net.sf.saxon.tree.linked.NodeImpl nodeParent, net.sf.saxon.tree.linked.NodeImpl childNode)
nodeParent
- the parent nodechildNode
- the node to removedpublic 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 boolean setRawParentXBRL(XMLFragment parent)
parent
- the new parentpublic XMLFragment getParentXBRL()
For Document nodes the returned value is null
For Embedded document nodes, the returned value is the parent element node.
public XBRLDocument getParentDocument()
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.Throwable
- the throwablepublic boolean isDead()
public boolean isNil()
XMLElementDefinition.getNillable()
public boolean isEmpty()
public boolean setNil(boolean newValue)
newValue
- the new nilpublic static boolean equalXdmValues(net.sf.saxon.s9api.XdmValue val, net.sf.saxon.s9api.XdmValue val2, AtomicComparerHelper ach)
val
- XdmValueval2
- XdmValueach
- the AtomicComparerHelper instance, will be passed as parameter to s_equal2(Item, Item, true, null, ach)s_equal2(Item, Item, boolean, DTSContainer, AtomicComparerHelper)
,
s_equal2(Sequence, Sequence)
public static boolean s_equal2(net.sf.saxon.om.Item item1, net.sf.saxon.om.Item item2)
item1
- the item1item2
- the item2public static boolean s_equal2(net.sf.saxon.om.Sequence item1, net.sf.saxon.om.Sequence item2)
item1
- the item1item2
- the item2public net.sf.saxon.om.NamespaceBinding getNamespaceBinding()
public XMLFragment getElement(javax.xml.namespace.QName nodeName)
nodeName
- the node namepublic XMLFragment getElement(java.lang.String nodeName, java.lang.String namespace)
nodeName
- the node namenamespace
- the namespacepublic void addComment(java.lang.String commentValue)
commentValue
- the comment valuepublic void removeNamespace(net.sf.saxon.om.NamespaceBinding oldNs)
oldNs
- the old nspublic void reindex(int newIndex)
There is a bug in saxonica when elements are deleted from a node. While the number of nodes is more than one and the children array exists, the indexes are OK. When two elements are in the children array, the first one is index number 0 and the second one is index number 1 and the first one is deleted, the array is converted into a single element (the one with reference 1) but the index number is not updated from 1 to 0
A call to reindex takes care of this bug
newIndex
- the new indexpublic void setDirty()
public boolean isHashDependsOnAtribute(javax.xml.namespace.QName attributeName)
resetHash()
. If it is well known that
this attribute is not used in the hashCode calculation then
it is better to return false.
This method shall be overridden by sub classes
attributeName
- the attribute namepublic boolean isChangeHashEnabled()
isChangeHashEnabled
in interface HasChangeHashSupport
public void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
addPropertyChangeListener
in interface HasChangeHashSupport
propertyName
- the property namelistener
- the listenerpublic void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
removePropertyChangeListener
in interface HasChangeHashSupport
propertyName
- the property namelistener
- the listenerpublic void firePropertyChangeEvent(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
firePropertyChangeEvent
in interface HasChangeHashSupport
propertyName
- the property nameoldValue
- the old valuenewValue
- the new valuepublic java.util.Set<java.beans.PropertyChangeListener> getPropertyChangeListeners(java.lang.String propertyName)
propertyName
- as stringpublic final boolean hasChildNodes()
hasChildNodes
in interface net.sf.saxon.om.NodeInfo
hasChildNodes
in class net.sf.saxon.tree.linked.NodeImpl
public final int getNumberOfChildren()
public final net.sf.saxon.tree.linked.NodeImpl getFirstChild()
getFirstChild
in interface net.sf.saxon.tree.util.SteppingNode<net.sf.saxon.tree.linked.NodeImpl>
getFirstChild
in class net.sf.saxon.tree.linked.NodeImpl
public final net.sf.saxon.tree.linked.NodeImpl getLastChild()
getLastChild
in class net.sf.saxon.tree.linked.NodeImpl
Copyright 2006-2015 Reporting Standard S.L., C/ Torrecilla del Puerto 1, 28043, Madrid, Espaņa