Object obj;
if (value instanceof Collection) {
Collection collection = (Collection) value;
if (collection.isEmpty()) return;
Bag bag = model.createBag(uri + "_" + property.getLocalName() + "_bag");
for (Iterator i = collection.iterator(); i.hasNext();)
bag.add(i.next());
resource.addProperty(property, bag);
obj = bag;
} else {
resource.addProperty(property, value.toString());
obj = value;
}
Resource reification = model.createResource(uri + "_" + property.getLocalName() + "_reification");
reification.addProperty(rdfSubject, resource);
reification.addProperty(rdfPredicate, property);
reification.addProperty(rdfObject, obj.toString());
reification.addProperty(rdfType, rdfStatement);
addPotentiallyNullReifiedStatement(reification, edmID, profAttr.getVersion());
addPotentiallyNullReifiedStatement(reification, edmVersion, profAttr.getVersion());
addPotentiallyNullReifiedStatement(reification, edmType, profAttr.getType());
addPotentiallyNullReifiedStatement(reification, edmStatus, profAttr.getStatusID());
addPotentiallyNullReifiedStatement(reification, edmSecurity, profAttr.getSecurityType());
addPotentiallyNullReifiedStatement(reification, edmParent, profAttr.getParent());
addPotentiallyNullReifiedStatement(reification, edmRegAuth, profAttr.getRegAuthority());
List children = profAttr.getChildren();
if (!children.isEmpty()) {
Bag bag = model.createBag(uri + "_" + property.getLocalName() + "_childrenBag");
for (Iterator i = children.iterator(); i.hasNext();)
bag.add(i.next());
reification.addProperty(edmChild, bag);
}
List revNotes = profAttr.getRevisionNotes();
if (!revNotes.isEmpty()) {