Package org.apache.clerezza.rdf.core.access

Examples of org.apache.clerezza.rdf.core.access.TcManager


        Set<Object> result = new HashSet<Object>();
        final MyTypeHandler typeHandler = new MyTypeHandler();
        final MyTypeHandler2 fallbackHandler = new MyTypeHandler2();
       
        TypeHandlerSpace typeHandlerSpace = new TypeHandlerSpace();
        typeHandlerSpace.tcManager = new TcManager(){
          @Override
          public LockableMGraph getMGraph(UriRef name) {
            return new LockableMGraph() {

              @Override
View Full Code Here


      throw new CASMappingException(e);
    }
  }

  private GraphNode createNode(String graphName) {
    final TcManager tcManager = TcManager.getInstance();
    final UriRef mGraphName = new UriRef(graphName);
    return new GraphNode(new BNode(), tcManager.createMGraph(mGraphName));
  }
View Full Code Here

  @Override
  public void map(CAS cas, String graphName) throws CASMappingException {

    // This is creating the Graph for the annotation in Annotation Ontology format
    final TcManager tcManager = TcManager.getInstance();
    final UriRef mGraphName = new UriRef(graphName);

    GraphNode node = new GraphNode(new BNode(), tcManager.createMGraph(mGraphName));
    Lock lock = node.writeLock();
    try {
      lock.lock();

      SelectorRegistry selectorRegistry = new SelectorRegistry();
View Full Code Here

   * @param selectedUri the initial selected URI
   */
  public Tutorial1App(final String selectedUri) {
    this.selectedUri = selectedUri;
    //get the singleton instance of TcManager
    final TcManager tcManager = TcManager.getInstance();
    //the arbitrary name we use for our mutable graph
    final UriRef mGraphName = new UriRef("http://tutorial.example.org/");
    //the m-graph into which we'll put the triples we collect
    mGraph = tcManager.createMGraph(mGraphName);
    try {
      loadContextFromWeb();
    } catch (IOException ex) {
      System.err.println("Error retrieving " + selectedUri);
      ex.printStackTrace();
View Full Code Here

   * @return
   *    an {@link MGraph}
   */
  public MGraph getRemoteConceptsDescriptionMGraph() {
    MGraph remoteConceptsDescriptionMGraph = null;
    TcManager tcManager = TcManager.getInstance();
    try {
      remoteConceptsDescriptionMGraph =
          tcManager.getMGraph(REMOTE_CONCEPTS_DESCRIPTION_MGRAPH);
    } catch (NoSuchEntityException nsee) {
      remoteConceptsDescriptionMGraph =
          tcManager.createMGraph(REMOTE_CONCEPTS_DESCRIPTION_MGRAPH);
    }
    return remoteConceptsDescriptionMGraph;
  }
View Full Code Here

        parsedGraph);
  }

  private MGraph getConceptCacheMGraph() {
    MGraph conceptCacheMGraph = null;
    TcManager tcManager = TcManager.getInstance();
    try {
      conceptCacheMGraph = tcManager.getMGraph(CONCEPT_CACHE_MGRAPH);
    } catch (NoSuchEntityException nsee) {
      conceptCacheMGraph = tcManager.createMGraph(CONCEPT_CACHE_MGRAPH);
    }
    return conceptCacheMGraph;
  }
View Full Code Here

    /**
     * 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());
        parser = new Parser(); // add Jena-supported formats + RDF/JSON
        parser.bindParsingProvider(new JenaParserProvider());
        parser.bindParsingProvider(new RdfJsonParsingProvider());
        serializer = new Serializer(); // add Jena-supported formats + RDF/JSON
View Full Code Here

    /**
     * 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());
        parser = new Parser(); // add Jena-supported formats + RDF/JSON
        parser.bindParsingProvider(new JenaParserProvider());
        parser.bindParsingProvider(new RdfJsonParsingProvider());
        serializer = new Serializer(); // add Jena-supported formats + RDF/JSON
View Full Code Here

            }
        }
       
        QueryEngine qe = new JenaSparqlEngine();
        WeightedTcProvider wtcp = new SimpleTcProvider();
        TcManager tcm = new SpecialTcManager(qe, wtcp);

        Dictionary<String,Object> configuration = new Hashtable<String,Object>();
        RuleAdaptersFactory ruleAdaptersFactory = new RuleAdaptersFactoryImpl();
        RuleStore ruleStore = new ClerezzaRuleStore(configuration, tcm);
       
View Full Code Here

            }
        }

        QueryEngine qe = new JenaSparqlEngine();
        WeightedTcProvider wtcp = new SimpleTcProvider();
        TcManager tcm = new SpecialTcManager(qe, wtcp);

        Dictionary<String,Object> configuration = new Hashtable<String,Object>();
        store = new ClerezzaRuleStore(configuration, tcm);
    }
View Full Code Here

TOP

Related Classes of org.apache.clerezza.rdf.core.access.TcManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.