Subsequent operations on those resource may modify this model.
6162636465666768697071
public void testListSubjectsNoRemove() { final Model m = ModelHelper.modelWithStatements(this, "a P b; b Q c; c R a"); final ResIterator it = m.listSubjects(); it.next(); try { it.remove(); Assert.fail("listSubjects should not support .remove()");
8182838485868788899091
final Model m = ModelHelper.modelWithStatements(this, "p1 before terminal; p2 before terminal"); m.createResource("eh:/p1").removeProperties(); ModelHelper.assertIsoModels( ModelHelper.modelWithStatements(this, "p2 before terminal"), m); Assert.assertEquals(ModelHelper.resourceSet("p2"), m.listSubjects() .toSet()); } public void testListSubjectsWorksAfterRemovePropertiesWIthLots() {
96979899100101102103104
ModelHelper.modelAdd(m, "p1 hasValue " + i); } m.createResource("eh:/p1").removeProperties(); ModelHelper.assertIsoModels( ModelHelper.modelWithStatements(this, "p2 before terminal"), m); Assert.assertEquals(ModelHelper.resourceSet("p2"), m.listSubjects() .toSet()); } }
3637383940414243444546
if (resourceList == null) { response.sendError(404, "Sorry, class map '" + classMapName + "' not found."); return; } Map<String,String> resources = new TreeMap<String,String>(); ResIterator subjects = resourceList.listSubjects(); while (subjects.hasNext()) { Resource resource = subjects.nextResource(); if (!resource.isURIResource()) { continue; }