org.nlp2rdf.ontology
Class ClasspathLoader

java.lang.Object
  extended by org.nlp2rdf.ontology.ClasspathLoader
All Implemented Interfaces:
OntologyLoader

public class ClasspathLoader
extends Object
implements OntologyLoader

Author:
Sebastian Hellmann - http://bis.informatik.uni-leipzig.de/SebastianHellmann Created: 29.06.11

//TODO there is some domain specific replacements in this class private String toClasspath(String ontologyUrl) throws MalformedURLException{ ontologyUrl = ontologyUrl.replace("http://nlp2rdf.lod2.eu/schema/sso/", "http://nlp2rdf.lod2.eu/schema/sso/sso.owl"); ontologyUrl = ontologyUrl.replace("http://nlp2rdf.lod2.eu/schema/string/", "http://nlp2rdf.lod2.eu/schema/string/string.owl");


Nested Class Summary
 class ClasspathLoader.CC
           
 
Constructor Summary
ClasspathLoader()
           
 
Method Summary
 void loadImports(com.hp.hpl.jena.ontology.OntModel model)
          Recursively loads any imported models.
 com.hp.hpl.jena.ontology.OntModel loadOntology(String ontologyUri)
           
 com.hp.hpl.jena.ontology.OntModel loadOntology(String ontologyUri, com.hp.hpl.jena.ontology.OntModelSpec spec)
           
static void main(String[] args)
           
 String toClasspath(String ontologyUrl)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClasspathLoader

public ClasspathLoader()
Method Detail

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception

loadOntology

public com.hp.hpl.jena.ontology.OntModel loadOntology(String ontologyUri)
Specified by:
loadOntology in interface OntologyLoader

loadOntology

public com.hp.hpl.jena.ontology.OntModel loadOntology(String ontologyUri,
                                                      com.hp.hpl.jena.ontology.OntModelSpec spec)
Specified by:
loadOntology in interface OntologyLoader

loadImports

public void loadImports(com.hp.hpl.jena.ontology.OntModel model)
Description copied from interface: OntologyLoader
Recursively loads any imported models. They will be included as Jena submodels

Specified by:
loadImports in interface OntologyLoader

toClasspath

public String toClasspath(String ontologyUrl)
                   throws MalformedURLException
Throws:
MalformedURLException


Copyright © 2011. All Rights Reserved.