/** A factory method to create an instance of a delegation {@link ActedOnBehalfOf} * @param id identifier for the delegation association between delegate and responsible * @param delegate identifier for the agent associated with an activity, acting on behalf of the responsible agent * @param responsible identifier for the agent, on behalf of which the delegate agent acted * @return an instance of {@link ActedOnBehalfOf} */ public ActedOnBehalfOf newActedOnBehalfOf(QualifiedName id, QualifiedName delegate, QualifiedName responsible) { ActedOnBehalfOf res=newActedOnBehalfOf(id, delegate, responsible, null,null); return res; }
/** A factory method to create an instance of a delegation {@link ActedOnBehalfOf} * @param id identifier for the delegation association between delegate and responsible * @param delegate identifier for the agent associated with an activity, acting on behalf of the responsible agent * @param responsible identifier for the agent, on behalf of which the delegate agent acted * @return an instance of {@link ActedOnBehalfOf} */ public ActedOnBehalfOf newActedOnBehalfOf(QualifiedName id, QualifiedName delegate, QualifiedName responsible) { ActedOnBehalfOf res=newActedOnBehalfOf(id, delegate, responsible, null,null); return res; }
@Override public Object doAction(ActedOnBehalfOf s) { return newActedOnBehalfOf(s); }
@Override public Object doAction(ActedOnBehalfOf s) { return newActedOnBehalfOf(s); }
public ActedOnBehalfOf newActedOnBehalfOf(ActedOnBehalfOf u) { ActedOnBehalfOf u1 = newActedOnBehalfOf(u.getId(), u.getDelegate(), u.getResponsible(), u.getActivity(), null); u1.getOther().addAll(u.getOther()); return u1; }
public ActedOnBehalfOf newActedOnBehalfOf(ActedOnBehalfOf u) { ActedOnBehalfOf u1 = newActedOnBehalfOf(u.getId(), u.getDelegate(), u.getResponsible(), u.getActivity(), null); u1.getOther().addAll(u.getOther()); return u1; }
private void createDelegation(QualifiedName context, QualifiedName qualifiedName) { List<QualifiedName> activities = getObjects(context, qualifiedName, onto.QualifiedName_PROVO_hadActivity); List<QualifiedName> agents = getObjects(context, qualifiedName, onto.QualifiedName_PROVO_agent); List<QualifiedName> subordinates = getSubjects(context, onto.QualifiedName_PROVO_qualifiedDelegation, qualifiedName); List<Attribute> attributes = collectAttributes(context, qualifiedName, Types.ProvType.DELEGATION); qualifiedName = getQualqualifiedName(qualifiedName); List<List<?>> perms = permute(subordinates, agents, activities); for (List<?> perm : perms) { ActedOnBehalfOf aobo = pFactory.newActedOnBehalfOf(qualifiedName, (QualifiedName) perm.get(0), (QualifiedName) perm.get(1), (QualifiedName) perm.get(2), attributes); store(context, aobo); } }
private void createDelegation(QualifiedName context, QualifiedName qualifiedName) { List<QualifiedName> activities = getObjects(context, qualifiedName, onto.QualifiedName_PROVO_hadActivity); List<QualifiedName> agents = getObjects(context, qualifiedName, onto.QualifiedName_PROVO_agent); List<QualifiedName> subordinates = getSubjects(context, onto.QualifiedName_PROVO_qualifiedDelegation, qualifiedName); List<Attribute> attributes = collectAttributes(context, qualifiedName, Types.ProvType.DELEGATION); qualifiedName = getQualqualifiedName(qualifiedName); List<List<?>> perms = permute(subordinates, agents, activities); for (List<?> perm : perms) { ActedOnBehalfOf aobo = pFactory.newActedOnBehalfOf(qualifiedName, (QualifiedName) perm.get(0), (QualifiedName) perm.get(1), (QualifiedName) perm.get(2), attributes); store(context, aobo); } }
public void testDelegation5() { ActedOnBehalfOf del = pFactory.newActedOnBehalfOf((QualifiedName) null, q("e1"), q("ag1"), null); makeDocAndTest(del, "target/delegation5"); }
public void testDelegation2() { ActedOnBehalfOf del = pFactory.newActedOnBehalfOf(q("del2"), null, q("ag1"), null); makeDocAndTest(del, "target/delegation2"); }
ll.add(pf.newActedOnBehalfOf(null, ns .stringToQualifiedName(root, pf), ns .stringToQualifiedName(node, pf)));
public void testDelegation1() { ActedOnBehalfOf del = pFactory.newActedOnBehalfOf(q("del1"), q("e1"), null, null); makeDocAndTest(del, "target/delegation1"); }
public void testDelegation3() { ActedOnBehalfOf del = pFactory.newActedOnBehalfOf(q("del3"), q("e1"), q("ag1"), null); makeDocAndTest(del, "target/delegation3"); }
public void testDelegation4() { ActedOnBehalfOf del = pFactory.newActedOnBehalfOf(q("del4"), q("e1"), q("ag1"), q("a")); makeDocAndTest(del, "target/delegation4"); }
public void testDelegation6() { ActedOnBehalfOf del = pFactory.newActedOnBehalfOf(q("del6"), q("e1"), q("ag1"), q("a")); addLabels(del); makeDocAndTest(del, "target/delegation6"); }
@Override public void doAction(ActedOnBehalfOf s) { ActedOnBehalfOf res = pf.newActedOnBehalfOf(s.getId(), s.getDelegate(), s.getResponsible(), s.getActivity()); QualifiedName id = res.getId(); boolean updated1 = setExpand(res, id, 0); QualifiedName del = res.getDelegate(); boolean updated2 = setExpand(res, del, 1); QualifiedName resp = res.getResponsible(); boolean updated3 = setExpand(res, resp, 2); QualifiedName act = res.getActivity(); boolean updated4 = setExpand(res, act, 3); boolean updated5 = expandAttributes(s, res); boolean updated = updated1 || updated2 || updated3 || updated4 || updated5; boolean allUpdated = updated1 && updated2 && updated3 && updated4 ; allExpanded=allExpanded && allUpdated; if (!allUpdatedRequired || allUpdated) { ll.add(res); } if (updated) addOrderAttribute(res); }
@Override public void doAction(ActedOnBehalfOf s) { ActedOnBehalfOf res = pf.newActedOnBehalfOf(s.getId(), s.getDelegate(), s.getResponsible(), s.getActivity()); QualifiedName id = res.getId(); boolean updated1 = setExpand(res, id, 0); QualifiedName del = res.getDelegate(); boolean updated2 = setExpand(res, del, 1); QualifiedName resp = res.getResponsible(); boolean updated3 = setExpand(res, resp, 2); QualifiedName act = res.getActivity(); boolean updated4 = setExpand(res, act, 3); boolean updated5 = expandAttributes(s, res); boolean updated = updated1 || updated2 || updated3 || updated4 || updated5; boolean allUpdated = updated1 && updated2 && updated3 && updated4 ; allExpanded=allExpanded && allUpdated; if (!allUpdatedRequired || allUpdated) { ll.add(res); } if (updated) addOrderAttribute(res); }
public void testDelegation7() { ActedOnBehalfOf del = pFactory.newActedOnBehalfOf(q("del7"), q("e1"), q("ag1"), q("a")); addLabels(del); addTypes(del); makeDocAndTest(del, "target/delegation7"); }
public void testDelegation8() { ActedOnBehalfOf del = pFactory.newActedOnBehalfOf(q("del8"), q("e1"), q("ag1"), q("a")); addLabels(del); addTypes(del); addFurtherAttributes(del); makeDocAndTest(del, "target/delegation8"); }
public void testDelegation0() { ActedOnBehalfOf a = pFactory.newActedOnBehalfOf(q("del0"), q("a1"), q("a2"), q("a3")); addOthers(a, pFactory.newQualifiedName(EX_NS, "tag2", EX_PREFIX)); addOthers(a, pFactory.newQualifiedName(EX_NS, "tag3", EX2_PREFIX)); addOthers(a, pFactory.newQualifiedName(EX2_NS, "tag4", "ex4")); addOthers(a, pFactory.newQualifiedName(EX2_NS, "tag5", EX_PREFIX)); addLabels(a); addTypes(a); makeDocAndTest(a,"target/attr_delegation0"); }