Class SaveExtractionHelper
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.ametys.plugins.extraction.edition.SaveExtractionHelper
-
- All Implemented Interfaces:
Component
,LogEnabled
,Serviceable
public class SaveExtractionHelper extends AbstractLogEnabled implements Component, Serviceable
Helper that manages the button that saves extraction's modifications
-
-
Field Summary
Fields Modifier and Type Field Description private SourceResolver
_sourceResolver
private static String
EXTRACT_EXTRA_DATA_REGEX
static String
ROLE
The Avalon role name
-
Constructor Summary
Constructors Constructor Description SaveExtractionHelper()
-
Method Summary
-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Field Detail
-
EXTRACT_EXTRA_DATA_REGEX
private static final String EXTRACT_EXTRA_DATA_REGEX
- See Also:
- Constant Field Values
-
_sourceResolver
private SourceResolver _sourceResolver
-
-
Constructor Detail
-
SaveExtractionHelper
public SaveExtractionHelper()
-
-
Method Detail
-
service
public void service(ServiceManager serviceManager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
saveExtraction
public boolean saveExtraction(String definitionFileName, Map<String,Object> extraction) throws Exception
Saves modifications on extraction. Creates the definition file if it doesn't exist- Parameters:
definitionFileName
- The extraction definition file nameextraction
- AMap
containing definition informations- Returns:
true
if extraction saving succeed,false
otherwise- Throws:
Exception
- if an error occurs
-
_saxExtraction
private void _saxExtraction(Map<String,Object> extraction, TransformerHandler handler) throws SAXException
- Throws:
SAXException
-
_saxClausesVariables
private void _saxClausesVariables(Map<String,Object> child, TransformerHandler handler) throws SAXException
- Throws:
SAXException
-
_saxOptionalColumns
private void _saxOptionalColumns(Map<String,Object> child, TransformerHandler handler) throws SAXException
- Throws:
SAXException
-
_saxExtractionComponent
private void _saxExtractionComponent(Map<String,Object> component, TransformerHandler handler) throws SAXException
- Throws:
SAXException
-
_getComponentAttibutes
private AttributesImpl _getComponentAttibutes(Map<String,Object> data)
-
_saxExtractionComponentClauses
private void _saxExtractionComponentClauses(Map<String,Object> data, TransformerHandler handler) throws SAXException
- Throws:
SAXException
-
_saxExtractionComponentGroupingFields
private void _saxExtractionComponentGroupingFields(Map<String,Object> data, TransformerHandler handler) throws SAXException
- Throws:
SAXException
-
_saxExtractionComponentColumns
private void _saxExtractionComponentColumns(Map<String,Object> data, TransformerHandler handler) throws SAXException
- Throws:
SAXException
-
_saxExtractionComponentSorts
private void _saxExtractionComponentSorts(Map<String,Object> data, TransformerHandler handler) throws SAXException
- Throws:
SAXException
-
_splitDataAndExtradataFromString
private Map<String,String> _splitDataAndExtradataFromString(String str)
-
-