|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ihr.xbrl.mapper.source.ExcelDataSource
public class ExcelDataSource
| Constructor Summary | |
|---|---|
ExcelDataSource()
|
|
| Method Summary | |
|---|---|
void |
addMap(java.lang.String identifier,
java.lang.String cell,
double mult,
java.lang.String exactMode,
java.lang.String exactModeValue,
java.lang.String zeroValue)
Adds a new map item to the map |
void |
createConfigFileContent()
This function is used by the GUI during the generation of a new mapper. |
void |
deleteRegion(Region region)
Removes all mappings to a cell inside the Region region |
void |
endOfDocument(XBRLInstance instance)
Called by the MapEngine when a new instance is finished Can be used to close connections to data sources. |
void |
endOfFact(java.lang.String mapIdenfifier,
javax.xml.namespace.QName factName)
Called by the MapEngine when a new fact is finalized returns nothing. |
java.lang.String[] |
getCells(java.lang.String identifier)
Obtains an array of cells connected with the indicated identifier |
java.net.URI |
getConfigFile()
Access to the name of the configuration file |
XBRLContext |
getContext(java.lang.String mapIdentifier,
int index,
XBRLContext context)
Each data item has mapIdentifier string each used concept in the taxonomy has at least one mapIdentifier returns the XBRLContext to be used for the fact item. |
com.ihr.xbrl.mapper.source.ExcelDataSource.ZeroValuePolicyType |
getDefaultZeroValuePolicyType()
|
java.lang.String |
getExactMode(java.lang.String identifier,
java.lang.String cell)
Returns the exactMode value for a specified identifier and cell |
java.lang.String |
getExactModeValue(java.lang.String identifier,
java.lang.String cell)
Returns the exactMode value for a specified identifier and cell |
java.lang.Object |
getFootnote(java.lang.String mapIdentifier,
int index,
XBRLFact fact)
After a fact is produced the data source is asked for a footnote to be added to the instance document by doing a call to this method. |
java.lang.String |
getFootnoteLang(java.lang.String mapIdentifier,
int index,
XBRLFact fact,
java.lang.Object footnoteContent)
After a footnote resource is create it MUST have an xml:lang attribute. |
int |
getFormat(java.lang.String mapIdentifier,
int index,
XBRLContext context,
XBRLUnit localUnit)
Ask the driver for the preferred serialization for the numeric data. |
java.lang.String |
getFormatValue(java.lang.String mapIdentifier,
int index,
XBRLContext context,
XBRLUnit localUnit)
Returns the value (as string) for the data format. |
java.lang.String |
getMapId(int index)
|
java.util.Iterator<java.lang.Integer> |
getMapIterator()
|
SheetPoint |
getMapSheetPoint(int index)
|
double |
getMult(java.lang.String identifier,
java.lang.String cell)
Returns the mult value used for a specified identifier and cell |
int |
getNumberOfValues(java.lang.String mapIdentifier,
Fact fact)
Each data item has mapIdentifier string, each used concept in the taxonomy has at least one mapIdentifier This method returns the number of facts in the source that corresponds to the mapIdentifier string. |
java.lang.Object |
getSampleData(java.lang.Object data)
This method is used by the mapper editor during test cycles of the mapper The implemented class should use the incoming data to produce an object that the mapper can use later to produce an instance document |
XBRLUnit |
getUnit(java.lang.String mapIdentifier,
int index,
XBRLContext localContext,
XBRLUnit unit)
Each time a numeric concept is created this function is called to request or change the required unit. |
net.sf.saxon.value.AtomicValue |
getValue(java.lang.String mapIdentifier,
int index,
XBRLContext context,
net.sf.saxon.type.SimpleType type)
Each data item has mapIdentifier string each used concept in the taxonomy has at least one mapIdentifier returns the Value to be sent to the fact item. null is allowed and will be considered as no input data available |
java.lang.String |
getZeroValuePolicy(java.lang.String identifier,
java.lang.String cell)
Returns the string identifying how the zeros will be handled on this fact |
void |
init()
Called by the mapping engine once the object is created. |
boolean |
isConfigfileRequired()
Returns true if the configuration file is required for this XBRLDataSource. |
boolean |
isInputFileRequired()
Returns true if this driver requires an input file. |
boolean |
isNil(java.lang.String mapIdentifier,
int index,
XMLElementDefinition concept)
Return true if the concept content is xsi:nil so there will be no request for a value |
boolean |
isTupleSourceRequired()
Returns a boolean value indicating if the source format has a meaning to indicate the number of occurrences of a tuple. |
void |
moveRegion(Region region,
SheetPoint destination)
Moves all SheetPoints in the Region region to be mapped according to the new SheetPoint indicated in destination. |
void |
removeMap(java.lang.String identifier,
java.lang.String cell)
Removes a map from the internal collection |
void |
save()
Save the content of the configuration file to disk. |
void |
setConfigFile(java.net.URI configFile)
Sets the configuration file for this XBRLDataSource. |
void |
setDefaultZeroValuePolicyType(com.ihr.xbrl.mapper.source.ExcelDataSource.ZeroValuePolicyType newValue)
|
void |
startOfDocument(XBRLInstance instance,
java.lang.Object[] inputs)
Called by the MapEngine when a new instance that requires this data source is going to be created. |
void |
startOfFact(java.lang.String mapIdentifier,
javax.xml.namespace.QName factName)
Called by the MapEngine when a new fact is about to be started Return nothing. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ExcelDataSource()
| Method Detail |
|---|
public void init()
throws MapConfigurationFileException
XBRLDataSource
init in interface XBRLDataSourceMapConfigurationFileException
public void startOfDocument(XBRLInstance instance,
java.lang.Object[] inputs)
throws MapException
XBRLDataSource
startOfDocument in interface XBRLDataSourceinstance - this is the instance document.inputs - Input parameters, they are different objects for each driver.
MapExceptionpublic void endOfDocument(XBRLInstance instance)
XBRLDataSource
endOfDocument in interface XBRLDataSourceinstance - XBRLInstance
public void startOfFact(java.lang.String mapIdentifier,
javax.xml.namespace.QName factName)
XBRLDataSource
startOfFact in interface XBRLDataSourcemapIdentifier - StringfactName - QName
public void endOfFact(java.lang.String mapIdenfifier,
javax.xml.namespace.QName factName)
XBRLDataSource
endOfFact in interface XBRLDataSource
public XBRLContext getContext(java.lang.String mapIdentifier,
int index,
XBRLContext context)
XBRLDataSource
getContext in interface XBRLDataSourcemapIdentifier - Stringindex - intcontext - XBRLContext the context proposed by the mapping engine. If the context is modified
it will be modified for all concepts using this context. So if the context requires modifications
for a specified fact it would be better to clone the context before modifications are performed.
public java.lang.Object getFootnote(java.lang.String mapIdentifier,
int index,
XBRLFact fact)
XBRLDataSource
getFootnote in interface XBRLDataSourcemapIdentifier - Stringindex - intfact - XBRLFactItem
public int getNumberOfValues(java.lang.String mapIdentifier,
Fact fact)
XBRLDataSource
getNumberOfValues in interface XBRLDataSource
public net.sf.saxon.value.AtomicValue getValue(java.lang.String mapIdentifier,
int index,
XBRLContext context,
net.sf.saxon.type.SimpleType type)
throws MapException
XBRLDataSource
getValue in interface XBRLDataSourcemapIdentifier - Stringindex - intcontext - XBRLContext the XBRL Context for the fact being reported. The context
should not be modified here.type - This is that target schema type obtained from the element definition
MapException
public boolean isNil(java.lang.String mapIdentifier,
int index,
XMLElementDefinition concept)
XBRLDataSource
isNil in interface XBRLDataSource
public java.lang.String getFootnoteLang(java.lang.String mapIdentifier,
int index,
XBRLFact fact,
java.lang.Object footnoteContent)
XBRLDataSource
getFootnoteLang in interface XBRLDataSourcepublic void setConfigFile(java.net.URI configFile)
XBRLDataSource
setConfigFile in interface XBRLDataSource
public int getFormat(java.lang.String mapIdentifier,
int index,
XBRLContext context,
XBRLUnit localUnit)
XBRLDataSource
getFormat in interface XBRLDataSource
public java.lang.String getFormatValue(java.lang.String mapIdentifier,
int index,
XBRLContext context,
XBRLUnit localUnit)
XBRLDataSource
getFormatValue in interface XBRLDataSource
public XBRLUnit getUnit(java.lang.String mapIdentifier,
int index,
XBRLContext localContext,
XBRLUnit unit)
XBRLDataSource
getUnit in interface XBRLDataSourcemapIdentifier - String codeindex - int indicating which value we are working onlocalContext - the context for the new dataunit - the proposed unit. Can be changed
public java.net.URI getConfigFile()
XBRLDataSource
getConfigFile in interface XBRLDataSource
public java.lang.Object getSampleData(java.lang.Object data)
throws MapException
XBRLDataSource
getSampleData in interface XBRLDataSourcedata - object
MapException - in the case the input object cannot be usedpublic void createConfigFileContent()
XBRLDataSource
createConfigFileContent in interface XBRLDataSourcepublic boolean isConfigfileRequired()
XBRLDataSource
isConfigfileRequired in interface XBRLDataSource
public void save()
throws MapException
XBRLDataSource
save in interface XBRLDataSourceMapException - in the event of problems like IOExceptionpublic boolean isInputFileRequired()
XBRLDataSource
isInputFileRequired in interface XBRLDataSourcepublic java.lang.String[] getCells(java.lang.String identifier)
identifier - String
public double getMult(java.lang.String identifier,
java.lang.String cell)
identifier - string mapIdentifiercell - string cell address
public java.lang.String getExactMode(java.lang.String identifier,
java.lang.String cell)
identifier - string mapIdentifiercell - string cell address
public java.lang.String getExactModeValue(java.lang.String identifier,
java.lang.String cell)
identifier - string mapIdentifiercell - string cell address
public java.lang.String getZeroValuePolicy(java.lang.String identifier,
java.lang.String cell)
identifier - string mapIdentifiercell - string cell address
public void addMap(java.lang.String identifier,
java.lang.String cell,
double mult,
java.lang.String exactMode,
java.lang.String exactModeValue,
java.lang.String zeroValue)
identifier - Stringcell - Stringmult - double, multiplier for this cell.exactMode, - constant string "decimals" or "precision", if null, "decimals" will be used.exactModeValue, - "INF", "mult", or an integer (positive or negative). see the XBRL 2.1 specificationzeroValue, - "blankCell" or "passZeroValue"; indicating if the cell value will be ignored when it is zero or if the cell value will be passed throughpublic com.ihr.xbrl.mapper.source.ExcelDataSource.ZeroValuePolicyType getDefaultZeroValuePolicyType()
public void setDefaultZeroValuePolicyType(com.ihr.xbrl.mapper.source.ExcelDataSource.ZeroValuePolicyType newValue)
newValue - ZeroValuePolicyType Enum the new value to set
public void removeMap(java.lang.String identifier,
java.lang.String cell)
identifier - cell - public boolean isTupleSourceRequired()
XBRLDataSourceThis information is used during the algorithm for generating a template file automatically.
Excel Data Source, for example, does not provides a meaning to indicate the number of occurrences of a tuple. The number of occurrences will be indicated in the instance document template itself. SQL Data Source, is on the other side. The SQL Driver and the source format may have information to provide the number of occurrences for a tuple.
Note, once a template has been automatically generated. it is up to the team to change the generated template into something different if this is required by the project.
isTupleSourceRequired in interface XBRLDataSource
public void moveRegion(Region region,
SheetPoint destination)
The topLeft SheetPoint in the Region region will be mapped to the SheetPoint at destination. All other points inside the region will be mapped to a point in the destination with the same displacement in the rows and columns as the original point has in the source region and the origin of the region (top left coordinates of the region).
source - region - destination - public void deleteRegion(Region region)
region - public java.util.Iterator<java.lang.Integer> getMapIterator()
public SheetPoint getMapSheetPoint(int index)
index -
public java.lang.String getMapId(int index)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||