Examples of createURI()


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

      for (RepositoryInfo info : getRepositoryManager().getAllRepositoryInfos()) {
        String id = info.getId();

        MapBindingSet bindings = new MapBindingSet(3);
        bindings.addBinding("uri", vf.createURI(namespace, id));
        bindings.addBinding("id", vf.createLiteral(id));

        if (info.getDescription() != null) {
          bindings.addBinding("title", vf.createLiteral(info.getDescription()));
        }
View Full Code Here

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

    @Test
    public void testLinkExtraction() throws RepositoryException {
        assertExtract("/html/html-head-link-extractor.html");
        assertModelNotEmpty();
        final ValueFactory valueFactory = new ValueFactoryImpl();
        final URI externalLinkURI = valueFactory.createURI("http://www.myexperiment.org/workflows/16.rdf");
        assertContains(
                AbstractExtractorTestCase.baseURI,
                valueFactory.createURI("http://www.w3.org/1999/xhtml/vocab#alternate"),
                externalLinkURI
View Full Code Here

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

        assertModelNotEmpty();
        final ValueFactory valueFactory = new ValueFactoryImpl();
        final URI externalLinkURI = valueFactory.createURI("http://www.myexperiment.org/workflows/16.rdf");
        assertContains(
                AbstractExtractorTestCase.baseURI,
                valueFactory.createURI("http://www.w3.org/1999/xhtml/vocab#alternate"),
                externalLinkURI

        );
        assertContains(
                externalLinkURI,
View Full Code Here

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

                externalLinkURI

        );
        assertContains(
                externalLinkURI,
                valueFactory.createURI("http://purl.org/dc/terms/title"),
                valueFactory.createLiteral("RDF+XML")

        );
        assertContains(
                externalLinkURI,
View Full Code Here

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

                valueFactory.createLiteral("RDF+XML")

        );
        assertContains(
                externalLinkURI,
                valueFactory.createURI("http://purl.org/dc/terms/format"),
                valueFactory.createLiteral("application/rdf+xml")

        );
    }
}
View Full Code Here

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

  public Resource export(Model model) {
    Resource implNode = super.export(model);
    ValueFactoryImpl vf = ValueFactoryImpl.getInstance();

    if (url != null) {
      model.add(implNode, REPOSITORYURL, vf.createURI(url));
    }
    if (readOnly) {
      model.add(implNode, READ_ONLY, vf.createLiteral(readOnly));
    }
    for (String space : subjectSpace) {
View Full Code Here

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

    }
    if (readOnly) {
      model.add(implNode, READ_ONLY, vf.createLiteral(readOnly));
    }
    for (String space : subjectSpace) {
      model.add(implNode, SUBJECTSPACE, vf.createURI(space));
    }
    // if (username != null) {
    // graph.add(implNode, USERNAME,
    // graph.getValueFactory().createLiteral(username));
    // }
View Full Code Here

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

        Resource subject;
        URI predicate;
        Value object;
        if (triple.getSubject() instanceof RDFResourceIRI) {
            try {
                subject = vf.createURI(triple.getSubject().getIRI().toString());
            } catch (IllegalArgumentException iae) {
                LOGGER.error("Subject URI was invalid: {}", triple);
                return Collections.emptyList();
            }
        } else {
View Full Code Here

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

            } else {
                subject = vf.createBNode(triple.getSubject().getIRI()
                        .toString());
            }
        }
        predicate = vf.createURI(triple.getPredicate().getIRI().toString());
        if (triple.getObject() instanceof RDFResourceIRI) {
            try {
                object = vf.createURI(triple.getObject().getIRI().toString());
            } catch (IllegalArgumentException iae) {
                LOGGER.error("Object URI was invalid: {}", triple);
View Full Code Here

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

            }
        }
        predicate = vf.createURI(triple.getPredicate().getIRI().toString());
        if (triple.getObject() instanceof RDFResourceIRI) {
            try {
                object = vf.createURI(triple.getObject().getIRI().toString());
            } catch (IllegalArgumentException iae) {
                LOGGER.error("Object URI was invalid: {}", triple);
                return Collections.emptyList();
            }
        } else if (triple.getObject() instanceof RDFLiteral) {
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.