use of com.bigdata.rdf.model.BigdataStatement in project wikidata-query-rdf by wikimedia.
the class WikibaseDateUnitTest method dateExtension.
@Test
public void dateExtension() {
BigdataStatement statement = roundTrip(Ontology.Time.VALUE, Ontology.Time.VALUE, new LiteralImpl("-0101-01-01T00:00:00", XMLSchema.DATE));
assertThat(statement.getObject().getIV(), instanceOf(LiteralExtensionIV.class));
}
use of com.bigdata.rdf.model.BigdataStatement in project wikidata-query-rdf by wikimedia.
the class WikibaseInlineUriFactoryUnitTest method expandedValuesAreInlined.
@Test
public void expandedValuesAreInlined() {
BigdataStatement statement = roundTrip("wds:Q23-01EDEEEE-F0DF-4A07-980F-5E76866B74D7", "psv:P580", "wdv:a10564107110b2d5739b8fe235cddf73");
assertThat(statement.getSubject().getIV(), instanceOf(TermId.class));
assertThat(statement.getPredicate().getIV(), uriIv(uris().property(PropertyType.STATEMENT_VALUE) + "P", "580"));
assertThat(statement.getObject().getIV(), uriIv(uris().value(), "a10564107110b2d5739b8fe235cddf73"));
}
use of com.bigdata.rdf.model.BigdataStatement in project wikidata-query-rdf by wikimedia.
the class WikibaseInlineUriFactoryUnitTest method qualifierValuesAreInlined.
@Test
public void qualifierValuesAreInlined() {
BigdataStatement statement = roundTrip("wds:Q23-01EDEEEE-F0DF-4A07-980F-5E76866B74D7", "pqv:P1711", 100686);
assertThat(statement.getSubject().getIV(), instanceOf(TermId.class));
assertThat(statement.getPredicate().getIV(), uriIv(uris().property(PropertyType.QUALIFIER_VALUE) + "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 WikibaseInlineUriFactoryUnitTest method viafIsInlined.
@Test
public void viafIsInlined() {
BigdataStatement statement = roundTrip(CommonValues.VIAF + "123313", CommonValues.VIAF_HTTP + "1234555", CommonValues.VIAF_HTTP + "23466/");
assertThat(statement.getSubject().getIV(), uriIv(CommonValues.VIAF_HTTP, "123313"));
assertThat(statement.getPredicate().getIV(), uriIv(CommonValues.VIAF_HTTP, "1234555"));
assertThat(statement.getObject().getIV(), uriIv(CommonValues.VIAF_HTTP, "23466"));
}
use of com.bigdata.rdf.model.BigdataStatement in project wikidata-query-rdf by wikimedia.
the class WikibaseInlineUriFactoryUnitTest method entityAndTruthyAreInlined.
@Test
public void entityAndTruthyAreInlined() {
BigdataStatement statement = roundTrip("wd:Q23", "wdt:P509", "wd:Q356405");
assertThat(statement.getSubject().getIV(), uriIv(uris().entityIdToURI("Q"), "23"));
assertThat(statement.getPredicate().getIV(), uriIv(uris().property(PropertyType.DIRECT) + "P", "509"));
assertThat(statement.getObject().getIV(), uriIv(uris().entityIdToURI("Q"), "356405"));
}
Aggregations