Package org.openrdf.model

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


      URI post2 = vf.createURI("http://reference.data.gov.uk/id/department/bis/post/111912");
      con.add(vf.createStatement(post2,RDF.TYPE,vf.createURI("http://reference.data.gov.uk/def/central-government/CivilServicePost")));
      con.add(vf.createStatement(post2,RDFS.LABEL,vf.createLiteral("Deputy Director - Legal Services Directorate B","en")));
     
      URI person2 = vf.createURI("http://data.bis.gov.uk/data/organogram/2010-08-26/person1");
      con.add(vf.createStatement(person2,RDF.TYPE,vf.createURI("http://xmlns.com/foaf/0.1/Person")));
      con.add(vf.createStatement(person2,vf.createURI("http://xmlns.com/foaf/0.1/name"),vf.createLiteral("Bryan Welch")));
      con.add(vf.createStatement(person2,vf.createURI("http://xmlns.com/foaf/0.1/mbox"),vf.createURI("mailto:bryan.welch@bis.gsi.gov.uk")));
     
      URI unit2 = vf.createURI("http://data.bis.gov.uk/data/organogram/2010-08-26/legal-services-group");
     
View Full Code Here


      con.add(vf.createStatement(post2,RDF.TYPE,vf.createURI("http://reference.data.gov.uk/def/central-government/CivilServicePost")));
      con.add(vf.createStatement(post2,RDFS.LABEL,vf.createLiteral("Deputy Director - Legal Services Directorate B","en")));
     
      URI person2 = vf.createURI("http://data.bis.gov.uk/data/organogram/2010-08-26/person1");
      con.add(vf.createStatement(person2,RDF.TYPE,vf.createURI("http://xmlns.com/foaf/0.1/Person")));
      con.add(vf.createStatement(person2,vf.createURI("http://xmlns.com/foaf/0.1/name"),vf.createLiteral("Bryan Welch")));
      con.add(vf.createStatement(person2,vf.createURI("http://xmlns.com/foaf/0.1/mbox"),vf.createURI("mailto:bryan.welch@bis.gsi.gov.uk")));
     
      URI unit2 = vf.createURI("http://data.bis.gov.uk/data/organogram/2010-08-26/legal-services-group");
     
      con.add(vf.createStatement(unit2, vf.createURI("http://reference.data.gov.uk/def/central-government/hasPost"), post2));
View Full Code Here

                final Elements values = mapping.getValue().select(htmlDoc);
                for(Element value : values) {
                    List<Value> objects = mapping.getValue().map(resource, value, vf);
                    for(Value object : objects) {
                        Statement stmt = vf.createStatement(subject, predicate, object);
                        con.add(stmt);
                    }
                }
            }
View Full Code Here

            org.openrdf.model.URI ptype = vf.createURI(Namespaces.NS_RDF + "type");

            for(String typeUri : getTypes(subject)) {
                Resource type_resource = vf.createURI(typeUri);
                con.add(vf.createStatement(subject, ptype, type_resource));
            }

            con.commit();
            con.close();
View Full Code Here

            org.openrdf.model.URI ptype = triples.getValueFactory().createURI(Namespaces.NS_RDF + "type");
           
            for(String typeUri : getTypes(vf.createURI(resource))) {
                Resource type_resource = vf.createURI(typeUri);
                con.add(vf.createStatement(subject, ptype, type_resource));
            }

            con.commit();
            con.close();
View Full Code Here

                    final PredicateObjectFactory factory = MAPPING.get(attr);
                    final URI predicate = factory.createPredicate(vf);

                    for (String val : accountData.get(attr)) {
                        for (Value object : factory.createObjects(val, vf)) {
                            conn.add(vf.createStatement(subject, predicate, object));
                        }
                    }

                }
View Full Code Here

        final SailRepositoryConnection con = repository.getConnection();
        try {
            final ValueFactory vf = con.getValueFactory();

            con.add(vf.createStatement(subject, predicate, vf.createLiteral(text)));

            con.commit();
        } finally {
            con.close();
        }
View Full Code Here

            writer.handleNamespace(SPARQL_SD.PREFIX, SPARQL_SD.NAMESPACE);
            writer.handleNamespace("formats", "http://www.w3.org/ns/formats/");
            writer.handleNamespace("void", "http://rdfs.org/ns/void#");

            final BNode sd = vf.createBNode();
            writer.handleStatement(vf.createStatement(sd, RDF.TYPE, SPARQL_SD.Service));
            writer.handleStatement(vf.createStatement(sd, SPARQL_SD.endpoint, vf.createURI(requestURL)));
            writer.handleStatement(vf.createStatement(sd, SPARQL_SD.supportedLanguage, isUpdate?SPARQL_SD.SPARQL11Update:SPARQL_SD.SPARQL11Query));

            if (!isUpdate) {
                // FIXME: really? these types?
View Full Code Here

            writer.handleNamespace("formats", "http://www.w3.org/ns/formats/");
            writer.handleNamespace("void", "http://rdfs.org/ns/void#");

            final BNode sd = vf.createBNode();
            writer.handleStatement(vf.createStatement(sd, RDF.TYPE, SPARQL_SD.Service));
            writer.handleStatement(vf.createStatement(sd, SPARQL_SD.endpoint, vf.createURI(requestURL)));
            writer.handleStatement(vf.createStatement(sd, SPARQL_SD.supportedLanguage, isUpdate?SPARQL_SD.SPARQL11Update:SPARQL_SD.SPARQL11Query));

            if (!isUpdate) {
                // FIXME: really? these types?
                final Set<FileFormat> formats = new HashSet<>();
View Full Code Here

            writer.handleNamespace("void", "http://rdfs.org/ns/void#");

            final BNode sd = vf.createBNode();
            writer.handleStatement(vf.createStatement(sd, RDF.TYPE, SPARQL_SD.Service));
            writer.handleStatement(vf.createStatement(sd, SPARQL_SD.endpoint, vf.createURI(requestURL)));
            writer.handleStatement(vf.createStatement(sd, SPARQL_SD.supportedLanguage, isUpdate?SPARQL_SD.SPARQL11Update:SPARQL_SD.SPARQL11Query));

            if (!isUpdate) {
                // FIXME: really? these types?
                final Set<FileFormat> formats = new HashSet<>();
                formats.addAll(RDFWriterRegistry.getInstance().getKeys());
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.