use of com.bigdata.rdf.model.BigdataStatement in project wikidata-query-rdf by wikimedia.
the class WikibaseVocabularyUnitTest method valuePAndQAreBytes.
@Test
public void valuePAndQAreBytes() {
BigdataStatement statement = roundTrip(uris().entityIdToURI("P"), uris().property(PropertyType.STATEMENT_VALUE) + "P", new LiteralImpl("cat"));
assertThat(statement.getSubject().getIV(), instanceOf(VocabURIByteIV.class));
assertThat(statement.getPredicate().getIV(), instanceOf(VocabURIByteIV.class));
}
use of com.bigdata.rdf.model.BigdataStatement in project wikidata-query-rdf by wikimedia.
the class WikibaseGeoUnitTest method geoExtension.
@Test
public void geoExtension() {
BigdataStatement statement = roundTrip(Ontology.Geo.GLOBE, Ontology.Geo.LATITUDE, pointLiteral("Point(1.2 3.4)"));
assertThat(statement.getObject().getIV(), instanceOf(LiteralExtensionIV.class));
assertEquals(statement.getObject().toString(), "\"Point(1.2 3.4)\"^^<" + GeoSparql.WKT_LITERAL + ">");
}
use of com.bigdata.rdf.model.BigdataStatement in project wikidata-query-rdf by wikimedia.
the class WikibaseGeoUnitTest method geoExtensionGlobe.
@Test
public void geoExtensionGlobe() {
String point = "<" + uris().entityIdToURI("Q1234") + "> Point(5.6 7.8)";
BigdataStatement statement = roundTrip(Ontology.Geo.GLOBE, Ontology.Geo.LATITUDE, pointLiteral(point));
assertThat(statement.getObject().getIV(), instanceOf(LiteralExtensionIV.class));
assertEquals(statement.getObject().toString(), "\"" + point + "\"^^<" + GeoSparql.WKT_LITERAL + ">");
}
use of com.bigdata.rdf.model.BigdataStatement in project wikidata-query-rdf by wikimedia.
the class WikibaseInlineUriFactoryUnitTest method someValueIsInlined.
@Test
public void someValueIsInlined() {
BigdataStatement statement = roundTrip(uris().wellKnownBNodeIRIPrefix() + "a10564107110b2d5739b8fe235cddf73", "uri:test", uris().wellKnownBNodeIRIPrefix() + "a10564107110b2d5739b8fe235cddf74");
assertThat(statement.getSubject().getIV(), uriIv(uris().wellKnownBNodeIRIPrefix(), "a10564107110b2d5739b8fe235cddf73"));
assertThat(statement.getObject().getIV(), uriIv(uris().wellKnownBNodeIRIPrefix(), "a10564107110b2d5739b8fe235cddf74"));
}
use of com.bigdata.rdf.model.BigdataStatement in project wikidata-query-rdf by wikimedia.
the class WikibaseInlineUriFactoryUnitTest method qualifiersAreInlined.
@Test
public void qualifiersAreInlined() {
BigdataStatement statement = roundTrip("wds:Q23-01EDEEEE-F0DF-4A07-980F-5E76866B74D7", "pq:P1711", 100686);
assertThat(statement.getSubject().getIV(), instanceOf(TermId.class));
assertThat(statement.getPredicate().getIV(), uriIv(uris().property(PropertyType.QUALIFIER) + "P", "1711"));
assertThat(statement.getObject().getIV(), instanceOf(XSDIntegerIV.class));
}
Aggregations