01: package org.ontoware.rdfreactor.generator;
02:
03: import org.junit.Test;
04: import org.ontoware.aifbcommons.collection.ClosableIterator;
05: import org.ontoware.rdf2go.RDF2Go;
06: import org.ontoware.rdf2go.model.node.Resource;
07:
08: import com.example.AAA;
09:
10: public class TestTemplateTest {
11:
12: @Test
13: public void testIt() {
14: org.ontoware.rdf2go.model.Model m = RDF2Go.getModelFactory()
15: .createModel();
16: m.open();
17: AAA a = new AAA(m, true);
18: a.addLabel("ggg");
19: m.dump();
20: ClosableIterator<Resource> it = AAA.getAllInstances(m);
21: while (it.hasNext()) {
22: Resource elem = it.next();
23: System.out.println("found as it " + elem);
24: }
25: for (AAA b : AAA.getAllInstance_as(m).asArray()) {
26: System.out.println("found as array " + b);
27: System.out.println(b.getAllLabel_as().asArray());
28: }
29: for (AAA b : AAA.getAllInstance_as(m).asList()) {
30: System.out.println("found as list " + b);
31: System.out.println(b.getAllLabel_as().asArray());
32: }
33: }
34:
35: }
|