org.omwg.mediation.mappingstore.store
Class MappingStoreImpl

java.lang.Object
  extended byorg.omwg.mediation.mappingstore.store.MappingStoreImpl
All Implemented Interfaces:
MappingStore

public class MappingStoreImpl
extends java.lang.Object
implements MappingStore


Constructor Summary
MappingStoreImpl(java.lang.String indexDir)
           
 
Method Summary
 Mapping loadMapping(MappingID mapping)
          Loads a mapping through its identifier
 void removeMapping(MappingID mapping)
          Removes a mapping specified by its identifier.
 java.util.Iterator searchByKeywords(java.util.List keywords)
          Searches for all mappings with the given keywords in their descriptions
 java.util.Iterator searchByName(java.lang.String name)
          Searches for an ontology mapping with given name
 java.util.Iterator searchByRestriction(MappingRestriction mappingRestriction)
          Searches for ontology mappings in respect to given composite restriction .
 java.util.Iterator searchBySourceOntology(java.lang.String sourceOntURI)
          Searches for ontology mappings with specified source ontology
 java.util.Iterator searchByTargetOntology(java.lang.String targetOntURI)
          Searches for ontology mappings with specified target ontology
 java.util.Iterator searchByVersion(Version v)
          Searches for an ontology mapping by its version
 MappingID storeMapping(Mapping mapping)
          Stores a mapping and returns new created mapping identifier
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MappingStoreImpl

public MappingStoreImpl(java.lang.String indexDir)
Method Detail

searchByVersion

public java.util.Iterator searchByVersion(Version v)
Description copied from interface: MappingStore
Searches for an ontology mapping by its version

Specified by:
searchByVersion in interface MappingStore
Parameters:
v - given version
Returns:
Iterator on MappingIDs

searchByName

public java.util.Iterator searchByName(java.lang.String name)
Description copied from interface: MappingStore
Searches for an ontology mapping with given name

Specified by:
searchByName in interface MappingStore
Parameters:
name - given name of mapping
Returns:
Iterator on MappingIDs

searchByKeywords

public java.util.Iterator searchByKeywords(java.util.List keywords)
Description copied from interface: MappingStore
Searches for all mappings with the given keywords in their descriptions

Specified by:
searchByKeywords in interface MappingStore
Parameters:
keywords - list of strings representing given keywords
Returns:
Iterator on MappingIDs

searchBySourceOntology

public java.util.Iterator searchBySourceOntology(java.lang.String sourceOntURI)
Description copied from interface: MappingStore
Searches for ontology mappings with specified source ontology

Specified by:
searchBySourceOntology in interface MappingStore
Parameters:
sourceOntURI - given ontology identifier
Returns:
Iterator on MappingIDs

searchByTargetOntology

public java.util.Iterator searchByTargetOntology(java.lang.String targetOntURI)
Description copied from interface: MappingStore
Searches for ontology mappings with specified target ontology

Specified by:
searchByTargetOntology in interface MappingStore
Parameters:
targetOntURI - given ontology identifier
Returns:
Iterator on MappingIDs

searchByRestriction

public java.util.Iterator searchByRestriction(MappingRestriction mappingRestriction)
Description copied from interface: MappingStore
Searches for ontology mappings in respect to given composite restriction . It searches for AND-combination of the Restrictions by versions, descriptions, referencedPatterns, source and target ontologies.

Specified by:
searchByRestriction in interface MappingStore
Parameters:
mappingRestriction - given restrictions on mapping fields
Returns:
Iterator on MappingIDs

storeMapping

public MappingID storeMapping(Mapping mapping)
Description copied from interface: MappingStore
Stores a mapping and returns new created mapping identifier

Specified by:
storeMapping in interface MappingStore
Parameters:
mapping - given mapping
Returns:
Generated mapping identifier

loadMapping

public Mapping loadMapping(MappingID mapping)
Description copied from interface: MappingStore
Loads a mapping through its identifier

Specified by:
loadMapping in interface MappingStore
Parameters:
mapping - the identifier of mapping
Returns:
Mapping with the given identifier or null if such doesn't exist

removeMapping

public void removeMapping(MappingID mapping)
Description copied from interface: MappingStore
Removes a mapping specified by its identifier.

Specified by:
removeMapping in interface MappingStore
Parameters:
mapping - the identifier of mapping