/** Return the value of the label property in the first annotation. */ public String getLabel(List<JAXBElement<? extends EmbeddedAnnotation>> annotations) { for (JAXBElement<? extends EmbeddedAnnotation> jann: annotations) { EmbeddedAnnotation ann=jann.getValue(); String label=getLabel(ann); if (label!=null) return label; } return null; }
/** Return the value of the label property. */ public List<String> getLabels(List<JAXBElement<? extends EmbeddedAnnotation>> annotations) { List<String> res=new LinkedList(); for (JAXBElement<? extends EmbeddedAnnotation> jann: annotations) { EmbeddedAnnotation ann=jann.getValue(); String label=getLabel(ann); if (label!=null) res.add(label); } return res; }
/** Generic accessor for annotable entities. */ public String getLabel(Annotable annotable) { return getLabel(annotable.getAnnotation()); }
public String processLabel(Process p) { if (displayProcessValue) { return convertProcessName(""+of.getLabel(p)); } else { return p.getId(); } } public String processColor(Process p) {
public String agentLabel(Agent p) { if (displayAgentValue) { return convertAgentName(""+of.getLabel(p)); } else { return p.getId(); } }
public String artifactLabel(Artifact p) { if (displayArtifactValue) { return convertArtifactName(""+of.getLabel(p)); } else { return p.getId(); } } public String artifactColor(Artifact p) {
Resource res=Resource.uriRef(urify(p.getId())); ProvenanceProcess rdfProcess; rdfProcess = pcf.newProcess((String)oFactory.getLabel(p),res); Resource res=Resource.uriRef(urify(a.getId())); ProvenanceArtifact rdfArtifact; rdfArtifact = pcf.newArtifact((String)oFactory.getLabel(a),res); Resource res=Resource.uriRef(urify(a.getId())); ProvenanceAgent rdfAgent; rdfAgent = pcf.newAgent((String)oFactory.getLabel(a),res);