public interface TypeSystemMgr extends TypeSystem
FEATURE_SEPARATOR, NAMESPACE_SEPARATOR
Modifier and Type | Method and Description |
---|---|
Feature |
addFeature(String featureName,
Type domainType,
Type rangeType)
Add an feature to the type system.
|
Feature |
addFeature(String featureName,
Type domainType,
Type rangeType,
boolean multipleReferencesAllowed)
Add an feature to the type system.
|
Type |
addStringSubtype(String typeName,
String[] stringList)
Inherit from String.
|
Type |
addType(String typeName,
Type mother)
Add a new type to the type system.
|
void |
commit()
Commit the type system.
|
boolean |
isCommitted()
Check if this instance has been committed.
|
void |
setFeatureFinal(Type type)
Make type feature final in the sense that no new features can be added to this type.
|
void |
setInheritanceFinal(Type type)
Block any further inheritance from this type.
|
getArrayType, getDirectlySubsumedTypes, getDirectSubtypes, getFeatureByFullName, getFeatures, getLowLevelTypeSystem, getParent, getProperlySubsumedTypes, getTopType, getType, getTypeIterator, getTypeNameSpace, subsumes
Type addType(String typeName, Type mother) throws CASAdminException
typeName
- The name of the new type.mother
- The type node under which the new type should be attached. This must not be null.null
if typeName
is already in use (so
check for null return values).CASAdminException
- If typeName
is not a legal type name, type system is locked, or
mother
is inheritance final.Type addStringSubtype(String typeName, String[] stringList) throws CASAdminException
typeName
- The name of the type to be created.stringList
- The list of legal string values for this string type.null
if the type is already defined.CASAdminException
- If the type system is locked.Feature addFeature(String featureName, Type domainType, Type rangeType) throws CASAdminException
featureName
- The name of the new feature.domainType
- The type that defines the domain of the feature.rangeType
- The type that defines the range of the feature.null
if featureName
is already
in use for domainType
with the same range (if the range is different, an
exception is thrown).CASAdminException
- If featureName
is not a legal feature name, the type system is
locked or domainType
is feature final. Also if
featureName
has already been defined on domainType
(or a supertype) with a different range than rangeType
.Feature addFeature(String featureName, Type domainType, Type rangeType, boolean multipleReferencesAllowed) throws CASAdminException
featureName
- The name of the new feature.domainType
- The type that defines the domain of the feature.rangeType
- The type that defines the range of the feature.multipleReferencesAllowed
- If the rangeType
is an array type, you can use this flag to enforce
that the feature value is not referenced anywhere else. This is currently only used
for XMI serialization. Defaults to true
.null
if featureName
is already
in use for domainType
with the same range (if the range is different, an
exception is thrown).CASAdminException
- If featureName
is not a legal feature name, the type system is
locked or domainType
is feature final. Also if
featureName
has already been defined on domainType
(or a supertype) with a different range than rangeType
.void commit()
boolean isCommitted()
true
iff this instance has been committed.void setFeatureFinal(Type type)
type
- The type to be made feature final.void setInheritanceFinal(Type type)
type
- the type to block subtypes onCopyright © 2006–2017 The Apache Software Foundation. All rights reserved.