us.mitre.ShapeChange.Model.GSIP
Class ClassInfoGSIP

java.lang.Object
  extended by de.interactive_instruments.ShapeChange.Model.InfoImpl
      extended by de.interactive_instruments.ShapeChange.Model.ClassInfoImpl
          extended by us.mitre.ShapeChange.Model.GSIP.ClassInfoGSIP
All Implemented Interfaces:
ClassInfo, Info

public class ClassInfoGSIP
extends ClassInfoImpl
implements ClassInfo


Field Summary
protected  ClassInfoGSIP baseclassInfo
          Baseclasses
protected  HashSet<ClassInfoGSIP> baseclassInfoSet
           
protected  Vector<Constraint> constraintsCache
          Cache set of constraints
protected  GSIPDocument document
          Access to the document object
protected  int enumLiteralSequenceNumber
          Assist for property sequencing if this is an Enumeration.
protected  HashMap<String,PropertyInfoGSIP> fPropertiesById
           
protected  String gsipClassId
          The GSIP object id of the class element object
protected  String gsipName
          Name of the class
protected  boolean hasNilReason
          Does this class possess nilReason properties?
protected  boolean isAbstract
          Some class flags.
protected  boolean isLeaf
           
protected  int numBaseClasses
           
protected  TreeMap<Integer,OperationInfo> operationsCache
          Cache (ordered) set for operations
protected  PackageInfoGSIP packageInfo
          The package the class belongs to
protected  TreeMap<StructuredNumber,PropertyInfo> propertiesCache
          Cache (ordered) set for properties
protected  Vector<PropertyInfoGSIP> registeredRoles
          Roles registered as properties of the class
protected  String stereotype
          Stereotype
protected  HashSet<ClassInfoGSIP> subclassInfoSet
          Subclasses
protected  HashMap<String,String> taggedValuesCache
          Cache map for tagged values
protected  boolean validatedConstraints
           
 
Fields inherited from class de.interactive_instruments.ShapeChange.Model.ClassInfoImpl
category, diagrams, processed
 
Fields inherited from class de.interactive_instruments.ShapeChange.Model.InfoImpl
aliasName, definition, description, documentation
 
Constructor Summary
ClassInfoGSIP(GSIPDocument doc, PackageInfoGSIP pi, HashMap<String,Object> properties)
           
 
Method Summary
 void addConstraint(Constraint c)
           
 void addProperty(PropertyInfo pi)
           
 ClassInfo baseClass()
          This determines the particular base class of a class in the sense of ISO19136 annex D+E.
 boolean checkSupertypes(int cat)
          This is supposed to find out, whether the given category 'cat' applied in 'this' class complies to the categories of all its base classes.
 Vector<Constraint> constraints()
           
 void establishRoles(PropertyInfoGSIP pi)
           
 PropertyInfoGSIP getPropertyById(String id)
           
 boolean hasNilReason()
           
 String id()
          Return model-unique id of class.
 boolean isAbstract()
           
 AssociationInfo isAssocClass()
           
 boolean isLeaf()
           
 Model model()
          Return GSIP model object.
 String name()
          Obtain the name of the class.
 OperationInfo operation(String name, String[] types)
           
 Options options()
          Return options and configuration object.
 PackageInfo pkg()
           
 TreeMap<StructuredNumber,PropertyInfo> properties()
           
 PropertyInfo property(String name)
          Note: a ClassInfo does not keep track of non-navigable properties.
 ShapeChangeResult result()
          Return result object for error reporting.
 Set<String> stereotypes()
           
 HashSet<String> subtypes()
          Provide the ids of all subclasses of this class.
 HashSet<String> supertypes()
          Provide the ids of all base classes of this class.
 String taggedValue(String tag)
          Return the tagged value for the tag given or null if missing.
 HashMap<String,String> taggedValues()
           
 HashMap<String,String> taggedValues(String tagList)
          TODO tagged values validation
 
Methods inherited from class de.interactive_instruments.ShapeChange.Model.ClassInfoImpl
asCharacterString, asDictionary, asDictionaryGml33, asGroup, category, encodingRule, establishCategory, fixIfCategoryIsUnknown, fullName, getDiagrams, hasConstraint, includeByValuePropertyType, includePropertyType, inSchema, isCollection, isKindOf, isSubtype, isUnionDirect, ns, nsabr, postprocessAfterLoadingAndValidate, processed, processed, qname, setDiagrams, suppressed, unsuppressedSupertype, xmlSchemaType
 
Methods inherited from class de.interactive_instruments.ShapeChange.Model.InfoImpl
aliasName, definition, description, documentation, matches, stereotype
 
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.ClassInfo
asCharacterString, asDictionary, asDictionaryGml33, asGroup, category, getDiagrams, hasConstraint, includeByValuePropertyType, includePropertyType, inSchema, isCollection, isKindOf, isSubtype, isUnionDirect, processed, processed, qname, setDiagrams, suppressed, unsuppressedSupertype, xmlSchemaType
 
Methods inherited from interface de.interactive_instruments.ShapeChange.Model.Info
aliasName, definition, description, documentation, encodingRule, fullName, matches, postprocessAfterLoadingAndValidate, stereotype
 

Field Detail

document

protected GSIPDocument document
Access to the document object


packageInfo

protected PackageInfoGSIP packageInfo
The package the class belongs to


baseclassInfo

protected ClassInfoGSIP baseclassInfo
Baseclasses


baseclassInfoSet

protected HashSet<ClassInfoGSIP> baseclassInfoSet

subclassInfoSet

protected HashSet<ClassInfoGSIP> subclassInfoSet
Subclasses


gsipClassId

protected String gsipClassId
The GSIP object id of the class element object


gsipName

protected String gsipName
Name of the class


isAbstract

protected boolean isAbstract
Some class flags.


isLeaf

protected boolean isLeaf

numBaseClasses

protected int numBaseClasses

registeredRoles

protected Vector<PropertyInfoGSIP> registeredRoles
Roles registered as properties of the class


taggedValuesCache

protected HashMap<String,String> taggedValuesCache
Cache map for tagged values


stereotype

protected String stereotype
Stereotype


propertiesCache

protected TreeMap<StructuredNumber,PropertyInfo> propertiesCache
Cache (ordered) set for properties


fPropertiesById

protected HashMap<String,PropertyInfoGSIP> fPropertiesById

operationsCache

protected TreeMap<Integer,OperationInfo> operationsCache
Cache (ordered) set for operations


constraintsCache

protected Vector<Constraint> constraintsCache
Cache set of constraints


validatedConstraints

protected boolean validatedConstraints

hasNilReason

protected boolean hasNilReason
Does this class possess nilReason properties?


enumLiteralSequenceNumber

protected int enumLiteralSequenceNumber
Assist for property sequencing if this is an Enumeration.

Constructor Detail

ClassInfoGSIP

public ClassInfoGSIP(GSIPDocument doc,
                     PackageInfoGSIP pi,
                     HashMap<String,Object> properties)
              throws ShapeChangeAbortException
Throws:
ShapeChangeAbortException
Method Detail

baseClass

public ClassInfo baseClass()
This determines the particular base class of a class in the sense of ISO19136 annex D+E. Only classes of categories resulting from the acknowledged stereotypes are considered. A base class is selected if it has the same category as this class or category unknown. However mixin classes are always ignored.

Specified by:
baseClass in interface ClassInfo

checkSupertypes

public boolean checkSupertypes(int cat)
Description copied from class: ClassInfoImpl
This is supposed to find out, whether the given category 'cat' applied in 'this' class complies to the categories of all its base classes. If at least one base class does not comply, 'false' is returned.

Specified by:
checkSupertypes in interface ClassInfo
Overrides:
checkSupertypes in class ClassInfoImpl

addConstraint

public void addConstraint(Constraint c)

constraints

public Vector<Constraint> constraints()
Specified by:
constraints in interface ClassInfo

hasNilReason

public boolean hasNilReason()
Specified by:
hasNilReason in interface ClassInfo

isAbstract

public boolean isAbstract()
Specified by:
isAbstract in interface ClassInfo

isLeaf

public boolean isLeaf()
Specified by:
isLeaf in interface ClassInfo

operation

public OperationInfo operation(String name,
                               String[] types)
Specified by:
operation in interface ClassInfo

pkg

public PackageInfo pkg()
Specified by:
pkg in interface ClassInfo

properties

public TreeMap<StructuredNumber,PropertyInfo> properties()
Specified by:
properties in interface ClassInfo

property

public PropertyInfo property(String name)
Description copied from interface: ClassInfo
Note: a ClassInfo does not keep track of non-navigable properties. Such properties occur in directed associations and are only referenced there.

Specified by:
property in interface ClassInfo
Returns:

subtypes

public HashSet<String> subtypes()
Provide the ids of all subclasses of this class.

Specified by:
subtypes in interface ClassInfo
Returns:
Set with the ids of all subtypes of this class (WARNING: this can be a shallow copy or derived set, thus it is not safe to assume that modifications to this set will update the subtype information in the class itself).

supertypes

public HashSet<String> supertypes()
Provide the ids of all base classes of this class.

Specified by:
supertypes in interface ClassInfo
Returns:
Set of ids of the base classes of this class.

id

public String id()
Return model-unique id of class.

Specified by:
id in interface Info

model

public Model model()
Return GSIP model object.

Specified by:
model in interface Info

name

public String name()
Obtain the name of the class.

Specified by:
name in interface Info

options

public Options options()
Return options and configuration object.

Specified by:
options in interface Info

result

public ShapeChangeResult result()
Return result object for error reporting.

Specified by:
result in interface Info

stereotypes

public Set<String> stereotypes()
Specified by:
stereotypes in interface Info

taggedValue

public String taggedValue(String tag)
Return the tagged value for the tag given or null if missing.

Specified by:
taggedValue in interface Info
Parameters:
tag - name of the tagged value to look up
Returns:
the tagged value for the tag given or null if the tagged value is missing.

taggedValues

public HashMap<String,String> taggedValues(String tagList)
TODO tagged values validation

Specified by:
taggedValues in interface Info

taggedValues

public HashMap<String,String> taggedValues()
Specified by:
taggedValues in interface Info
Returns:
a map with the tagged values defined for this object (key: tagged value name, value: the value of the tagged value); can be an empty map but not null

addProperty

public void addProperty(PropertyInfo pi)

getPropertyById

public PropertyInfoGSIP getPropertyById(String id)

establishRoles

public void establishRoles(PropertyInfoGSIP pi)

isAssocClass

public AssociationInfo isAssocClass()
Specified by:
isAssocClass in interface ClassInfo


Copyright © 2015. All rights reserved.