use of com.inova8.pathql.context.RepositoryContext in project com.inova8.intelligentgraph by peterjohnlawrence.
the class QueryStringParserTests method setUpBeforeClass.
/**
* Sets the up before class.
*
* @throws Exception the exception
*/
@BeforeAll
static void setUpBeforeClass() throws Exception {
repositoryContext = new RepositoryContext();
repositoryContext.prefix("http://default/").prefix("local", "http://local/").prefix("rdfs", "http://rdfs/").prefix("id", "http://id/").prefix("xsd", "http://www.w3.org/2001/XMLSchema#");
}
use of com.inova8.pathql.context.RepositoryContext in project com.inova8.intelligentgraph by peterjohnlawrence.
the class PathPatternSPARQLTests method setUpBeforeClass.
/**
* Sets the up before class.
*
* @throws Exception the exception
*/
@BeforeAll
static void setUpBeforeClass() throws Exception {
repositoryContext = new RepositoryContext();
repositoryContext.getReifications().addReificationType(PathConstants.RDF_STATEMENT_IRI, PathConstants.RDF_SUBJECT_IRI, PathConstants.RDF_PREDICATE_IRI, PathConstants.RDF_OBJECT_IRI, null, null, null);
repositoryContext.getReifications().addReificationType(iri("http://default/Attribute"), PathConstants.RDF_SUBJECT_IRI, PathConstants.RDF_PREDICATE_IRI, PathConstants.RDF_OBJECT_IRI, PathConstants.RDF_ISSUBJECTOF_IRI, PathConstants.RDF_ISPREDICATEOF_IRI, PathConstants.RDF_ISOBJECTOF_IRI);
repositoryContext.getReifications().addReificationType(iri("http://default/Location"), PathConstants.RDF_SUBJECT_IRI, PathConstants.RDF_PREDICATE_IRI, PathConstants.RDF_OBJECT_IRI, null, null, null);
repositoryContext.getReifications().setReificationsAreLazyLoaded(true);
repositoryContext.prefix("http://default/").prefix("local", "http://local/").prefix("rdfs", "http://rdfs/").prefix("id", "http://id/").prefix("xsd", "http://www.w3.org/2001/XMLSchema#");
}
use of com.inova8.pathql.context.RepositoryContext in project com.inova8.intelligentgraph by peterjohnlawrence.
the class PathPatternTests method test_24.
/**
* Test 24.
*/
@Test
@Order(24)
void test_24() {
try {
PathElement element = PathParser.parsePathPattern(repositoryContext, "^:hasProductBatteryLimit/(:massFlow |:volumeFlow |:density)");
assertEquals("^<http://default/hasProductBatteryLimit> / ((<http://default/massFlow> | <http://default/volumeFlow>) | <http://default/density>)", element.toString());
} catch (Exception e) {
assertEquals("", e.getMessage());
}
}
use of com.inova8.pathql.context.RepositoryContext in project com.inova8.intelligentgraph by peterjohnlawrence.
the class PathPatternTests method test_30.
/**
* Test 30.
*/
@Test
@Order(30)
void test_30() {
try {
PathElement element = PathParser.parsePathPattern(repositoryContext, "^:measurementOf[:hasOrdinal %1]/:hasBMI");
// Query.assertEqualsWOSpaces
assertEquals("^<http://default/measurementOf>[<http://default/hasOrdinal> %1 ] / <http://default/hasBMI>", element.toString());
} catch (Exception e) {
assertEquals("", e.getMessage());
}
}
use of com.inova8.pathql.context.RepositoryContext in project com.inova8.intelligentgraph by peterjohnlawrence.
the class PathPatternTests method setUpBeforeClass.
/**
* Sets the up before class.
*
* @throws Exception the exception
*/
@BeforeAll
static void setUpBeforeClass() throws Exception {
repositoryContext = new RepositoryContext();
repositoryContext.prefix("http://default/").prefix("local", "http://local/").prefix("rdfs", "http://rdfs/").prefix("id", "http://id/").prefix("xsd", "http://www.w3.org/2001/XMLSchema#");
}
Aggregations