Class ExtractionDefinitionReader
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.ametys.plugins.extraction.execution.ExtractionDefinitionReader
-
- All Implemented Interfaces:
Component
,Contextualizable
,LogEnabled
,Serviceable
public class ExtractionDefinitionReader extends AbstractLogEnabled implements Component, Contextualizable, Serviceable
This class reads the extraction definition file
-
-
Field Summary
Fields Modifier and Type Field Description private Context
_context
private ServiceManager
_serviceManager
static String
ROLE
The component role.
-
Constructor Summary
Constructors Constructor Description ExtractionDefinitionReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private ExtractionComponent
_processExtractionComponent(Configuration componentConfiguration)
private void
_readExtractionDefinitionFile(Configuration configuration, Extraction extraction)
private void
_readExtractionDescription(Configuration configuration, Extraction extraction)
private void
_readVariablesDefinition(Configuration configuration, Extraction extraction)
void
contextualize(Context context)
private List<String>
getDisplayOptionalColumnNames(Configuration configuration)
private Map<String,String>
getQueryVariablesNamesAndContentTypes(Configuration configuration)
Extraction
readExtractionDefinitionFile(File file)
Read the extraction definition fileExtraction
readVariablesDefinitionsInExtractionDefinitionFile(File file)
Read the extraction definition filevoid
service(ServiceManager manager)
-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Field Detail
-
_serviceManager
private ServiceManager _serviceManager
-
-
Constructor Detail
-
ExtractionDefinitionReader
public ExtractionDefinitionReader()
-
-
Method Detail
-
contextualize
public void contextualize(Context context) throws ContextException
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
readExtractionDefinitionFile
public Extraction readExtractionDefinitionFile(File file) throws Exception
Read the extraction definition file- Parameters:
file
- extraction definition file- Returns:
- the extraction components parsed in the definition file
- Throws:
Exception
- if an error occurs
-
readVariablesDefinitionsInExtractionDefinitionFile
public Extraction readVariablesDefinitionsInExtractionDefinitionFile(File file) throws Exception
Read the extraction definition file- Parameters:
file
- extraction definition file- Returns:
- the extraction components parsed in the definition file
- Throws:
Exception
- if an error occurs
-
_readExtractionDescription
private void _readExtractionDescription(Configuration configuration, Extraction extraction)
-
_readVariablesDefinition
private void _readVariablesDefinition(Configuration configuration, Extraction extraction) throws ConfigurationException
- Throws:
ConfigurationException
-
_readExtractionDefinitionFile
private void _readExtractionDefinitionFile(Configuration configuration, Extraction extraction) throws Exception
- Throws:
Exception
-
getDisplayOptionalColumnNames
private List<String> getDisplayOptionalColumnNames(Configuration configuration) throws ConfigurationException
- Throws:
ConfigurationException
-
getQueryVariablesNamesAndContentTypes
private Map<String,String> getQueryVariablesNamesAndContentTypes(Configuration configuration)
-
_processExtractionComponent
private ExtractionComponent _processExtractionComponent(Configuration componentConfiguration) throws Exception
- Throws:
Exception
-
-