Search in sources :

Example 6 with BigdataStatement

use of com.bigdata.rdf.model.BigdataStatement in project wikidata-query-rdf by wikimedia.

the class WikibaseVocabularyUnitTest method geoIsInlined.

@Test
public void geoIsInlined() {
    BigdataStatement statement = roundTrip(Ontology.Geo.LATITUDE, Ontology.Geo.LONGITUDE, Ontology.Geo.GLOBE);
    assertThat(statement.getSubject().getIV(), instanceOf(VocabURIByteIV.class));
    assertThat(statement.getPredicate().getIV(), instanceOf(VocabURIByteIV.class));
    assertThat(statement.getObject().getIV(), instanceOf(VocabURIByteIV.class));
}
Also used : BigdataStatement(com.bigdata.rdf.model.BigdataStatement) VocabURIByteIV(com.bigdata.rdf.internal.impl.uri.VocabURIByteIV) Test(org.junit.Test)

Example 7 with BigdataStatement

use of com.bigdata.rdf.model.BigdataStatement in project wikidata-query-rdf by wikimedia.

the class WikibaseVocabularyUnitTest method quantityIsInlined.

@Test
public void quantityIsInlined() {
    BigdataStatement statement = roundTrip(Ontology.Quantity.AMOUNT, Ontology.Quantity.UNIT, Ontology.Quantity.UPPER_BOUND);
    assertThat(statement.getSubject().getIV(), instanceOf(VocabURIByteIV.class));
    assertThat(statement.getPredicate().getIV(), instanceOf(VocabURIByteIV.class));
    assertThat(statement.getObject().getIV(), instanceOf(VocabURIByteIV.class));
}
Also used : BigdataStatement(com.bigdata.rdf.model.BigdataStatement) VocabURIByteIV(com.bigdata.rdf.internal.impl.uri.VocabURIByteIV) Test(org.junit.Test)

Example 8 with BigdataStatement

use of com.bigdata.rdf.model.BigdataStatement in project wikidata-query-rdf by wikimedia.

the class WikibaseVocabularyUnitTest method descriptionIsByte.

@Test
public void descriptionIsByte() {
    BigdataStatement statement = roundTrip("entity:Q23", SchemaDotOrg.DESCRIPTION, new LiteralImpl("some dude", "en"));
    assertThat(statement.getPredicate().getIV(), instanceOf(VocabURIByteIV.class));
}
Also used : LiteralImpl(org.openrdf.model.impl.LiteralImpl) BigdataStatement(com.bigdata.rdf.model.BigdataStatement) VocabURIByteIV(com.bigdata.rdf.internal.impl.uri.VocabURIByteIV) Test(org.junit.Test)

Example 9 with BigdataStatement

use of com.bigdata.rdf.model.BigdataStatement in project wikidata-query-rdf by wikimedia.

the class WikibaseVocabularyUnitTest method valueReferenceAndQualifierAreBytes.

@Test
public void valueReferenceAndQualifierAreBytes() {
    BigdataStatement statement = roundTrip(uris().value(), uris().property(PropertyType.REFERENCE) + "P", uris().property(PropertyType.QUALIFIER) + "P");
    assertThat(statement.getSubject().getIV(), instanceOf(VocabURIByteIV.class));
    assertThat(statement.getPredicate().getIV(), instanceOf(VocabURIByteIV.class));
    assertThat(statement.getObject().getIV(), instanceOf(VocabURIByteIV.class));
}
Also used : BigdataStatement(com.bigdata.rdf.model.BigdataStatement) VocabURIByteIV(com.bigdata.rdf.internal.impl.uri.VocabURIByteIV) Test(org.junit.Test)

Example 10 with BigdataStatement

use of com.bigdata.rdf.model.BigdataStatement in project wikidata-query-rdf by wikimedia.

the class WikibaseVocabularyUnitTest method labelIsByte.

@Test
public void labelIsByte() {
    BigdataStatement statement = roundTrip("entity:Q23", RDFS.LABEL, new LiteralImpl("George", "en"));
    /*
         * See WikibaseInlineUrIFactoryUnitTest for tests about the entity
         * namespace.
         */
    assertThat(statement.getPredicate().getIV(), instanceOf(VocabURIByteIV.class));
}
Also used : LiteralImpl(org.openrdf.model.impl.LiteralImpl) BigdataStatement(com.bigdata.rdf.model.BigdataStatement) VocabURIByteIV(com.bigdata.rdf.internal.impl.uri.VocabURIByteIV) Test(org.junit.Test)

Aggregations

BigdataStatement (com.bigdata.rdf.model.BigdataStatement)25 Test (org.junit.Test)25 VocabURIByteIV (com.bigdata.rdf.internal.impl.uri.VocabURIByteIV)15 LiteralImpl (org.openrdf.model.impl.LiteralImpl)10 TermId (com.bigdata.rdf.internal.impl.TermId)5 LiteralExtensionIV (com.bigdata.rdf.internal.impl.literal.LiteralExtensionIV)3 XSDIntegerIV (com.bigdata.rdf.internal.impl.literal.XSDIntegerIV)3