| 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 Modelpublic String getAlternativeNamespace(String actualNs)
ModelgetAlternativeNamespace in interface ModelactualNs - the actual namespace URIpublic String getActualNamespace(String alternativeNs)
ModelgetActualNamespace in interface ModelalternativeNs - the alternative namespace URIpublic Collection<ModelElementType> getTypes()
ModelModelElementType defined in the model.public ModelElementType getType(Class<? extends ModelElementInstance> instanceClass)
ModelModelElementType of a ModelElementInstance.public ModelElementType getTypeForName(String typeName)
ModelModelElementType for a type by its name.getTypeForName in interface ModeltypeName - the name of the typepublic ModelElementType getTypeForName(String namespaceUri, String typeName)
ModelModelElementType for a type by its name and namespace URI.getTypeForName in interface ModelnamespaceUri - 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()
ModelgetModelName in interface ModelCopyright © 2022. All rights reserved.