de.interactive_instruments.ShapeChange.Model.EA
Class PackageInfoEA

java.lang.Object
  extended by de.interactive_instruments.ShapeChange.Model.InfoImpl
      extended by de.interactive_instruments.ShapeChange.Model.PackageInfoImpl
          extended by de.interactive_instruments.ShapeChange.Model.EA.PackageInfoEA
All Implemented Interfaces:
Info, PackageInfo

public class PackageInfoEA
extends PackageInfoImpl
implements PackageInfo


Field Summary
protected  boolean aliasAccessed
          Flag used to prevent duplicate retrieval/computation of the alias of this package.
protected  HashSet<ClassInfoEA> childCI
          Set of child classes
protected  HashSet<PackageInfoEA> childPI
          Set of child package objects
protected  boolean connectorsAccessed
          Flag used to prevent duplicate retrieval/computation of the connectors of this package.
protected  org.sparx.Collection<org.sparx.Connector> conns
          Access to the connectors of this package in the EA model
protected  EADocument document
          The Model object
protected  boolean documentationAccessed
          Flag used to prevent duplicate retrieval/computation of the documentation of this package.
protected  String eaName
          Name of the Package
protected  org.sparx.Package eaPackage
          The EA package object
protected  org.sparx.Element eaPackageElmt
          The EA element object possibly associated to the package
protected  int eaPackageElmtId
          The EA object id of the associated element object
protected  int eaPackageId
          The EA object id of the package object
protected  PackageInfoEA parentPI
          The parent package object
protected  HashSet<String> stereotypesCache
          Cache set for stereotypes
protected  HashSet<String> supplierIds
          Cache for the IDs of the suppliers of this class
protected  HashMap<String,String> taggedValuesCache
          Cache map for tagged values
 
Fields inherited from class de.interactive_instruments.ShapeChange.Model.PackageInfoImpl
diagrams
 
Fields inherited from class de.interactive_instruments.ShapeChange.Model.InfoImpl
aliasName, definition, description, documentation
 
Constructor Summary
PackageInfoEA(EADocument doc, PackageInfoEA ppi, org.sparx.Package pack, org.sparx.Element packelmt)
          Create new PackageInfo object.
 
Method Summary
 String aliasName()
          Get alias name of the package.
 HashSet<PackageInfo> containedPackages()
           
 String documentation()
          Return the documentation attached to the property object.
 org.sparx.Package getEaPackageObj()
          Inquire wrapped EA object
 String id()
          Return model-unique id of package.
 boolean isAppSchema()
          Determine whether the package represents an 'application schema'.
 Model model()
          Return EA model object.
 String name()
          Obtain the name of the package.
 Options options()
          Return options and configuration object.
 PackageInfo owner()
          Return the parent package if present, null otherwise.
 ShapeChangeResult result()
          Return result object for error reporting.
 PackageInfo rootPackage()
          Determine the root package.
 Set<String> stereotypes()
          Return the normalized stereotypes of the package.
 HashSet<String> supplierIds()
          Return the set of ids of the packages on which this package depends.
 String taggedValue(String tag)
          Return the tagged value for the tag given or null if missing.
 void taggedValue(String tag, String value)
          Set the tagged value for the tag given.
 HashMap<String,String> taggedValues()
           
 HashMap<String,String> taggedValues(String tagList)
          Return all the tagged values listed in the input string.
 
Methods inherited from class de.interactive_instruments.ShapeChange.Model.PackageInfoImpl
encodingRule, fullName, getDiagrams, gmlProfileSchema, isSchema, mapPackageNameToFilename, postprocessAfterLoadingAndValidate, schemaId, setDiagrams, targetNamespace, version, xmlns, xsdDocument
 
Methods inherited from class de.interactive_instruments.ShapeChange.Model.InfoImpl
definition, description, 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.PackageInfo
getDiagrams, gmlProfileSchema, isSchema, schemaId, setDiagrams, targetNamespace, version, xmlns, xsdDocument
 
Methods inherited from interface de.interactive_instruments.ShapeChange.Model.Info
definition, description, encodingRule, fullName, matches, postprocessAfterLoadingAndValidate, stereotype
 

Field Detail

aliasAccessed

protected boolean aliasAccessed
Flag used to prevent duplicate retrieval/computation of the alias of this package.


connectorsAccessed

protected boolean connectorsAccessed
Flag used to prevent duplicate retrieval/computation of the connectors of this package.


documentationAccessed

protected boolean documentationAccessed
Flag used to prevent duplicate retrieval/computation of the documentation of this package.


conns

protected org.sparx.Collection<org.sparx.Connector> conns
Access to the connectors of this package in the EA model


document

protected EADocument document
The Model object


parentPI

protected PackageInfoEA parentPI
The parent package object


childPI

protected HashSet<PackageInfoEA> childPI
Set of child package objects


childCI

protected HashSet<ClassInfoEA> childCI
Set of child classes


eaPackage

protected org.sparx.Package eaPackage
The EA package object


eaPackageId

protected int eaPackageId
The EA object id of the package object


eaPackageElmt

protected org.sparx.Element eaPackageElmt
The EA element object possibly associated to the package


eaPackageElmtId

protected int eaPackageElmtId
The EA object id of the associated element object


eaName

protected String eaName
Name of the Package


taggedValuesCache

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


stereotypesCache

protected HashSet<String> stereotypesCache
Cache set for stereotypes


supplierIds

protected HashSet<String> supplierIds
Cache for the IDs of the suppliers of this class

Constructor Detail

PackageInfoEA

public PackageInfoEA(EADocument doc,
                     PackageInfoEA ppi,
                     org.sparx.Package pack,
                     org.sparx.Element packelmt)
Create new PackageInfo object.

Method Detail

getEaPackageObj

public org.sparx.Package getEaPackageObj()
Inquire wrapped EA object


model

public Model model()
Return EA model object.

Specified by:
model 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

containedPackages

public HashSet<PackageInfo> containedPackages()
Specified by:
containedPackages in interface PackageInfo
Returns:
a set of directly contained (child) packages (shallow copy, NOT deep copy). One or more of these packages may belong to a different schema / targetNamespace.
See Also:
PackageInfo.containedPackages()

stereotypes

public Set<String> stereotypes()
Return the normalized stereotypes of the package.

Specified by:
stereotypes in interface Info

isAppSchema

public boolean isAppSchema()
Determine whether the package represents an 'application schema'. The package is regarded an 'application schema', if it carries a stereotype with normalized name "application schema".

Specified by:
isAppSchema in interface PackageInfo
Overrides:
isAppSchema in class PackageInfoImpl
See Also:
PackageInfo.isAppSchema()

owner

public PackageInfo owner()
Return the parent package if present, null otherwise.

Specified by:
owner in interface PackageInfo

rootPackage

public PackageInfo rootPackage()
Determine the root package. Search the package and its ancestors for one representing a schema. Return null if no such package exists.

Specified by:
rootPackage in interface PackageInfo

supplierIds

public HashSet<String> supplierIds()
Return the set of ids of the packages on which this package depends.

Specified by:
supplierIds in interface PackageInfo

documentation

public String documentation()
Return the documentation attached to the property object. This is fetched from tagged values and - if this is absent - from the 'notes' specific to the EA objects model.

Specified by:
documentation in interface Info
Overrides:
documentation in class InfoImpl

id

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

Specified by:
id in interface Info

name

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

Specified by:
name in interface Info

aliasName

public String aliasName()
Get alias name of the package.

Specified by:
aliasName in interface Info
Overrides:
aliasName in class InfoImpl
Returns:
the human readable name or an empty string if none exists

taggedValues

public HashMap<String,String> taggedValues(String tagList)
Return all the tagged values listed in the input string. Tags are assumed to be separated by commas.

Specified by:
taggedValues 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.

taggedValue

public void taggedValue(String tag,
                        String value)
Set the tagged value for the tag given.


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
See Also:
Info.taggedValues()


Copyright © 2015. All rights reserved.