use of com.inova8.intelligentgraph.model.Thing in project com.inova8.intelligentgraph by peterjohnlawrence.
the class Local_GetFact_Tests method test_19.
/**
* Test 19.
*/
@Test
@Order(19)
void test_19() {
try {
Thing _this = source.getThing(iri("http://inova8.com/calc2graph/id/BatteryLimit1"), null);
Resource result = _this.getFact(":Location@:appearsOn[ rdfs:label 'Calc2Graph2']#");
assertEquals("http://inova8.com/calc2graph/id/Location_BL1_2", result.stringValue());
} catch (Exception e) {
assertEquals("", e.getMessage());
e.printStackTrace();
}
}
use of com.inova8.intelligentgraph.model.Thing in project com.inova8.intelligentgraph by peterjohnlawrence.
the class Local_GetFact_Tests method test_17.
/**
* Test 17.
*/
@Test
@Order(17)
void test_17() {
try {
Thing _this = source.getThing(iri("http://inova8.com/calc2graph/id/Calc2Graph1"), null);
Resource result = _this.getFact("^:Location@:appearsOn[eq id:BatteryLimit2]");
assertEquals("http://inova8.com/calc2graph/id/BatteryLimit2", result.stringValue());
} catch (Exception e) {
assertEquals("", e.getMessage());
e.printStackTrace();
}
}
use of com.inova8.intelligentgraph.model.Thing in project com.inova8.intelligentgraph by peterjohnlawrence.
the class Local_GetFact_Tests method test_36.
/**
* Test 36.
*/
@Test
@Order(36)
void test_36() {
try {
source = IntelligentGraphRepository.create(workingRep);
source.removeGraph("<http://inova8.com/calc2graph/contextGraph>");
Graph graph = source.addGraph("<http://inova8.com/calc2graph/contextGraph>");
Thing myCountry = graph.getThing(":Country1");
myCountry.addFact(":time", "_customQueryOptions.get(\"time\") ;", SCRIPT.GROOVY);
Literal time = literal(42);
Literal time1 = literal(41);
CustomQueryOptions customQueryOptions = new CustomQueryOptions();
customQueryOptions.add("time", time);
Thing myCountry1 = graph.getThing(":Country1");
Resource result = myCountry1.getFact("<http://inova8.com/calc2graph/def/time>[eq %1; gt %2]", customQueryOptions, time, time1);
assertEquals("42", result.stringValue());
result = myCountry1.getFact("<http://inova8.com/calc2graph/def/time>[eq %1; gt %2]", customQueryOptions, time);
assertEquals("42", result.stringValue());
} catch (Exception e) {
assertEquals("", e.getMessage());
}
}
use of com.inova8.intelligentgraph.model.Thing in project com.inova8.intelligentgraph by peterjohnlawrence.
the class Remote_PathQL_GetFactTests method test_2.
/**
* Test 2.
*/
@Test
@Order(2)
void test_2() {
try {
Thing $this = source.getThing(iri("http://inova8.com/calc2graph/id/BatteryLimit1"), null);
Resource result = $this.getFact(":volumeFlow");
assertEquals("59", result.stringValue());
} catch (Exception e) {
fail();
e.printStackTrace();
}
}
use of com.inova8.intelligentgraph.model.Thing in project com.inova8.intelligentgraph by peterjohnlawrence.
the class Remote_PathQL_GetFactTests method test_19.
/**
* Test 19.
*/
@Test
@Order(19)
void test_19() {
try {
Thing $this = source.getThing(iri("http://inova8.com/calc2graph/id/BatteryLimit1"), null);
Resource result = $this.getFact(":Location@:appearsOn[eq [ rdfs:label 'Calc2Graph2']]#");
assertEquals("http://inova8.com/calc2graph/id/Location_BL1_2", result.stringValue());
} catch (Exception e) {
e.printStackTrace();
}
}
Aggregations