com.ihr.xbrl.om.formula
Class XBRLVariableGeneral

java.lang.Object
  extended by com.ihr.xbrl.om.XMLFragment
      extended by com.ihr.xbrl.om.exLinks.XLinkElement
          extended by com.ihr.xbrl.om.exLinks.XBRLPointerOfARelationship
              extended by com.ihr.xbrl.om.exLinks.XBRLResource
                  extended by com.ihr.xbrl.om.formula.XBRLFormulaResource
                      extended by com.ihr.xbrl.om.formula.XBRLVariableResource
                          extended by com.ihr.xbrl.om.formula.XBRLVariableGeneral
All Implemented Interfaces:
XBRLRelationshipPoint, HasFormulaProcessor, XBRLVariableFormulaEvaluable, XBRLValueKey, XMLHasParent, java.lang.Cloneable, javax.xml.namespace.NamespaceContext

public class XBRLVariableGeneral
extends XBRLVariableResource

Author:
Ignacio

Field Summary
static javax.xml.namespace.QName select
           
 
Fields inherited from class com.ihr.xbrl.om.formula.XBRLVariableResource
as, name, order
 
Fields inherited from class com.ihr.xbrl.om.exLinks.XBRLResource
nullResource
 
Fields inherited from class com.ihr.xbrl.om.exLinks.XLinkElement
actuate, ACTUATE, ARC, arcrole, ARCROLE, ETITLE, EXTENDED, from, FROM, href, HREF, label, LABEL, LOCATOR, RESOURCE, role, ROLE, show, SHOW, SIMPLE, title, TITLE, to, TO, TYPE
 
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
XBRLVariableGeneral(XBRLFormulaProcessor formulaProcessor, XBRLResource res)
           
 
Method Summary
 boolean checkVariable(XBRLVariablesHolder set, javax.xml.namespace.QName name, java.util.Collection<net.sf.saxon.s9api.QName> resolved)
          Called for variables that are also resources during the static compilation phase of the formula preparation.
 Evaluation evaluateValue(XMLFragment evaluationContext, java.util.Collection<XBRLVariableResourceUse> availableVars, XBRLVariableSetResource set)
          Evaluates the resource internal XPath expression and returns either the returned value from the XPath expression or the fall back value in the case of variables that may have a fall back value and the rawEvaluation of the XPath expression results in the empty sequence.
 java.lang.String getExpression()
          Used only for debug purposes.
 java.util.Collection<javax.xml.namespace.QName> getVariablesRequired(XBRLVariablesHolder set)
          Returns a collection of variables required for the evaluation of this variable
 Evaluation rawEvaluateValue(XMLFragment evaluationContext, java.util.Collection<XBRLVariableResourceUse> availableVars)
          Evaluates the resource internal XPath expression and returns the sequence.
 
Methods inherited from class com.ihr.xbrl.om.formula.XBRLVariableResource
adjustValueAccordingToType, bindAsSequence, getAllAspectsFiltered, getFilters, getKeysAspectsFiltered, getUse, getVariableType, hasFilterAspect
 
Methods inherited from class com.ihr.xbrl.om.formula.XBRLFormulaResource
getProcessor
 
Methods inherited from class com.ihr.xbrl.om.exLinks.XBRLResource
addChild, clear, equals, generateLocatorToNode, generateNode, getAttributes, getDTSBase, getFriendlyName, getFriendlyName, getParent, getRoleType, getType, getValueKey, hashCode, isComplexType, isSimpleType, setComplexType, setDTSBase, setId, setParent, setRole, setRoleType, setSimpleType, setValue
 
Methods inherited from class com.ihr.xbrl.om.exLinks.XLinkElement
getActuate, getArcrole, getFromTxt, getHRef, getLabel, getRole, getShow, getStaticLabel, getSType, getTitle, getToTxt, isRequiredAttribute, isValidAttribute, setActuate, setArcrole, setFrom, setHRef, setLabel, setShow, setSType, setTitle, setTo
 
Methods inherited from class com.ihr.xbrl.om.XMLFragment
addAttribute, addFromRelationship, addNamespace, addNamespace, addToRelationship, addXMLChild, changeBase, checkBase, clone, clone, delAttribute, delAttribute, equalXdmValues, evaluateBoolean, evaluateList, evaluateNode, evaluateNumber, evaluateString, generateId, generateNodeNamespacesAndAttributes, generateNodeValue, generatePrefix, getAttribute, getAttributeQNameValue, getAttributes, getAttributeValue, getBase, getBase, getBaseURI, getBooleanValue, getChild, getContainer, getDeclaredNamespaces, getDocument, getElements, getFragment, getFromRelationships, getFromRelationships, getFromRelationships, getId, getLang, getNamespaceURI, getNodeName, getNumberOfElements, getNumberOfFromRelationships, getNumberOfToRelationships, getOrGenerateId, getPrefix, getPrefixes, getQNameValue, getRelationshipsBases, getRelationshipsChain, getRelationshipTypes, getStaticNamespace, getStringValue, getToRelationships, getToRelationships, getToRelationships, getValue, getXPathNamespaceContext, getXPathToNode, getXPathToRoot, getXPointerElementScheme, getXPointerElementScheme, getXPointerShorthandScheme, getXPointerToNode, isNamespaceDefined, objEquals, objHashCode, qNameToString, removeAttribute, removeChild, removeChild, removeFromRelationship, removeToRelationship, removeXMLChild, resetElements, resetHash, resolveHRef, resolveHRef, s_equal2, s_equal2, setAttributes, setBase, setDocument, setDocumentAndReload, setElements, setLang, setNamespaceContext, setNamespaces, setNode, setNodeName, setParent, setValue, setVariablesDefined, toString, valueEquals, xEqual
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.ihr.xbrl.om.formula.XBRLVariableFormulaEvaluable
getProcessor
 
Methods inherited from interface com.ihr.xbrl.om.exLinks.XBRLRelationshipPoint
addFromRelationship, addToRelationship, getFromRelationships, getToRelationships, removeFromRelationship, removeToRelationship
 

Field Detail

select

public static final javax.xml.namespace.QName select
Constructor Detail

XBRLVariableGeneral

public XBRLVariableGeneral(XBRLFormulaProcessor formulaProcessor,
                           XBRLResource res)
                    throws XFValidationException
Parameters:
formulaProcessor -
res -
Throws:
net.sf.saxon.trans.XPathException
XFValidationException
Method Detail

evaluateValue

public Evaluation evaluateValue(XMLFragment evaluationContext,
                                java.util.Collection<XBRLVariableResourceUse> availableVars,
                                XBRLVariableSetResource set)
                         throws XFValidationException
Description copied from interface: XBRLVariableFormulaEvaluable
Evaluates the resource internal XPath expression and returns either the returned value from the XPath expression or the fall back value in the case of variables that may have a fall back value and the rawEvaluation of the XPath expression results in the empty sequence. The raw evaluation of the XPath expression is implemented in the #rawEvaluateValue(XMLFragment, Collection, XBRLVariableSetResource) call.

Returns:
Throws:
XFValidationException

rawEvaluateValue

public Evaluation rawEvaluateValue(XMLFragment evaluationContext,
                                   java.util.Collection<XBRLVariableResourceUse> availableVars)
                            throws XFValidationException
Description copied from interface: XBRLVariableFormulaEvaluable
Evaluates the resource internal XPath expression and returns the sequence. This method does not considers nor evaluates the default value if any is possible. The evaluation considering default values is implemented in the XBRLVariableFormulaEvaluable.evaluateValue(XMLFragment, Collection, XBRLVariableSetResource) method.

Returns:
Throws:
XFValidationException

checkVariable

public boolean checkVariable(XBRLVariablesHolder set,
                             javax.xml.namespace.QName name,
                             java.util.Collection<net.sf.saxon.s9api.QName> resolved)
                      throws XFValidationException
Description copied from interface: XBRLVariableFormulaEvaluable
Called for variables that are also resources during the static compilation phase of the formula preparation.

throws exceptions according to the validation rules.

shall return true on success

Returns:
Throws:
XFValidationException

getVariablesRequired

public java.util.Collection<javax.xml.namespace.QName> getVariablesRequired(XBRLVariablesHolder set)
Description copied from interface: XBRLVariableFormulaEvaluable
Returns a collection of variables required for the evaluation of this variable

Returns:
collection of QNames

getExpression

public java.lang.String getExpression()
Description copied from class: XBRLVariableResource
Used only for debug purposes.

Returns the XPath expression used to evaluate this variable

Specified by:
getExpression in class XBRLVariableResource
Returns:
String


Copyright 2006-2009 Reporting Standard S.L., C/ Torrecilla del Puerto 1, 28043, Madrid, Espaņa