public class XBRLContext extends XMLFragment implements java.lang.Cloneable, XBRLValidation, HasEqualsCache
An XBRL Context contains:
| Content | Description | 
|---|---|
| XBRLEntity | Content about the reporting entity | 
| XBRLPeriod | Content about the reporting period, instant or duration | 
| XBRLScenario | Content about the reporting scenario. Collection of XML nodes | 
XMLFragment.NodeNameIterator<T extends XMLFragment>, XMLFragment.NodeTypeIterator<T extends XMLFragment>XBRLValidation.Direction| Modifier and Type | Field and Description | 
|---|---|
| static javax.xml.namespace.QName | contextNodeThe QName of the XML element that is the container of context information. | 
| static net.sf.saxon.om.StructuredQName | sqnContextNodeThe Constant sqnContextNode. | 
ADD_NAMESPACE_INHERIT, baseQName, CONCEPT_LABEL, CONCEPT_QNAME, EASY_TO_READ, ELEMENT_LABEL, EMPTYRELATIONSHIPSITERATORINSTANCE, EMPTYXMLFRAGMENTITERATORINSTANCE, FACT_CONCEPT_DATATYPE, FACT_CONCEPT_LABEL, FACT_QNAME, FACT_VALUE, HIDE_COMMON_ACCURACY, idQName, langQName, nil, NO_POSITION, OrderComparator, OrderComparator2, OrderComparatorReverse, PERIOD_BOP, PERIOD_TYPE, PERIOD_VALUE, RELATIONSHIP_TYPE, RESOURCE_TYPE, SHORT_TEXT, SOURCE_DOCUMENT, XPATH, XPOINTER| Constructor and Description | 
|---|
| XBRLContext(DTSContainer dts,
           XBRLEntity entity,
           XBRLPeriod period,
           XBRLScenario scenario)Creates a new context with the supplied entity, period and scenario. | 
| XBRLContext(XBRLInstance parent,
           XBRLEntity entity,
           XBRLPeriod period,
           XBRLScenario scenario)Creates a new context with the supplied entity, period and scenario and set the parent to the 
 parent instance. | 
| XBRLContext(XMLFragment node)Creates a new context with the supplied XMLFragment. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | clear()Clear. | 
| XBRLContext | clone()Clone. | 
| XBRLContext | clone(DTSContainer newDTS)Clone. | 
| boolean | equals(java.lang.Object other)Evaluates c-equality of two contexts according to the XBRL 2.1 spec
 
 The context IDs may be different and are not compared | 
| XBRLContext | generateNode()Generate node. | 
| XBRLEntity | getEntity()Obtains the entity associated with this context or null. | 
| net.sf.saxon.tree.linked.NodeImpl | getFirstChild() | 
| java.lang.String | getFriendlyName()Gets the friendly name. | 
| java.lang.String | getFriendlyName(int modifiers,
               LabelsProvider lp)Gets the friendly name. | 
| java.lang.String | getFriendlyNameOnlyId()Gets the friendly name only id. | 
| net.sf.saxon.tree.linked.NodeImpl | getLastChild() | 
| int | getNumberOfChildren() | 
| XBRLScenario | getOrCreateScenario()Returns the scenario for this context. | 
| XBRLPeriod | getPeriod()obtains the period of this context. | 
| XBRLScenario | getScenario()Returns the scenario for this context. | 
| XBRLValidationReport | getValidationReport()Gets the validation report. | 
| boolean | hasChildNodes() | 
| int | hashCode()Hash code. | 
| void | invalidate()Invalidate. | 
| boolean | invalidate(XBRLValidation.Direction dir)Invalidate. | 
| boolean | isOnValidation()Checks if is on validation. | 
| static XBRLContext | make(XBRLInstance instance,
    XBRLEntity ent,
    XBRLPeriod pi,
    XBRLScenario scenario)Make. | 
| boolean | s_equal2(java.lang.Object other)S equal 2. | 
| void | setEntity(XBRLEntity entity)Sets the entity for this context
 
 this method resets validation of the context. | 
| void | setId(java.lang.String id)Sets the id. | 
| void | setPeriod(XBRLPeriod period)Sets the period of this context
 
 This method resets validation status of this context. | 
| void | setScenario(XBRLScenario scenario)Sets the new scenario for this context. | 
| XBRLValidationReport | validate(XBRLPlugInProcessor proc)Validate. | 
addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addChild, addChildArray, addChildAt, addChildNode, addChildNodeArray, addChildNodeAt, addChildNodeInBatch, addComment, addFromRelationship, addNamespace, addNamespace, addPropertyChangeListener, addToRelationship, changeBase, checkBase, childExists, commitBatch, copy, createComment, delAttribute, delAttribute, delete, equalXdmValues, findFirstNodeOfClass, findPosition, firePropertyChangeEvent, generateId, generateLocatorToNode, generatePrefix, getAllAttributes, getAttribute, getAttributeAtomicValue, getAttributeBooleanValue, getAttributeGroundedValue, getAttributeQNameValue, getAttributes, getAttributeValue, getBase, getBase, getBooleanValue, getChildren, getChildStringValue, getConfiguration, getContainer, getContainerDocumentURI, getDocument, getElement, getElement, getElements, getFirstChildNoComment, getFragment, getFriendlyName, getFromRelationships, getFromRelationships, getFromRelationships, getFromRelationships, getFromRelationships, getFromRelationships, getFromRelationships, getFromRelationships, getFromRelationships, getFromRelationships, getId, getInScopeNamespaces, getLang, getLastChildNoComment, getNamePool, getNamespaceBinding, getNamespaceURI, getNextSiblingNoComment, getNodeName, getNthElement, getNumberOfElements, getNumberOfFromRelationships, getNumberOfToRelationships, getOrGenerateId, getParentDocument, getParentXBRL, getPrefix, getPrefixes, getPropertyChangeListeners, getQNameValue, getRelationshipsBases, getRelationshipsChain, getRelationshipTypes, getStaticNamespace, getStringValue, getToolTipText, getToRelationships, getToRelationships, getToRelationships, getToRelationships, getToRelationships, getToRelationships, getToRelationships, getToRelationships, getToRelationships, getToRelationships, getValue, getXPath, getXPathFromXPointer, getXPathNamespaceContext, getXPathToRoot, getXPointerElementScheme, getXPointerElementScheme, getXPointerShorthandScheme, getXPointerXPath2Scheme, initialise, internalToString, isAttribute, isChangeHashEnabled, isDead, isEmpty, isHashDependsOnAtribute, isNamespaceDefined, isNil, moveNamespacesUp, objEquals, objHashCode, reindex, removeChild, removeChildNode, removeFromRelationship, removeNamespace, removePropertyChangeListener, removeToRelationship, replace, replaceChild, replaceStringValue, resetElements, resolveHRef, s_equal2_xp2, s_equal2_xp2, s_equal2, s_equal2, s_equal2, setAttributeList, setAttributes, setBase, setChildrenClone, setDirty, setElements, setLang, setModified, setNamespaceDeclarations, setNamespaces, setNil, setNodeName, setRawParentXBRL, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, toString, valueEquals, xEqualaddAttribute, 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, setTypeAnnotationatomize, 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, replacepublic static final javax.xml.namespace.QName contextNode
public static final net.sf.saxon.om.StructuredQName sqnContextNode
public XBRLContext(XMLFragment node)
node - - the XMLFragment to obtain data from and replace in the container documentpublic XBRLContext(DTSContainer dts, XBRLEntity entity, XBRLPeriod period, XBRLScenario scenario)
dts - - The container DTS, MUST not be nullentity - - The entity, may be nullperiod - - The period, may be nullscenario - - The scenario, may be nullpublic XBRLContext(XBRLInstance parent, XBRLEntity entity, XBRLPeriod period, XBRLScenario scenario)
This constructor will add this context as child of the instance root nodes and will add the context to the limbo contexts. It is possible later that instance document serialization algorithm decides to remove the context from instance if it is not used.
parent - - The parent XBRLInstance documententity - - The entity, may be nullperiod - - The period, may be nullscenario - - The scenario, may be nullpublic void clear()
           throws java.lang.Throwable
clear in class XMLFragmentjava.lang.Throwable - the throwablepublic void setId(java.lang.String id)
           throws XBRLInconsistentDTSException
setId in class XMLFragmentid - the new idXBRLInconsistentDTSException - the XBRL inconsistent DTS exceptionpublic XBRLContext clone()
clone in class XMLFragmentpublic XBRLContext clone(DTSContainer newDTS)
clone in class XMLFragmentnewDTS - the new DTSpublic boolean equals(java.lang.Object other)
equals in interface net.sf.saxon.om.NodeInfoequals in class XMLFragmentother - the otherpublic boolean s_equal2(java.lang.Object other)
s_equal2 in class XMLFragmentother - the otherpublic int hashCode()
hashCode in interface net.sf.saxon.om.NodeInfohashCode in class XMLFragmentpublic XBRLPeriod getPeriod()
public void setPeriod(XBRLPeriod period)
period - the new periodpublic XBRLEntity getEntity()
public void setEntity(XBRLEntity entity)
entity - the new entitypublic XBRLScenario getScenario()
getOrCreateScenario()public XBRLScenario getOrCreateScenario()
setScenario(XBRLScenario)public void setScenario(XBRLScenario scenario)
scenario - the new scenariopublic XBRLContext generateNode() throws XBRLSerializationException
generateNode in class XMLFragmentXBRLSerializationException - the XBRL serialization exceptionpublic java.lang.String getFriendlyName()
getFriendlyName in class XMLFragmentpublic java.lang.String getFriendlyName(int modifiers,
                                        LabelsProvider lp)
getFriendlyName in class XMLFragmentmodifiers - the modifierslp - the lppublic java.lang.String getFriendlyNameOnlyId()
public XBRLValidationReport getValidationReport()
getValidationReport in interface XBRLValidationpublic XBRLValidationReport validate(XBRLPlugInProcessor proc)
validate in interface XBRLValidationproc - the procpublic void invalidate()
invalidate in interface XBRLValidationpublic boolean invalidate(XBRLValidation.Direction dir)
invalidate in interface XBRLValidationdir - the dirpublic boolean isOnValidation()
isOnValidation in interface XBRLValidationpublic static XBRLContext make(XBRLInstance instance, XBRLEntity ent, XBRLPeriod pi, XBRLScenario scenario)
instance - the instanceent - the entpi - the piscenario - the scenariopublic final boolean hasChildNodes()
hasChildNodes in interface net.sf.saxon.om.NodeInfohasChildNodes in class net.sf.saxon.tree.linked.NodeImplpublic 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.NodeImplpublic final net.sf.saxon.tree.linked.NodeImpl getLastChild()
getLastChild in class net.sf.saxon.tree.linked.NodeImplCopyright 2006-2015 Reporting Standard S.L., C/ Torrecilla del Puerto 1, 28043, Madrid, Espaņa