com.ihr.xbrl.formula
Class FlVariable

java.lang.Object
  extended by com.ihr.xbrl.formula.FlVariableDepend
      extended by com.ihr.xbrl.formula.FlXPathObject
          extended by com.ihr.xbrl.formula.FlVariable
All Implemented Interfaces:
FlValue, java.util.Iterator<java.lang.Object>

public class FlVariable
extends FlXPathObject
implements FlValue, java.util.Iterator<java.lang.Object>


Method Summary
 boolean bindAsSequence()
           
 void compile()
           
 boolean evaluateVariable()
          If the variable hasn't been evaluated before or is on the reset state a call to this method will evaluate the XPath expression associated to the variable
 java.lang.Object getLastReturnedValue()
          This method does not calculate the variable and can be called multiple times wihtout modifying the status of this object
 javax.xml.namespace.QName getName()
           
 net.sf.saxon.s9api.XdmValue getXPathResult()
          This method return the value calculated as a call to the evaluate method
 boolean hasNext()
          Returns true if the FlVariable has been evaluated, does not bind as a sequence, and the sequence has a next value to return
 java.lang.Object next()
          Return the next object in the sequence if the FlVariable has been evaluated
 void remove()
           
 void reset()
           
 java.lang.String toString()
           
 java.lang.Object valueOrNext()
          Return the FlVariable value or the next value in the sequence if this variable does not bind as sequence
 
Methods inherited from class com.ihr.xbrl.formula.FlXPathObject
getXPathString, setNamespace, setNamespaces
 
Methods inherited from class com.ihr.xbrl.formula.FlVariableDepend
evaluate, getFormulaProcessor
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getName

public javax.xml.namespace.QName getName()
Returns:
the variable QName

compile

public void compile()
             throws FlCompilationException
Throws:
FlCompilationException

bindAsSequence

public boolean bindAsSequence()

reset

public void reset()

evaluateVariable

public boolean evaluateVariable()
                         throws FormulaRuntimeException
If the variable hasn't been evaluated before or is on the reset state a call to this method will evaluate the XPath expression associated to the variable

Returns:
boolean value indicating whether or not the xpath expression has been evaluated
Throws:
FormulaRuntimeException

hasNext

public boolean hasNext()
Returns true if the FlVariable has been evaluated, does not bind as a sequence, and the sequence has a next value to return

Specified by:
hasNext in interface java.util.Iterator<java.lang.Object>

next

public java.lang.Object next()
Return the next object in the sequence if the FlVariable has been evaluated

Specified by:
next in interface java.util.Iterator<java.lang.Object>

remove

public void remove()
Specified by:
remove in interface java.util.Iterator<java.lang.Object>

getLastReturnedValue

public java.lang.Object getLastReturnedValue()
This method does not calculate the variable and can be called multiple times wihtout modifying the status of this object

Returns:
the last value of this variable

valueOrNext

public java.lang.Object valueOrNext()
Return the FlVariable value or the next value in the sequence if this variable does not bind as sequence

Returns:
Object

getXPathResult

public net.sf.saxon.s9api.XdmValue getXPathResult()
This method return the value calculated as a call to the evaluate method

Specified by:
getXPathResult in interface FlValue
Returns:
the object returned by the evaluate method.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


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