com.rapidtransform.core.meta.service
Class MetaServiceImpl
java.lang.Object
com.rapidtransform.core.meta.service.MetaServiceImpl
- All Implemented Interfaces:
- MetaService, org.springframework.context.ResourceLoaderAware
public class MetaServiceImpl
- extends java.lang.Object
- implements MetaService, org.springframework.context.ResourceLoaderAware
- Author:
- Steve Werner
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MetaServiceImpl
public MetaServiceImpl()
getModels
public java.util.List<java.lang.String> getModels()
- Returns:
- Returns the models.
setModels
public void setModels(java.util.List<java.lang.String> models)
- Parameters:
models
- The models to set.
getDictionary
public Dictionary getDictionary()
- Returns:
- Returns the dictionary.
setDictionary
public void setDictionary(Dictionary dictionary)
- Parameters:
dictionary
- The dictionary to set.
getModelResources
public java.util.List<org.springframework.core.io.Resource> getModelResources()
- Returns:
- Returns the modelResources.
setModelResources
public void setModelResources(java.util.List<org.springframework.core.io.Resource> modelResources)
- Parameters:
modelResources
- The modelResources to set.
load
public void load()
throws MetaException
- Specified by:
load
in interface MetaService
- Throws:
MetaException
loadModel
public MetaModel loadModel(java.io.InputStream xmlModelStream)
throws MetaException
- Specified by:
loadModel
in interface MetaService
- Throws:
MetaException
addModel
public void addModel(MetaModel model)
- Specified by:
addModel
in interface MetaService
removeModel
public void removeModel(QName qName)
- Specified by:
removeModel
in interface MetaService
getLoadedModel
public MetaModel getLoadedModel(QName qName)
- Specified by:
getLoadedModel
in interface MetaService
getLoadedModel
public MetaModel getLoadedModel(Namespace namespace)
throws MetaException
- Specified by:
getLoadedModel
in interface MetaService
- Throws:
MetaException
getType
public MetaType getType(QName qname)
throws MetaException
- Specified by:
getType
in interface MetaService
- Throws:
MetaException
getProperties
public PropertyHolder getProperties(QName type)
throws MetaException
- Specified by:
getProperties
in interface MetaService
- Throws:
MetaException
getType
public MetaType getType(java.lang.String qname)
throws MetaException
- Specified by:
getType
in interface MetaService
- Throws:
MetaException
getProperties
public PropertyHolder getProperties(java.lang.String typeQname)
throws MetaException
- Specified by:
getProperties
in interface MetaService
- Throws:
MetaException
getProperty
public MetaProperty getProperty(java.lang.String fullyQualifiedPropertyName)
throws MetaException
- Finds the MetaProperty for the given internal property name.
- Specified by:
getProperty
in interface MetaService
- Throws:
MetaException
- See Also:
DictionaryImpl.getProperty(java.lang.String)
getRelationTarget
public QName getRelationTarget(QName source,
QName relation)
throws InvalidMetaRelationException,
MetaException
- Description copied from interface:
MetaService
- 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.
- Specified by:
getRelationTarget
in interface MetaService
- Parameters:
source
- QName for the source for the relationrelation
- QName for the relation
- Returns:
- The QName representing the type of the target
- Throws:
InvalidMetaRelationException
MetaException
getNamespace
public Namespace getNamespace(QName type)
- returns the namespace associated with the given type. This is how types are mapped to M1 objects - for each namespace, there is one and only
one M1 object type.
- Specified by:
getNamespace
in interface MetaService
getLoadedModels
public java.util.Collection<MetaModel> getLoadedModels()
- Specified by:
getLoadedModels
in interface MetaService
getSearchableTypes
public java.util.Collection<MetaType> getSearchableTypes()
throws MetaException
- Specified by:
getSearchableTypes
in interface MetaService
- Throws:
MetaException
setResourceLoader
public void setResourceLoader(org.springframework.core.io.ResourceLoader loader)
- Specified by:
setResourceLoader
in interface org.springframework.context.ResourceLoaderAware