public void addAccounts(HasAccounts element, Collection<Account> accounts, Object ignoreForErasure) { if ((accounts !=null) && (accounts.size()!=0)) { LinkedList ll=new LinkedList(); for (Account acc: accounts) { ll.add(newAccountRef(acc)); } addAccounts(element,ll); } } public void addAccounts(HasAccounts element, Collection<AccountRef> accounts) {
public void addAccounts(HasAccounts element, Collection<AccountRef> accounts) { super.addAccounts(element,accounts); if (element instanceof HasAccounts) { //Annotable HasFacade facade=(HasFacade) element; Object o=facade.findMyFacade(); AnnotationOrEdgeOrNode el=(AnnotationOrEdgeOrNode) o; Set set=new HashSet(); for (AccountRef accr: accounts) { set.add(((HasFacade)accr.getRef()).findMyFacade()); } el.getAccounts().addAll(set); //el.setAccounts(set); } }
public EmbeddedAnnotation newEmbeddedAnnotation(String id, List<Property> properties, Collection<AccountRef> accs, Object dummyParameterForAvoidingSameErasure) { EmbeddedAnnotation res=of.createEmbeddedAnnotation(); res.setId(id); if (properties!=null) { addProperty(res,properties); } addAccounts(res,accs); return res; }
public WasDerivedFromStar newWasDerivedFromStar(ArtifactRef aid1, ArtifactRef aid2, Collection<AccountRef> accounts) { WasDerivedFromStar res=of.createWasDerivedFromStar(); res.setCause(aid2); res.setEffect(aid1); addAccounts(res,accounts); return res; }
public UsedStar newUsedStar(ProcessRef pid, ArtifactRef aid, Collection<AccountRef> accounts) { UsedStar res=of.createUsedStar(); res.setEffect(pid); res.setCause(aid); addAccounts(res,accounts); return res; }
public WasGeneratedByStar newWasGeneratedByStar(ArtifactRef aid, ProcessRef pid, Collection<AccountRef> accounts) { WasGeneratedByStar res=of.createWasGeneratedByStar(); res.setCause(pid); res.setEffect(aid); addAccounts(res,accounts); return res; } public WasGeneratedBy newWasGeneratedBy(Artifact a,
public WasTriggeredByStar newWasTriggeredByStar(ProcessRef pid1, ProcessRef pid2, Collection<AccountRef> accounts) { WasTriggeredByStar res=of.createWasTriggeredByStar(); res.setEffect(pid1); res.setCause(pid2); addAccounts(res,accounts); return res; }
public Process newProcess(String pr, Collection<Account> accounts, String label) { Process res=of.createProcess(); res.setId(pr); addAccounts(res,accounts,null); if (label!=null) addAnnotation(res,newLabel(label)); return res; }
public Agent newAgent(String ag, Collection<Account> accounts, String label) { Agent res=of.createAgent(); res.setId(ag); addAccounts(res,accounts,null); if (label!=null) addAnnotation(res,newLabel(label)); return res; }
public Artifact newArtifact(String id, Collection<Account> accounts, String label) { Artifact res=of.createArtifact(); res.setId(id); addAccounts(res,accounts,null); if (label!=null) addAnnotation(res,newLabel(label)); return res; }
public EmbeddedAnnotation newEmbeddedAnnotation(String id, String property, Object value, Collection<AccountRef> accs, Object dummyParameterForAvoidingSameErasure) { EmbeddedAnnotation res=of.createEmbeddedAnnotation(); res.setId(id); addProperty(res,newProperty(property,value)); addAccounts(res,accs); return res; } public EmbeddedAnnotation newEmbeddedAnnotation(String id,
public Annotation newAnnotation(String id, Object o, List<Property> properties, Collection<AccountRef> accs) { Annotation res=of.createAnnotation(); res.setId(id); res.setLocalSubject(o); for (Property property: properties) { addProperty(res,property); } addAccounts(res,accs); return res; }
public WasDerivedFrom newWasDerivedFrom(String id, ArtifactRef aid1, ArtifactRef aid2, Collection<AccountRef> accounts) { WasDerivedFrom res=of.createWasDerivedFrom(); res.setId(autoGenerateId(wasDerivedFromIdPrefix,id)); res.setCause(aid2); res.setEffect(aid1); addAccounts(res,accounts); return res; }
public WasTriggeredBy newWasTriggeredBy(String id, ProcessRef pid1, ProcessRef pid2, Collection<AccountRef> accounts) { WasTriggeredBy res=of.createWasTriggeredBy(); res.setId(autoGenerateId(wasTriggeredByIdPrefix,id)); res.setEffect(pid1); res.setCause(pid2); addAccounts(res,accounts); return res; }
public Annotation newAnnotation(String id, Ref ref, String property, Object value, Collection<AccountRef> accs) { Annotation res=of.createAnnotation(); res.setId(id); res.setLocalSubject(ref.getRef()); addProperty(res,newProperty(property,value)); addAccounts(res,accs); return res; }
public Used newUsed(String id, ProcessRef pid, Role role, ArtifactRef aid, Collection<AccountRef> accounts) { Used res=of.createUsed(); res.setId(autoGenerateId(usedIdPrefix,id)); res.setEffect(pid); res.setRole(role); res.setCause(aid); addAccounts(res,accounts); return res; }
public WasGeneratedBy newWasGeneratedBy(String id, ArtifactRef aid, Role role, ProcessRef pid, Collection<AccountRef> accounts) { WasGeneratedBy res=of.createWasGeneratedBy(); res.setId(autoGenerateId(wasGenerateByIdPrefix,id)); res.setCause(pid); res.setRole(role); res.setEffect(aid); addAccounts(res,accounts); return res; }
public WasControlledBy newWasControlledBy(String id, ProcessRef pid, Role role, AgentRef agid, Collection<AccountRef> accounts) { WasControlledBy res=of.createWasControlledBy(); res.setId(autoGenerateId(wasControlledByIdPrefix,id)); res.setEffect(pid); res.setRole(role); res.setCause(agid); addAccounts(res,accounts); return res; }