|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.rs.xbrl.TaxonomyBuilder
public class TaxonomyBuilder
Generates an XBRL DTS executing all the instructions available in one excel sheet prepared specifically for this purpose. Read the documentation about the taxonomyBuilder in order to know more about the available instructions.
Process:
generate()
| Field Summary | |
|---|---|
static java.lang.String |
DTS_BUILDER_EXTENDED_LINKS_POLICY
The property DTS_BUILDER_EXTENDED_LINKS_POLICY defines how the tool creates new extended links inside linkbase containers. |
static java.lang.String |
DTS_BUILDER_EXTENDED_LINKS_POLICY_CREATE_NEW
This value of the Extended Links Policy indicates that a every instruction in the DTS Definition Language generates a new extended link within the parent container |
static java.lang.String |
DTS_BUILDER_EXTENDED_LINKS_POLICY_REUSE_EXISTING
This value of the Extended Links Policy indicates that a every instruction in the DTS Definition Language generates will try to reuse existing extended links already created in the parent container. |
static java.lang.String |
DTS_BUILDER_TARGET_OUT_OF_CURRENT_FILE_MESSAGE
This property control what message level is assigned to the event that occurs when, during the creation of an arc, a resource referenced in the from or to (source or target of the relationship) is out of the file where the arc is created but the ID of the target resource exists on another file. |
static java.lang.String |
LOGGER_NAME
This is the logger name where this Taxonomy Builder sends logs to. |
static java.lang.String |
PROPERTY_VALUE_ERROR
Property value for error messages |
static java.lang.String |
PROPERTY_VALUE_IGNORE
Property value for ignore messages |
static java.lang.String |
PROPERTY_VALUE_TRACE
Property value for trace messages |
static java.lang.String |
PROPERTY_VALUE_WARN
Property value for warning messages |
| Constructor Summary | |
|---|---|
TaxonomyBuilder()
Creates a new TaxonomyBuilder instance. |
|
TaxonomyBuilder(java.net.URI excelURI,
java.lang.String sheetInstructions)
Creates a new TaxonomyBuilder instance. |
|
| Method Summary | |
|---|---|
static void |
addToSchemaLocation(java.lang.String namespace,
java.lang.String absoluteURL,
GenerationContext gc)
|
static java.util.Properties |
createDefaultProperties()
|
static XMLFragment |
findResourceOrConceptById(java.lang.String token,
GenerationContext gc)
|
void |
generate()
Generates the new DTS using default values for all properties |
void |
generate(GenerationContext gc)
Generates the new DTS using the properties indicated and the workbook form the GenerationContext. the instructions sheet will be taken from the constructor of this class |
java.net.URI |
getExcelURI()
|
GenerationContext |
getGenerationContext()
Generates the new DTS using the properties indicated |
GenerationContext |
getGenerationContext(java.util.Properties props)
Generates the new DTS using the properties indicated |
org.apache.log4j.Logger |
getLogger()
Access to the logger on this class |
javax.xml.namespace.QName |
getQNameAtPoint(DTSContainer dts,
SheetPoint qnamePoint,
boolean bIsConcept)
Reads a concept reference as defined in the Taxonomy Builder documentation The cell pointed to by the qnamePoint parameter is the concept prefix. |
javax.xml.namespace.QName |
getQNameConcept(DTSContainer dts,
java.lang.String conceptPrefix,
java.lang.String conceptName)
Returns the QName of a concept already defined in one of the taxonomies in the DTS. |
static XBRLXSDTypeDefinition |
getTypeDefinitionAtPoint(GenerationContext gc,
SheetPoint typePoint)
|
static void |
main(java.lang.String[] args)
|
javax.xml.namespace.QName |
putGlobalName(java.lang.String name,
javax.xml.namespace.QName q)
Adds an entry to the global table of names to QNames. |
static void |
registerInstructionsFactory(java.lang.String clazz)
Instantiates and registers a new factory class for instructions. |
void |
setExcelURI(java.net.URI excelURI)
|
void |
setSheetInstructions(java.lang.String sheetInstructions)
|
void |
setVersion(int version)
Sets the excel source version to version 1 or version 2. |
static void |
usage()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String DTS_BUILDER_EXTENDED_LINKS_POLICY
"create-new": see DTS_BUILDER_EXTENDED_LINKS_POLICY_CREATE_NEW
"reuse-existing": see DTS_BUILDER_EXTENDED_LINKS_POLICY_REUSE_EXISTING (default)
public static final java.lang.String DTS_BUILDER_EXTENDED_LINKS_POLICY_CREATE_NEW
public static final java.lang.String DTS_BUILDER_EXTENDED_LINKS_POLICY_REUSE_EXISTING
public static final java.lang.String DTS_BUILDER_TARGET_OUT_OF_CURRENT_FILE_MESSAGE
public static final java.lang.String PROPERTY_VALUE_WARN
public static final java.lang.String PROPERTY_VALUE_ERROR
public static final java.lang.String PROPERTY_VALUE_IGNORE
public static final java.lang.String PROPERTY_VALUE_TRACE
public static final java.lang.String LOGGER_NAME
| Constructor Detail |
|---|
public TaxonomyBuilder(java.net.URI excelURI,
java.lang.String sheetInstructions)
throws com.rs.lic.LicenseVerificationException
generate() method will execute
the instructions in the sheet indicated in the sheetInstructions parameter.
excelURI2 - URI of the Excel file to processsheetInstructions - name of the sheet with instructions to execute
com.rs.lic.LicenseVerificationException - if the user does not have rights to use this class or any problem with the license has occurred
public TaxonomyBuilder()
throws com.rs.lic.LicenseVerificationException
generate() method will execute
the instructions in the sheet indicated in the sheetInstructions parameter.
excelURI2 - URI of the Excel file to processsheetInstructions - name of the sheet with instructions to execute
com.rs.lic.LicenseVerificationException - if the user does not have rights to use this class or any problem with the license has occurred| Method Detail |
|---|
public void setExcelURI(java.net.URI excelURI)
excelURI - the excelURI to setpublic java.net.URI getExcelURI()
public void setSheetInstructions(java.lang.String sheetInstructions)
sheetInstructions - the sheetInstructions to setpublic void setVersion(int version)
version -
public static void registerInstructionsFactory(java.lang.String clazz)
throws XBRLInitializationException
clazz -
XBRLInitializationException
public static void main(java.lang.String[] args)
throws java.lang.Exception
args -
java.lang.Exception
public void generate()
throws TaxonomyBuilderException
TaxonomyBuilderExceptionpublic org.apache.log4j.Logger getLogger()
public GenerationContext getGenerationContext()
throws TaxonomyBuilderException
TaxonomyBuilderException
public GenerationContext getGenerationContext(java.util.Properties props)
throws TaxonomyBuilderException
TaxonomyBuilderExceptionpublic static java.util.Properties createDefaultProperties()
public void generate(GenerationContext gc)
throws TaxonomyBuilderException
TaxonomyBuilderException
public static void addToSchemaLocation(java.lang.String namespace,
java.lang.String absoluteURL,
GenerationContext gc)
namespace - absoluteURL -
public static XBRLXSDTypeDefinition getTypeDefinitionAtPoint(GenerationContext gc,
SheetPoint typePoint)
typePoint -
SheetPointAccessException
public javax.xml.namespace.QName putGlobalName(java.lang.String name,
javax.xml.namespace.QName q)
name - as string, this is the key for the QNameq - as QName this is the QName the key refers to.
public static XMLFragment findResourceOrConceptById(java.lang.String token,
GenerationContext gc)
token -
public javax.xml.namespace.QName getQNameAtPoint(DTSContainer dts,
SheetPoint qnamePoint,
boolean bIsConcept)
throws SheetPointAccessException
The cell pointed to by the qnamePoint parameter is the concept prefix. The following cell is the element name in the namespace defined by the prefix.
The method searches loaded namespaces for a namespace that corresponds to the prefix. Once one is found, a new QName is created on that namespace for that prefix using the name found in the following cell.
dts - the DTSContainer on which namespaces will be investigated. Global namespaces will be used too.qnamePoint - the cell where the prefix is defined
SheetPointAccessException - in case of problems reading the parameters
public javax.xml.namespace.QName getQNameConcept(DTSContainer dts,
java.lang.String conceptPrefix,
java.lang.String conceptName)
dts - conceptPrefix - conceptName -
public static void usage()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||