public class ArcGISWorkspace extends Object implements SingleTarget, MessageSource
Modifier and Type | Class and Description |
---|---|
static class |
ArcGISWorkspace.ArcGISGeometryType |
Modifier and Type | Field and Description |
---|---|
protected static Integer |
assocClassesPkgId
Package where all association classes used to represent n:m relationships
are stored.
|
static int |
DEFAULT_MAX_NAME_LENGTH |
static Double |
DEFAULT_NUM_RANGE_MAX_UPPER_BOUNDARY |
static Double |
DEFAULT_NUM_RANGE_MIN_LOWER_BOUNDARY |
protected static Integer |
domainsPkgId
Package where all code lists and enumerations are stored (in package
itself or sub-packages according to package hierarchy in the application
schema).
|
protected static SortedMap<Integer,SortedMap<PackageInfo,Integer>> |
eaPkgIdByModelPkg_byWorkspaceSubPkgId
key: workspace sub package; value: {key: application schema package;
value: corresponding EA package within the workspace sub package}
|
protected static Integer |
featuresPkgId
<<FeatureDataset>> package where all feature types with
supported ArcGIS geometry are stored (in package itself or sub-packages
according to package hierarchy in the application schema).
|
static String |
ILLEGAL_NAME_CHARACTERS_DETECTION_REGEX |
static int |
LENGTH_TAGGED_VALUE_DEFAULT |
protected static SortedMap<String,Integer> |
lengthByClassPropName
Contains information about the maximum length of a property value
(usually of a textual type).
|
protected static SortedMap<String,Integer> |
lengthMappingByTypeName |
protected static String |
nameOfTVToDetermineFieldLength |
static double |
NUM_RANGE_DELTA |
protected static int |
numberOfSchemasSelectedForProcessing |
protected static SortedMap<ClassInfo,SortedMap<String,NumericRangeConstraintMetadata>> |
numericRangeConstraintByPropNameByClassName
Contains information about the numeric ranges defined for specific class
properties via OCL constraints.
|
static String |
PARAM_DOCUMENTATION_NOVALUE |
static String |
PARAM_DOCUMENTATION_TEMPLATE
Optional changes to the default documentation template and the default
strings for descriptors without value
|
static String |
PARAM_FOREIGN_KEY_SUFFIX
Suffix to append to the name of foreign keys.
|
static String |
PARAM_KEEP_CASE_OF_ROLENAME
If set to 'true', do not switch the first character of a target or source
role name in a relationship class to lower case.
|
static String |
PARAM_LENGTH_TAGGED_VALUE_DEFAULT
Optional (defaults to 255) - Default length to set in the 'length' tagged
value of <
|
static String |
PARAM_MAX_NAME_LENGTH |
static String |
PARAM_NAME_OF_TV_TO_DETERMINE_FIELD_LENGTH
Optional (defaults to 'size') - Name of the tagged value that is used to
determine the length of a <<field>> that represents a
property under "rule-arcgis-prop-lengthFromTaggedValue".
|
static String |
PARAM_OUTPUT_DIR
Optional (default is the current run directory) - The path to the folder
in which the resulting ArcGIS workspace (UML) model will be created.
|
static String |
PARAM_OUTPUT_FILENAME
Optional (defaults to "ArcGISWorkspace.eap") The name of the output file.
|
static String |
PARAM_REFLEXIVE_REL_FIELD_SUFFIX |
static String |
PARAM_SHORT_NAME_BY_TAGGED_VALUE
Name of the tagged value that provides the short name for a model
element, when used in constructing specific names of the ArcGIS
workspace.
|
static String |
PARAM_VALUE_RANGE_DELTA
Optional (defaults to 0.01) - Delta to add to / subtract from a range
limit in case that the lower and/or upper boundary comparison operator is
not inclusive.
|
static String |
PARAM_WORKSPACE_TEMPLATE
Optional (defaults to
"http://shapechange.net/resources/templates/ArcGISWorkspace_template.eap"
) - Path to the ArcGIS workspace UML model template file (can be local or
an online resource).
|
protected static SortedMap<String,Integer> |
precisionMappingByTypeName |
protected static SortedMap<String,ProcessMapEntry> |
processMapEntries
TODO: value of 'rule' attribute is currently ignored
key: 'type' attribute value of map entry defined for the target; value:
according map entry
|
static String |
RULE_ALL_PRECISION |
static String |
RULE_ALL_RELCLASSNAME_BY_TAGGEDVALUE_OF_CLASSES
If this rule is enabled, then the base name of a relationship class will
be constructed from the short names of the source and target class,
combined by an underscore.
|
static String |
RULE_ALL_SCALE |
static String |
RULE_CLS_HASM
If a feature type has the tagged value 'HasM' set to 'true', and the
feature type is converted to an ArcGIS feature class (Point, Polyline,
etc.), then with this rule enabled the ArcGIS feature class will have the
tagged value 'HasM' set to 'true' (default is 'false').
|
static String |
RULE_CLS_HASZ
If a feature type has the tagged value 'HasZ' set to 'true', and the
feature type is converted to an ArcGIS feature class (Point, Polyline,
etc.), then with this rule enabled the ArcGIS feature class will have the
tagged value 'HasZ' set to 'true' (default is 'false').
|
static String |
RULE_CLS_IDENTIFIER_STEREOTYPE
Enables use of stereotype <<identifier>> on class attributes.
|
static String |
RULE_CLS_RANGE_DOMAIN_FROM_TAGGED_VALUES
Identifies range domains for class properties based upon the tagged
values 'rangeMinimum' and 'rangeMaximum'.
|
static String |
RULE_ENUM_INITIAL_VALUE_BY_ALIAS
If this rule is enabled, the initial value for a <
|
static String |
RULE_PROP_ATTINDEX |
static String |
RULE_PROP_INITIAL_VALUE |
static String |
RULE_PROP_ISNULLABLE |
static String |
RULE_PROP_LENGTH_FROM_CODES_OR_ENUMS_OF_VALUE_TYPE
If this rule is enabled then the length of a property that has a code
list or enumeration as value type is computed as the maximum name length
from the codes/enums of the value type (if codes/enums are defined by
that type).
|
static String |
RULE_PROP_LENGTH_FROM_TAGGED_VALUE
If this rule is enabled, ShapeChange will use the value of the tagged
value 'size' (must be an integer) to populate the ‘length’ tagged value
of the <<field>> that will represent the property in the
ArcGIS model.
|
static String |
RULE_PROP_LENGTH_FROM_TAGGED_VALUE_FOR_CODELIST_OR_ENUMERATION_VALUE_TYPE
If this rule is enabled, then - for properties with a code list or
enumeration as value type - ShapeChange will use the value of the tagged
value 'size' (must be an integer) to populate the ‘length’ tagged value
of the <<field>> that will represent the property in the
ArcGIS model.
|
static String |
RULE_PROP_PRECISION
NOTE: This rule identifier is deprecated.
|
static String |
RULE_PROP_REFLEXIVE_AS_FIELD |
static String |
RULE_PROP_SCALE
NOTE: This rule identifier is deprecated.
|
protected static SortedMap<String,Integer> |
scaleMappingByTypeName |
static String |
STEREOTYPE_DOMAIN_CODED_VALUE |
static String |
STEREOTYPE_RELATIONSHIP_CLASS |
protected static Integer |
tablesPkgId
Package where all feature types without geometry and object types are
stored (in package itself or sub-packages according to package hierarchy
in the application schema).
|
static String |
TEMPLATE_PKG_ASSOCIATION_CLASSES_NAME |
static String |
TEMPLATE_PKG_DOMAINS_NAME |
static String |
TEMPLATE_PKG_FEATURES_NAME |
static String |
TEMPLATE_PKG_TABLES_NAME |
static String |
TV_FIELD_TYPE |
static String |
TV_NUMERIC_TYPE
Setting this tagged value on a code list or enumeration indicates that
the codes are numeric.
|
static String |
WORKSPACE_TEMPLATE_URL |
protected static Integer |
workspacePkgId
<<ArcGIS>> workspace package that represents the application
schema package.
|
Constructor and Description |
---|
ArcGISWorkspace() |
Modifier and Type | Method and Description |
---|---|
String |
getTargetName() |
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)
Return a message for a message number.
|
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.
|
public static final String RULE_ENUM_INITIAL_VALUE_BY_ALIAS
public static final String RULE_CLS_IDENTIFIER_STEREOTYPE
public static final String RULE_CLS_HASZ
public static final String RULE_CLS_HASM
public static final String RULE_CLS_RANGE_DOMAIN_FROM_TAGGED_VALUES
public static final String RULE_PROP_LENGTH_FROM_TAGGED_VALUE
public static final String RULE_PROP_LENGTH_FROM_TAGGED_VALUE_FOR_CODELIST_OR_ENUMERATION_VALUE_TYPE
public static final String RULE_PROP_LENGTH_FROM_CODES_OR_ENUMS_OF_VALUE_TYPE
public static final String RULE_PROP_INITIAL_VALUE
public static final String RULE_ALL_PRECISION
public static final String RULE_PROP_PRECISION
public static final String RULE_ALL_SCALE
public static final String RULE_PROP_SCALE
public static final String RULE_PROP_ISNULLABLE
public static final String RULE_PROP_ATTINDEX
public static final String RULE_PROP_REFLEXIVE_AS_FIELD
public static final String RULE_ALL_RELCLASSNAME_BY_TAGGEDVALUE_OF_CLASSES
public static final String PARAM_LENGTH_TAGGED_VALUE_DEFAULT
public static final String PARAM_NAME_OF_TV_TO_DETERMINE_FIELD_LENGTH
public static final String PARAM_VALUE_RANGE_DELTA
public static final String PARAM_OUTPUT_DIR
public static final String PARAM_OUTPUT_FILENAME
public static final String PARAM_WORKSPACE_TEMPLATE
public static final String WORKSPACE_TEMPLATE_URL
public static final String PARAM_DOCUMENTATION_TEMPLATE
public static final String PARAM_DOCUMENTATION_NOVALUE
public static final String PARAM_FOREIGN_KEY_SUFFIX
public static final String PARAM_REFLEXIVE_REL_FIELD_SUFFIX
public static final String PARAM_KEEP_CASE_OF_ROLENAME
public static final String PARAM_MAX_NAME_LENGTH
public static final String PARAM_SHORT_NAME_BY_TAGGED_VALUE
public static final String TEMPLATE_PKG_FEATURES_NAME
public static final String TEMPLATE_PKG_DOMAINS_NAME
public static final String TEMPLATE_PKG_TABLES_NAME
public static final String TEMPLATE_PKG_ASSOCIATION_CLASSES_NAME
public static final String STEREOTYPE_RELATIONSHIP_CLASS
public static final String STEREOTYPE_DOMAIN_CODED_VALUE
public static final int DEFAULT_MAX_NAME_LENGTH
public static final double NUM_RANGE_DELTA
public static final Double DEFAULT_NUM_RANGE_MIN_LOWER_BOUNDARY
public static final Double DEFAULT_NUM_RANGE_MAX_UPPER_BOUNDARY
public static final int LENGTH_TAGGED_VALUE_DEFAULT
public static final String ILLEGAL_NAME_CHARACTERS_DETECTION_REGEX
public static final String TV_NUMERIC_TYPE
NOTE: The field type determined by processing this tagged value will be overridden if tagged value "fieldType" is also set on the code list / enumeration.
public static final String TV_FIELD_TYPE
protected static int numberOfSchemasSelectedForProcessing
protected static Integer workspacePkgId
protected static Integer featuresPkgId
protected static Integer tablesPkgId
protected static Integer assocClassesPkgId
protected static Integer domainsPkgId
protected static SortedMap<Integer,SortedMap<PackageInfo,Integer>> eaPkgIdByModelPkg_byWorkspaceSubPkgId
protected static SortedMap<String,ProcessMapEntry> processMapEntries
key: 'type' attribute value of map entry defined for the target; value: according map entry
protected static SortedMap<String,Integer> lengthByClassPropName
protected static SortedMap<ClassInfo,SortedMap<String,NumericRangeConstraintMetadata>> numericRangeConstraintByPropNameByClassName
protected static String nameOfTVToDetermineFieldLength
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()
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 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 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 String message(int mnr)
MessageSource
message
in interface MessageSource
Copyright © 2018. All rights reserved.