Package org.semanticweb.owlapi.io

Examples of org.semanticweb.owlapi.io.RDFTriple


    }

    @Nonnull
    private RDFTriple getRDFTriple(@Nonnull IRI subject,
            @Nonnull IRI predicate, @Nonnull OWLLiteral object) {
        return new RDFTriple(getRDFResource(subject), new RDFResourceIRI(
                predicate), new RDFLiteral(object));
    }
View Full Code Here


            consumer.iterateResourceTriples(new ResourceTripleIterator() {

                @Override
                public void handleResourceTriple(IRI subject, IRI predicate,
                        IRI object) {
                    remainingTriples.add(new RDFTriple(subject, consumer
                            .isAnonymousNode(subject), predicate, object,
                            consumer.isAnonymousNode(object)));
                }
            });
            consumer.iterateLiteralTriples(new LiteralTripleIterator() {

                @Override
                public void handleLiteralTriple(@Nonnull IRI subject,
                        @Nonnull IRI predicate, @Nonnull OWLLiteral object) {
                    remainingTriples.add(new RDFTriple(subject, consumer
                            .isAnonymousNode(subject), predicate, object));
                }
            });
            return remainingTriples;
        }
View Full Code Here

        RDFResource ontologyHeaderNode = createOntologyHeaderNode();
        addVersionIRIToOntologyHeader(ontologyHeaderNode);
        addImportsDeclarationsToOntologyHeader(ontologyHeaderNode);
        addAnnotationsToOntologyHeader(ontologyHeaderNode);
        if (!ontID.isAnonymous() || !graph.isEmpty()) {
            graph.addTriple(new RDFTriple(ontologyHeaderNode,
                    new RDFResourceIRI(RDF_TYPE.getIRI()), new RDFResourceIRI(
                            OWL_ONTOLOGY.getIRI())));
        }
        if (!graph.isEmpty()) {
            render(ontologyHeaderNode);
View Full Code Here

    @SuppressWarnings("null")
    private void addVersionIRIToOntologyHeader(
            @Nonnull RDFResource ontologyHeaderNode) {
        OWLOntologyID ontID = ontology.getOntologyID();
        if (ontID.getVersionIRI().isPresent()) {
            graph.addTriple(new RDFTriple(ontologyHeaderNode,
                    new RDFResourceIRI(OWL_VERSION_IRI.getIRI()),
                    new RDFResourceIRI(ontID.getVersionIRI().get())));
        }
    }
View Full Code Here

    }

    private void addImportsDeclarationsToOntologyHeader(
            @Nonnull RDFResource ontologyHeaderNode) {
        for (OWLImportsDeclaration decl : ontology.getImportsDeclarations()) {
            graph.addTriple(new RDFTriple(ontologyHeaderNode,
                    new RDFResourceIRI(OWL_IMPORTS.getIRI()),
                    new RDFResourceIRI(decl.getIRI())));
        }
    }
View Full Code Here

                public RDFNode visit(OWLLiteral literal) {
                    return new RDFLiteral(literal);
                }
            };
            RDFNode node = anno.getValue().accept(valVisitor);
            graph.addTriple(new RDFTriple(ontologyHeaderNode,
                    new RDFResourceIRI(anno.getProperty().getIRI()), node));
        }
    }
View Full Code Here

    private Set<RDFTriple> getRemainingTriples() {
        final Set<RDFTriple> remainingTriples = new HashSet<RDFTriple>();
        iterateResourceTriples(new ResourceTripleIterator<RuntimeException>() {
            public void handleResourceTriple(IRI subject, IRI predicate, IRI object) {
                remainingTriples.add(new RDFTriple(subject, isAnonymousNode(subject), predicate, isAnonymousNode(predicate), object, isAnonymousNode(object)));
            }
        });

        iterateLiteralTriples(new LiteralTripleIterator<RuntimeException>() {
            public void handleLiteralTriple(IRI subject, IRI predicate, OWLLiteral object) {
                remainingTriples.add(new RDFTriple(subject, isAnonymousNode(subject), predicate, isAnonymousNode(predicate), object));
            }
        });
        return remainingTriples;
    }
View Full Code Here

    private RDFResource getRDFResource(IRI iri) {
        return new RDFResource(iri, isAnonymousNode(iri));
    }

    private RDFTriple getRDFTriple(IRI subject, IRI predicate, IRI object) {
        return new RDFTriple(getRDFResource(subject), getRDFResource(predicate), getRDFResource(object));
    }
View Full Code Here

        return new RDFTriple(getRDFResource(subject), getRDFResource(predicate), getRDFResource(object));
    }


    private RDFTriple getRDFTriple(IRI subject, IRI predicate, OWLLiteral object) {
        return new RDFTriple(getRDFResource(subject), getRDFResource(predicate), new RDFLiteral(object));
    }
View Full Code Here

TOP

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

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.