Examples of createURI()


Examples of org.ontoware.rdf2go.model.Model.createURI()

     * before we can do anything useful, we have to define the uris we want
     * to use
     */
    // use the uris defined by foaf
    URI foafName = model.createURI("http://xmlns.com/foaf/0.1/name");
    URI foafPerson = model.createURI("http://xmlns.com/foaf/0.1/Person");
    URI foafTitle = model.createURI("http://xmlns.com/foaf/0.1/title");
    URI foafKnows = model.createURI("http://xmlns.com/foaf/0.1/knows");
    URI foafHomepage = model.createURI("http://xmlns.com/foaf/0.1/homepage");
    // use a blank node for the person
    BlankNode werner = model.createBlankNode();
View Full Code Here

Examples of org.ontoware.rdf2go.model.ModelSet.createURI()

    BookmarksHelper bh = new BookmarksHelper(dirUri);
    String uri = bh.createResource(dirUri, dirLabel, dirComment, person,true);
   
    try
    {
      innerModel.addStatement(null,innerModel.createURI(uri), innerModel.createURI(S3B_SSCF.isIn), innerModel.createURI(ownerMbox));
    }
    catch (Exception e)
    {
      //if the inserting is failed, removed just created resource
      XfoafSscfResource xfsr = XfoafSscfResource.getXfoafSscfResource(uri,innerModel);
View Full Code Here

Examples of org.openrdf.model.URIFactory.createURI()

  {
    MemoryStore store = new MemoryStore(dataDir);
    store.initialize();

    URIFactory factory = store.getURIFactory();
    URI foo = factory.createURI("http://www.foo.example/foo");
    URI bar = factory.createURI("http://www.foo.example/bar");

    SailConnection con = store.getConnection();
    con.addStatement(foo, RDF.TYPE, bar);
View Full Code Here

Examples of org.openrdf.model.URIFactory.createURI()

    MemoryStore store = new MemoryStore(dataDir);
    store.initialize();

    URIFactory factory = store.getURIFactory();
    URI foo = factory.createURI("http://www.foo.example/foo");
    URI bar = factory.createURI("http://www.foo.example/bar");

    SailConnection con = store.getConnection();
    con.addStatement(foo, RDF.TYPE, bar);

    TupleQueryModel query = QueryParserUtil.parseTupleQuery(QueryLanguage.SERQL,
View Full Code Here

Examples of org.openrdf.model.URIFactory.createURI()

    store = new MemoryStore(dataDir);
    store.initialize();

    factory = store.getURIFactory();
    foo = factory.createURI("http://www.foo.example/foo");
    bar = factory.createURI("http://www.foo.example/bar");

    con = store.getConnection();

    iter = con.evaluate(query, EmptyBindingSet.getInstance(), false);
View Full Code Here

Examples of org.openrdf.model.URIFactory.createURI()

    store = new MemoryStore(dataDir);
    store.initialize();

    factory = store.getURIFactory();
    foo = factory.createURI("http://www.foo.example/foo");
    bar = factory.createURI("http://www.foo.example/bar");

    con = store.getConnection();

    iter = con.evaluate(query, EmptyBindingSet.getInstance(), false);
View Full Code Here

Examples of org.openrdf.model.URIFactory.createURI()

  {
    MemoryStore store = new MemoryStore(dataDir);
    store.initialize();

    URIFactory factory = store.getURIFactory();
    URI foo = factory.createURI("http://www.foo.example/foo");

    StringBuilder sb = new StringBuilder(66000);
    for (int i = 0; i < 66000; i++) {
      sb.append('a');
    }
View Full Code Here

Examples of org.openrdf.model.URIFactory.createURI()

  private Object[] getArrayOf(Class<?> type, String localName)
    throws MalformedURLException
  {
    URIFactory uf = repository.getURIFactory();
    URI pred = uf.createURI(Protocol.METADATA_NAMESPACE, localName);
    if (type.isAssignableFrom(String.class)) {
      return getString(pred);
    }
    else if (type.isAssignableFrom(Boolean.TYPE)) {
      return getBoolean(pred);
View Full Code Here

Examples of org.openrdf.model.URIFactory.createURI()

      if (contextID.equalsIgnoreCase("null")) {
        contexts[i - 1] = null;
      }
      else {
        try {
          contexts[i - 1] = valueFactory.createURI(contextID);
        }
        catch (IllegalArgumentException e) {
          writeError("illegal URI: " + contextID);
          printHelpClear();
          return;
View Full Code Here

Examples of org.openrdf.model.URIFactory.createURI()

    URIFactory uf = repository.getURIFactory();
    LiteralFactory lf = repository.getLiteralFactory();
    String foafName = "http://xmlns.com/foaf/0.1/name";
    String exEmpId = "http://example.org/ns#empId";
    RepositoryConnection conn = repository.getConnection();
    conn.add(uf.createURI("http://example.org/ns#" + id), uf.createURI(foafName), lf.createLiteral(name));
    conn.add(uf.createURI("http://example.org/ns#" + id), uf.createURI(exEmpId), lf.createLiteral(empId));
    conn.close();
  }

  private void assertResult(String queryStr, List<String> names)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.