Package net.loomchild.segment.srx.io
Class Srx1Transformer
java.lang.Object
net.loomchild.segment.srx.io.Srx1Transformer
- All Implemented Interfaces:
SrxTransformer
Represents SRX document transformer between SRX 1.0 and newest supported
version. Responsible for validating input as SRX 1.0 and doing the
transformation using XSLT stylesheet.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Transform given SRX 1.0 document to newest supported version and write it to given writer.Transforms given SRX 1.0 document and returns Reader containing SRX document in newest supported version.
-
Field Details
-
MAP_RULE_NAME
Transformation parameter. Used to select map rule in SRX 1.0 document.- See Also:
-
STYLESHEET
- See Also:
-
SCHEMA
- See Also:
-
templates
-
schema
-
-
Constructor Details
-
Srx1Transformer
public Srx1Transformer()
-
-
Method Details
-
transform
Transform given SRX 1.0 document to newest supported version and write it to given writer. Because in current SRX version only one map rule is allowed it must be selected from SRX 1.0 document. If parameter map contains parameterMAP_RULE_NAME
then only map rule with name given by this parameter value is preserved. Otherwise first map rule from source document is preserved. If source document does not contain appropriate map rule to select, resulting document will not contain language maps and will be unusable.- Specified by:
transform
in interfaceSrxTransformer
- Parameters:
reader
- reader containing SRX 1.0 documentwriter
- writer to write transformed SRX documentparameterMap
- map containing transformation parameters
-
transform
Transforms given SRX 1.0 document and returns Reader containing SRX document in newest supported version. Creates temporary file and usestransform(Reader, Writer, Map)
.- Specified by:
transform
in interfaceSrxTransformer
- Parameters:
reader
- reader containing SRX 1.0 documentparameterMap
- map containing transformation parameters.- Returns:
- reader containing SRX document in newest supported version
- See Also:
-