public void hashCode(HashCodeBuilder hashCodeBuilder) { hashCodeBuilder.append(this.getAccount()); hashCodeBuilder.append(this.getAnnotation()); hashCodeBuilder.append(this.getId()); }
public void toString(ToStringBuilder toStringBuilder) { { List<AccountRef> theAccount; theAccount = this.getAccount(); toStringBuilder.append("account", theAccount); } { List<JAXBElement<? extends EmbeddedAnnotation>> theAnnotation; theAnnotation = this.getAnnotation(); toStringBuilder.append("annotation", theAnnotation); } { String theId; theId = this.getId(); toStringBuilder.append("id", theId); } }
public void equals(Object object, EqualsBuilder equalsBuilder) { if (!(object instanceof Process)) { equalsBuilder.appendSuper(false); return ; } if (this == object) { return ; } final Process that = ((Process) object); equalsBuilder.append(this.getAccount(), that.getAccount()); equalsBuilder.append(this.getAnnotation(), that.getAnnotation()); equalsBuilder.append(this.getId(), that.getId()); }
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 void embedExternalAnnotations(OPMGraph graph) { IndexedOPMGraph igraph=new IndexedOPMGraph(oFactory,graph); // embed external annotations if (graph.getAnnotations()!=null) { List<Annotation> anns=graph.getAnnotations().getAnnotation(); for (Annotation ann: anns) { String id=(((Identifiable)ann.getLocalSubject()).getId()); EmbeddedAnnotation embedded=oFactory.newEmbeddedAnnotation(ann.getId(), ann.getProperty(), ann.getAccount(), null); Process p=igraph.getProcess(id); if (p!=null) { p.getAnnotation().add(oFactory.compactAnnotation(embedded)); } else { Artifact a=igraph.getArtifact(id); if (a!=null) { a.getAnnotation().add(oFactory.compactAnnotation(embedded)); } else { Agent ag=igraph.getAgent(id); if (ag!=null) { ag.getAnnotation().add(oFactory.compactAnnotation(embedded)); } } } } graph.setAnnotations(null); } }
idTable.put(p.getId(),subject); if (!(p.getAnnotation().isEmpty())) { mc.addTriples(triplifyAnnotations(subject,p.getAnnotation()));
public void noAnnotation(OPMGraph graph) { graph.setAnnotations(null); destroy(graph.getAnnotation()); if (graph.getProcesses()!=null && graph.getProcesses().getProcess()!=null) { for (Process p: graph.getProcesses().getProcess()) { destroy(p.getAnnotation()); } } if (graph.getArtifacts()!=null && graph.getArtifacts().getArtifact()!=null) { for (Artifact a: graph.getArtifacts().getArtifact()) { destroy(a.getAnnotation()); } } if (graph.getAgents()!=null && graph.getAgents().getAgent()!=null) { for (Agent a: graph.getAgents().getAgent()) { destroy(a.getAnnotation()); } } for (Object e: graph.getDependencies().getUsedOrWasGeneratedByOrWasTriggeredBy()) { destroy(((Edge)e).getAnnotation()); } }
public void sortGraph(OPMGraph graph) { graph.setAnnotations(oFactory.getObjectFactory().createAnnotations()); sortById((List)graph.getAccounts().getAccount()); if (graph.getProcesses()!=null && graph.getProcesses().getProcess()!=null) { sortById((List)graph.getProcesses().getProcess()); for (Process p: graph.getProcesses().getProcess()) { sortAnnotations(p.getAnnotation()); sortByRef(p.getAccount()); } } if (graph.getArtifacts()!=null && graph.getArtifacts().getArtifact()!=null) { sortById((List)graph.getArtifacts().getArtifact()); for (Artifact a: graph.getArtifacts().getArtifact()) { sortAnnotations(a.getAnnotation()); sortByRef(a.getAccount()); } } if (graph.getAgents()!=null && graph.getAgents().getAgent()!=null) { sortById((List)graph.getAgents().getAgent()); for (Agent a: graph.getAgents().getAgent()) { sortAnnotations(a.getAnnotation()); sortByRef(a.getAccount()); } } for (Object e: graph.getDependencies().getUsedOrWasGeneratedByOrWasTriggeredBy()) { sortAnnotations(((Edge)e).getAnnotation()); sortByRef(((Edge)e).getAccount()); } sortEdges(graph.getDependencies().getUsedOrWasGeneratedByOrWasTriggeredBy()); }