Search in sources :

Example 1 with TcManager

use of org.apache.clerezza.rdf.core.access.TcManager in project stanbol by apache.

the class ClerezzaAdpterTest method setUpClass.

@BeforeClass
public static void setUpClass() {
    //new SpecialTcManager(qe, wtcp);
    TcManager tcm = TcManager.getInstance();
    Dictionary<String, Object> configuration = new Hashtable<String, Object>();
    RuleAdaptersFactory ruleAdaptersFactory = new RuleAdaptersFactoryImpl();
    RuleStore ruleStore = new ClerezzaRuleStore(configuration, tcm);
    ruleAdapter = new ClerezzaAdapter(configuration, ruleStore, ruleAdaptersFactory);
}
Also used : RuleAdaptersFactory(org.apache.stanbol.rules.base.api.RuleAdaptersFactory) RuleStore(org.apache.stanbol.rules.base.api.RuleStore) ClerezzaRuleStore(org.apache.stanbol.rules.manager.ClerezzaRuleStore) TcManager(org.apache.clerezza.rdf.core.access.TcManager) ClerezzaAdapter(org.apache.stanbol.rules.adapters.clerezza.ClerezzaAdapter) ClerezzaRuleStore(org.apache.stanbol.rules.manager.ClerezzaRuleStore) Hashtable(java.util.Hashtable) RuleAdaptersFactoryImpl(org.apache.stanbol.rules.adapters.impl.RuleAdaptersFactoryImpl) BeforeClass(org.junit.BeforeClass)

Example 2 with TcManager

use of org.apache.clerezza.rdf.core.access.TcManager 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();
}
Also used : TcManager(org.apache.clerezza.rdf.core.access.TcManager) SimpleTcProvider(org.apache.clerezza.rdf.simple.storage.SimpleTcProvider) ClerezzaOntologyProvider(org.apache.stanbol.ontologymanager.multiplexer.clerezza.ontology.ClerezzaOntologyProvider) ClerezzaCollectorFactory(org.apache.stanbol.ontologymanager.multiplexer.clerezza.collector.ClerezzaCollectorFactory)

Example 3 with TcManager

use of org.apache.clerezza.rdf.core.access.TcManager in project stanbol by apache.

the class MockOsgiContext method reset.

public static void reset() {
    tcManager = new TcManager();
    tcManager.addWeightedTcProvider(new SimpleTcProvider());
}
Also used : TcManager(org.apache.clerezza.rdf.core.access.TcManager) SimpleTcProvider(org.apache.clerezza.rdf.simple.storage.SimpleTcProvider)

Example 4 with TcManager

use of org.apache.clerezza.rdf.core.access.TcManager in project stanbol by apache.

the class RuleStoreTest method setUpClass.

@BeforeClass
public static void setUpClass() throws Exception {
    /*class SpecialTcManager extends TcManager {
            public SpecialTcManager(QueryEngine qe, WeightedTcProvider wtcp) {
                super();
                bindQueryEngine(qe);
                bindWeightedTcProvider(wtcp);
            }
        }

        QueryEngine qe = new JenaSparqlEngine();
        WeightedTcProvider wtcp = new SimpleTcProvider();*/
    //new SpecialTcManager(qe, wtcp);
    TcManager tcm = TcManager.getInstance();
    Dictionary<String, Object> configuration = new Hashtable<String, Object>();
    store = new ClerezzaRuleStore(configuration, tcm);
}
Also used : TcManager(org.apache.clerezza.rdf.core.access.TcManager) Hashtable(java.util.Hashtable) BeforeClass(org.junit.BeforeClass)

Aggregations

TcManager (org.apache.clerezza.rdf.core.access.TcManager)4 Hashtable (java.util.Hashtable)2 SimpleTcProvider (org.apache.clerezza.rdf.simple.storage.SimpleTcProvider)2 BeforeClass (org.junit.BeforeClass)2 ClerezzaCollectorFactory (org.apache.stanbol.ontologymanager.multiplexer.clerezza.collector.ClerezzaCollectorFactory)1 ClerezzaOntologyProvider (org.apache.stanbol.ontologymanager.multiplexer.clerezza.ontology.ClerezzaOntologyProvider)1 ClerezzaAdapter (org.apache.stanbol.rules.adapters.clerezza.ClerezzaAdapter)1 RuleAdaptersFactoryImpl (org.apache.stanbol.rules.adapters.impl.RuleAdaptersFactoryImpl)1 RuleAdaptersFactory (org.apache.stanbol.rules.base.api.RuleAdaptersFactory)1 RuleStore (org.apache.stanbol.rules.base.api.RuleStore)1 ClerezzaRuleStore (org.apache.stanbol.rules.manager.ClerezzaRuleStore)1