Class ImportCoursePartValuesExtractor
- java.lang.Object
-
- org.ametys.plugins.repository.data.extractor.xml.ModelAwareXMLValuesExtractor
-
- org.ametys.plugins.odfsync.cdmfr.extractor.ImportCDMFrValuesExtractor
-
- org.ametys.plugins.odfsync.cdmfr.extractor.ImportCoursePartValuesExtractor
-
- All Implemented Interfaces:
ModelAwareValuesExtractor
,ValuesExtractor
public class ImportCoursePartValuesExtractor extends ImportCDMFrValuesExtractor
This class provides methods to extract course part's values from a CMD-fr import document
-
-
Field Summary
-
Fields inherited from class org.ametys.plugins.odfsync.cdmfr.extractor.ImportCDMFrValuesExtractor
_component, _context, _factory, _MULTIPLE_DATA_ITEM_TAG, _TAG_COURSELIST
-
Fields inherited from class org.ametys.plugins.repository.data.extractor.xml.ModelAwareXMLValuesExtractor
_additionalDataGetter, _element, _modelItemContainers
-
-
Constructor Summary
Constructors Constructor Description ImportCoursePartValuesExtractor(Element element, ImportCDMFrValuesExtractorFactory factory, ImportCDMFrComponent component, ImportCDMFrContext context, XMLValuesExtractorAdditionalDataGetter additionalDataGetter, Collection<? extends ModelItemContainer> modelItemContainers)
Creates an import course part values extractorImportCoursePartValuesExtractor(Element element, ImportCDMFrValuesExtractorFactory factory, ImportCDMFrComponent component, ImportCDMFrContext context, XMLValuesExtractorAdditionalDataGetter additionalDataGetter, Model... models)
Creates an import course part values extractor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <T> Object
_extractElementValue(Element parent, ElementDefinition<T> definition, Optional<Object> additionalData)
Extracts the value of the given element-
Methods inherited from class org.ametys.plugins.odfsync.cdmfr.extractor.ImportCDMFrValuesExtractor
_extractContentValue, _extractContentValues, _extractTableRefValue, _extractTableRefValues, _getAttributeOrDefault
-
Methods inherited from class org.ametys.plugins.repository.data.extractor.xml.ModelAwareXMLValuesExtractor
_extractElementValue, _extractGroupValues, _extractValue, _extractValue, _extractValues, _fillViewItemContainerFromXML, _fillViewItemContainerFromXML, _getModelItemFromNodeName, _hasChildForAttribute, extractValue, extractValues, extractValues
-
-
-
-
Constructor Detail
-
ImportCoursePartValuesExtractor
public ImportCoursePartValuesExtractor(Element element, ImportCDMFrValuesExtractorFactory factory, ImportCDMFrComponent component, ImportCDMFrContext context, XMLValuesExtractorAdditionalDataGetter additionalDataGetter, Model... models)
Creates an import course part values extractor- Parameters:
element
- the DOM element containing the XML valuesfactory
- the values extractor factorycomponent
- the import CDM-fr componentcontext
- the import contextadditionalDataGetter
- the getter that retrieves needed additional data by typesmodels
- the model of the extracted values
-
ImportCoursePartValuesExtractor
public ImportCoursePartValuesExtractor(Element element, ImportCDMFrValuesExtractorFactory factory, ImportCDMFrComponent component, ImportCDMFrContext context, XMLValuesExtractorAdditionalDataGetter additionalDataGetter, Collection<? extends ModelItemContainer> modelItemContainers)
Creates an import course part values extractor- Parameters:
element
- the DOM element containing the XML valuesfactory
- the values extractor factorycomponent
- the import CDM-fr componentcontext
- the imported content's contextadditionalDataGetter
- the getter that retrieves needed additional data by typesmodelItemContainers
- the model of the extracted values
-
-
Method Detail
-
_extractElementValue
protected <T> Object _extractElementValue(Element parent, ElementDefinition<T> definition, Optional<Object> additionalData) throws Exception
Description copied from class:ModelAwareXMLValuesExtractor
Extracts the value of the given element- Overrides:
_extractElementValue
in classImportCDMFrValuesExtractor
- Type Parameters:
T
- type of the element definition- Parameters:
parent
- the DOM element of the element definition's parentdefinition
- the element's definitionadditionalData
- the additional data needed to extract the value- Returns:
- the value
- Throws:
Exception
- if an error occurs
-
-