protected static void addIdentities(AssociationIF assoc, Relation relation, Entity entity, String[] tuple, Context ctx) { if (assoc == null) throw new NullPointerException("Cannot add identities to null association."); List ifields = entity.getIdentityFields(); for (int i=0; i < ifields.size(); i++) { Field field = (Field) ifields.get(i); if (field.getFieldType() == Field.TYPE_ITEM_IDENTIFIER) { LocatorIF loc = Utils.getLocator(relation, entity, field, tuple, ctx); if (loc == null) continue; // note: at this point we should know that there are no other objects with the same identity assoc.addItemIdentifier(loc); } } }
protected static void addIdentities(AssociationIF assoc, Relation relation, Entity entity, String[] tuple, Context ctx) { if (assoc == null) throw new NullPointerException("Cannot add identities to null association."); for (Field field : entity.getIdentityFields()) { if (field.getFieldType() == Field.TYPE_ITEM_IDENTIFIER) { LocatorIF loc = Utils.getLocator(relation, entity, field, tuple, ctx); if (loc == null) continue; // note: at this point we should know that there are no other objects with the same identity assoc.addItemIdentifier(loc); } } }
@Override public void run() { AssociationIF a = getAssociation(); a.addItemIdentifier(URILocator.create("x:source-locator")); this.objectId = a.getObjectId(); } });
assoc.addItemIdentifier(srcloc); reifier.addSubjectIdentifier(srcloc);
assoc.addItemIdentifier(srcloc);
as.addItemIdentifier(as_item_identifier);
as.addItemIdentifier(URILocator.create("x:source-locator")); afterTest();