use of com.bigdata.rdf.model.BigdataStatement in project wikidata-query-rdf by wikimedia.
the class WikibaseInlineUriFactoryUnitTest method valueIsInlined.
@Test
public void valueIsInlined() {
BigdataStatement statement = roundTrip("wds:Q23-01EDEEEE-F0DF-4A07-980F-5E76866B74D7", "p:P1711", 100686);
assertThat(statement.getSubject().getIV(), instanceOf(TermId.class));
assertThat(statement.getPredicate().getIV(), uriIv(uris().property(PropertyType.CLAIM) + "P", "1711"));
assertThat(statement.getObject().getIV(), instanceOf(XSDIntegerIV.class));
}
use of com.bigdata.rdf.model.BigdataStatement in project wikidata-query-rdf by wikimedia.
the class WikibaseVocabularyUnitTest method ranksAreBytes.
@Test
public void ranksAreBytes() {
BigdataStatement statement = roundTrip("s:Q23-uuidhere", Ontology.RANK, Ontology.BEST_RANK);
assertThat(statement.getSubject().getIV(), instanceOf(TermId.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 versionIsByte.
@Test
public void versionIsByte() {
BigdataStatement statement = roundTrip("entity:Q23", SchemaDotOrg.VERSION, new LiteralImpl("its a number", "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 entityTruthyAndStatementAreBytes.
@Test
public void entityTruthyAndStatementAreBytes() {
uris().entityURIs().forEach(prefix -> {
BigdataStatement statement = roundTrip(prefix, uris().property(PropertyType.DIRECT) + "P", uris().statement());
assertThat(statement.getSubject().getIV(), instanceOf(VocabURIByteIV.class));
});
BigdataStatement statement = roundTrip(uris().entityIdToURI("Q"), uris().property(PropertyType.DIRECT) + "P", uris().statement());
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 dateModifiedIsByte.
@Test
public void dateModifiedIsByte() {
BigdataStatement statement = roundTrip("entity:Q23", SchemaDotOrg.DATE_MODIFIED, new LiteralImpl("its a date!", "en"));
assertThat(statement.getPredicate().getIV(), instanceOf(VocabURIByteIV.class));
}
Aggregations