owltools.gaf.eco
Class EcoMapperFactory

java.lang.Object
  extended by owltools.gaf.eco.EcoMapperFactory

public class EcoMapperFactory
extends Object

Factory to create instances of EcoMapper and TraversingEcoMapper.


Nested Class Summary
static class EcoMapperFactory.OntologyMapperPair<MAPPER extends EcoMapper>
           
 
Method Summary
static EcoMapperFactory.OntologyMapperPair<EcoMapper> createEcoMapper()
          Create an instance of a EcoMapper.
static EcoMapper createEcoMapper(OWLGraphWrapper graph)
          Create an instance of a EcoMapper.
static EcoMapperFactory.OntologyMapperPair<EcoMapper> createEcoMapper(org.semanticweb.owlapi.model.OWLOntologyManager m)
          Create an instance of a EcoMapper.
static EcoMapperFactory.OntologyMapperPair<EcoMapper> createEcoMapper(ParserWrapper p)
          Create an instance of a EcoMapper.
static EcoMapperFactory.OntologyMapperPair<EcoMapper> createEcoMapper(ParserWrapper p, String location)
          Create an instance of a EcoMapper.
static SimpleEcoMapper createSimple()
          Create a new SimpleEcoMapper with from the mapping loaded from the PURL.
static SimpleEcoMapper createSimple(String source)
          Create a new SimpleEcoMapper with from the mapping loaded from the given source.
static EcoMapperFactory.OntologyMapperPair<TraversingEcoMapper> createTraversingEcoMapper()
          Create a TraversingEcoMapper instance using a new ParserWrapper to load ECO.
static TraversingEcoMapper createTraversingEcoMapper(OWLGraphWrapper all, org.semanticweb.owlapi.reasoner.OWLReasoner reasoner, boolean disposeReasoner)
          Create a TraversingEcoMapper instance using the given OWLGraphWrapper.
static EcoMapperFactory.OntologyMapperPair<TraversingEcoMapper> createTraversingEcoMapper(ParserWrapper p)
          Create a TraversingEcoMapper instance using the given ParserWrapper to load ECO.
static EcoMapperFactory.OntologyMapperPair<TraversingEcoMapper> createTraversingEcoMapper(ParserWrapper p, String location)
          Create a TraversingEcoMapper instance using the given ParserWrapper to load ECO from the given location.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createSimple

public static SimpleEcoMapper createSimple()
                                    throws IOException
Create a new SimpleEcoMapper with from the mapping loaded from the PURL.

Returns:
mapper
Throws:
IOException
See Also:
EcoMapper.ECO_MAPPING_PURL

createSimple

public static SimpleEcoMapper createSimple(String source)
                                    throws IOException
Create a new SimpleEcoMapper with from the mapping loaded from the given source.

Parameters:
source -
Returns:
mapper
Throws:
IOException

createEcoMapper

public static EcoMapperFactory.OntologyMapperPair<EcoMapper> createEcoMapper()
                                                                      throws org.semanticweb.owlapi.model.OWLException,
                                                                             IOException
Create an instance of a EcoMapper. Uses a separate parser. Load the ECO and mappings using their PURLs.

Returns:
mapper pair
Throws:
org.semanticweb.owlapi.model.OWLException
IOException
See Also:
EcoMapper.ECO_PURL, EcoMapper.ECO_MAPPING_PURL

createEcoMapper

public static EcoMapperFactory.OntologyMapperPair<EcoMapper> createEcoMapper(org.semanticweb.owlapi.model.OWLOntologyManager m)
                                                                      throws org.semanticweb.owlapi.model.OWLException,
                                                                             IOException
Create an instance of a EcoMapper. Uses a the manager to load ECO via the PURL. Load mappings using the PURL.

Parameters:
m -
Returns:
mapper pair
Throws:
org.semanticweb.owlapi.model.OWLException
IOException
See Also:
EcoMapper.ECO_PURL, EcoMapper.ECO_MAPPING_PURL

createEcoMapper

public static EcoMapperFactory.OntologyMapperPair<EcoMapper> createEcoMapper(ParserWrapper p)
                                                                      throws org.semanticweb.owlapi.model.OWLException,
                                                                             IOException
Create an instance of a EcoMapper. Uses the given ParserWrapper to load the ontology. Retrieves ECO and the mappings using their PURLs.

Parameters:
p -
Returns:
mapper pair
Throws:
org.semanticweb.owlapi.model.OWLException
IOException
See Also:
EcoMapper.ECO_PURL, EcoMapper.ECO_MAPPING_PURL

createEcoMapper

public static EcoMapperFactory.OntologyMapperPair<EcoMapper> createEcoMapper(ParserWrapper p,
                                                                             String location)
                                                                      throws org.semanticweb.owlapi.model.OWLException,
                                                                             IOException
Create an instance of a EcoMapper. Uses the given ParserWrapper to load the ontology. Retrieves ECO from the given location and the mapping from the PURL.

Parameters:
p -
location -
Returns:
mapper pair
Throws:
org.semanticweb.owlapi.model.OWLException
IOException
See Also:
EcoMapper.ECO_MAPPING_PURL

createEcoMapper

public static EcoMapper createEcoMapper(OWLGraphWrapper graph)
                                 throws IOException
Create an instance of a EcoMapper. Retrieves the mappings using the PURL.

Parameters:
graph - graph containing ECO
Returns:
mapper
Throws:
IOException
See Also:
EcoMapper.ECO_MAPPING_PURL

createTraversingEcoMapper

public static EcoMapperFactory.OntologyMapperPair<TraversingEcoMapper> createTraversingEcoMapper()
                                                                                          throws org.semanticweb.owlapi.model.OWLException,
                                                                                                 IOException
Create a TraversingEcoMapper instance using a new ParserWrapper to load ECO. ECO and the mappings are retrieved using their PURLs.

Creates an ELK reasoner to be used in the traversal methods. Use TraversingEcoMapper.dispose() to ensure proper cleanup of the ELK worker thread pool.

Returns:
mapper pair
Throws:
org.semanticweb.owlapi.model.OWLException
IOException
See Also:
EcoMapper.ECO_PURL, EcoMapper.ECO_MAPPING_PURL

createTraversingEcoMapper

public static EcoMapperFactory.OntologyMapperPair<TraversingEcoMapper> createTraversingEcoMapper(ParserWrapper p)
                                                                                          throws org.semanticweb.owlapi.model.OWLException,
                                                                                                 IOException
Create a TraversingEcoMapper instance using the given ParserWrapper to load ECO. ECO and the mappings are retrieved using their PURLs.

Creates an ELK reasoner to be used in the traversal methods. Use TraversingEcoMapper.dispose() to ensure proper cleanup of the ELK worker thread pool.

Parameters:
p -
Returns:
mapper
Throws:
org.semanticweb.owlapi.model.OWLException
IOException
See Also:
EcoMapper.ECO_PURL, EcoMapper.ECO_MAPPING_PURL

createTraversingEcoMapper

public static EcoMapperFactory.OntologyMapperPair<TraversingEcoMapper> createTraversingEcoMapper(ParserWrapper p,
                                                                                                 String location)
                                                                                          throws org.semanticweb.owlapi.model.OWLException,
                                                                                                 IOException
Create a TraversingEcoMapper instance using the given ParserWrapper to load ECO from the given location. The mappings are retrieved using the PURL.

Creates an ELK reasoner to be used in the traversal methods. Use TraversingEcoMapper.dispose() to ensure proper cleanup of the ELK worker thread pool.

Parameters:
p -
location -
Returns:
mapper
Throws:
org.semanticweb.owlapi.model.OWLException
IOException
See Also:
EcoMapper.ECO_MAPPING_PURL

createTraversingEcoMapper

public static TraversingEcoMapper createTraversingEcoMapper(OWLGraphWrapper all,
                                                            org.semanticweb.owlapi.reasoner.OWLReasoner reasoner,
                                                            boolean disposeReasoner)
                                                     throws IOException,
                                                            org.semanticweb.owlapi.model.OWLException
Create a TraversingEcoMapper instance using the given OWLGraphWrapper. It is assumed that ECO can be retrieved from the graph using its default IRI. The mappings are retrieved using the PURL.

Uses the given reasoner in the traversal methods. If disposeReasoner is set to true, dispose also the reasoner, while calling TraversingEcoMapper.dispose().

Parameters:
all - graph containing all ontologies, including ECO
reasoner - reasoner capable of traversing ECO
disposeReasoner - set to true if the reasoner should be disposed, when calling TraversingEcoMapper.dispose()
Returns:
mapper
Throws:
IOException
org.semanticweb.owlapi.model.OWLException
IllegalArgumentException - throw when the reasoner is null, or the OWLGraphWrapper does not contain ECO.
See Also:
EcoMapper.ECO_PURL_IRI, EcoMapper.ECO_MAPPING_PURL


Copyright © 2010-2014. All Rights Reserved.