com.ihr.xbrl.dts
Class InstanceExplorerAbstract

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

public abstract class InstanceExplorerAbstract
extends java.lang.Object
implements InstanceExplorerInterface, InstanceExplorerListener

Author:
Ignacio

Field Summary
static int ACUM_Q1Q3
           
static int ALL
           
static int DAYS
           
static int FOREVER
           
static int HALVES
           
static int HOURS
           
static int INSTANT
           
static int MINUTES
           
static int MONTHS
           
static int NONSTANDARD
           
static com.ihr.xbrl.dts.InstanceExplorerAbstract.ClsNotesOrderer notesOrderer
           
static int QUARTERS
           
static java.lang.String sDays
           
static int SECONDS
           
static java.lang.String sForever
           
static java.lang.String sHalves
           
static java.lang.String sHours
           
static java.lang.String sMinutes
           
static java.lang.String sMonths
           
static java.lang.String sNonstandard
           
static java.lang.String sQuarters
           
static java.lang.String sSeconds
           
static java.lang.String sWeeks
           
static java.lang.String sYears
           
static javax.xml.namespace.QName unkownUnit
           
static int WEEKS
           
static int YEARS
           
 
Method Summary
static void addInstanceExplorerListener(InstanceExplorerListener l)
           
 void clear()
           
 java.util.Iterator<CompanyKey> getCompanyKeys()
          Access to an iterator over the keys for company data
 VNotes getFactNotes(XBRLFact fact)
           
static InstanceExplorerListener[] getInstanceExplorerListeners()
           
 int getNumberOfCompanies()
          Access to the number of different companies this instance have stored information
static int getNumTokens()
          Returns the number of tokens that represents column types by the column range.
static java.lang.String getStringOfDateStep(java.util.GregorianCalendar gc, int dateStep, HasBoySupport hb)
           
 XBRLUnit getSuggestedUnit(CompanyKey ck, XBRLItem itm)
          Returns a suggested unit for a numeric concept definition.
 java.util.Iterator<XBRLUnit> getSuggestedUnits(XBRLItem itm)
          Implementation of the UnitsProvider interface The algorithm considers other units in this report and put first the "suggested unit" for this fact item.
 java.util.Iterator<VNotes> getVNotes()
           
 boolean hasDataForCompany(CompanyKey ck)
           
static int indexOfDateStepCode(int dateStep)
          Return the index of the dateStep code in the internally ordered array of dateStep codes
 void instanceEvent(InstanceExplorerEvent e)
           
static java.lang.String intTokenToString(int dateStep)
          Converts an integer value into the string representation See: intTokenToString(int) for more information
static void removeInstanceExplorerListener(InstanceExplorerListener l)
           
static void sendEvent(InstanceExplorerEvent event)
           
 void setSuggestedUnit(XBRLItem item, CompanyKey ck, XBRLUnit unit)
           
static int stepsCodeForIndex(int index)
          Access to the dateStep code corresponding to the index in the sequence.
static int stringTokenToInt(java.lang.String dateStep)
          Transform a string representation of a token for a period into the corresponding integer value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ihr.xbrl.dts.InstanceExplorerInterface
addFact, delFact, findFact, setInstance
 
Methods inherited from interface com.ihr.xbrl.dts.ContextProvider
addContext, factChangedContext, getCompatibleContexts
 
Methods inherited from interface com.ihr.xbrl.dts.UnitsProvider
factChangedUnit
 

Field Detail

FOREVER

public static final int FOREVER
See Also:
Constant Field Values

YEARS

public static final int YEARS
See Also:
Constant Field Values

HALVES

public static final int HALVES
See Also:
Constant Field Values

QUARTERS

public static final int QUARTERS
See Also:
Constant Field Values

MONTHS

public static final int MONTHS
See Also:
Constant Field Values

WEEKS

public static final int WEEKS
See Also:
Constant Field Values

DAYS

public static final int DAYS
See Also:
Constant Field Values

HOURS

public static final int HOURS
See Also:
Constant Field Values

MINUTES

public static final int MINUTES
See Also:
Constant Field Values

SECONDS

public static final int SECONDS
See Also:
Constant Field Values

NONSTANDARD

public static final int NONSTANDARD
See Also:
Constant Field Values

INSTANT

public static final int INSTANT
See Also:
Constant Field Values

ALL

public static final int ALL
See Also:
Constant Field Values

ACUM_Q1Q3

public static final int ACUM_Q1Q3
See Also:
Constant Field Values

sForever

public static final java.lang.String sForever

sYears

public static final java.lang.String sYears

sHalves

public static final java.lang.String sHalves

sQuarters

public static final java.lang.String sQuarters

sMonths

public static final java.lang.String sMonths

sWeeks

public static final java.lang.String sWeeks

sDays

public static final java.lang.String sDays

sHours

public static final java.lang.String sHours

sMinutes

public static final java.lang.String sMinutes

sSeconds

public static final java.lang.String sSeconds

sNonstandard

public static final java.lang.String sNonstandard

unkownUnit

public static final javax.xml.namespace.QName unkownUnit

notesOrderer

public static com.ihr.xbrl.dts.InstanceExplorerAbstract.ClsNotesOrderer notesOrderer
Method Detail

instanceEvent

public void instanceEvent(InstanceExplorerEvent e)
Specified by:
instanceEvent in interface InstanceExplorerListener

indexOfDateStepCode

public static int indexOfDateStepCode(int dateStep)
Return the index of the dateStep code in the internally ordered array of dateStep codes

Parameters:
dateStep -
Returns:
integer

stepsCodeForIndex

public static int stepsCodeForIndex(int index)
Access to the dateStep code corresponding to the index in the sequence. YEARS = 0 ... SECONDS = Biggest index

Parameters:
index -
Returns:
integer

stringTokenToInt

public static int stringTokenToInt(java.lang.String dateStep)
Transform a string representation of a token for a period into the corresponding integer value.

The integer value is an index over a tale of dateSteps ordered by duration.

Parameters:
dateStep - String like "years", "halves", "quarters", "months", "weeks", "days", "hours", "minutes", "seconds"
Returns:
integer value of the string token

intTokenToString

public static java.lang.String intTokenToString(int dateStep)
Converts an integer value into the string representation See: intTokenToString(int) for more information

Parameters:
dateStep - integer
Returns:
String token

getNumTokens

public static int getNumTokens()
Returns the number of tokens that represents column types by the column range. Years, Halves, Querters, ... Seconds

Returns:
integer

getNumberOfCompanies

public int getNumberOfCompanies()
Access to the number of different companies this instance have stored information

Returns:
integer

getCompanyKeys

public java.util.Iterator<CompanyKey> getCompanyKeys()
Access to an iterator over the keys for company data

Specified by:
getCompanyKeys in interface InstanceExplorerInterface
Returns:
Iterator<InstanceExplorer.CompanyKey>

getStringOfDateStep

public static java.lang.String getStringOfDateStep(java.util.GregorianCalendar gc,
                                                   int dateStep,
                                                   HasBoySupport hb)
Parameters:
gc - GregorianCalendar
dateStep -
Returns:
String

addInstanceExplorerListener

public static void addInstanceExplorerListener(InstanceExplorerListener l)

removeInstanceExplorerListener

public static void removeInstanceExplorerListener(InstanceExplorerListener l)

getInstanceExplorerListeners

public static InstanceExplorerListener[] getInstanceExplorerListeners()
Returns:
Array of listeners of type InstanceExplorerListener

sendEvent

public static void sendEvent(InstanceExplorerEvent event)
Parameters:
event -

clear

public void clear()
Specified by:
clear in interface InstanceExplorerInterface

getVNotes

public java.util.Iterator<VNotes> getVNotes()

getFactNotes

public VNotes getFactNotes(XBRLFact fact)

getSuggestedUnits

public java.util.Iterator<XBRLUnit> getSuggestedUnits(XBRLItem itm)
Implementation of the UnitsProvider interface The algorithm considers other units in this report and put first the "suggested unit" for this fact item.

Specified by:
getSuggestedUnits in interface UnitsProvider
Returns:
Iterator<XBRLUnit>

getSuggestedUnit

public XBRLUnit getSuggestedUnit(CompanyKey ck,
                                 XBRLItem itm)

Returns a suggested unit for a numeric concept definition. The answer will be based on existing information in the instance. If the instance already has a fact item for the same concept definition the same unit will be suggested.

If there are no results like this then the Local Country ISO is returned for monetary item types, xbrli:pure is returned for pure item types and xbrli:shares is returned for shares item types. In any other case the QName {http://www.reportingstandard.com/userDefinedUnits}unkownUnit is returned

Specified by:
getSuggestedUnit in interface InstanceExplorerInterface
Parameters:
itm -
Returns:
XBRLUnit

setSuggestedUnit

public void setSuggestedUnit(XBRLItem item,
                             CompanyKey ck,
                             XBRLUnit unit)
Parameters:
item -
companyKey -
unit -

hasDataForCompany

public boolean hasDataForCompany(CompanyKey ck)
Specified by:
hasDataForCompany in interface InstanceExplorerInterface
Parameters:
ck -
Returns:
boolean


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