Container resourceBag = (Container) resource;
NodeIterator nodeI = resourceBag.iterator();
//OntResource resourceBag = (OntResource) resource;
//NodeIterator nodeI = resourceBag.listPropertyValues(null);
while(nodeI.hasNext()) {
RDFNode node = nodeI.nextNode();
System.out.println(" node to check:" + node);
if(node.isResource()) {
NodeIterator nodess = model.listObjectsOfProperty((Resource)node,null);
while(nodess.hasNext()) {
RDFNode profile = nodess.nextNode();