Class DefaultCDMFrSyncTransformer
- java.lang.Object
- 
- org.ametys.plugins.odfsync.cdmfr.transformers.DefaultCDMFrSyncTransformer
 
- 
- All Implemented Interfaces:
- CDMFrSyncTransformer,- Configurable,- Serviceable
 
 public class DefaultCDMFrSyncTransformer extends Object implements CDMFrSyncTransformer, Serviceable, Configurable Default implementation of CDMFrSyncTransformer.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classDefaultCDMFrSyncTransformer.CDMFrPrefixResolverXML prefix resolver which declares CDMFr namespaces.
 - 
Field SummaryFields Modifier and Type Field Description protected Set<Pattern>_applicationsSet of applications supported by the transformer.protected DOMParser_domParserThe DOM parser.protected PrefixResolver_prefixResolverThe prefix resolver.protected SourceResolver_sourceResolverAmetys object resolver.protected XPathProcessor_xPathProcessorThe XPath processor.protected String_xslFileThe XSL file to transform the document.static Map<String,String>DEFAULT_NAMESPACESThe default XML namespace prefixes.
 - 
Constructor SummaryConstructors Constructor Description DefaultCDMFrSyncTransformer()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigure(Configuration configuration)protected voidconfigureNamespaces(Configuration configuration)Configure the namespace to use.voidservice(ServiceManager manager)booleansupports(Document document)Analyze the document and tell if it's support or not by the current transformer.Documenttransform(Document document, Map<String,Object> parameters)Transform the document to a generic document designed for Ametys importers and synchronizers.
 
- 
- 
- 
Field Detail- 
DEFAULT_NAMESPACESpublic static final Map<String,String> DEFAULT_NAMESPACES The default XML namespace prefixes.
 - 
_domParserprotected DOMParser _domParser The DOM parser.
 - 
_sourceResolverprotected SourceResolver _sourceResolver Ametys object resolver.
 - 
_xPathProcessorprotected XPathProcessor _xPathProcessor The XPath processor.
 - 
_applicationsprotected Set<Pattern> _applications Set of applications supported by the transformer.
 - 
_prefixResolverprotected PrefixResolver _prefixResolver The prefix resolver.
 
- 
 - 
Constructor Detail- 
DefaultCDMFrSyncTransformerpublic DefaultCDMFrSyncTransformer() 
 
- 
 - 
Method Detail- 
servicepublic void service(ServiceManager manager) throws ServiceException - Specified by:
- servicein interface- Serviceable
- Throws:
- ServiceException
 
 - 
configurepublic void configure(Configuration configuration) throws ConfigurationException - Specified by:
- configurein interface- Configurable
- Throws:
- ConfigurationException
 
 - 
configureNamespacesprotected void configureNamespaces(Configuration configuration) Configure the namespace to use.- Parameters:
- configuration- the namespaces configuration, can be null.
 
 - 
supportspublic boolean supports(Document document) Description copied from interface:CDMFrSyncTransformerAnalyze the document and tell if it's support or not by the current transformer.- Specified by:
- supportsin interface- CDMFrSyncTransformer
- Parameters:
- document- The document to analyze.
- Returns:
- TRUE if the document is supported by the transformer, otherwise FALSE.
 
 - 
transformpublic Document transform(Document document, Map<String,Object> parameters) throws IOException, SAXException, ProcessingException Description copied from interface:CDMFrSyncTransformerTransform the document to a generic document designed for Ametys importers and synchronizers.- Specified by:
- transformin interface- CDMFrSyncTransformer
- Parameters:
- document- The document to transform.
- parameters- additional parameters for transformation
- Returns:
- The transformed document.
- Throws:
- IOException- if an error occurs.
- SAXException- if an error occurs.
- ProcessingException- if an error occurs.
 
 
- 
 
-