@Override public Object doAction(WasAttributedTo s) { return newWasAttributedTo(s); }
@Override public Object doAction(WasAttributedTo s) { return newWasAttributedTo(s); }
private void createAttribution(QualifiedName context, QualifiedName qualifiedName) { List<QualifiedName> agents = getObjects(context, qualifiedName, onto.QualifiedName_PROVO_agent); List<QualifiedName> entities = getSubjects(context, onto.QualifiedName_PROVO_qualifiedAttribution, qualifiedName); List<Attribute> attributes = collectAttributes(context, qualifiedName, Types.ProvType.ATTRIBUTION); qualifiedName = getQualqualifiedName(qualifiedName); List<List<?>> perms = permute(entities, agents); for (List<?> perm : perms) { WasAttributedTo wat = pFactory.newWasAttributedTo(qualifiedName, (QualifiedName) perm.get(0), (QualifiedName) perm.get(1), attributes); store(context, wat); } }
private void createAttribution(QualifiedName context, QualifiedName qualifiedName) { List<QualifiedName> agents = getObjects(context, qualifiedName, onto.QualifiedName_PROVO_agent); List<QualifiedName> entities = getSubjects(context, onto.QualifiedName_PROVO_qualifiedAttribution, qualifiedName); List<Attribute> attributes = collectAttributes(context, qualifiedName, Types.ProvType.ATTRIBUTION); qualifiedName = getQualqualifiedName(qualifiedName); List<List<?>> perms = permute(entities, agents); for (List<?> perm : perms) { WasAttributedTo wat = pFactory.newWasAttributedTo(qualifiedName, (QualifiedName) perm.get(0), (QualifiedName) perm.get(1), attributes); store(context, wat); } }
public WasAttributedTo newWasAttributedTo(WasAttributedTo u) { WasAttributedTo u1 = newWasAttributedTo(u.getId(), u.getEntity(), u.getAgent()); u1.getOther().addAll(u.getOther()); u1.getType().addAll(u.getType()); u1.getLabel().addAll(u.getLabel()); return u1; }
public WasAttributedTo newWasAttributedTo(WasAttributedTo u) { WasAttributedTo u1 = newWasAttributedTo(u.getId(), u.getEntity(), u.getAgent()); u1.getOther().addAll(u.getOther()); u1.getType().addAll(u.getType()); u1.getLabel().addAll(u.getLabel()); return u1; }
.stringToQualifiedName(node, pf))); } else if (node.startsWith("g")) { ll.add(pf.newWasAttributedTo(null, ns .stringToQualifiedName(root, pf), ns .stringToQualifiedName(node, pf))); .stringToQualifiedName(node1, pf))); } else if (node1.startsWith("g")) { ll.add(pf.newWasAttributedTo(null, ns .stringToQualifiedName(root, pf), ns .stringToQualifiedName(node1, pf)));
public void testAttribution5() { WasAttributedTo attr = pFactory.newWasAttributedTo((QualifiedName) null, q("e1"), q("ag1")); makeDocAndTest(attr, "target/attribution5"); }
public void testAttribution2() { WasAttributedTo attr = pFactory.newWasAttributedTo(q("attr2"), null, q("ag1")); makeDocAndTest(attr, "target/attribution2"); }
public void testAttribution1() { WasAttributedTo attr = pFactory.newWasAttributedTo(q("attr1"), q("e1"), null); makeDocAndTest(attr, "target/attribution1"); }
public void testAttribution4() { WasAttributedTo attr = pFactory.newWasAttributedTo(q("attr4"), q("e1"), q("ag1")); makeDocAndTest(attr, "target/attribution4"); }
public void testAttribution3() { WasAttributedTo attr = pFactory.newWasAttributedTo(q("attr3"), q("e1"), q("ag1")); makeDocAndTest(attr, "target/attribution3"); }
@Override public void doAction(WasAttributedTo s) { WasAttributedTo res = pf.newWasAttributedTo(s.getId(), s.getEntity(), s.getAgent()); QualifiedName id = res.getId(); boolean updated1 = setExpand(res, id, 0); QualifiedName en = res.getEntity(); boolean updated2 = setExpand(res, en, 1); QualifiedName ag = res.getAgent(); boolean updated3 = setExpand(res, ag, 2); boolean updated4 = expandAttributes(s, res); boolean updated = updated1 || updated2 || updated3 || updated4; boolean allUpdated = updated1 && updated2 && updated3 ; allExpanded=allExpanded && allUpdated; if (!allUpdatedRequired || allUpdated) { ll.add(res); } if (updated) addOrderAttribute(res); }
@Override public void doAction(WasAttributedTo s) { WasAttributedTo res = pf.newWasAttributedTo(s.getId(), s.getEntity(), s.getAgent()); QualifiedName id = res.getId(); boolean updated1 = setExpand(res, id, 0); QualifiedName en = res.getEntity(); boolean updated2 = setExpand(res, en, 1); QualifiedName ag = res.getAgent(); boolean updated3 = setExpand(res, ag, 2); boolean updated4 = expandAttributes(s, res); boolean updated = updated1 || updated2 || updated3 || updated4; boolean allUpdated = updated1 && updated2 && updated3 ; allExpanded=allExpanded && allUpdated; if (!allUpdatedRequired || allUpdated) { ll.add(res); } if (updated) addOrderAttribute(res); }
public void testAttribution6() { WasAttributedTo attr = pFactory.newWasAttributedTo(q("attr6"), q("e1"), q("ag1")); addLabels(attr); makeDocAndTest(attr, "target/attribution6"); }
public void testAttribution7() { WasAttributedTo attr = pFactory.newWasAttributedTo(q("attr7"), q("e1"), q("ag1")); addLabels(attr); addTypes(attr); makeDocAndTest(attr, "target/attribution7"); }
public void testAttribution8() { WasAttributedTo attr = pFactory.newWasAttributedTo(q("attr8"), q("e1"), q("ag1")); addLabels(attr); addTypes(attr); addFurtherAttributes(attr); makeDocAndTest(attr, "target/attribution8"); }
public void testAttribution0() { WasAttributedTo a = pFactory.newWasAttributedTo(q("assoc0"), q("e1"), q("ag1")); 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_attribution0"); }
WasAttributedTo wit = pFactory.newWasAttributedTo(null, qualifiedName, valueQ,
WasAttributedTo wit = pFactory.newWasAttributedTo(null, qualifiedName, valueQ,