public class ExtractionEngine extends StorageService implements StorageEventListener
StorageService.StorageStatus
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CREATE_VIEWS
When this property is set to true, during the creation of the ExtractionEngine instance all views are
created from scratch.
|
static java.lang.String |
IDENTIFIER_QUERY
Used to obtain the identifier from the reported fact.
|
static java.lang.String |
INSTANCE_FILTER_QUERY
Used to check if the instance document will be processed or will be skipped.
|
Constructor and Description |
---|
ExtractionEngine(DatabaseManagerBase dbm,
RegisterExtraClasses[] extra,
java.util.Properties props,
boolean hasGUI)
It must be public because of the way it should be initialized due to the
HasURIResolverParameter interface.
|
ExtractionEngine(RegisterExtraClasses[] extra,
java.util.Properties props,
boolean hasGUI)
It must be public because of the way it should be initialized due to the
HasURIResolverParameter interface.
|
Modifier and Type | Method and Description |
---|---|
boolean |
containsClass(java.lang.String name)
Contains class.
|
void |
documentStoredEvent(StorageEvent evt)
Document stored event.
|
void |
endUnitOfWork()
This method closes current session and allows for the
creation of a new session in the next call to
getSession() . |
static java.lang.String |
getDefaultIdentifierQuery()
Returns the default query used to obtain the identifier from the reported fact
The query must use a parameter called "f" that will be set to the fact from which the identifier shall be obtained.
|
static java.lang.String |
getDefaultInstanceFilterQuery()
Returns the default query to determine if the instance document is going to
be processed for extraction.
|
java.lang.String |
getIdentifierQuery()
Returns the query that is currently set to obtain the company identifier from a reported fact.
|
java.lang.String |
getInstanceFilterQuery()
Returns the query that will be executed to determine if the instance will be processed for extractions
or if it will be skipped.
|
java.lang.Throwable |
getLastException()
Access to the last error collected on this class. returns null in case of
no errors
|
static ExtractionEngine |
getService(RegisterExtraClasses[] extra,
java.util.Properties props,
boolean hasGUI)
Obtains the instance of the static service class that manages storage of information into the XBRL database.
|
org.hibernate.Session |
getSession()
Access to the session created on the extraction engine
can be null in case of errors.
|
boolean |
isNew()
Temp method to avoid the test tool to create duplicate records every time it runs.
|
void |
processInstance(XBRLInstance instance,
org.hibernate.Session dbs)
Process instance.
|
clear, disableOpen, doStoreDTS, doStoreDTS, doStoreDTS, enableOpen, getLastMessage, getPercentage, getStackTrace, getStatus, getStorageThreads, getTooltipMessage, isStored
getDbUtil, getStatus, showDbSettings
public static final java.lang.String IDENTIFIER_QUERY
public static final java.lang.String INSTANCE_FILTER_QUERY
public static final java.lang.String CREATE_VIEWS
public ExtractionEngine(RegisterExtraClasses[] extra, java.util.Properties props, boolean hasGUI)
extra
- is an array of RegisterExtraClasses objectsprops
- additional Properties object for the connection to the databasehasGUI
- this is true if the service can open a window to the end user. false otherwise.RegisterExtraClasses
public ExtractionEngine(DatabaseManagerBase dbm, RegisterExtraClasses[] extra, java.util.Properties props, boolean hasGUI)
dbm
- the database manager base to use with alternate configuration to connect to the databaseextra
- is an array of RegisterExtraClasses objectsprops
- additional Properties object for the connection to the database and to the pojo generarion processhasGUI
- this is true if the service can open a window to the end user. false otherwise.RegisterExtraClasses
public static ExtractionEngine getService(RegisterExtraClasses[] extra, java.util.Properties props, boolean hasGUI)
The parameters are optional and both can be null.
extra
- array of RegisterExtraClasses instances. The RegisterExtraClasses interface allows for extending the database model for additional objectsprops
- extra properties that will be added to the connection to the database and to the pojo generarion processhasGUI
- this is true if the service can open a window to the end user. false otherwise.RegisterExtraClasses
public static java.lang.String getDefaultIdentifierQuery()
The query must use a parameter called "f" that will be set to the fact from which the identifier shall be obtained.
public static java.lang.String getDefaultInstanceFilterQuery()
The query must use the parameter "i" that will be set to the instance document for which the decision shall be taken. The return value can be either a boolean value or a number that will be treated as true if it is different from 0 or false if it is equal to 0
public java.lang.String getIdentifierQuery()
public java.lang.String getInstanceFilterQuery()
public java.lang.Throwable getLastException()
public void processInstance(XBRLInstance instance, org.hibernate.Session dbs)
instance
- the instancedbs
- the dbspublic void documentStoredEvent(StorageEvent evt)
StorageEventListener
documentStoredEvent
in interface StorageEventListener
documentStoredEvent
in class StorageService
evt
- the evtpublic org.hibernate.Session getSession()
public void endUnitOfWork()
getSession()
.public boolean containsClass(java.lang.String name)
name
- the namepublic boolean isNew()
Copyright 2006-2015 Reporting Standard S.L., C/ Torrecilla del Puerto 1, 28043, Madrid, Espaņa