com.rapidtransform.core.meta
Interface MetaService

All Known Implementing Classes:
MetaServiceImpl

public interface MetaService

Meta service for loading and accessing meta models and components.

Author:
Steve Werner

Method Summary
 void addModel(MetaModel model)
           
 MetaModel getLoadedModel(Namespace namespace)
           
 MetaModel getLoadedModel(QName qName)
           
 java.util.Collection<MetaModel> getLoadedModels()
           
 Namespace getNamespace(QName type)
           
 PropertyHolder getProperties(QName type)
           
 PropertyHolder getProperties(java.lang.String typeQname)
           
 MetaProperty getProperty(java.lang.String fullyQualifiedPropertyName)
           
 QName getRelationTarget(QName type, QName relation)
          Checks if the specified relation is valid for the given type and returns the target type if the relation is valid.
 java.util.Collection<MetaType> getSearchableTypes()
           
 MetaType getType(QName qname)
           
 MetaType getType(java.lang.String qname)
           
 void load()
           
 MetaModel loadModel(java.io.InputStream modelStream)
           
 void removeModel(QName qName)
           
 

Method Detail

load

void load()
          throws MetaException
Throws:
MetaException

loadModel

MetaModel loadModel(java.io.InputStream modelStream)
                    throws MetaException
Throws:
MetaException

addModel

void addModel(MetaModel model)

removeModel

void removeModel(QName qName)

getLoadedModels

java.util.Collection<MetaModel> getLoadedModels()

getLoadedModel

MetaModel getLoadedModel(QName qName)

getLoadedModel

MetaModel getLoadedModel(Namespace namespace)
                         throws MetaException
Throws:
MetaException

getType

MetaType getType(QName qname)
                 throws MetaException
Throws:
MetaException

getType

MetaType getType(java.lang.String qname)
                 throws MetaException
Throws:
MetaException

getProperties

PropertyHolder getProperties(QName type)
                             throws MetaException
Throws:
MetaException

getProperties

PropertyHolder getProperties(java.lang.String typeQname)
                             throws MetaException
Throws:
MetaException

getProperty

MetaProperty getProperty(java.lang.String fullyQualifiedPropertyName)
                         throws MetaException
Throws:
MetaException

getNamespace

Namespace getNamespace(QName type)

getRelationTarget

QName getRelationTarget(QName type,
                        QName relation)
                        throws MetaException,
                               InvalidMetaRelationException
Checks if the specified relation is valid for the given type and returns the target type if the relation is valid. If it is an invalid relation, then an exception is thrown.

Parameters:
type - QName for the source for the relation
relation - QName for the relation
Returns:
The QName representing the type of the target
Throws:
InvalidMetaRelationException
MetaException

getSearchableTypes

java.util.Collection<MetaType> getSearchableTypes()
                                                  throws MetaException
Throws:
MetaException