|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ihr.xbrl.om.XMLFragment
com.ihr.xbrl.om.instance.XBRLContext
public class XBRLContext
This class represents the content of an XBRL Context.
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 |
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.ihr.xbrl.om.XBRLValidation |
|---|
XBRLValidation.Direction |
| Field Summary | |
|---|---|
static javax.xml.namespace.QName |
contextNode
The QName of the XML element that is the container of context information |
| Fields inherited from class com.ihr.xbrl.om.XMLFragment |
|---|
CONCEPT_LABEL, CONCEPT_QNAME, EMPTYRELATIONSHIPSITERATORINSTANCE, EMPTYXMLFRAGMENTITERATORINSTANCE, FACT_CONCEPT_DATATYPE, FACT_CONCEPT_LABEL, FACT_QNAME, idQName, NO_POSITION, OrderComparator, PERIOD_TYPE, PERIOD_VALUE, SHORT_TEXT, SOURCE_DOCUMENT, XPATH, XPOINTER |
| Constructor Summary | |
|---|---|
XBRLContext(DTSContainer dts,
XBRLEntity entity,
XBRLPeriod period,
XBRLScenario scenario)
Creates a new context with the supplied entity, period and scenario. |
|
XBRLContext(XBRLContext other)
Creates a new context as a copy or clone of the context supplied as a parameter The new context will have null as parent instance |
|
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(XBRLInstance parent,
net.sf.saxon.s9api.XdmNode root)
Creates a new context with the supplied XdmNode |
|
| Method Summary | |
|---|---|
void |
addXMLChild(XMLHasParent newChild)
|
void |
clear()
Frees-up used memory This method should not be invoqued on live objects in the DTS. |
XBRLContext |
clone()
|
XBRLContext |
clone(DTSContainer newDTS)
|
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 |
org.jdom.Element |
generateNode(boolean relativize,
java.net.URI base)
Serializes to a jdom Element the representation of the properties of this Information Item This method should be called from classes derived from this class |
java.util.Iterator<XMLFragment> |
getElements()
For complex type resources this returns an iterator with all children XML fragments Tthis method may be overwriten by other classes in the hierarchy |
XBRLEntity |
getEntity()
Obtains the entity associated with this context or null |
java.lang.String |
getFriendlyName()
Returns a string description that represents the element content in a form that users can understand. |
java.lang.String |
getFriendlyNameOnlyId()
|
XBRLInstance |
getParent()
The parent XMLFragment node of this XMLFragment node. |
XBRLPeriod |
getPeriod()
obtains the period of this context |
XBRLScenario |
getScenario()
Returns the scenario for this context. |
XBRLValidationReport |
getValidationReport()
Access to the last stored validation report |
net.sf.saxon.s9api.XdmValue |
getValue()
Returns the value of this node. |
int |
hashCode()
|
void |
invalidate()
Invalidates the XBRLFact for XBRL validation. |
boolean |
invalidate(XBRLValidation.Direction dir)
Invalidates this object and the elements in the XML tree according with the parameter in dir This method is used by GUI tools that requires to reset validation before a manual validation cycle is started |
boolean |
isOnValidation()
When validation is a recursive process, this function returns true if the object going to be validated is already under validation. |
void |
removeXMLChild(XMLHasParent child)
|
boolean |
s_equal2(java.lang.Object other)
Resolves s_equal2 comparison of this node against the other node. |
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 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 |
setParent(XMLHasParent instance)
Sets the parent of this context to the instance document specified in the parameter |
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 using this method resets validation flag |
XBRLValidationReport |
validate(XBRLPlugInProcessor proc)
Executes validation on the instance object and returns a validation report. |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final javax.xml.namespace.QName contextNode
| Constructor Detail |
|---|
public XBRLContext(XBRLInstance parent,
net.sf.saxon.s9api.XdmNode root)
throws XBRLInconsistentDTSException
parent - - The XBRLInstance object that is the parent of this contextroot - - The XdmNode for this context
XBRLInconsistentDTSException
XBRLValidationException
public 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 null
public XBRLContext(XBRLInstance parent,
XBRLEntity entity,
XBRLPeriod period,
XBRLScenario scenario)
parent - - The parent XBRLInstance documententity - - The entity, may be nullperiod - - The period, may be nullscenario - - The scenario, may be nullpublic XBRLContext(XBRLContext other)
other - the context to clone| Method Detail |
|---|
public void clear()
throws java.lang.Throwable
XMLFragmentThis 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.
clear in class XMLFragmentjava.lang.Throwable
public void setId(java.lang.String id)
throws XBRLInconsistentDTSException
XMLFragment
setId in class XMLFragmentid - the new ID
XBRLInconsistentDTSException - if the id is not lexicographically validpublic XBRLContext clone()
clone in class XMLFragmentpublic XBRLContext clone(DTSContainer newDTS)
clone in class XMLFragmentpublic boolean equals(java.lang.Object other)
equals in class XMLFragmentpublic boolean s_equal2(java.lang.Object other)
XMLFragment
s_equal2 in class XMLFragmentother - The other node (preferably an XMLFragment) that contains a non null NodeInfo document.
public int hashCode()
hashCode in class XMLFragmentpublic XBRLPeriod getPeriod()
public void setPeriod(XBRLPeriod period)
period - public XBRLEntity getEntity()
public void setEntity(XBRLEntity entity)
entity - public XBRLScenario getScenario()
public void setScenario(XBRLScenario scenario)
scenario -
public org.jdom.Element generateNode(boolean relativize,
java.net.URI base)
throws XBRLSerializationException
XMLFragment
generateNode in class XMLFragmentrelativize - boolean indicating if URIs should be relativized to the base URI (see next argument)base - the URI to which some attributes of this object should be relativided
XBRLSerializationExceptionpublic net.sf.saxon.s9api.XdmValue getValue()
XMLFragment
getValue in class XMLFragment
public void setParent(XMLHasParent instance)
throws XBRLInconsistentDTSException
setParent in interface XMLHasParentsetParent in class XMLFragmentinstance - XBRLInstance
XBRLInconsistentDTSException - if the context contains facts in a previous unattached instancepublic void addXMLChild(XMLHasParent newChild)
addXMLChild in interface XMLHasParentaddXMLChild in class XMLFragmentpublic void removeXMLChild(XMLHasParent child)
removeXMLChild in interface XMLHasParentremoveXMLChild in class XMLFragmentpublic XBRLInstance getParent()
XMLFragmentFor 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 XMLHasParentgetParent in class XMLFragmentpublic java.util.Iterator<XMLFragment> getElements()
XMLFragment
getElements in class XMLFragmentpublic java.lang.String getFriendlyName()
XMLFragmentRemarks, this method may return very long names not suitable for user interface
getFriendlyName in class XMLFragmentpublic java.lang.String getFriendlyNameOnlyId()
public XBRLValidationReport getValidationReport()
XBRLValidation
getValidationReport in interface XBRLValidationpublic XBRLValidationReport validate(XBRLPlugInProcessor proc)
XBRLValidation
The validation result may be cached internally. A call to XBRLValidation.invalidate(Direction) clears the validation cache.
validate in interface XBRLValidationproc - the processor under which the object is going to be validated. Note the same object can be validated on multiple processors.
public void invalidate()
XBRLValidation
invalidate in interface XBRLValidationpublic boolean invalidate(XBRLValidation.Direction dir)
XBRLValidationThis method is used by GUI tools that requires to reset validation before a manual validation cycle is started
invalidate in interface XBRLValidationdir - see the XBRLValidation.Direction enumeration for more information.public boolean isOnValidation()
XBRLValidation
isOnValidation in interface XBRLValidation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||