de.interactive_instruments.ShapeChange.Target.ArcGISWorkspace
Class ArcGISWorkspace

java.lang.Object
  extended by de.interactive_instruments.ShapeChange.Target.ArcGISWorkspace.ArcGISWorkspace
All Implemented Interfaces:
MessageSource, Target

public class ArcGISWorkspace
extends Object
implements Target, MessageSource

Author:
Johannes Echterhoff

Nested Class Summary
static class ArcGISWorkspace.ArcGISGeometryType
           
 
Field Summary
protected  PackageInfo appSchemaPkg
           
protected  org.sparx.Package assocClasses
          Package where all association classes used to represent n:m relationships are stored.
static Double DEFAULT_NUM_RANGE_MAX_UPPER_BOUNDARY
           
static Double DEFAULT_NUM_RANGE_MIN_LOWER_BOUNDARY
           
protected  org.sparx.Package domains
          Package where all code lists and enumerations are stored (in package itself or sub-packages according to package hierarchy in the application schema).
protected  Map<org.sparx.Package,Map<PackageInfo,org.sparx.Package>> eaPkgByModelPkg_byWorkspaceSubPkg
          key: workspace sub package; value: {key: application schema package; value: corresponding EA package within the workspace sub package}
protected  org.sparx.Package features
          <<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
           
protected  Map<String,Integer> lengthByClassPropName
          Contains information about the maximum length of a property value (usually of a textual type).
protected  Map<String,Integer> lengthMappingByTypeName
           
 int lengthTaggedValueDefault
           
static int MAX_ALIAS_LENGTH
           
static int MAX_NAME_LENGTH
           
static double NUM_RANGE_DELTA
           
protected  Map<ClassInfo,Map<String,NumericRangeConstraintMetadata>> numericRangeConstraintByPropNameByClassName
          Contains information about the numeric ranges defined for specific class properties via OCL constraints.
static String PARAM_LENGTH_TAGGED_VALUE_DEFAULT
          Optional (defaults to 255) - Default length to set in the 'length' tagged value of <>s that have a textual value, in case that there is no OCL constraint that defines the length.
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_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  Map<String,Integer> precisionMappingByTypeName
           
protected  Map<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_ENUM_INITIAL_VALUE_BY_ALIAS
          If this rule is enabled, the initial value for a <>, which is an attribute of a <> that results from conversion of enumerations and code lists from the application schema, is taken from the alias of the respective enums and codes, rather than from the initial value defined in the application schema.
protected  Map<String,Integer> scaleMappingByTypeName
           
static String STEREOTYPE_DOMAIN_CODED_VALUE
           
static String STEREOTYPE_RELATIONSHIP_CLASS
           
protected  org.sparx.Package tables
          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 int TARGET_ArcGISWorkspace
           
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 WORKSPACE_TEMPLATE_URL
           
protected  org.sparx.Package workspacePkg
          <<ArcGIS>> workspace package that represents the application schema package.
 
Constructor Summary
ArcGISWorkspace()
           
 
Method Summary
 int getTargetID()
           
 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()
           
 void write()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TARGET_ArcGISWorkspace

public static final int TARGET_ArcGISWorkspace
See Also:
Constant Field Values

RULE_ENUM_INITIAL_VALUE_BY_ALIAS

public static final String RULE_ENUM_INITIAL_VALUE_BY_ALIAS
If this rule is enabled, the initial value for a <>, which is an attribute of a <> that results from conversion of enumerations and code lists from the application schema, is taken from the alias of the respective enums and codes, rather than from the initial value defined in the application schema.

See Also:
Constant Field Values

PARAM_LENGTH_TAGGED_VALUE_DEFAULT

public static final String PARAM_LENGTH_TAGGED_VALUE_DEFAULT
Optional (defaults to 255) - Default length to set in the 'length' tagged value of <>s that have a textual value, in case that there is no OCL constraint that defines the length.

See Also:
Constant Field Values

PARAM_VALUE_RANGE_DELTA

public static final 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.

See Also:
Constant Field Values

PARAM_OUTPUT_DIR

public static final 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.

See Also:
Constant Field Values

PARAM_OUTPUT_FILENAME

public static final String PARAM_OUTPUT_FILENAME
Optional (defaults to "ArcGISWorkspace.eap") The name of the output file. ShapeChange will append the file extension '.eap' as suffix if the file name does not already contain it.

See Also:
Constant Field Values

PARAM_WORKSPACE_TEMPLATE

public static final 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).

See Also:
Constant Field Values

WORKSPACE_TEMPLATE_URL

public static final String WORKSPACE_TEMPLATE_URL
See Also:
Constant Field Values

TEMPLATE_PKG_FEATURES_NAME

public static final String TEMPLATE_PKG_FEATURES_NAME
See Also:
Constant Field Values

TEMPLATE_PKG_DOMAINS_NAME

public static final String TEMPLATE_PKG_DOMAINS_NAME
See Also:
Constant Field Values

TEMPLATE_PKG_TABLES_NAME

public static final String TEMPLATE_PKG_TABLES_NAME
See Also:
Constant Field Values

TEMPLATE_PKG_ASSOCIATION_CLASSES_NAME

public static final String TEMPLATE_PKG_ASSOCIATION_CLASSES_NAME
See Also:
Constant Field Values

STEREOTYPE_RELATIONSHIP_CLASS

public static final String STEREOTYPE_RELATIONSHIP_CLASS
See Also:
Constant Field Values

STEREOTYPE_DOMAIN_CODED_VALUE

public static final String STEREOTYPE_DOMAIN_CODED_VALUE
See Also:
Constant Field Values

MAX_NAME_LENGTH

public static final int MAX_NAME_LENGTH
See Also:
Constant Field Values

MAX_ALIAS_LENGTH

public static final int MAX_ALIAS_LENGTH
See Also:
Constant Field Values

NUM_RANGE_DELTA

public static final double NUM_RANGE_DELTA
See Also:
Constant Field Values

DEFAULT_NUM_RANGE_MIN_LOWER_BOUNDARY

public static final Double DEFAULT_NUM_RANGE_MIN_LOWER_BOUNDARY

DEFAULT_NUM_RANGE_MAX_UPPER_BOUNDARY

public static final Double DEFAULT_NUM_RANGE_MAX_UPPER_BOUNDARY

lengthTaggedValueDefault

public int lengthTaggedValueDefault

ILLEGAL_NAME_CHARACTERS_DETECTION_REGEX

public static final String ILLEGAL_NAME_CHARACTERS_DETECTION_REGEX
See Also:
Constant Field Values

appSchemaPkg

protected PackageInfo appSchemaPkg

workspacePkg

protected org.sparx.Package workspacePkg
<<ArcGIS>> workspace package that represents the application schema package.


features

protected org.sparx.Package features
<<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).


tables

protected org.sparx.Package tables
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).


assocClasses

protected org.sparx.Package assocClasses
Package where all association classes used to represent n:m relationships are stored.


domains

protected org.sparx.Package domains
Package where all code lists and enumerations are stored (in package itself or sub-packages according to package hierarchy in the application schema).


eaPkgByModelPkg_byWorkspaceSubPkg

protected Map<org.sparx.Package,Map<PackageInfo,org.sparx.Package>> eaPkgByModelPkg_byWorkspaceSubPkg
key: workspace sub package; value: {key: application schema package; value: corresponding EA package within the workspace sub package}


processMapEntries

protected Map<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


lengthMappingByTypeName

protected Map<String,Integer> lengthMappingByTypeName

precisionMappingByTypeName

protected Map<String,Integer> precisionMappingByTypeName

scaleMappingByTypeName

protected Map<String,Integer> scaleMappingByTypeName

lengthByClassPropName

protected Map<String,Integer> lengthByClassPropName
Contains information about the maximum length of a property value (usually of a textual type). key: {class name}_{property name}; value: the max length of the property value


numericRangeConstraintByPropNameByClassName

protected Map<ClassInfo,Map<String,NumericRangeConstraintMetadata>> numericRangeConstraintByPropNameByClassName
Contains information about the numeric ranges defined for specific class properties via OCL constraints. key: class; value: map with [key: property name; value: the numeric range for the property]

Constructor Detail

ArcGISWorkspace

public ArcGISWorkspace()
Method Detail

initialise

public void initialise(PackageInfo p,
                       Model m,
                       Options o,
                       ShapeChangeResult r,
                       boolean diagOnly)
                throws ShapeChangeAbortException
Description copied from interface: Target
Allows a target to perform the necessary initialization routines before processing.

Will be called by the Converter for each selected schema (see Model.selectedSchemas() and PackageInfo.isSchema()).

Specified by:
initialise in interface Target
Parameters:
p - a schema from the model selected via the configuration (see Model.selectedSchemas()) - not necessarily always an application schema
Throws:
ShapeChangeAbortException
See Also:
Model.selectedSchemas(), PackageInfo.isSchema()

process

public void process(ClassInfo ci)
Description copied from interface: Target
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)).

NOTE: will be called not only for the classes directly contained in the package, but also all sub-packages belonging to the same targetNamespace!

Specified by:
process in interface Target

write

public void write()
Specified by:
write in interface Target

getTargetID

public int getTargetID()
Specified by:
getTargetID in interface Target

reset

public void reset()

message

public String message(int mnr)
Description copied from interface: MessageSource
Return a message for a message number.

Specified by:
message in interface MessageSource
See Also:
MessageSource.message(int)


Copyright © 2015. All rights reserved.