Examples of BlankNode


Examples of com.franz.agbase.BlankNode

      result = "Null";
    } else if (o instanceof LiteralNode) {
      LiteralNode l = (LiteralNode)o;
      result = l.getLabel();
    } else if (o instanceof BlankNode) {
      BlankNode b = (BlankNode)o;
      result = b.getID();
    } else if (o instanceof ValueNode) {
      ValueNode n = (ValueNode)o;
      result = n.toString();
    } else {
      result = o.toString();
View Full Code Here

Examples of lupos.datastructures.items.BlankNode

    if (template != null) {
      for (final TriplePattern tp : template) {
        final Triple trip = new Triple();
        for (int i = 0; i < 3; i++) {
          if (tp.getPos(i) instanceof BlankNode) {
            final BlankNode bn = (BlankNode) tp.getPos(i);
            AnonymousLiteral al = assignedBlankNodes.get(bn);
            if (al == null) {
              do {
                al = new AnonymousLiteral("_:_constructedBN"
                    + bnodeid++);
View Full Code Here

Examples of org.jrdf.graph.BlankNode

    }

    public BlankNode createLocalBlankNode() {
        String uid = UUID.randomUUID().toString();
        currentId = nodePool.getNewNodeId();
        BlankNode node = new BlankNodeImpl(uid, currentId);
        nodePool.registerLocalBlankNode(node);
        return node;
    }
View Full Code Here

Examples of org.jrdf.graph.BlankNode

        URIReference p = elementFactory.createURIReference(URI.create(predicate));
        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.BlankNode

        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.BlankNode

        }
    }

    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);
            thisNode = nextNode;
        }
        graph.add(thisNode, p1, firstNode);
    }
View Full Code Here

Examples of org.jrdf.graph.BlankNode

        return valueFactory.createBlankNode();
    }

    public BlankNode createBlankNode(String nodeID) throws GraphElementFactoryException {
        // Maybe the node ID has been used before:
        BlankNode result = bNodeIdMap.get(nodeID);

        if (null == result) {
            // This is a new node ID, create a new BNode object for it
            result = valueFactory.createBlankNode();
View Full Code Here

Examples of org.jrdf.graph.BlankNode

            NodeElement subject = (NodeElement) peekStack(1);
            PropertyElement predicate = (PropertyElement) peekStack(0);

            if (predicate.parseCollection()) {
                SubjectNode lastListRes = predicate.getLastListResource();
                BlankNode newListRes = createBNode();

                if (null == lastListRes) {
                    // first element in the list
                    reportStatement(subject.getResource(), predicate.getURI(), newListRes);
View Full Code Here

Examples of org.jrdf.graph.BlankNode

            }

            String parseTypeValue = parseType.getValue();

            if ("Resource".equals(parseTypeValue)) {
                BlankNode objectResource = createBNode();
                NodeElement subject = (NodeElement) peekStack(1);

                reportStatement(subject.getResource(), propURI, objectResource);

                if (isEmptyElt) {
View Full Code Here

Examples of org.ontoware.rdf2go.model.node.BlankNode

    String foafURI = "http://xmlns.com/foaf/0.1/";
    URI max = model.createURI("http://xam.de/foaf.rdf.xml#i");
    URI name = model.createURI(foafURI+"#term_name");
    URI icqId = model.createURI(foafURI+"#term_icqChatID");
    URI typeInteger = XSD._integer;
    BlankNode konrad = model.createBlankNode();
    PlainLiteral maxNameAsPlainLiteral = model.createPlainLiteral("Max Völkel");
    DatatypeLiteral number = model.createDatatypeLiteral("123", typeInteger);
    LanguageTagLiteral konradNameEnglish = model.createLanguageTagLiteral("Konrad Voelkel", "en");
    LanguageTagLiteral konradNameGerman = model.createLanguageTagLiteral("Konrad Völkel", "de");
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.