public boolean equalsStructurally(RDFObject object) { if (object instanceof RDFList) { RDFList list = (RDFList) object; if (getValues().size() == list.getValues().size()) { Iterator it = getValues().iterator(); for (Iterator listIt = list.getValues().iterator(); listIt.hasNext(); ) { OWLModel model = getOWLModel(); RDFObject curListObj = model.asRDFObject(listIt.next()); RDFObject curThisObj = model.asRDFObject(it.next()); if (curListObj != null && curThisObj != null) { if (curListObj.equalsStructurally(curThisObj) == false) { return false; } } else { if (curListObj != curThisObj) { return false; } } } return true; } } return false; }
public static void removeListValue(RDFResource resource, RDFProperty property, Object value) { RDFList list = (RDFList) resource.getPropertyValue(property); List values = list.getValues(); int index = values.indexOf(value); removeListValue(resource, property, list, index); }