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

org.eclipse.cosmos.rm.repository.internal.resource
Class SMLFileMetadata

java.lang.Object
  extended by org.eclipse.cosmos.rm.repository.internal.resource.SMLFileMetadata
All Implemented Interfaces:
org.eclipse.cosmos.rm.repository.provisional.resource.ISMLMetadata

public class SMLFileMetadata
extends java.lang.Object
implements org.eclipse.cosmos.rm.repository.provisional.resource.ISMLMetadata

The file system implementation of the SML document meta-data


Field Summary
 
Fields inherited from interface org.eclipse.cosmos.rm.repository.provisional.resource.ISMLMetadata
DOCUMENT_TYPE_DEFINITION, DOCUMENT_TYPE_INSTANCE, DOCUMENT_TYPE_NONE
 
Constructor Summary
SMLFileMetadata()
           
SMLFileMetadata(java.lang.String id, int type, java.lang.String elementName, java.lang.String[] aliases, java.util.Map rules)
          A convenience constructor used to set the fields of the meta-data
 
Method Summary
 java.lang.String[] getAliases()
          Retrieves and returns the aliases of the associated SML document
 java.util.Map getBoundRules()
          Retrieves and returns the bound rules of the associated SML document The returned map is expected to be indexed based on the alias that the rule is bound to
 int getDocumentType()
          Returns the document type
 java.lang.String getId()
          Retrieves and returns the id of the associated SML document.
 java.lang.String getRootElementName()
          Retrieves and returns the root element name of the associated SML document.
 void setAliases(java.lang.String[] aliases)
           
 void setBoundRules(java.util.Map rules)
           
 void setDocumentType(int documentType)
           
 void setId(java.lang.String id)
           
 void setRepositoryMetadata(MetadataProcessor metadataProcessor)
           
 void setRootElementName(java.lang.String rootElementName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SMLFileMetadata

public SMLFileMetadata()

SMLFileMetadata

public SMLFileMetadata(java.lang.String id,
                       int type,
                       java.lang.String elementName,
                       java.lang.String[] aliases,
                       java.util.Map rules)
A convenience constructor used to set the fields of the meta-data

Parameters:
id - The id of the document
type - The type of the document
elementName - The element name
aliases - Aliases of the document
rules - Rules of the document
Method Detail

getAliases

public java.lang.String[] getAliases()
Description copied from interface: org.eclipse.cosmos.rm.repository.provisional.resource.ISMLMetadata
Retrieves and returns the aliases of the associated SML document

Specified by:
getAliases in interface org.eclipse.cosmos.rm.repository.provisional.resource.ISMLMetadata
Returns:
The aliases of the associated SML document
See Also:
ISMLMetadata.getAliases()

setAliases

public void setAliases(java.lang.String[] aliases)

getBoundRules

public java.util.Map getBoundRules()
Description copied from interface: org.eclipse.cosmos.rm.repository.provisional.resource.ISMLMetadata
Retrieves and returns the bound rules of the associated SML document The returned map is expected to be indexed based on the alias that the rule is bound to

Specified by:
getBoundRules in interface org.eclipse.cosmos.rm.repository.provisional.resource.ISMLMetadata
Returns:
The bound rules of the associated SML document.
See Also:
ISMLMetadata.getBoundRules()

setBoundRules

public void setBoundRules(java.util.Map rules)

getDocumentType

public int getDocumentType()
Description copied from interface: org.eclipse.cosmos.rm.repository.provisional.resource.ISMLMetadata
Returns the document type

Specified by:
getDocumentType in interface org.eclipse.cosmos.rm.repository.provisional.resource.ISMLMetadata
Returns:
ISMLMetadata.DOCUMENT_TYPE_DEFINITION if the associated document is of type definition or ISMLMetadata.DOCUMENT_TYPE_INSTANCE if the associated document is of type instance.
See Also:
ISMLMetadata.getDocumentType()

setDocumentType

public void setDocumentType(int documentType)

getId

public java.lang.String getId()
Description copied from interface: org.eclipse.cosmos.rm.repository.provisional.resource.ISMLMetadata
Retrieves and returns the id of the associated SML document. The id is implementation specific.

Specified by:
getId in interface org.eclipse.cosmos.rm.repository.provisional.resource.ISMLMetadata
Returns:
The id of the associated SML document
See Also:
ISMLMetadata.getId()

setId

public void setId(java.lang.String id)

getRootElementName

public java.lang.String getRootElementName()
Description copied from interface: org.eclipse.cosmos.rm.repository.provisional.resource.ISMLMetadata
Retrieves and returns the root element name of the associated SML document.

Specified by:
getRootElementName in interface org.eclipse.cosmos.rm.repository.provisional.resource.ISMLMetadata
Returns:
The qualified root element name of the associated SML document
See Also:
ISMLMetadata.getRootElementName()

setRootElementName

public void setRootElementName(java.lang.String rootElementName)

setRepositoryMetadata

public void setRepositoryMetadata(MetadataProcessor metadataProcessor)

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