use of org.apache.jena.rdf.model.Seq in project jena by apache.
the class TestContainers method testCanAsContainer.
public void testCanAsContainer() {
final String seqUri = "http://example.com/#seq";
model.createSeq(seqUri);
final Resource res = model.createResource(seqUri);
Assert.assertTrue(res.canAs(Seq.class));
Assert.assertTrue(res.canAs(Container.class));
}
use of org.apache.jena.rdf.model.Seq in project jena by apache.
the class TestContainerConstructors method testCreateNamedSeq.
public void testCreateNamedSeq() {
final String uri = "http://aldabaran/andromeda";
final Seq tv = model.createSeq(uri);
Assert.assertEquals(uri, tv.getURI());
Assert.assertTrue(model.contains(tv, RDF.type, RDF.Seq));
}
use of org.apache.jena.rdf.model.Seq in project jena by apache.
the class TestContainerConstructors method testCreateAnonSeq.
public void testCreateAnonSeq() {
final Seq tv = model.createSeq();
Assert.assertTrue(tv.isAnon());
Assert.assertTrue(model.contains(tv, RDF.type, RDF.Seq));
}
use of org.apache.jena.rdf.model.Seq in project jena by apache.
the class TestPathPF method beforeClass.
@BeforeClass
public static void beforeClass() {
Model m = ModelFactory.createModelForGraph(graph1);
Bag bag0 = m.createBag(base + "node0");
Bag bag1 = m.createBag(base + "node1");
Seq seq2 = m.createSeq(base + "node2");
bag1.add("elt1");
seq2.add("elt1");
seq2.add("elt2");
}