Modifier and Type | Field and Description |
---|---|
protected Map<String,Set<String>> |
actualNsToAlternative |
protected Map<String,String> |
alternativeNsToActual |
Constructor and Description |
---|
ModelImpl(String modelName)
Create a new
Model with a model name. |
Modifier and Type | Method and Description |
---|---|
void |
declareAlternativeNamespace(String alternativeNs,
String actualNs)
Declares an alternative namespace for an actual so that during lookup of elements/attributes both will be considered.
|
boolean |
equals(Object obj) |
String |
getActualNamespace(String alternativeNs)
Returns the actual namespace URI for an alternative namespace URI
|
String |
getAlternativeNamespace(String actualNs)
Returns the alternative namespace URI for a namespace URI
|
Set<String> |
getAlternativeNamespaces(String actualNs) |
String |
getModelName()
Returns the model name, which is the identifier of this model.
|
ModelElementType |
getType(Class<? extends ModelElementInstance> instanceClass)
Gets the defined
ModelElementType of a ModelElementInstance . |
ModelElementType |
getTypeForName(String typeName)
Gets the defined
ModelElementType for a type by its name. |
ModelElementType |
getTypeForName(String namespaceUri,
String typeName)
Gets the defined
ModelElementType for a type by its name and namespace URI. |
Collection<ModelElementType> |
getTypes()
Gets the collection of all
ModelElementType defined in the model. |
int |
hashCode() |
void |
registerType(ModelElementType modelElementType,
Class<? extends ModelElementInstance> instanceType)
Registers a
ModelElementType in this Model . |
void |
undeclareAlternativeNamespace(String alternativeNs) |
public void declareAlternativeNamespace(String alternativeNs, String actualNs)
alternativeNs
- actualNs
- IllegalArgumentException
- if the alternative is already used or if the actual namespace has an alternativepublic void undeclareAlternativeNamespace(String alternativeNs)
public Set<String> getAlternativeNamespaces(String actualNs)
getAlternativeNamespaces
in interface Model
public String getAlternativeNamespace(String actualNs)
Model
getAlternativeNamespace
in interface Model
actualNs
- the actual namespace URIpublic String getActualNamespace(String alternativeNs)
Model
getActualNamespace
in interface Model
alternativeNs
- the alternative namespace URIpublic Collection<ModelElementType> getTypes()
Model
ModelElementType
defined in the model.public ModelElementType getType(Class<? extends ModelElementInstance> instanceClass)
Model
ModelElementType
of a ModelElementInstance
.public ModelElementType getTypeForName(String typeName)
Model
ModelElementType
for a type by its name.getTypeForName
in interface Model
typeName
- the name of the typepublic ModelElementType getTypeForName(String namespaceUri, String typeName)
Model
ModelElementType
for a type by its name and namespace URI.getTypeForName
in interface Model
namespaceUri
- the namespace URI for the typetypeName
- the name of the typepublic void registerType(ModelElementType modelElementType, Class<? extends ModelElementInstance> instanceType)
ModelElementType
in this Model
.modelElementType
- the element type to registerinstanceType
- the instance class of the type to registerpublic String getModelName()
Model
getModelName
in interface Model
Copyright © 2019. All rights reserved.