COSMOS ${releaseVersion} resource-modeling Project
Internal API Specification

org.eclipse.cosmos.rm.validation.internal.artifacts
Class ElementTypeMap

java.lang.Object
  extended by org.eclipse.cosmos.rm.validation.internal.artifacts.ElementTypeMap

public class ElementTypeMap
extends java.lang.Object

This structure is used to find the mapping between an element and its associated type.


Constructor Summary
ElementTypeMap()
          Constructor
 
Method Summary
 void addElementDeclaration(ElementNode elementNode)
          Adds an element declaration
 void addElementDeclaration(java.lang.String uri, java.lang.String name, java.lang.String type)
          Adds an element declaration
 java.lang.String getType(ElementNode elementNode)
          Retrieves and returns the type of the element passed in
 java.lang.String getType(java.lang.String uri, java.lang.String name)
          Retrieves and returns the type of an element
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ElementTypeMap

public ElementTypeMap()
Constructor

Method Detail

addElementDeclaration

public void addElementDeclaration(java.lang.String uri,
                                  java.lang.String name,
                                  java.lang.String type)
Adds an element declaration

Parameters:
uri - The associated URI of the element
name - The name of the element
type - The type of the element

addElementDeclaration

public void addElementDeclaration(ElementNode elementNode)
Adds an element declaration

Parameters:
elementNode - The element node, which is expected to have a valid name, type and an URI indicating its namespace

getType

public java.lang.String getType(ElementNode elementNode)
Retrieves and returns the type of the element passed in

Parameters:
elementNode - The element node
Returns:
The type of elementNode or null if none can be found

getType

public java.lang.String getType(java.lang.String uri,
                                java.lang.String name)
Retrieves and returns the type of an element

Parameters:
uri - The uri of the element
name - The name of the element
Returns:
The type of the element or null if none can be found

COSMOS ${releaseVersion} resource-modeling Project
Internal API Specification