Package org.openrdf.model.impl

Examples of org.openrdf.model.impl.ValueFactoryImpl.createURI()


    String ns2 = "b:";
    String ns3 = "c:";

    ValueFactory vf = new ValueFactoryImpl();
    URI uri1 = vf.createURI(ns1, "r1");
    URI uri2 = vf.createURI(ns2, "r2");
    URI uri3 = vf.createURI(ns3, "r3");
    Statement st = vf.createStatement(uri1, uri2, uri3);

    StringWriter writer = new StringWriter();
    RDFWriter rdfWriter = rdfWriterFactory.getWriter(writer);
View Full Code Here


    String ns3 = "c:";

    ValueFactory vf = new ValueFactoryImpl();
    URI uri1 = vf.createURI(ns1, "r1");
    URI uri2 = vf.createURI(ns2, "r2");
    URI uri3 = vf.createURI(ns3, "r3");
    Statement st = vf.createStatement(uri1, uri2, uri3);

    StringWriter writer = new StringWriter();
    RDFWriter rdfWriter = rdfWriterFactory.getWriter(writer);
    rdfWriter.handleNamespace("", ns1);
View Full Code Here

    String ns1 = "a:";
    String ns2 = "b:";
    String ns3 = "c:";

    ValueFactory vf = new ValueFactoryImpl();
    URI uri1 = vf.createURI(ns1, "r1");
    URI uri2 = vf.createURI(ns2, "r2");
    URI uri3 = vf.createURI(ns3, "r3");
    Statement st = vf.createStatement(uri1, uri2, uri3);

    StringWriter writer = new StringWriter();
View Full Code Here

    String ns2 = "b:";
    String ns3 = "c:";

    ValueFactory vf = new ValueFactoryImpl();
    URI uri1 = vf.createURI(ns1, "r1");
    URI uri2 = vf.createURI(ns2, "r2");
    URI uri3 = vf.createURI(ns3, "r3");
    Statement st = vf.createStatement(uri1, uri2, uri3);

    StringWriter writer = new StringWriter();
    RDFWriter rdfWriter = rdfWriterFactory.getWriter(writer);
View Full Code Here

    String ns3 = "c:";

    ValueFactory vf = new ValueFactoryImpl();
    URI uri1 = vf.createURI(ns1, "r1");
    URI uri2 = vf.createURI(ns2, "r2");
    URI uri3 = vf.createURI(ns3, "r3");
    Statement st = vf.createStatement(uri1, uri2, uri3);

    StringWriter writer = new StringWriter();
    RDFWriter rdfWriter = rdfWriterFactory.getWriter(writer);
    rdfWriter.handleNamespace("1", ns1);
View Full Code Here

            }


            ValueFactory vf = new ValueFactoryImpl();

            Resource subject = vf.createURI(resource);

            for(Map.Entry<String,XPathValueMapper> mapping : getXPathMappings(requestUrl).entrySet()) {
                XPathExpression<Object> xpath = mapping.getValue().getCompiled();

                org.openrdf.model.URI predicate = triples.getValueFactory().createURI(mapping.getKey());
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);
                triples.add(vf.createStatement(subject, ptype, type_resource));
            }

            return Collections.emptyList();
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);
                triples.add(vf.createStatement(subject, ptype, type_resource));
            }

            return Collections.emptyList();
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

                formats.addAll(RDFWriterRegistry.getInstance().getKeys());
                formats.addAll(TupleQueryResultFormat.values());
                for (FileFormat f: formats) {
                    final String formatUri = w3cFormatID.get(f);
                    if (StringUtils.isNotBlank(formatUri)) {
                        writer.handleStatement(vf.createStatement(sd, SPARQL_SD.resultFormat, vf.createURI(formatUri)));
                    } else {
                        final BNode fNode = vf.createBNode();
                        writer.handleStatement(vf.createStatement(sd, SPARQL_SD.resultFormat, fNode));
                        writer.handleStatement(vf.createStatement(fNode, RDF.TYPE, vf.createURI("http://www.w3.org/ns/formats/Format")));
                        writer.handleStatement(vf.createStatement(fNode, vf.createURI("http://www.w3.org/ns/formats/media_type"), vf.createLiteral(f.getDefaultMIMEType())));
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.