Examples of URIReference


Examples of net.fortytwo.twitlogic.model.URIReference

        // TODO
        throw new IllegalStateException("not implemented");
    }

    public Resource anonymousNode() {
        return new URIReference(SesameTools.createRandomMiscellaneousURIString());
    }
View Full Code Here

Examples of net.fortytwo.twitlogic.model.URIReference

            }
        }
    }

    protected URIReference bnode(final int id) {
        return new URIReference(BNODE_URI_BASE + id);
    }
View Full Code Here

Examples of net.fortytwo.twitlogic.model.URIReference

            // Note: dollar tags are not "sniffed" here.

            Collection<URIReference> links = entities.getLinks();
            for (String s : TweetSyntax.findLinks(tweet.getText())) {
                links.add(new URIReference(s));
            }

            tweet.setEntities(entities);
        }
View Full Code Here

Examples of org.jrdf.graph.URIReference

        return node;
    }

    public URIReference createLocalURIReference(URI uri, boolean validate) {
        currentId = nodePool.getNewNodeId();
        URIReference node = new URIReferenceImpl(uri, validate, currentId);
        nodePool.registerURIReference(node);
        return node;
    }
View Full Code Here

Examples of org.jrdf.graph.URIReference

    public void load(Graph graph) throws GraphException {
        // check for blank nodes
        ClosableIterable<? extends Node> predicates = graph.findNodes(PREDICATE_TYPE);
        for (Node node : predicates) {
            URIReference uriReference = (URIReference) node;
            String partial = getPartialUri(uriReference.getURI().toString());
            if (!uris.containsKey(partial)) {
                String ns = NS_PREFIX + names.size();
                add(ns, partial);
            }
        }
View Full Code Here

Examples of org.jrdf.graph.URIReference

        return getLocalLiteral("\"" + EscapeUtil.escape(lexicalValue) + "\"" + "^^<" + datatypeURI + ">");
    }

    private URIReference getLocalURIReference(URI uri, boolean validate) {
        Long nodeId = nodePool.getNodeIdByString(uri.toString());
        URIReference newURIReference;
        if (null != nodeId) {
            newURIReference = (URIReference) nodePool.getNodeById(nodeId);
        } else {
            newURIReference = localizer.createLocalURIReference(uri, validate);
        }
View Full Code Here

Examples of org.jrdf.graph.URIReference

    private void addResult(Set<Molecule> results, Molecule molecule) {
        results.add(molecule);
    }

    private void addGrounded(String predicate) throws Exception {
        URIReference p = elementFactory.createURIReference(URI.create(predicate));
        graph.add(p, p, p);
    }
View Full Code Here

Examples of org.jrdf.graph.URIReference

        graph.add(p, p, p);
    }

    private void addTriple(String predicate) throws Exception {
        BlankNode s = elementFactory.createBlankNode();
        URIReference p = elementFactory.createURIReference(URI.create(predicate));
        BlankNode o = elementFactory.createBlankNode();
        graph.add(s, p, o);
    }
View Full Code Here

Examples of org.jrdf.graph.URIReference

        BlankNode o = elementFactory.createBlankNode();
        graph.add(s, p, o);
    }

    private void addChain(String predicate) throws Exception {
        URIReference p1 = elementFactory.createURIReference(URI.create(predicate));
        BlankNode thisNode = elementFactory.createBlankNode();
        for (int i = 0; i < CHAIN_SIZE; i++) {
            BlankNode nextNode = elementFactory.createBlankNode();
            graph.add(thisNode, p1, nextNode);
            thisNode = nextNode;
View Full Code Here

Examples of org.jrdf.graph.URIReference

            thisNode = nextNode;
        }
    }

    private void addLoop(String predicate) throws Exception {
        URIReference p1 = elementFactory.createURIReference(URI.create(predicate));
        BlankNode firstNode = elementFactory.createBlankNode();
        BlankNode thisNode = firstNode;
        for (int i = 0; i < LOOP_SIZE; i++) {
            BlankNode nextNode = elementFactory.createBlankNode();
            graph.add(thisNode, p1, nextNode);
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.