|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.interactive_instruments.ShapeChange.Model.ModelImpl
de.interactive_instruments.ShapeChange.Model.Xmi10.Xmi10Document
public class Xmi10Document
Field Summary | |
---|---|
Document |
document
|
protected String |
dtd
|
protected HashMap<String,AssociationInfo> |
fAssociations
Hash table for associations |
protected HashMap<String,ClassInfo> |
fClasses
Hash table for all classes and classnames |
protected HashMap<String,Multiplicity> |
fClassesRoseHiddenCardinality
|
HashMap<String,String> |
fClassesRoseHiddenLabels
|
protected HashMap<String,ClassInfo> |
fClassnames
|
protected HashMap<String,PackageInfo> |
fPackages
Hash table for all relevant packages |
protected HashMap<String,Vector<PropertyInfo>> |
fRoles
|
protected HashMap<String,Element> |
fSchemas
Hash table for all root schema packages |
protected HashMap<String,String> |
fStereotypes
Hash table for all relevant stereotypes |
protected HashMap<String,HashSet<String>> |
fSubtypes
Hash table for all relevant subtypes of a pure abstract class |
protected HashMap<String,HashSet<String>> |
fSupertypes
Hash table for all relevant supertypes of a feature or data type |
protected HashMap<String,String> |
fTaggedValues
Hash table for all relevant tagged values |
protected HashMap<String,Element> |
fTypes
Hash table for all potential types |
protected HashMap<String,UUID> |
fUUIDs
Hash table for all package uuids |
protected int |
globalSequenceNumber
global sequence number to ensure uniqueness in case the required tagged values "sequenceNumber" are not provided; this assumes that in the application schema only non-negative sequence numbers are used |
Options |
options
|
ShapeChangeResult |
result
|
Fields inherited from class de.interactive_instruments.ShapeChange.Model.ModelImpl |
---|
allowedTags, gmlTags, jsonTags, postprocessed, shapeChangeTags |
Constructor Summary | |
---|---|
Xmi10Document()
|
Method Summary | |
---|---|
protected String |
attributeOfProperty(Element elmt,
String child,
String att)
Get value of attribute node. |
protected Multiplicity |
cardinalityFromString(String multiplicityRanges)
|
String |
characterEncoding()
|
ClassInfo |
classById(String id)
|
ClassInfo |
classByName(String nam)
|
HashSet<ClassInfo> |
classes(PackageInfo pi)
Return all ClassInfo objects contained in the given package and in sub- packages, which belong to the same targetNamespace as the given package. |
protected void |
cleanupDOM()
Delete parts of the DOM not relevant for the conversion, i.e. the |
protected Element |
elementOfProperty(Element elmt,
String child)
Get element representing a property. |
protected Element |
firstChildElement(Element elmt)
Get first child element. |
protected Element |
getElementById(String id)
Get element representing a property. |
protected Vector<String> |
getOwnerId(Element e)
Some applications use ownedElement to attach stereotypes |
protected String |
getOwnerIdAsString(Element e)
Get the id of the containing package of a class |
protected String |
idOfProperty(Element elmt,
String child)
Get id (or idref) of an element. |
protected String |
idrefValue(Node n)
get value of idref reference |
protected Vector<String> |
idsOfProperty(Element elmt,
String child)
Get ids (or idrefs) of an element. |
protected void |
initAssociations()
Initialize map of asscoiations |
protected void |
initClasses()
Process all classes and generate the XML Schema "code" |
void |
initialise(ShapeChangeResult r,
Options o,
String xmifile)
Load the application schema(s). |
protected void |
initPackages()
Process all packages in the application schema |
protected void |
initStereotypesMap()
Initialize map of well-known stereotypes |
protected void |
initSubSupertypesMap()
Initialize maps for supertypes of a feature or data type and subtypes of a pure abstract class |
protected void |
initTaggedValuesMap()
Initialize map for well-known tagged values |
protected void |
initTypesMap()
Initialize map of types |
protected boolean |
isOwnerOfEnumeration(Element elmt)
Needed for MagicDraw XMI 1.0 / UML 1.4 export |
protected boolean |
notAReference(Element e)
Verify that an element is a model element and not just a reference to one. |
void |
open(String xmlfile)
|
Options |
options()
Return options and configuration object. |
PackageInfo |
packageById(String id)
|
HashSet<PackageInfo> |
packages()
|
ShapeChangeResult |
result()
Return result object for error reporting. |
HashSet<PackageInfo> |
schemas(String name)
Collect and return all PackageInfo objects tagged as being a schema. |
void |
shutdown()
|
String |
taggedValue(String idref,
String tag)
Find tagged value for a node |
HashMap<String,String> |
taggedValues(String idref)
|
protected String |
textOfProperty(Element e,
String property)
Get value of text node. |
protected String |
textValue(Node n)
get value of text child node |
int |
type()
|
protected void |
verify()
Verify XMI version |
protected boolean |
visible(Element e)
Check visibility of an UML model element for the mapping. |
Methods inherited from class de.interactive_instruments.ShapeChange.Model.ModelImpl |
---|
initialise, normalizeTaggedValue, postprocessAfterLoadingAndValidate, selectedSchemas |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface de.interactive_instruments.ShapeChange.Model.Model |
---|
initialise, postprocessAfterLoadingAndValidate, selectedSchemas |
Field Detail |
---|
public Document document
protected String dtd
public ShapeChangeResult result
public Options options
protected HashMap<String,String> fTaggedValues
protected HashMap<String,String> fStereotypes
protected HashMap<String,HashSet<String>> fSupertypes
protected HashMap<String,HashSet<String>> fSubtypes
protected HashMap<String,Element> fTypes
protected HashMap<String,Element> fSchemas
protected HashMap<String,AssociationInfo> fAssociations
protected HashMap<String,Vector<PropertyInfo>> fRoles
protected HashMap<String,PackageInfo> fPackages
protected HashMap<String,ClassInfo> fClasses
protected HashMap<String,ClassInfo> fClassnames
protected HashMap<String,Multiplicity> fClassesRoseHiddenCardinality
public HashMap<String,String> fClassesRoseHiddenLabels
protected HashMap<String,UUID> fUUIDs
protected int globalSequenceNumber
Constructor Detail |
---|
public Xmi10Document()
Method Detail |
---|
public Options options()
options
in interface Model
public ShapeChangeResult result()
result
in interface Model
public void initialise(ShapeChangeResult r, Options o, String xmifile) throws ShapeChangeAbortException
initialise
in interface Model
ShapeChangeAbortException
public void open(String xmlfile) throws ShapeChangeAbortException
ShapeChangeAbortException
public String characterEncoding()
characterEncoding
in interface Model
protected String textValue(Node n)
protected void verify() throws ShapeChangeAbortException
ShapeChangeAbortException
protected void cleanupDOM()
protected String idrefValue(Node n)
protected Element getElementById(String id)
protected String idOfProperty(Element elmt, String child)
protected Element elementOfProperty(Element elmt, String child)
protected Vector<String> idsOfProperty(Element elmt, String child)
protected String textOfProperty(Element e, String property)
protected String attributeOfProperty(Element elmt, String child, String att)
protected Element firstChildElement(Element elmt)
protected boolean visible(Element e)
public String taggedValue(String idref, String tag)
public HashMap<String,String> taggedValues(String idref)
idref
- identifies a model element
protected Vector<String> getOwnerId(Element e)
protected String getOwnerIdAsString(Element e)
protected boolean notAReference(Element e)
protected boolean isOwnerOfEnumeration(Element elmt)
protected void initTaggedValuesMap()
protected void initStereotypesMap()
protected void initSubSupertypesMap()
protected void initTypesMap() throws ShapeChangeAbortException
ShapeChangeAbortException
protected void initAssociations() throws ShapeChangeAbortException
ShapeChangeAbortException
protected void initPackages() throws ShapeChangeAbortException
ShapeChangeAbortException
protected void initClasses() throws ShapeChangeAbortException
ShapeChangeAbortException
public HashSet<PackageInfo> schemas(String name)
Model
schemas
in interface Model
public PackageInfo packageById(String id)
packageById
in interface Model
public ClassInfo classById(String id)
classById
in interface Model
public ClassInfo classByName(String nam)
classByName
in interface Model
public HashSet<ClassInfo> classes(PackageInfo pi)
Model
classes
in interface Model
protected Multiplicity cardinalityFromString(String multiplicityRanges)
public int type()
type
in interface Model
public void shutdown()
shutdown
in interface Model
public HashSet<PackageInfo> packages()
packages
in interface Model
PackageInfo
objects contained in the model
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |