com.ihr.xbrl.dts
Class DimensionalInstanceExplorer

java.lang.Object
  extended by com.ihr.xbrl.dts.InstanceExplorerAbstract
      extended by com.ihr.xbrl.dts.DimensionalInstanceExplorer
All Implemented Interfaces:
ContextProvider, InstanceExplorerInterface, InstanceExplorerListener, UnitsProvider

public class DimensionalInstanceExplorer
extends InstanceExplorerAbstract

This class provides methods to investigate the content of an XBRL instance document from a high level point of view so the development of tools reading the content of instance document will be much easier

Author:
Ignacio

Field Summary
 
Fields inherited from class com.ihr.xbrl.dts.InstanceExplorerAbstract
DAYS, HALVES, HOURS, MINUTES, MONTHS, notesOrderer, QUARTERS, sDays, SECONDS, sHalves, sHours, sMinutes, sMonths, sQuarters, sSeconds, sWeeks, sYears, unkownUnit, WEEKS, YEARS
 
Constructor Summary
DimensionalInstanceExplorer(LangsProvider lp, HasBoySupport hb, HasFrame tool, HandleDateStep hds, HasDimensionsTableHeaderItem hdth, HasAccessSelectedRole instanceDocumentPane, DefaultUnitProviderInterface defaultUnitProvider)
           
 
Method Summary
 void addContext(XBRLContext newContext, int dateStep)
          Adds a new context to this context provider.
 void addFact(XBRLFact fact)
          Received notification that a fact has been added
 void addFragmentMember(XMLFragmentMember frMem, java.lang.String text)
          Adds a member to a typed dimension Forwards messages accordingly
 void clear()
           
 void delFact(XBRLFact fact, XBRLFactsList parent)
          Receives notification that a fact has been removed from the instance being explored.
 void factChangedContext(XBRLFactItem fact, XBRLContext oldContext, XBRLContext newContext)
          Informs the Context provider that the fact has changed its context information.
 void factChangedUnit(XBRLFactNumeric fact, XBRLUnit oldUnit, XBRLUnit newUnit)
           
 XBRLFactItem findFact(java.util.ArrayList<Member<?>> allMembers)
           
 java.util.Iterator<XBRLContext> getCompatibleContexts(XBRLFactItem fact, int dateStep)
          Returns an iterator over compatible contexts for this fact.
 Dimension<?> getDimensionFromQName(javax.xml.namespace.QName name)
           
 java.util.Collection<javax.xml.namespace.QName> getItemDimensions(XMLElementDefinition item)
          Returns a collection of dimensions that are applicable for this primary item
 XDTInfosetConsumer getXDTInfosetConsumer()
          Access to the XDTInfosetConsumer linked with this DimensionalIntanceExplorer
 XDTProcessor getXDTProc()
          Access to the XDTProcessor linked with this DimensionalInstanceExplorer
 void resetDuplicatesDimension()
           
 void setInstance(XBRLInstance instance)
           
 void setXDTProcessors(XDTProcessor xdt, XDTInfosetConsumer xdtInfo)
          When the DTS change these variables must be updated too
 void update()
           
 
Methods inherited from class com.ihr.xbrl.dts.InstanceExplorerAbstract
addInstanceExplorerListener, getCompanyKeys, getFactNotes, getInstanceExplorerListeners, getNumberOfCompanies, getNumTokens, getStringOfDateStep, getSuggestedUnit, getSuggestedUnits, getVNotes, indexOfDateStepCode, instanceEvent, intTokenToString, removeInstanceExplorerListener, sendEvent, setSuggestedUnit, stepsCodeForIndex, stringTokenToInt
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DimensionalInstanceExplorer

public DimensionalInstanceExplorer(LangsProvider lp,
                                   HasBoySupport hb,
                                   HasFrame tool,
                                   HandleDateStep hds,
                                   HasDimensionsTableHeaderItem hdth,
                                   HasAccessSelectedRole instanceDocumentPane,
                                   DefaultUnitProviderInterface defaultUnitProvider)
Method Detail

setXDTProcessors

public void setXDTProcessors(XDTProcessor xdt,
                             XDTInfosetConsumer xdtInfo)
When the DTS change these variables must be updated too

Parameters:
xdt -
xdtInfo -

setInstance

public void setInstance(XBRLInstance instance)
Parameters:
instance -

resetDuplicatesDimension

public void resetDuplicatesDimension()

update

public void update()
Parameters:
role -
item -

getXDTProc

public XDTProcessor getXDTProc()
Access to the XDTProcessor linked with this DimensionalInstanceExplorer

Returns:
instance of XDTProcessor or null if none is set

getXDTInfosetConsumer

public XDTInfosetConsumer getXDTInfosetConsumer()
Access to the XDTInfosetConsumer linked with this DimensionalIntanceExplorer

Returns:
instance od XDTInfosetConsumer or null if none is set

clear

public void clear()
Specified by:
clear in interface InstanceExplorerInterface
Overrides:
clear in class InstanceExplorerAbstract

addContext

public void addContext(XBRLContext newContext,
                       int dateStep)
Description copied from interface: ContextProvider
Adds a new context to this context provider. This happens when the user creates a new context

Parameters:
newContext - XBRLContext to add
dateStep - the value of the dateStep container for the new context

factChangedContext

public void factChangedContext(XBRLFactItem fact,
                               XBRLContext oldContext,
                               XBRLContext newContext)
Description copied from interface: ContextProvider
Informs the Context provider that the fact has changed its context information.


getCompatibleContexts

public java.util.Iterator<XBRLContext> getCompatibleContexts(XBRLFactItem fact,
                                                             int dateStep)
Description copied from interface: ContextProvider
Returns an iterator over compatible contexts for this fact. the first element in the iterator is the context currently associated to the fact.

Returns:
Iterator<XBRLContext>

factChangedUnit

public void factChangedUnit(XBRLFactNumeric fact,
                            XBRLUnit oldUnit,
                            XBRLUnit newUnit)

findFact

public XBRLFactItem findFact(java.util.ArrayList<Member<?>> allMembers)
Returns:

getItemDimensions

public java.util.Collection<javax.xml.namespace.QName> getItemDimensions(XMLElementDefinition item)
Returns a collection of dimensions that are applicable for this primary item

Parameters:
item -
Returns:

getDimensionFromQName

public Dimension<?> getDimensionFromQName(javax.xml.namespace.QName name)

addFact

public void addFact(XBRLFact fact)
Description copied from interface: InstanceExplorerInterface
Received notification that a fact has been added


delFact

public void delFact(XBRLFact fact,
                    XBRLFactsList parent)
Description copied from interface: InstanceExplorerInterface
Receives notification that a fact has been removed from the instance being explored.

Note: after removing a fact from its container the fact parent is set to null.

The fact has to be removed from the parent container prior to call this method and this is the reason this method has a second parameter that indicated what the parent container was.


addFragmentMember

public void addFragmentMember(XMLFragmentMember frMem,
                              java.lang.String text)
Adds a member to a typed dimension Forwards messages accordingly

Parameters:
fm - XMLFragmentMember
text - String text representation for fm or null


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