public class TypeConverter extends Object implements Transformer, MessageSource
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_DISSOLVE_ASSOCIATIONS_ATTRIBUTE_TYPE |
static String |
PARAM_DISSOLVE_ASSOCIATIONS_ATTRIBUTE_NAME_SUFFIX
Define a suffix to be added to the names of attributes that have been
transformed from association roles.
|
static String |
PARAM_DISSOLVE_ASSOCIATIONS_ATTRIBUTE_TYPE
Define the type to set for attributes that have been transformed from
association roles.
|
static String |
PARAM_ENUMERATION_TO_CODELIST_EXCLUSION_REGEX
Regular expression to identify enumerations (in the whole model) to NOT
convert to code lists under "rule-trf-enumeration-to-codelist" .
|
static String |
PARAM_TO_FEATURE_TYPE_NAME_REGEX
Regular expression to identify types from the schemas selected for
processing to convert to feature types with "rule-trf-toFeatureType"
.
|
static String |
PARAM_TO_FEATURE_TYPE_TAGGED_VALUE_NAME
Identify the name of the tagged value that is used to tag types that
shall be converted to feature types under "rule-trf-toFeatureType".
|
static String |
RULE_DISSOLVE_ASSOCIATIONS
Dissolves associations that are navigable from types in the schemas
selected for processing.
|
static String |
RULE_DISSOLVE_ASSOCIATIONS_EXCLUDE_MANYTOMANY_RELATIONSHIPS
If this rule is included together with
"rule-trf-dissolveAssociations", an association is not dissolved if
it represents a many-to-many relationship between two types (i.e., all
navigable roles have max multiplicity greater than 1).
|
static String |
RULE_DISSOLVE_ASSOCIATIONS_KEEP_TYPE
If this rule is included, then the type of resulting attributes is kept
as-is, i.e. parameter
"attributeType" will have no effect.
|
static String |
RULE_DISSOLVE_ASSOCIATIONS_REMOVE_TRANSFORMED_ROLE_IF_MULTIPLE
If this rule is included together with
"rule-trf-dissolveAssociations", then attributes that result from
dissolving an association and have maximum multiplicity greater than 1
are removed.
|
static String |
RULE_ENUMERATION_TO_CODELIST
Converts enumerations to code lists.
|
static String |
RULE_OBJECTTYPES_TO_FEATURETYPES
Convert all object types from schemas selected for processing to feature
types.
|
static String |
RULE_TO_FEATURETYPE
Convert types either identified via parameter
"toFeatureTypeNameRegex" or with tagged value
'toFeatureType=true' to feature types.
|
static String |
TV_DISSOLVE_ASSOCIATION |
static String |
TV_TO_CODELIST |
Constructor and Description |
---|
TypeConverter() |
Modifier and Type | Method and Description |
---|---|
String |
message(int mnr)
Return a message for a message number.
|
void |
process(GenericModel genModel,
Options options,
TransformerConfiguration trfConfig,
ShapeChangeResult result)
Processes the model.
|
public static final String TV_DISSOLVE_ASSOCIATION
public static final String TV_TO_CODELIST
public static final String PARAM_DISSOLVE_ASSOCIATIONS_ATTRIBUTE_NAME_SUFFIX
public static final String PARAM_DISSOLVE_ASSOCIATIONS_ATTRIBUTE_TYPE
public static final String DEFAULT_DISSOLVE_ASSOCIATIONS_ATTRIBUTE_TYPE
public static final String PARAM_TO_FEATURE_TYPE_NAME_REGEX
public static final String PARAM_ENUMERATION_TO_CODELIST_EXCLUSION_REGEX
public static final String PARAM_TO_FEATURE_TYPE_TAGGED_VALUE_NAME
public static final String RULE_ENUMERATION_TO_CODELIST
Enumerations can be excluded from this conversion if their name matches the regular expression given via parameter "toCodelistExclusionRegex" or if they have tagged value "toCodelist"='false'.
NOTE: This rule converts all enumerations within the model to code lists. If a restriction is desired, for example to enumerations that belong to the schemas selected for processing, or to specifically identified application schemas (e.g. identified by name or target namespace regex), the implementation would need to be enhanced (for example through new parameters).
Constraints are not updated.
public static final String RULE_TO_FEATURETYPE
public static final String RULE_OBJECTTYPES_TO_FEATURETYPES
public static final String RULE_DISSOLVE_ASSOCIATIONS
Associations can be excluded from this transformation by:
public static final String RULE_DISSOLVE_ASSOCIATIONS_EXCLUDE_MANYTOMANY_RELATIONSHIPS
public static final String RULE_DISSOLVE_ASSOCIATIONS_REMOVE_TRANSFORMED_ROLE_IF_MULTIPLE
public static final String RULE_DISSOLVE_ASSOCIATIONS_KEEP_TYPE
public void process(GenericModel genModel, Options options, TransformerConfiguration trfConfig, ShapeChangeResult result) throws ShapeChangeAbortException
Transformer
process
in interface Transformer
genModel
- The model to process.options
- Options to control the process execution.result
- Logging target.ShapeChangeAbortException
public String message(int mnr)
MessageSource
message
in interface MessageSource
Copyright © 2018. All rights reserved.