public class XBRLPojoGenerator
extends java.lang.Object
If the conversion is launched for the storage of the object in a permanent repository
then it is required to set up this generator with a session object that will be used
for storing the data in the database.
if the session is not set then the conversion
cannot be stored in a database but can be used for any other purposes.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
EXTERNAL_FILES_DOCUMENT_CONTENT_METHOD
The EXTERNAL_FILES_DOCUMENT_CONTENT_METHOD property indicates how the content "nodes" of an XBRL Document
already loaded from an external web site is going to be transformed into a sequence of bytes for storage
into the content of the DOCUMENTS table.
|
static java.lang.String |
READSOURCE
This is another possible value for the EXTERNAL_FILES_DOCUMENT_CONTENT_METHOD property.
|
static java.lang.String |
SERIALIZE
This is the default value for the EXTERNAL_FILES_DOCUMENT_CONTENT_METHOD property.
|
Constructor and Description |
---|
XBRLPojoGenerator()
Instantiates a new XBRL pojo generator.
|
XBRLPojoGenerator(java.util.Properties props)
Instantiates a new XBRL pojo generator.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addClassExtension(PojoExtension<?,?> extension)
Register a new PojoExtension class to capture events during the generation of the
POJO object model.
|
void |
clear()
Liberates all resources cached during the pojo model generation
|
XBRLDBAccessor |
clearSession(org.hibernate.Session session,
DbUtil.Database databaseType)
Clear the session cache.
|
DTSContainer |
generate(DTSContainer dts)
Generates a POJO version of the non POJO DTSContainer.
|
Namespace |
generate(net.sf.saxon.om.NamespaceBinding ns)
Generate.
|
QName |
generate(javax.xml.namespace.QName q)
Generate.
|
XBRLHasDocumentation |
generate(XBRLAllowsDocumentation parent)
Generate.
|
XBRLArcroleType |
generate(XBRLArcroleType dtsArcroleType)
Generate.
|
XMLAttribute |
generate(XBRLAttribute dtsAtt)
Generate.
|
XBRLContext |
generate(XBRLContext context)
Generate.
|
XBRLDocument |
generate(XBRLDocument dtsDoc)
Generate.
|
XBRLDocumentation |
generate(XBRLDocumentation dtsDoc)
Generate.
|
XBRLEntity |
generate(XBRLEntity entity)
Generate.
|
XBRLExtendedLink |
generate(XBRLExtendedLink dtsExtLink)
Generate.
|
XBRLFact |
generate(XBRLFact fact)
Generate.
|
XBRLFactItem |
generate(XBRLFactItem fact)
Generate.
|
XBRLFactString |
generate(XBRLFactNonNumeric fact)
Generate.
|
XBRLFactNumeric |
generate(XBRLFactNumeric fact)
Generate.
|
XBRLFactList |
generate(XBRLFactsList list)
FactList is an interface so generate the appropriate class.
|
XBRLFactTuple |
generate(XBRLFactTuple fact)
Generate.
|
XBRLImport |
generate(XBRLImport dtsImport)
Generate.
|
XBRLInstance |
generate(XBRLInstance instance)
Generate.
|
XBRLInstance |
generate(XBRLInstance instance,
boolean bForUpdate)
Generates a new pojo instance document based on the content of the instance document submitted as a parameter.
|
XBRLInstance |
generate(XBRLInstance instance,
boolean bForUpdate,
java.lang.String pathConversionRule)
Generates a new pojo instance document based on the content of the instance document submitted as a parameter.
|
XBRLItem |
generate(XBRLItem dtsItem)
Generate.
|
XBRLLinkbase |
generate(XBRLLinkbase dtsLinkbase)
Generate.
|
XBRLPeriod |
generate(XBRLPeriod period)
Generate.
|
XBRLRelationship |
generate(XBRLRelationship dtsRel)
Generate.
|
XBRLResource |
generate(XBRLResource dtsRes)
Generate.
|
XBRLRoleArcroleType |
generate(XBRLRoleAndArcroleTypes parent)
Generate.
|
XBRLRoleType |
generate(XBRLRoleType dtsRoleType)
Generate.
|
XBRLScenario |
generate(XBRLScenario scenario)
Generate.
|
XBRLSegment |
generate(XBRLSegment segment)
Generate.
|
XBRLTaxonomy |
generate(XBRLTaxonomy dtsTaxonomy)
Generate.
|
XBRLTuple |
generate(XBRLTuple dtsTuple)
Generate.
|
XBRLUnit |
generate(XBRLUnit unit)
Generate.
|
XBRLUsedOn |
generate(XBRLUsedOn dtsOn)
Generate.
|
XMLFragment |
generate(XMLFragment node)
Generate.
|
int |
getObjectsCount()
Gets the objects count.
|
java.lang.String |
getStatistics()
Gets the statistics.
|
void |
registerBar(DTSLoadingBarInterface bar)
Register bar.
|
void |
setSession(org.hibernate.Session session,
DbUtil.Database databaseType)
Sets the session with the database.
|
public static final java.lang.String EXTERNAL_FILES_DOCUMENT_CONTENT_METHOD
serialize: this is the default value. Means, the API will generate a new XBRLDocument (Taxonomy or Linkbase) from the original content. The new file will be semantically equivalent to the original one (same content) but may not be syntactically equal. The generation will always success because the document has been already loaded and validated. The generation is faster than obtaining it fron an external web site.
readsource: this will open a new http connection to the external web site and will read the content again from the original location.
public static final java.lang.String SERIALIZE
public static final java.lang.String READSOURCE
public XBRLPojoGenerator()
public XBRLPojoGenerator(java.util.Properties props)
props
- the propspublic XBRLInstance generate(XBRLInstance instance) throws XBRLPojoGenerationException
instance
- the instanceXBRLPojoGenerationException
- the XBRL pojo generation exceptionpublic XBRLInstance generate(XBRLInstance instance, boolean bForUpdate) throws XBRLPojoGenerationException
instance
- RS Object model XBRL instancebForUpdate
- booleanXBRLPojoGenerationException
- the XBRL pojo generation exceptionpublic XBRLInstance generate(XBRLInstance instance, boolean bForUpdate, java.lang.String pathConversionRule) throws XBRLPojoGenerationException
instance
- RS Object model XBRL instancebForUpdate
- booleanpathConversionRule
- the path conversion ruleXBRLPojoGenerationException
- the XBRL pojo generation exceptionpublic XBRLFactList generate(XBRLFactsList list) throws XBRLPojoGenerationException
list
- the listXBRLPojoGenerationException
- the XBRL pojo generation exceptionpublic XBRLFact generate(XBRLFact fact) throws XBRLPojoGenerationException
fact
- the factXBRLPojoGenerationException
- the XBRL pojo generation exceptionpublic XBRLFactItem generate(XBRLFactItem fact) throws XBRLPojoGenerationException
fact
- the factXBRLPojoGenerationException
- the XBRL pojo generation exceptionpublic XBRLFactTuple generate(XBRLFactTuple fact) throws XBRLPojoGenerationException
fact
- the factXBRLPojoGenerationException
- the XBRL pojo generation exceptionpublic XBRLFactString generate(XBRLFactNonNumeric fact) throws XBRLPojoGenerationException
fact
- the factXBRLPojoGenerationException
- the XBRL pojo generation exceptionpublic XBRLFactNumeric generate(XBRLFactNumeric fact) throws XBRLPojoGenerationException
fact
- the factXBRLPojoGenerationException
- the XBRL pojo generation exceptionpublic XBRLUnit generate(XBRLUnit unit) throws XBRLPojoGenerationException
unit
- the unitXBRLPojoGenerationException
public XBRLContext generate(XBRLContext context) throws XBRLPojoGenerationException
context
- the contextXBRLPojoGenerationException
- the XBRL pojo generation exceptionpublic XBRLScenario generate(XBRLScenario scenario) throws XBRLPojoGenerationException
scenario
- the scenarioXBRLPojoGenerationException
- the XBRL pojo generation exceptionpublic XBRLPeriod generate(XBRLPeriod period) throws XBRLPojoGenerationException
period
- the periodXBRLPojoGenerationException
public XBRLEntity generate(XBRLEntity entity) throws XBRLPojoGenerationException
entity
- the entityXBRLPojoGenerationException
- the XBRL pojo generation exceptionpublic XBRLSegment generate(XBRLSegment segment) throws XBRLPojoGenerationException
segment
- the segmentXBRLPojoGenerationException
- the XBRL pojo generation exceptionpublic DTSContainer generate(DTSContainer dts) throws XBRLPojoGenerationException
dts
- Regular, non POJO, DTS ContainerXBRLPojoGenerationException
- the XBRL pojo generation exceptionpublic void clear()
public XBRLItem generate(XBRLItem dtsItem) throws XBRLPojoGenerationException
dtsItem
- the dts itemXBRLPojoGenerationException
- the XBRL pojo generation exceptionpublic QName generate(javax.xml.namespace.QName q) throws XBRLPojoGenerationException
q
- QNameXBRLPojoGenerationException
public Namespace generate(net.sf.saxon.om.NamespaceBinding ns) throws XBRLPojoGenerationException
ns
- the nsXBRLPojoGenerationException
public XMLAttribute generate(XBRLAttribute dtsAtt) throws XBRLPojoGenerationException
dtsAtt
- the dts attXBRLPojoGenerationException
- the XBRL pojo generation exceptionpublic XBRLTuple generate(XBRLTuple dtsTuple) throws XBRLPojoGenerationException
dtsTuple
- the dts tupleXBRLPojoGenerationException
- the XBRL pojo generation exceptionpublic XBRLTaxonomy generate(XBRLTaxonomy dtsTaxonomy) throws XBRLPojoGenerationException
dtsTaxonomy
- the dts taxonomyXBRLPojoGenerationException
- the XBRL pojo generation exceptionpublic XBRLImport generate(XBRLImport dtsImport) throws XBRLPojoGenerationException
dtsImport
- the dts importXBRLPojoGenerationException
- the XBRL pojo generation exceptionpublic XBRLResource generate(XBRLResource dtsRes) throws XBRLPojoGenerationException
dtsRes
- the dts resXBRLPojoGenerationException
- the XBRL pojo generation exceptionpublic XBRLExtendedLink generate(XBRLExtendedLink dtsExtLink) throws XBRLPojoGenerationException
dtsExtLink
- the dts ext linkXBRLPojoGenerationException
- the XBRL pojo generation exceptionpublic XBRLDocument generate(XBRLDocument dtsDoc) throws XBRLPojoGenerationException
dtsDoc
- the dts docXBRLPojoGenerationException
- the XBRL pojo generation exceptionpublic XBRLRelationship generate(XBRLRelationship dtsRel) throws XBRLPojoGenerationException
dtsRel
- the dts relXBRLPojoGenerationException
- the XBRL pojo generation exceptionpublic XMLFragment generate(XMLFragment node) throws XBRLPojoGenerationException
node
- the nodeXBRLPojoGenerationException
- the XBRL pojo generation exceptionpublic XBRLLinkbase generate(XBRLLinkbase dtsLinkbase) throws XBRLPojoGenerationException
dtsLinkbase
- the dts linkbaseXBRLPojoGenerationException
- the XBRL pojo generation exceptionpublic XBRLArcroleType generate(XBRLArcroleType dtsArcroleType) throws XBRLPojoGenerationException
dtsArcroleType
- the dts arcrole typeXBRLPojoGenerationException
- the XBRL pojo generation exceptionpublic XBRLRoleType generate(XBRLRoleType dtsRoleType) throws XBRLPojoGenerationException
dtsRoleType
- the dts role typeXBRLPojoGenerationException
- the XBRL pojo generation exceptionpublic XBRLDocumentation generate(XBRLDocumentation dtsDoc) throws XBRLPojoGenerationException
dtsDoc
- the dts docXBRLPojoGenerationException
- the XBRL pojo generation exceptionpublic XBRLHasDocumentation generate(XBRLAllowsDocumentation parent) throws XBRLPojoGenerationException
parent
- the parentXBRLPojoGenerationException
- the XBRL pojo generation exceptionpublic XBRLRoleArcroleType generate(XBRLRoleAndArcroleTypes parent) throws XBRLPojoGenerationException
parent
- the parentXBRLPojoGenerationException
- the XBRL pojo generation exceptionpublic XBRLUsedOn generate(XBRLUsedOn dtsOn) throws XBRLPojoGenerationException
dtsOn
- the dts onXBRLPojoGenerationException
- the XBRL pojo generation exceptionpublic void registerBar(DTSLoadingBarInterface bar)
bar
- the barpublic int getObjectsCount()
public java.lang.String getStatistics()
public void setSession(org.hibernate.Session session, DbUtil.Database databaseType)
session
- Session object to setdatabaseType
- the database typepublic XBRLDBAccessor clearSession(org.hibernate.Session session, DbUtil.Database databaseType)
session
- Session object to cleardatabaseType
- the database typepublic boolean addClassExtension(PojoExtension<?,?> extension)
extension
- the new PojoExtension class. Note there shall be no duplicates
this is the reason hashCode and equals shall be implemented on every PojoExtensionCopyright 2006-2015 Reporting Standard S.L., C/ Torrecilla del Puerto 1, 28043, Madrid, Espaņa