public class ReplicationXmlSchema extends Object implements Target, MessageSource
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_OBJECT_IDENTIFIER_FIELD_NAME |
protected Integer |
defaultSize |
protected Document |
document |
static String |
MAP_ENTRY_PARAM_MAXLENGTHFROMSIZE |
protected Map<String,ProcessMapEntry> |
mapEntryByType |
protected Multiplicity |
multiplicity1 |
protected String |
objectIdentifierFieldName |
static String |
PARAM_OBJECT_IDENTIFIER_FIELD_NAME
Name of the field that contains the identifier of the object for which a
data entity contains information.
|
static String |
PARAM_SIZE
Size for elements representing textual properties with limited length, to
be used in case that the property represented by the element does not
have a 'size' tagged value; by default an element with textual type does
not have a size/length restriction.
|
static String |
PARAM_SUFFIX_FOR_PROPERTIES_WITH_FEATURE_VALUE_TYPE
Supports setting a suffix that will be appended to the name of properties
that reference feature types.
|
static String |
PARAM_SUFFIX_FOR_PROPERTIES_WITH_OBJECT_VALUE_TYPE
Supports setting a suffix that will be appended to the name of properties
that reference object types.
|
static String |
PARAM_TARGET_NAMESPACE_SUFFIX
Supports setting a suffix that will be appended to the target namespace
of the replication schema that is produced by the target.
|
protected Element |
root |
static String |
RULE_TGT_REP_CLS_GENERATE_OBJECTIDENTIFIER
If this rule is enabled, an object identifier will be added to feature
and object types.
|
static String |
RULE_TGT_REP_PROP_EXCLUDE_DERIVED
If this rule is enabled derived properties will be ignored.
|
static String |
RULE_TGT_REP_PROP_MAXLENGTHFROMSIZE
If this rule is enabled then properties with specific value types receive
a length restriction.
|
static String |
RULE_TGT_REP_PROP_OPTIONAL
If this rule is enabled all elements that represent properties from the
conceptual schema will have minOccurs=0.
|
protected String |
suffixForPropWithFeatureValueType |
protected String |
suffixForPropWithObjectValueType |
protected String |
targetNamespace |
protected String |
targetNamespaceSuffix |
static String |
TV_SIZE
Name of the tagged value via which properties with textual type can be
restricted in length.
|
Constructor and Description |
---|
ReplicationXmlSchema() |
Modifier and Type | Method and Description |
---|---|
protected void |
addAttribute(Element e,
String name,
String value)
Add attribute to an element
|
protected void |
addGlobalIdentifierAnnotation(Element e,
Info info)
Add standard annotations for data entities and fields.
|
protected Element |
addProperty(PropertyInfo pi)
Process a single property.
|
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.
|
protected String |
mapBaseType(ClassInfo ci)
Map a base type of a class to a predefined representation.
|
protected void |
mapPropertyType(PropertyInfo propi,
Element e)
Set the type for a property element.
|
String |
message(int mnr)
Return a message for a message number.
|
Element |
pComplexType(ClassInfo ci) |
void |
pGlobalEnumeration(ClassInfo ci) |
void |
pObjectElement(ClassInfo ci)
Create global element for a feature / object type
|
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 |
processLocalProperties(ClassInfo ci,
Element sequenceOrChoice)
Process all properties that are added in this class.
|
void |
processLocalProperty(PropertyInfo pi,
Element sequenceOrChoice)
Process a class property.
|
void |
write() |
public static final String PARAM_OBJECT_IDENTIFIER_FIELD_NAME
public static final String PARAM_TARGET_NAMESPACE_SUFFIX
public static final String PARAM_SUFFIX_FOR_PROPERTIES_WITH_FEATURE_VALUE_TYPE
public static final String PARAM_SUFFIX_FOR_PROPERTIES_WITH_OBJECT_VALUE_TYPE
public static final String PARAM_SIZE
public static final String RULE_TGT_REP_CLS_GENERATE_OBJECTIDENTIFIER
public static final String RULE_TGT_REP_PROP_EXCLUDE_DERIVED
public static final String RULE_TGT_REP_PROP_OPTIONAL
public static final String RULE_TGT_REP_PROP_MAXLENGTHFROMSIZE
public static final String TV_SIZE
public static final String DEFAULT_OBJECT_IDENTIFIER_FIELD_NAME
public static final String MAP_ENTRY_PARAM_MAXLENGTHFROMSIZE
protected Document document
protected Element root
protected Map<String,ProcessMapEntry> mapEntryByType
protected String targetNamespace
protected String objectIdentifierFieldName
protected String suffixForPropWithFeatureValueType
protected String suffixForPropWithObjectValueType
protected Multiplicity multiplicity1
protected Integer defaultSize
protected String targetNamespaceSuffix
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(Element e, String name, String value)
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 processLocalProperties(ClassInfo ci, Element sequenceOrChoice)
public void processLocalProperty(PropertyInfo pi, Element sequenceOrChoice)
pi
- property to processsequenceOrChoice
- element to which the property element shall be appendedprotected Element addProperty(PropertyInfo pi)
protected void mapPropertyType(PropertyInfo propi, Element e)
propi
- the propertye
- property elementprotected String mapBaseType(ClassInfo ci)
public void pGlobalEnumeration(ClassInfo ci)
public void pObjectElement(ClassInfo ci)
protected void addGlobalIdentifierAnnotation(Element e, Info info)
public String getTargetName()
getTargetName
in interface Target
public String message(int mnr)
MessageSource
message
in interface MessageSource
Copyright © 2017. All rights reserved.