de.interactive_instruments.ShapeChange.Model.Generic
Class GenericPackageInfo

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.Generic.GenericPackageInfo
All Implemented Interfaces:
Info, PackageInfo

public class GenericPackageInfo
extends PackageInfoImpl

Author:
echterhoff

Field Summary
protected  HashSet<PackageInfo> childPi
           
protected  HashSet<ClassInfo> classes
           
protected  String gmlProfileSchema
           
protected  String id
           
protected  boolean isAppSchema
           
protected  boolean isSchema
           
protected  GenericModel model
           
protected  String name
           
protected  Options options
           
protected  PackageInfo owner
           
protected  ShapeChangeResult result
           
protected  PackageInfo rootPackage
           
protected  String schemaId
           
protected  HashSet<String> stereotypes
           
protected  HashSet<String> supplierIds
           
protected  HashMap<String,String> taggedValues
           
protected  String targetNamespace
           
protected  String version
           
protected  String xmlns
           
protected  String xsdDocument
           
 
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
GenericPackageInfo()
           
 
Method Summary
 void addClass(ClassInfo ci)
           
 String aliasName()
          Retrieve the alias, typically a human readable name
 HashSet<PackageInfo> containedPackages()
           
 String documentation()
           
 Set<GenericPackageInfo> getAllPackages(Set<GenericPackageInfo> set)
          Provides the set of all packages in the package tree where this package is the head.
 HashSet<ClassInfo> getClasses()
           
 void getEmptyPackages(Set<PackageInfo> containerForEmptyPackages)
           
 String gmlProfileSchema()
          This is supposed to return the value of the tag "gmlProfileSchema", or null in case such a tag does not exist on the package.
 String id()
           
 boolean isAppSchema()
          Determine whether the package represents an 'application schema'.
 boolean isSchema()
          Note: Additional support for deprecated tag "xmlNamespace".
 Model model()
           
 String name()
           
 Options options()
           
 PackageInfo owner()
           
 ShapeChangeResult result()
           
 PackageInfo rootPackage()
           
 String schemaId()
          Return the id of the rootPackage, "(null)" on failure.
 void setAliasName(String aliasName)
           
 void setClasses(HashSet<ClassInfo> classes)
           
 void setContainedPackages(HashSet<PackageInfo> childPi)
           
 void setDocumentation(String documentation)
           
 void setGmlProfileSchema(String gmlProfileSchema)
           
 void setId(String id)
           
 void setIsAppSchema(boolean isAppSchema)
           
 void setIsSchema(boolean isSchema)
           
 void setModel(GenericModel model)
           
 void setName(String name)
           
 void setOptions(Options options)
           
 void setOwner(PackageInfo owner)
           
 void setResult(ShapeChangeResult result)
           
 void setRootPackage(PackageInfo rootPackage)
           
 void setSchemaId(String schemaId)
           
 void setStereotype(String stereotype)
           
 void setStereotypes(Set<String> stereotypeSet)
           
 void setSupplierIds(HashSet<String> supplierIds)
           
 void setTaggedValues(HashMap<String,String> taggedValues, boolean updateFields)
           
 void setTargetNamespace(String targetNamespace)
          Explicitly sets the target namespace for this package and all child packages that are not application schema.
 void setVersion(String version)
           
 void setXmlns(String xmlns)
           
 void setXsdDocument(String xsdDocument)
           
 Set<String> stereotypes()
           
 HashSet<String> supplierIds()
           
 String taggedValue(String tag)
           
 HashMap<String,String> taggedValues()
           
 HashMap<String,String> taggedValues(String tagList)
          Return all the tagged values listed in the input string.
 String targetNamespace()
          Determine the targetNamespace of the GML applications schema to be generated.
 String toString(String indent)
           
 String version()
          Determine the version attribute to be applied to the GML application schema.
 String xmlns()
          Determine the namespace abbreviation of the GML applications schema to be generated.
 String xsdDocument()
          Determine the file name of the xsd document to be generated from the package.
 
Methods inherited from class de.interactive_instruments.ShapeChange.Model.PackageInfoImpl
encodingRule, fullName, getDiagrams, mapPackageNameToFilename, postprocessAfterLoadingAndValidate, setDiagrams
 
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.Info
definition, description, matches, stereotype
 

Field Detail

options

protected Options options

result

protected ShapeChangeResult result

model

protected GenericModel model

id

protected String id

name

protected String name

stereotypes

protected HashSet<String> stereotypes

taggedValues

protected HashMap<String,String> taggedValues

targetNamespace

protected String targetNamespace

xmlns

protected String xmlns

xsdDocument

protected String xsdDocument

gmlProfileSchema

protected String gmlProfileSchema

version

protected String version

owner

protected PackageInfo owner

schemaId

protected String schemaId

rootPackage

protected PackageInfo rootPackage

isAppSchema

protected boolean isAppSchema

isSchema

protected boolean isSchema

childPi

protected HashSet<PackageInfo> childPi

supplierIds

protected HashSet<String> supplierIds

classes

protected HashSet<ClassInfo> classes
Constructor Detail

GenericPackageInfo

public GenericPackageInfo()
Method Detail

aliasName

public String aliasName()
Description copied from class: InfoImpl
Retrieve the alias, typically a human readable name

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

containedPackages

public HashSet<PackageInfo> containedPackages()
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:
()

documentation

public String documentation()
Specified by:
documentation in interface Info
Overrides:
documentation in class InfoImpl
See Also:
InfoImpl.documentation()

getAllPackages

public Set<GenericPackageInfo> getAllPackages(Set<GenericPackageInfo> set)
Provides the set of all packages in the package tree where this package is the head. This package is also added to the set.

Parameters:
set -
Returns:

getClasses

public HashSet<ClassInfo> getClasses()
Returns:

gmlProfileSchema

public String gmlProfileSchema()
Description copied from class: PackageInfoImpl
This is supposed to return the value of the tag "gmlProfileSchema", or null in case such a tag does not exist on the package.

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

id

public String id()
See Also:
Info.id()

isAppSchema

public boolean isAppSchema()
Description copied from interface: PackageInfo
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:
PackageInfoImpl.isAppSchema()

isSchema

public boolean isSchema()
Description copied from class: PackageInfoImpl
Note: Additional support for deprecated tag "xmlNamespace".

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

model

public Model model()
See Also:
Info.model()

name

public String name()
See Also:
Info.name()

options

public Options options()
See Also:
Info.options()

owner

public PackageInfo owner()
See Also:
PackageInfo.owner()

result

public ShapeChangeResult result()
See Also:
Info.result()

rootPackage

public PackageInfo rootPackage()
See Also:
PackageInfo.rootPackage()

schemaId

public String schemaId()
Description copied from class: PackageInfoImpl
Return the id of the rootPackage, "(null)" on failure.

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

setAliasName

public void setAliasName(String aliasName)
Parameters:
aliasName -

setClasses

public void setClasses(HashSet<ClassInfo> classes)

setContainedPackages

public void setContainedPackages(HashSet<PackageInfo> childPi)
Parameters:
childPi -

setDocumentation

public void setDocumentation(String documentation)
Parameters:
documentation -

setGmlProfileSchema

public void setGmlProfileSchema(String gmlProfileSchema)
Parameters:
gmlProfileSchema -

setId

public void setId(String id)
Parameters:
id -

setIsAppSchema

public void setIsAppSchema(boolean isAppSchema)
Parameters:
isAppSchema -

setIsSchema

public void setIsSchema(boolean isSchema)
Parameters:
isSchema -

setModel

public void setModel(GenericModel model)
Parameters:
model -

setName

public void setName(String name)
Parameters:
name -

setOptions

public void setOptions(Options options)
Parameters:
options -

setOwner

public void setOwner(PackageInfo owner)
Parameters:
owner -

setResult

public void setResult(ShapeChangeResult result)
Parameters:
result -

setRootPackage

public void setRootPackage(PackageInfo rootPackage)
Parameters:
rootPackage -

setSchemaId

public void setSchemaId(String schemaId)
Parameters:
schemaId -

setStereotypes

public void setStereotypes(Set<String> stereotypeSet)
Parameters:
stereotypeSet -

setStereotype

public void setStereotype(String stereotype)
Parameters:
stereotype -

setSupplierIds

public void setSupplierIds(HashSet<String> supplierIds)
Parameters:
supplierIds -

setTaggedValues

public void setTaggedValues(HashMap<String,String> taggedValues,
                            boolean updateFields)
Parameters:
taggedValues -
updateFields - true if class fields should be updated based upon information from given tagged values, else false

setTargetNamespace

public void setTargetNamespace(String targetNamespace)
Explicitly sets the target namespace for this package and all child packages that are not application schema.

Parameters:
targetNamespace -

setVersion

public void setVersion(String version)
Parameters:
version -

setXmlns

public void setXmlns(String xmlns)
Parameters:
xmlns -

setXsdDocument

public void setXsdDocument(String xsdDocument)
Parameters:
xsdDocument -

stereotypes

public Set<String> stereotypes()
See Also:
Info.stereotypes()

supplierIds

public HashSet<String> supplierIds()
See Also:
PackageInfo.supplierIds()

taggedValue

public String taggedValue(String tag)
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.
See Also:
Info.taggedValue(java.lang.String)

taggedValues

public HashMap<String,String> taggedValues()
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()

taggedValues

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

See Also:
Info.taggedValues(java.lang.String)

getEmptyPackages

public void getEmptyPackages(Set<PackageInfo> containerForEmptyPackages)

targetNamespace

public String targetNamespace()
Description copied from interface: PackageInfo
Determine the targetNamespace of the GML applications schema to be generated. The item is used from the configuration or - if not present there - from the tagged value either on this package or one of its ancestors.

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

version

public String version()
Description copied from interface: PackageInfo
Determine the version attribute to be applied to the GML application schema. It is taken either from the configuration or from a tagged value on this package or any of its ancestors.

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

xmlns

public String xmlns()
Description copied from interface: PackageInfo
Determine the namespace abbreviation of the GML applications schema to be generated. The item is used from the configuration or - if not present there - from the tagged value either on this package or one of its ancestors.

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

xsdDocument

public String xsdDocument()
Description copied from class: PackageInfoImpl
Determine the file name of the xsd document to be generated from the package. This is either configured explicitly for the package or is otherwise obtained from the tagged value 'xsdDocument' on the package. If none of these are found and if the package is an application schema package, the file name is derived from the package name.

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

toString

public String toString(String indent)

addClass

public void addClass(ClassInfo ci)


Copyright © 2015. All rights reserved.