use of com.bigdata.rdf.model.BigdataStatement in project wikidata-query-rdf by wikimedia.
the class WikibaseVocabularyUnitTest method entityPAndQAreBytes.
/**
* Make sure the "P" and "Q" suffixed versions of entity are a byte because
* if they aren't then inline uris are more bloated.
*/
@Test
public void entityPAndQAreBytes() {
BigdataStatement statement = roundTrip(uris().entityIdToURI("P"), uris().entityIdToURI("Q"), 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 WikibaseVocabularyUnitTest method truthyPAndQAreBytes.
@Test
public void truthyPAndQAreBytes() {
BigdataStatement statement = roundTrip(uris().entityIdToURI("Q"), uris().property(PropertyType.DIRECT) + "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 WikibaseVocabularyUnitTest method timeIsInlined.
@Test
public void timeIsInlined() {
BigdataStatement statement = roundTrip(Ontology.Time.VALUE, Ontology.Time.PRECISION, Ontology.Time.CALENDAR_MODEL);
assertThat(statement.getSubject().getIV(), instanceOf(VocabURIByteIV.class));
assertThat(statement.getPredicate().getIV(), instanceOf(VocabURIByteIV.class));
assertThat(statement.getObject().getIV(), instanceOf(VocabURIByteIV.class));
}
use of com.bigdata.rdf.model.BigdataStatement in project wikidata-query-rdf by wikimedia.
the class WikibaseVocabularyUnitTest method altLabelIsByte.
@Test
public void altLabelIsByte() {
BigdataStatement statement = roundTrip("entity:Q23", SKOS.ALT_LABEL, new LiteralImpl("G", "en"));
assertThat(statement.getPredicate().getIV(), instanceOf(VocabURIByteIV.class));
}
use of com.bigdata.rdf.model.BigdataStatement in project wikidata-query-rdf by wikimedia.
the class WikibaseVocabularyUnitTest method qualifierPAndQAreBytes.
@Test
public void qualifierPAndQAreBytes() {
BigdataStatement statement = roundTrip(uris().entityIdToURI("P"), uris().property(PropertyType.QUALIFIER) + "P", new LiteralImpl("cat"));
assertThat(statement.getSubject().getIV(), instanceOf(VocabURIByteIV.class));
assertThat(statement.getPredicate().getIV(), instanceOf(VocabURIByteIV.class));
}
Aggregations