public abstract class XBRLFact extends XMLFragment implements XBRLValidation, StoreHistoryInterface
XBRLValidation.Direction| Modifier and Type | Field and Description |
|---|---|
static javax.xml.namespace.QName |
nil
The Constant nil.
|
CONCEPT_LABEL, CONCEPT_QNAME, EASY_TO_READ, ELEMENT_LABEL, EMPTYRELATIONSHIPSITERATORINSTANCE, EMPTYXMLFRAGMENTITERATORINSTANCE, FACT_CONCEPT_DATATYPE, FACT_CONCEPT_LABEL, FACT_QNAME, HIDE_COMMON_ACCURACY, idQName, NO_POSITION, OrderComparator, OrderComparator2, PERIOD_TYPE, PERIOD_VALUE, SHORT_TEXT, SOURCE_DOCUMENT, XPATH, XPOINTER| Modifier and Type | Method and Description |
|---|---|
void |
addEvent(java.util.Date date,
java.lang.String message)
Adds a new event at the indicated date with the specificed message.
|
void |
addEvent(HistoricalEventInterface event)
Adds a new event as an instance of an HistoricalEventInterface.
|
void |
addEvent(java.lang.String message)
Adds a new event at the time this method is called with the specified message.
|
void |
clear()
Eliminates all this fact content.
|
XBRLFact |
clone() |
XBRLFact |
clone(DTSContainer newDTS)
Clone current fact but in a new DTSContainer.
|
static XBRLFact |
createItemOrTupleInstance(DTSContainer dts,
XBRLFactsList facts,
net.sf.saxon.s9api.XdmNode node,
int pos)
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
This 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)
Gets the friendly name.
|
java.util.Collection<HistoricalEventInterface> |
getHistory()
Obtains a collection of all HistoricalEvent(s) produced .
|
java.lang.String |
getHistoryAsString()
returns a text string with the fact history.
|
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.
|
XBRLValidationReport |
getValidationReport()
Access to the last stored validation report.
|
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()
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.
|
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 |
isOnValidation()
When validation is a recursive process, this function returns true if the
object going to be validated is already under validation.
|
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)
Sets the value.
|
void |
setValue(net.sf.saxon.s9api.XdmValue value)
Sets the value of this node.
|
XBRLValidationReport |
validate(XBRLPlugInProcessor proc)
Executes validation on the instance object and returns a validation report.
|
addAttribute, addChild, addFromRelationship, addNamespace, addNamespace, addToRelationship, addXMLChild, changeBase, checkBase, delAttribute, delAttribute, equalXdmValues, evaluateBoolean, evaluateList, evaluateNode, evaluateNumber, evaluateString, generateId, generateNodeNamespacesAndAttributes, generateNodeValue, generatePrefix, getAllAttributes, getAttribute, getAttributeBooleanValue, getAttributeQNameValue, getAttributes, getAttributes, getAttributeStringValue, getAttributeValue, getBase, getBase, getBaseURI, getBooleanValue, getChild, getContainer, getContainerDocumentURI, getDeclaredNamespaces, getDocument, getElementsHashCode, getFragment, getFromRelationships, getFromRelationships, getFromRelationships, getFromRelationships, getFromRelationships, getGenericLabelText, getId, getLang, getNamespaceURI, getNodeName, getNumberOfAttributes, getNumberOfElements, getNumberOfFromRelationships, getNumberOfToRelationships, getOrGenerateId, getPrefix, getPrefixes, getQNameValue, getRelationshipsBases, getRelationshipsChain, getRelationshipTypes, getStaticContext, getStaticNamespace, getStringValue, getToolTipText, getToRelationships, getToRelationships, getToRelationships, getToRelationships, getToRelationships, getValue, getXPathExecutable, getXPathNamespaceContext, getXPathToNode, getXPointerElementScheme, getXPointerElementScheme, getXPointerShorthandScheme, getXPointerToNode, isDead, isNamespaceDefined, isXdmDocumentAttached, objEquals, objHashCode, qNameToString, removeAttribute, removeChild, removeChild, removeFromRelationship, removeToRelationship, removeXMLChild, resetElements, resetHash, resolve_equal2, resolveHRef, resolveHRef, s_equal2, s_equal2, s_equal2, setAttributes, setBase, setDocument, setDocumentAndReload, setElements, setLang, setNamespaceContext, setNamespaces, setNode, setNodeName, setParent, setRegenerateNodeIfnotFound, setVariablesDefined, size, thin, toString, valueEquals, xEqualpublic XBRLFact clone()
clone in class XMLFragmentpublic XBRLFact clone(DTSContainer newDTS)
clone in class XMLFragmentnewDTS - the new dtspublic 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 - the new parentpublic void setId(java.lang.String id)
throws XBRLInconsistentDTSException
XMLFragmentsetId in class XMLFragmentid - the new IDXBRLInconsistentDTSException - if the id is not lexicographically validpublic XBRLFactsList getParent()
getParent in interface XMLHasParentgetParent in class XMLFragmentpublic java.lang.String getXPathToRoot()
XMLFragmentgetXPathToRoot in class XMLFragmentpublic XMLElementDefinition getElementDefinition()
public 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 topublic static XBRLFact createItemOrTupleInstance(DTSContainer dts, XBRLFactsList facts, net.sf.saxon.s9api.XdmNode node, int pos) throws XBRLValidationException
dts - the dtsfacts - XBRLFactsContainernode - NodeInfopos - the posXBRLValidationException - the XBRL validation exceptionpublic 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 nullXBRLInconsistentDTSException - the XBRL inconsistent dts exceptionpublic 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()
XBRLValidationinvalidate 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 XBRLValidationReport getValidationReport()
XBRLValidationgetValidationReport in interface XBRLValidationpublic boolean isOnValidation()
XBRLValidationisOnValidation in interface XBRLValidationpublic XBRLLocator generateLocatorToNode(boolean relativize, java.net.URI base) throws java.net.URISyntaxException
relativize - booleanbase - URI base uri for relativization of the generated hrefjava.net.URISyntaxException - the URI syntax exceptionpublic boolean isNil()
public abstract boolean isDuplicate(XBRLFact otherFact)
otherFact - the other XBRLFactItempublic void setNil(boolean newValue)
newValue - the new nilpublic void setValue(net.sf.saxon.value.AtomicValue value)
XMLFragmentsetValue in class XMLFragmentvalue - the new valuepublic void setValue(net.sf.saxon.s9api.XdmValue value)
XMLFragmentsetValue in class XMLFragmentvalue - the new valuepublic org.jdom.Element generateNode(boolean relativize,
java.net.URI base)
throws XBRLSerializationException
generateNode in class XMLFragmentrelativize - the relativizebase - the baseXBRLSerializationException - the XBRL serialization exceptionpublic java.util.Iterator<XMLFragment> getElements()
XMLFragmentgetElements 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 getFriendlyName(int modifiers,
LabelsProvider lp)
getFriendlyName in class XMLFragmentmodifiers - the modifierslp - the lppublic void addEvent(java.lang.String message)
StoreHistoryInterfaceaddEvent in interface StoreHistoryInterfacemessage - the messagepublic void addEvent(java.util.Date date,
java.lang.String message)
StoreHistoryInterfaceaddEvent in interface StoreHistoryInterfacedate - the datemessage - the messagepublic void addEvent(HistoricalEventInterface event)
StoreHistoryInterfaceaddEvent in interface StoreHistoryInterfaceevent - the eventpublic java.util.Collection<HistoricalEventInterface> getHistory()
ObtainHistoryInterfacegetHistory in interface ObtainHistoryInterfacepublic java.lang.String getHistoryAsString()
ObtainHistoryInterfacegetHistoryAsString in interface ObtainHistoryInterfacepublic void clear()
throws java.lang.Throwable
clear in class XMLFragmentjava.lang.Throwable - the throwablepublic int hashCode()
hashCode in class XMLFragmentpublic boolean equals(java.lang.Object obj)
XMLFragmentequals in class XMLFragmentobj - the other