Package org.jrdf.graph

Examples of org.jrdf.graph.GraphElementFactory.createResource()


        Graph fooGraph = JRDF_FACTORY.getNewGraph("foo");
        Graph barGraph = JRDF_FACTORY.getNewGraph("bar");
        GraphElementFactory barElementFactory = barGraph.getElementFactory();
        URI uri1 = URI.create("urn:hello");
        URI uri2 = URI.create("urn:there");
        Resource resource = barElementFactory.createResource(uri1);
        resource.addValue(uri1, uri2);
        resource.addValue(uri2, uri2);
        GraphElementFactory fooElementFactory = fooGraph.getElementFactory();
        Resource blankResource = fooElementFactory.createResource();
        blankResource.addValue(uri1, uri2);
View Full Code Here


        URI uri2 = URI.create("urn:there");
        Resource resource = barElementFactory.createResource(uri1);
        resource.addValue(uri1, uri2);
        resource.addValue(uri2, uri2);
        GraphElementFactory fooElementFactory = fooGraph.getElementFactory();
        Resource blankResource = fooElementFactory.createResource();
        blankResource.addValue(uri1, uri2);
        blankResource.addValue(uri1, uri1);
        blankResource.addValue(uri2, uri2);
    }
}
View Full Code Here

        System.out.println("Example finished.");
    }

    private void populateGraph(Graph graph) throws GraphException {
        GraphElementFactory elementFactory = graph.getElementFactory();
        person = elementFactory.createResource(PERSON);
        address = elementFactory.createResource();
        addressStatement = person.asTriple(HAS_ADDRESS, address);
        graph.add(addressStatement);
        address.addValue(HAS_STREET, "1501 Grant Avenue");
        cityStatement = address.asTriple(HAS_CITY, "Bedford");
View Full Code Here

    }

    private void populateGraph(Graph graph) throws GraphException {
        GraphElementFactory elementFactory = graph.getElementFactory();
        person = elementFactory.createResource(PERSON);
        address = elementFactory.createResource();
        addressStatement = person.asTriple(HAS_ADDRESS, address);
        graph.add(addressStatement);
        address.addValue(HAS_STREET, "1501 Grant Avenue");
        cityStatement = address.asTriple(HAS_CITY, "Bedford");
        graph.add(cityStatement);
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.