|
||||||||||
| 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.XBRLFact
public abstract class XBRLFact
Abstract class to represent a fact item in an instance document or inside a tuple. Concreate classes of this class are: XBRLFactItem and XBRLFactTuple
| Field Summary | |
|---|---|
static javax.xml.namespace.QName |
nil
|
| 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 |
| Method Summary | |
|---|---|
void |
clear()
Eliminates all this fact content |
XBRLFact |
clone()
|
XBRLFact |
clone(DTSContainer newDTS)
Clone current fact but in a new DTSContainer |
static XBRLFact |
createItemOrTupleInstance(XBRLFactsList facts,
net.sf.saxon.s9api.XdmNode node)
Creates a tupleInstance or a itemInstance depending on the node content |
static XBRLFact |
createItemOrTupleInstance(XBRLFactsList facts,
XMLElementDefinition el,
XBRLContext ctx,
XBRLUnit unit)
Creates a tupleInstance of a itemInstance depending on the data type of the el parameter and extra information provided in other parameters |
boolean |
equals(java.lang.Object obj)
Sets a new XPathFunctionResolver for this object |
XBRLLocator |
generateLocatorToNode(boolean relativize,
java.net.URI base)
Generates a locator element pointing to the instantiated fact on the instance This is used during serialization of the instance document. |
org.jdom.Element |
generateNode(boolean relativize,
java.net.URI base)
Generates the XBRLFact jdom node. |
XMLElementDefinition |
getElementDefinition()
Access to the element definition behind this fact |
java.util.Iterator<XMLFragment> |
getElements()
For complex type resources this returns an iterator with all children XML fragments Tthis method may be overwriten by other classes in the hierarchy |
java.lang.String |
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. |
XBRLInstance |
getInstance()
The instance document where this fact exists |
XBRLFactsList |
getParent()
The parent of a fact is always a facts container. |
XBRLTaxonomy |
getTaxonomy()
The XBRLTaxonomy in which this fact is defined |
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. |
int |
hashCode()
|
void |
invalidate(boolean dir)
Reset the validation status for this fact. |
abstract boolean |
isDuplicate(XBRLFact otherFact)
Check if two items are duplicates as defined in the XBRL 2.1 specification |
boolean |
isNil()
Return true if the fact is nil it MUST contain a @xsi:nil attribute with value = true |
boolean |
pEqual(XBRLFact toFact)
Implementation of the p-equality as defined in the XBRL 2.1 specification. |
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 |
setNil(boolean newValue)
Sets the nil attribute to true or false according to the param value |
void |
setParent(XBRLFactsList parent)
Sets the parent of this XBRLFact to be the XBRLFactsList object used as a parameter. |
void |
setValue(net.sf.saxon.value.AtomicValue value)
|
void |
setValue(net.sf.saxon.s9api.XdmValue value)
Sets the value of this node |
abstract XBRLValidationReport |
validate(XBRLCoreProcessor proc)
Validates the item or tuple |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final javax.xml.namespace.QName nil
| Method Detail |
|---|
public XBRLFact clone()
clone in class XMLFragmentpublic XBRLFact clone(DTSContainer newDTS)
clone in class XMLFragmentnewDTS -
public void setParent(XBRLFactsList parent)
Setting the parent does not adds the fact as child of the parent element. This function do the following steps:
parent -
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 XBRLFactsList getParent()
getParent in interface XMLHasParentgetParent in class XMLFragmentpublic java.lang.String getXPathToRoot()
XMLFragment
getXPathToRoot in class XMLFragmentpublic XMLElementDefinition getElementDefinition()
XBRLValidationExceptionpublic XBRLInstance getInstance()
public XBRLTaxonomy getTaxonomy()
public boolean pEqual(XBRLFact toFact)
p-equality means parent-equality. two facts are p-equal if they have the same parent node
toFact - the other fact to compare this fact to
public static XBRLFact createItemOrTupleInstance(XBRLFactsList facts,
net.sf.saxon.s9api.XdmNode node)
throws XBRLValidationException
facts - XBRLFactsContainernode - NodeInfo
XBRLValidationException
public static XBRLFact createItemOrTupleInstance(XBRLFactsList facts,
XMLElementDefinition el,
XBRLContext ctx,
XBRLUnit unit)
throws XBRLInconsistentDTSException
facts - XBRLFactsContainer if null, the fact will not be part of any factsListel - XBRLElementDefinition must be either XBRLTuple or XBRLItem, Cannot be nullctx - XBRLContext, if element is a tuple this parameter can be nullunit - XBRLUnit, if element is not numeric or is a tuple this parameter can be null
XBRLValidationException - if the el parameter is not XBRLTuple or XBRLItem
XBRLInconsistentDTSExceptionpublic abstract XBRLValidationReport validate(XBRLCoreProcessor proc)
proc -
XBRLValidationException
public XBRLLocator generateLocatorToNode(boolean relativize,
java.net.URI base)
throws java.net.URISyntaxException
relativize - booleanbase - URI base uri for relativization of the generated href
java.net.URISyntaxExceptionpublic boolean isNil()
public abstract boolean isDuplicate(XBRLFact otherFact)
otherFact - the other XBRLFactItem
public void setNil(boolean newValue)
newValue - public void setValue(net.sf.saxon.value.AtomicValue value)
setValue in class XMLFragmentpublic void setValue(net.sf.saxon.s9api.XdmValue value)
XMLFragment
setValue in class XMLFragment
public org.jdom.Element generateNode(boolean relativize,
java.net.URI base)
throws XBRLSerializationException
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 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 XMLFragment
public java.lang.String getFriendlyName(int modifiers,
LabelsProvider lp)
XMLFragmentThis function accepts flags that are defined as constants in XMLFragment in order to modify the output.
getFriendlyName in class XMLFragmentmodifiers -
public void clear()
throws java.lang.Throwable
clear in class XMLFragmentjava.lang.Throwablepublic void invalidate(boolean dir)
This method is used by GUI tools that requires to reset validation before a manual validation cycle is started
dir - the direction of the propagation. if this parameter is false and fact is a tuple then the tuple content is recursively invalidatedpublic int hashCode()
hashCode in class XMLFragmentpublic boolean equals(java.lang.Object obj)
XMLFragment
equals in class XMLFragment
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||