/** Return all WasAssociatedWith edges with entity a as a cause. */ public Collection<WasAssociatedWith> getWasAssociatedWith(Agent a) { return agentWasAssociatedWithMap.get(a.getId()); }
/** * Creates a copy of an agent. The copy is shallow in the sense that the new Agent shares the same attributes as the original Agent. * @param a an {@link Agent} to copy * @return a copy of the input {@link Agent} */ public Agent newAgent(Agent a) { Agent res = newAgent(a.getId()); res.getType().addAll(a.getType()); res.getLabel().addAll(a.getLabel()); return res; }
@Override public void doAction(Agent ag) { register(ag.getId()); registerLocation(ag.getLocation()); registerType(ag.getType()); registerOther(ag.getOther()); }
public void testAgent7() { Agent a = pFactory.newAgent(q("ag7"), "agent7"); addTypes(a); a.getLabel().add(pFactory.newInternationalizedString("hello")); a.getLabel().add(pFactory.newInternationalizedString("bye", "en")); a.getLabel().add(pFactory.newInternationalizedString("bonjour", "fr")); a.getLocation().add(pFactory.newLocation("London", name.XSD_STRING)); a.getLocation().add(pFactory.newLocation(1, name.XSD_INT)); a.getLocation().add(pFactory.newLocation(1.0, name.XSD_FLOAT)); a.getLocation().add(pFactory.newLocation(true, name.XSD_BOOLEAN)); // a.getLocation().add(pFactory.newLocation(new QName(EX_NS, "london", // EX_PREFIX),vconv)); a.getLocation().add(pFactory.newLocation(pFactory.newTimeNow(), name.XSD_DATETIME)); a.getLocation().add(pFactory.newLocation(EX_NS+"london", name.XSD_ANY_URI)); makeDocAndTest(a, "target/agent7"); }
/** * Creates a new {@link Agent} with provided identifier and label * @param ag a {@link QualifiedName} for the agent * @param label a String for the label property (see {@link HasLabel#getLabel()} * @return an object of type {@link Agent} */ public Agent newAgent(QualifiedName ag, String label) { Agent res = newAgent(ag); if (label != null) res.getLabel().add(newInternationalizedString(label)); return res; }
/** * Creates a new {@link Agent} with provided identifier * @param ag a {@link QualifiedName} for the agent * @return an object of type {@link Agent} */ public Agent newAgent(QualifiedName ag) { Agent res = of.createAgent(); res.setId(ag); return res; }
a.getLocation().add(pFactory.newLocation(EX_NS + "london", name.XSD_ANY_URI)); a.getLocation().add(pFactory.newLocation(EX_NS + "london", name.XSD_ANY_URI));
/** * Creates a new {@link Agent} with provided identifier and label * @param ag a {@link QualifiedName} for the agent * @param label a String for the label property (see {@link HasLabel#getLabel()} * @return an object of type {@link Agent} */ public Agent newAgent(QualifiedName ag, String label) { Agent res = newAgent(ag); if (label != null) res.getLabel().add(newInternationalizedString(label)); return res; }
/** * Creates a new {@link Agent} with provided identifier * @param ag a {@link QualifiedName} for the agent * @return an object of type {@link Agent} */ public Agent newAgent(QualifiedName ag) { Agent res = of.createAgent(); res.setId(ag); return res; }
/** Return all WasAssociatedWith edges with entity a as a cause. */ public Collection<WasAssociatedWith> getWasAssociatedWith(Agent a) { return agentWasAssociatedWithMap.get(a.getId()); }
@Override public void doAction(Agent ag) { register(ag.getId()); registerLocation(ag.getLocation()); registerType(ag.getType()); registerOther(ag.getOther()); }
/** * Creates a copy of an agent. The copy is shallow in the sense that the new Agent shares the same attributes as the original Agent. * @param a an {@link Agent} to copy * @return a copy of the input {@link Agent} */ public Agent newAgent(Agent a) { Agent res = newAgent(a.getId()); res.getType().addAll(a.getType()); res.getLabel().addAll(a.getLabel()); return res; }
public void testAgent5() { Agent a = pFactory.newAgent(q("ag2"), "agent2"); a.getLabel().add(pFactory.newInternationalizedString("hello")); a.getLabel().add(pFactory.newInternationalizedString("bye", "en")); a.getLabel().add(pFactory.newInternationalizedString("bonjour", "fr")); makeDocAndTest(a, "target/agent5"); }
switch (i) { case 0: a.setId((QualifiedName) val); return; default:
public Agent add(Agent agent) { return add(agent.getId(),agent); } public Agent add(QualifiedName name, Agent agent) {