Package org.semanticweb.owlapi.io

Examples of org.semanticweb.owlapi.io.RDFResourceBlankNode


        }
        for (Map.Entry<RDFNode, List<RDFTriple>> e : sharers.entrySet()) {
            if (e.getValue().size() > 1) {
                // found reused blank nodes
                for (RDFTriple t : e.getValue()) {
                    RDFResourceBlankNode bnode = new RDFResourceBlankNode(
                            IRI.create(NodeID.nextAnonymousIRI()));
                    remappedNodes.put(bnode, e.getKey());
                    toReturn.put(t, bnode);
                }
            }
View Full Code Here


    @Override
    protected RDFResourceBlankNode getAnonymousNode(Object key) {
        checkNotNull(key, "key cannot be null");
        if (key instanceof OWLAnonymousIndividual) {
            return new RDFResourceBlankNode(
                    System.identityHashCode(((OWLAnonymousIndividual) key)
                            .getID().getID()));
        }
        return new RDFResourceBlankNode(System.identityHashCode(key));
    }
View Full Code Here

                logger.trace("triples={}", triples);
            }
        }
        for (final RDFTriple triple : triples) {
            RDFTriple tripleToRender = triple;
            RDFResourceBlankNode remappedNode = null;
            if (triplesWithRemappedNodes != null) {
                remappedNode = triplesWithRemappedNodes.get(tripleToRender);
            }
            if (remappedNode != null) {
                tripleToRender = new RDFTriple(tripleToRender.getSubject(),
View Full Code Here

        return new RDFResourceIRI(e);
    }

    @Nonnull
    private static RDFNode r(int s) {
        return new RDFResourceBlankNode(s);
    }
View Full Code Here

                "Test literal", "", null);
        RDFLiteral testOwlApiObjectLangLiteral1 = new RDFLiteral(
                "Test literal", "en", null);
        RDFLiteral testOwlApiObjectTypedLiteral1 = new RDFLiteral(
                "Test literal", null, IRI.create("urn:test:datatype:1"));
        RDFResourceBlankNode testOwlApiSubjectBNode1 = new RDFResourceBlankNode(
                IRI.create("subjectBnode1"));
        RDFResourceBlankNode testOwlApiObjectBNode1 = new RDFResourceBlankNode(
                IRI.create("objectBnode1"));
        testOwlApiTripleAllIRI = new RDFTriple(testOwlApiSubjectUri1,
                testOwlApiPredicateUri1, testOwlApiObjectUri1);
        testOwlApiTriplePlainLiteral = new RDFTriple(testOwlApiSubjectUri1,
                testOwlApiPredicateUri1, testOwlApiObjectPlainLiteral1);
View Full Code Here

    }

    @Nonnull
    private RDFResource getRDFResource(@Nonnull IRI iri) {
        if (isAnonymousNode(iri)) {
            return new RDFResourceBlankNode(iri);
        } else {
            return new RDFResourceIRI(iri);
        }
    }
View Full Code Here

    private RDFResource createOntologyHeaderNode() {
        Optional<IRI> id = ontology.getOntologyID().getOntologyIRI();
        if (id.isPresent()) {
            return new RDFResourceIRI(id.get());
        } else {
            return new RDFResourceBlankNode(System.identityHashCode(ontology));
        }
    }
View Full Code Here

                }

                @Nonnull
                @Override
                public RDFNode visit(OWLAnonymousIndividual individual) {
                    return new RDFResourceBlankNode(
                            System.identityHashCode(individual));
                }

                @Nonnull
                @Override
View Full Code Here

TOP

Related Classes of org.semanticweb.owlapi.io.RDFResourceBlankNode

Copyright © 2018 www.massapicom. 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.