Package org.semanticweb.owlapi.io

Examples of org.semanticweb.owlapi.io.RDFResourceIRI


        return new RDFLiteral(literal);
    }

    @Override
    protected RDFResourceIRI getPredicateNode(@Nonnull IRI iri) {
        return new RDFResourceIRI(iri);
    }
View Full Code Here


        return new RDFResourceIRI(iri);
    }

    @Override
    protected RDFResourceIRI getResourceNode(@Nonnull IRI iri) {
        return new RDFResourceIRI(iri);
    }
View Full Code Here

@SuppressWarnings("javadoc")
public class RdfGraphComparatorTestCase {

    @Test
    public void shouldSort() {
        RDFResourceIRI iri1 = new RDFResourceIRI(IRI.create("urn:test:1"));
        RDFTriple first = new RDFTriple(iri1, iri1, iri1);
        RDFTriple second = new RDFTriple(iri1, iri1, iri1);
        assertEquals(0, first.compareTo(second));
    }
View Full Code Here

        return new RDFTriple(g, subtype, r(n));
    }

    @Nonnull
    private static RDFResourceIRI r(@Nonnull OWLEntity e) {
        return new RDFResourceIRI(e.getIRI());
    }
View Full Code Here

        return new RDFResourceIRI(e.getIRI());
    }

    @Nonnull
    private static RDFResourceIRI r(@Nonnull IRI e) {
        return new RDFResourceIRI(e);
    }
View Full Code Here

    private Statement testSesameTripleObjectBNode;
    private Statement testSesameTripleSubjectObjectBNode;

    @Before
    public void setUp() {
        RDFResourceIRI testOwlApiSubjectUri1 = new RDFResourceIRI(
                IRI.create("urn:test:subject:uri:1"));
        RDFResourceIRI testOwlApiPredicateUri1 = new RDFResourceIRI(
                IRI.create("urn:test:predicate:uri:1"));
        RDFResourceIRI testOwlApiObjectUri1 = new RDFResourceIRI(
                IRI.create("urn:test:object:uri:1"));
        RDFLiteral testOwlApiObjectPlainLiteral1 = new RDFLiteral(
                "Test literal", "", null);
        RDFLiteral testOwlApiObjectLangLiteral1 = new RDFLiteral(
                "Test literal", "en", null);
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

    }

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

    }

    @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

        } else {
            triples = graph.getTriplesForSubject(node, true);
        }
        pending.add(node);
        RDFResource lastSubject = null;
        RDFResourceIRI lastPredicate = null;
        boolean first = true;
        for (RDFTriple triple : triples) {
            RDFResource subj = triple.getSubject();
            RDFResourceIRI pred = triple.getPredicate();
            if (lastSubject != null
                    && (subj.equals(lastSubject) || subj.isAnonymous())) {
                if (lastPredicate != null && pred.equals(lastPredicate)) {
                    // Only the object differs from previous triple
                    // Just write the object
                    write(" ,");
                    writeNewLine();
                    write(triple.getObject());
View Full Code Here

TOP

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

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.