use of org.apache.stanbol.ontologymanager.multiplexer.clerezza.collector.ClerezzaCollectorFactory in project stanbol by apache.
the class MockOsgiContext method reset.
/**
* Sets up a new mock OSGi context and cleans all resources and components.
*/
public static void reset() {
// reset Clerezza objects
tcManager = new TcManager();
tcManager.addWeightedTcProvider(new SimpleTcProvider());
// reset Stanbol objects
ontologyProvider = new ClerezzaOntologyProvider(tcManager, offline, parser);
collectorfactory = new ClerezzaCollectorFactory(ontologyProvider, config);
resetManagers();
}
use of org.apache.stanbol.ontologymanager.multiplexer.clerezza.collector.ClerezzaCollectorFactory in project stanbol by apache.
the class TestClerezzaSpaces method setup.
@BeforeClass
public static void setup() throws Exception {
offline = new OfflineConfigurationImpl(new Hashtable<String, Object>());
ScopeRegistry reg = new ScopeRegistryImpl();
// This one is created from scratch
Graph ont2 = ClerezzaOWLUtils.createOntology(baseIri2.toString());
minorSrc = new GraphSource(ont2.getImmutableGraph());
dropSrc = getLocalSource("/ontologies/droppedcharacters.owl");
nonexSrc = getLocalSource("/ontologies/nonexistentcharacters.owl");
inMemorySrc = new ParentPathInputSource(new File(TestClerezzaSpaces.class.getResource("/ontologies/maincharacters.owl").toURI()));
OWLDataFactory df = OWLManager.getOWLDataFactory();
OWLClass cHuman = df.getOWLClass(IRI.create(baseIri + "/" + Constants.humanBeing));
OWLIndividual iLinus = df.getOWLNamedIndividual(IRI.create(baseIri + "/" + Constants.linus));
linusIsHuman = df.getOWLClassAssertionAxiom(cHuman, iLinus);
factory = new ClerezzaCollectorFactory(new ClerezzaOntologyProvider(tcManager, offline, parser), new Hashtable<String, Object>());
factory.setDefaultNamespace(IRI.create("http://stanbol.apache.org/ontology/"));
}
Aggregations