Package org.openrdf.model

Examples of org.openrdf.model.ValueFactory.createLiteral()


        mySubject.addProperty(rdfType, skosClass);
        Set<Entry<String, String>> values = keyword.getValues().entrySet();
        for (Entry<String, String> entry : values) {
            String language = toiso639_1_Lang(entry.getKey());
            Value valueObj = myFactory.createLiteral(entry.getValue(), language);
            myGraph.add(mySubject, predicatePrefLabel, valueObj );
           
        }
        Set<Entry<String, String>> definitions = keyword.getDefinitions().entrySet();
        for (Entry<String, String> entry : definitions) {
View Full Code Here


           
        }
        Set<Entry<String, String>> definitions = keyword.getDefinitions().entrySet();
        for (Entry<String, String> entry : definitions) {
            String language = toiso639_1_Lang(entry.getKey());
            Value definitionObj = myFactory.createLiteral(entry.getValue(), language);
            myGraph.add(mySubject, predicateScopeNote, definitionObj );
           
        }
        myGraph.add(mySubject, predicateBoundedBy, gmlNode);
View Full Code Here

        // add updated Labels
        Set<Entry<String, String>> values = keyword.getValues().entrySet();
        for (Entry<String, String> entry : values) {
            String language = toiso639_1_Lang(entry.getKey());
            Value valueObj = myFactory.createLiteral(entry.getValue(), language);
            myGraph.add(subject, predicatePrefLabel, valueObj );
           
        }
        // add updated Definitions/Notes
        Set<Entry<String, String>> definitions = keyword.getDefinitions().entrySet();
View Full Code Here

        }
        // add updated Definitions/Notes
        Set<Entry<String, String>> definitions = keyword.getDefinitions().entrySet();
        for (Entry<String, String> entry : definitions) {
            String language = toiso639_1_Lang(entry.getKey());
            Value definitionObj = myFactory.createLiteral(entry.getValue(), language);
            myGraph.add(subject, predicateScopeNote, definitionObj );
           
        }

      // update bbox
View Full Code Here

                  AtomicReference<Statement> st = new AtomicReference<Statement>(iter.next());
                  myGraph.remove(st.get());
                  break;
              }
              // create the new statements
              Literal lowerCorner = myFactory.createLiteral(keyword.getCoordWest() + " " + keyword.getCoordSouth());
              Literal upperCorner = myFactory.createLiteral(keyword.getCoordEast() + " " + keyword.getCoordNorth());
             
              // Add the new statements
              myGraph.add(subjectGml, predicateLowerCorner, lowerCorner);
              myGraph.add(subjectGml, predicateUpperCorner, upperCorner);
View Full Code Here

                  myGraph.remove(st.get());
                  break;
              }
              // create the new statements
              Literal lowerCorner = myFactory.createLiteral(keyword.getCoordWest() + " " + keyword.getCoordSouth());
              Literal upperCorner = myFactory.createLiteral(keyword.getCoordEast() + " " + keyword.getCoordNorth());
             
              // Add the new statements
              myGraph.add(subjectGml, predicateLowerCorner, lowerCorner);
              myGraph.add(subjectGml, predicateUpperCorner, upperCorner);
          }
View Full Code Here

     
      URI rdfType = myFactory.createURI(org.openrdf.vocabulary.RDF.TYPE);
     
      mySubject.addProperty(rdfType, skosClass);
     
      Value valueObj = myFactory.createLiteral(thesaurusTitle);
      myGraph.add(mySubject, titleURI, valueObj );
     
      repository.addGraph(myGraph);
    }
   
View Full Code Here

    ValueFactory vf = repository.getValueFactory();
    String foafName = "http://xmlns.com/foaf/0.1/name";
    String exEmpId = "http://example.org/ns#empId";
    RepositoryConnection conn = repository.getConnection();
    conn.add(vf.createURI("http://example.org/ns#" + id), vf
        .createURI(foafName), vf.createLiteral(name));
    conn.add(vf.createURI("http://example.org/ns#" + id), vf
        .createURI(exEmpId), vf.createLiteral(empId));
    conn.close();
  }
View Full Code Here

    String exEmpId = "http://example.org/ns#empId";
    RepositoryConnection conn = repository.getConnection();
    conn.add(vf.createURI("http://example.org/ns#" + id), vf
        .createURI(foafName), vf.createLiteral(name));
    conn.add(vf.createURI("http://example.org/ns#" + id), vf
        .createURI(exEmpId), vf.createLiteral(empId));
    conn.close();
  }

  private void assertResult(String queryStr, List<String> names)
      throws RepositoryException, MalformedQueryException,
View Full Code Here

    BNode repositoryNode = vf.createBNode();

    graph.add(repositoryNode, RDF.TYPE, REPOSITORY);

    if (id != null) {
      graph.add(repositoryNode, REPOSITORYID, vf.createLiteral(id));
    }
    if (title != null) {
      graph.add(repositoryNode, RDFS.LABEL, vf.createLiteral(title));
    }
    if (implConfig != null) {
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.