public class FeatureCatalogue extends Object implements SingleTarget, MessageSource, DeferrableOutputWriter
Modifier and Type | Field and Description |
---|---|
static String |
DOCX_PLACEHOLDER
The string used as placeholder in the docx template.
|
static String |
DOCX_TEMPLATE_URL |
static String |
localizationMessagesDefaultUri
Default URI defining the location of the localizationMessages.xml file in
XSLT(s).
|
static String |
localizationXslDefaultUri
Default URI defining the location of the localization.xsl file.
|
static String |
PARAM_DONT_TRANSFORM
Can be used to only perform the deferrable output write if necessary.
|
static String |
PARAM_INCLUDE_CODELIST_URI
If set to
false , the URI of code lists (available via tagged
value 'codeList' or 'vocabulary') won't be encoded as hyperlink on the
name of a code list type in the feature catalogue. |
static String |
PARAM_JAVA_EXE_PATH
Path to a java executable (usually 64bit).
|
static String |
PARAM_JAVA_OPTIONS
Can be used to set options - especially 'Xmx' - for the invocation of the
java executable identified via the parameter
"pathToJavaExecutable".
|
static String |
PARAM_OUTPUT_FORMAT |
static String |
PARAM_XSL_TRANSFORMER_FACTORY |
static int |
STATUS_WRITE_DOCX |
static int |
STATUS_WRITE_FRAMEHTML |
static int |
STATUS_WRITE_HTML |
static int |
STATUS_WRITE_PDF |
static int |
STATUS_WRITE_RTF |
static int |
STATUS_WRITE_XML |
Constructor and Description |
---|
FeatureCatalogue() |
Modifier and Type | Method and Description |
---|---|
protected void |
addAttribute(Document document,
Element e,
String name,
String value)
Add attribute to an element
|
protected Document |
createDocument() |
String |
getTargetName() |
void |
initialise(Options o,
ShapeChangeResult r)
Perform any initialization required to perform the deferred write.
|
void |
initialise(PackageInfo p,
Model m,
Options o,
ShapeChangeResult r,
boolean diagOnly)
Allows a target to perform the necessary initialization routines before
processing.
|
String |
message(int mnr)
This method returns messages belonging to the Feature Catalogue target by
their message number.
|
protected String |
messageText(int mnr)
This is the message text provision proper.
|
void |
process(ClassInfo ci)
The converter will call this method for each class belonging to the
package given during initialization (see
Target.initialise(de.interactive_instruments.ShapeChange.Model.PackageInfo, de.interactive_instruments.ShapeChange.Model.Model, de.interactive_instruments.ShapeChange.Options, de.interactive_instruments.ShapeChange.ShapeChangeResult, boolean) ). |
void |
reset()
All relevant fields of the target will be reset, so that it is ready for
processing selected schemas based upon a specific target configuration.
|
void |
write() |
void |
writeAll(ShapeChangeResult r)
Instructs the target to output the processing results.
|
void |
writeOutput()
Execute the deferred write of the desired output.
|
void |
xsltWrite(File transformationSource,
String xsltfileName,
File transformationTarget) |
void |
xsltWrite(String xmlName,
String xsltfileName,
String outfileName) |
public static final int STATUS_WRITE_PDF
public static final int STATUS_WRITE_HTML
public static final int STATUS_WRITE_XML
public static final int STATUS_WRITE_RTF
public static final int STATUS_WRITE_FRAMEHTML
public static final int STATUS_WRITE_DOCX
public static final String localizationMessagesDefaultUri
public static final String localizationXslDefaultUri
public static final String DOCX_PLACEHOLDER
public static final String DOCX_TEMPLATE_URL
public static final String PARAM_DONT_TRANSFORM
public static final String PARAM_INCLUDE_CODELIST_URI
false
, the URI of code lists (available via tagged
value 'codeList' or 'vocabulary') won't be encoded as hyperlink on the
name of a code list type in the feature catalogue. This can be useful for
example when the overall linking to external code lists is not ready for
publication yet.public static final String PARAM_XSL_TRANSFORMER_FACTORY
public static final String PARAM_OUTPUT_FORMAT
public static final String PARAM_JAVA_EXE_PATH
public static final String PARAM_JAVA_OPTIONS
public String getTargetName()
getTargetName
in interface Target
public void reset()
SingleTarget
The Converter
will reset SingleTargets whenever it processes a
target configuration.
reset
in interface SingleTarget
public void initialise(PackageInfo p, Model m, Options o, ShapeChangeResult r, boolean diagOnly) throws ShapeChangeAbortException
Target
Will be called by the Converter
for each selected schema (see
Model.selectedSchemas()
and PackageInfo.isSchema()
).
initialise
in interface Target
p
- a schema from the model selected via the configuration (see
Model.selectedSchemas()
) - not necessarily always an
application schemaShapeChangeAbortException
Model.selectedSchemas()
,
PackageInfo.isSchema()
protected void addAttribute(Document document, Element e, String name, String value)
protected Document createDocument()
public void process(ClassInfo ci)
Target
Target.initialise(de.interactive_instruments.ShapeChange.Model.PackageInfo, de.interactive_instruments.ShapeChange.Model.Model, de.interactive_instruments.ShapeChange.Options, de.interactive_instruments.ShapeChange.ShapeChangeResult, boolean)
).
NOTE: will be called not only for the classes directly contained in the package, but also all sub-packages belonging to the same targetNamespace!
public void writeAll(ShapeChangeResult r)
SingleTarget
Will be called by the Converter
after initialization and
processing for all of the selected schema has been performed.
writeAll
in interface SingleTarget
Model.selectedSchemas()
public void xsltWrite(File transformationSource, String xsltfileName, File transformationTarget)
public String message(int mnr)
This method returns messages belonging to the Feature Catalogue target by their message number. The organization corresponds to the logic in module ShapeChangeResult. All functions in that class, which require an message number can be redirected to the function at hand.
message
in interface MessageSource
mnr
- Message numberpublic void writeOutput()
DeferrableOutputWriter
writeOutput
in interface DeferrableOutputWriter
public void initialise(Options o, ShapeChangeResult r)
DeferrableOutputWriter
initialise
in interface DeferrableOutputWriter
protected String messageText(int mnr)
mnr
- Message numberCopyright © 2018. All rights reserved.