org.openprovenance.prov.nf.xml.WasDerivedFrom Maven / Gradle / Ivy
The newest version!
package org.openprovenance.prov.nf.xml;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import org.openprovenance.prov.model.StatementOrBundle.Kind;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
@JacksonXmlRootElement(localName="wasDerivedFrom")
public class WasDerivedFrom implements Statement {
public List id=new LinkedList();
public List generatedEntity=new LinkedList();
public List usedEntity=new LinkedList();
public List activity=new LinkedList();
public List generation=new LinkedList();
public List usage=new LinkedList();
public List attr=new LinkedList();
@Override
public Kind getKind() {
return Kind.PROV_DERIVATION;
}
@Override
public void normalize() {
Collections.sort(id);
Collections.sort(generatedEntity);
Collections.sort(usedEntity);
Collections.sort(activity);
Collections.sort(generation);
Collections.sort(usage);
Collections.sort(attr);
}
/*
@Override
public String toString() {
return "WasDerivedFrom [id=" + id + ", generatedEntity=" + generatedEntity + ", usedEntity=" + usedEntity
+ ", activity=" + activity + ", generation=" + generation + ", usage=" + usage + ", attr=" + attr + "]";
}
*/
@Override
public List getAttr() {
return attr;
}
@Override
public LinkedList> paramsAsListsofStrings() {
LinkedList> l1=new LinkedList>();
l1.add(id);
l1.add(generatedEntity);
l1.add(usedEntity);
l1.add(activity);
l1.add(generation);
l1.add(usage);
return l1;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy