org.apache.nutch.ontology.jena
Class OntologyImpl
java.lang.Object
org.apache.nutch.ontology.jena.OntologyImpl
- All Implemented Interfaces:
- Ontology, Pluggable
public class OntologyImpl
- extends Object
- implements Ontology
this class wraps about a model,
built from a list of ontologies,
uses HP's Jena
- Author:
- michael j pan
Method Summary |
static void |
addSearchTerm(String label,
com.hp.hpl.jena.ontology.OntResource resource)
|
static Ontology |
getInstance()
|
static com.hp.hpl.jena.ontology.OntModel |
getModel()
|
static Parser |
getParser()
|
protected static void |
indent(PrintStream out,
int depth)
|
void |
load(String[] urls)
|
static void |
main(String[] args)
|
protected static void |
renderAnonymous(PrintStream out,
com.hp.hpl.jena.rdf.model.Resource anon,
String name)
|
static void |
renderClassDescription(PrintStream out,
com.hp.hpl.jena.ontology.OntClass c,
int depth)
|
protected static void |
renderHierarchy(PrintStream out,
com.hp.hpl.jena.ontology.OntClass cls,
List occurs,
int depth)
|
protected static void |
renderRestriction(PrintStream out,
com.hp.hpl.jena.ontology.Restriction r)
|
protected static void |
renderURI(PrintStream out,
com.hp.hpl.jena.shared.PrefixMapping prefixes,
String uri)
|
static Map |
retrieve(String label)
|
Iterator |
subclasses(String entitySearchTerm)
retrieve all subclasses of entity(ies) hashed to searchTerm |
Iterator |
synonyms(String queryKeyPhrase)
retrieves synonyms from wordnet via sweet's web interface |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG
public static final org.apache.commons.logging.Log LOG
DELIMITER_SEARCHTERM
public static final String DELIMITER_SEARCHTERM
- See Also:
- Constant Field Values
OntologyImpl
public OntologyImpl()
getInstance
public static Ontology getInstance()
load
public void load(String[] urls)
- Specified by:
load
in interface Ontology
getParser
public static Parser getParser()
getModel
public static com.hp.hpl.jena.ontology.OntModel getModel()
subclasses
public Iterator subclasses(String entitySearchTerm)
- retrieve all subclasses of entity(ies) hashed to searchTerm
- Specified by:
subclasses
in interface Ontology
synonyms
public Iterator synonyms(String queryKeyPhrase)
- retrieves synonyms from wordnet via sweet's web interface
- Specified by:
synonyms
in interface Ontology
addSearchTerm
public static void addSearchTerm(String label,
com.hp.hpl.jena.ontology.OntResource resource)
retrieve
public static Map retrieve(String label)
renderHierarchy
protected static void renderHierarchy(PrintStream out,
com.hp.hpl.jena.ontology.OntClass cls,
List occurs,
int depth)
renderClassDescription
public static void renderClassDescription(PrintStream out,
com.hp.hpl.jena.ontology.OntClass c,
int depth)
renderRestriction
protected static void renderRestriction(PrintStream out,
com.hp.hpl.jena.ontology.Restriction r)
renderURI
protected static void renderURI(PrintStream out,
com.hp.hpl.jena.shared.PrefixMapping prefixes,
String uri)
renderAnonymous
protected static void renderAnonymous(PrintStream out,
com.hp.hpl.jena.rdf.model.Resource anon,
String name)
indent
protected static void indent(PrintStream out,
int depth)
main
public static void main(String[] args)
throws Exception
- Throws:
Exception
Copyright © 2006 The Apache Software Foundation