Account getAccount(ProvenanceAccount pa) { String name=pa.getName(); Account acc=accountTable.get(name); if (acc==null) { Account a=pFactory.newAccount(name); accountTable.put(name,a); return a; } else { return acc; } }
public void emitDependency(Edge e, PrintStream out) { HashMap<String,String> properties=new HashMap(); List<AccountRef> accounts=e.getAccount(); if (accounts.isEmpty()) { accounts=new LinkedList(); accounts.add(of.newAccountRef(of.newAccount(defaultAccountLabel))); } for (AccountRef acc: accounts) { String accountLabel=((Account)acc.getRef()).getId(); addEdgeAttributes(accountLabel,e,properties); emitEdge( ((Node)e.getEffect().getRef()).getId(), ((Node)e.getCause().getRef()).getId(), properties, out, true); } }
Account getAccount(ProvenanceAccount pa) { String name=pa.getName(); Account acc=accountTable.get(name); if (acc==null) { Account a=pFactory.newAccount(name); accountTable.put(name,a); return a; } else { return acc; } }
public Account newAccount(Account acc) { Account res=newAccount(acc.getId()); addNewAnnotations(res,acc.getAnnotation()); return res; }
public Process newProcess(Process a) { LinkedList<Account> ll=new LinkedList(); for (AccountRef acc: a.getAccount()) { ll.add(newAccount((Account)acc.getRef())); } Process res=newProcess(a.getId(),ll); addNewAnnotations(res,a.getAnnotation()); return res; } public Agent newAgent(Agent a) {
public Artifact newArtifact(Artifact a) { LinkedList<Account> ll=new LinkedList(); for (AccountRef acc: a.getAccount()) { ll.add(newAccount((Account)acc.getRef())); } Artifact res=newArtifact(a.getId(),ll); addNewAnnotations(res,a.getAnnotation()); return res; } public Process newProcess(Process a) {
public Agent newAgent(Agent a) { LinkedList<Account> ll=new LinkedList(); for (AccountRef acc: a.getAccount()) { ll.add(newAccount((Account)acc.getRef())); } Agent res=newAgent(a.getId(),ll); addNewAnnotations(res,a.getAnnotation()); return res; }