public void createTestProcessingElement() {
Collection<ProcessingElementInputDescriptor> inputs = new ArrayList<ProcessingElementInputDescriptor>();
Collection<ProcessingElementOutputDescriptor> outputs = new ArrayList<ProcessingElementOutputDescriptor>();
String peName = "eu.admire.example.AmyTestPE3";
ProcessingElementInputDescriptor peInDescr1 = new ProcessingElementInputDescriptor(
"resource", true);
ProcessingElementInputDescriptor peInDescr2 = new ProcessingElementInputDescriptor(
"data");
ProcessingElementInputDescriptor peInDescr3 = new ProcessingElementInputDescriptor(
"resource3");
ProcessingElementInputDescriptor peInDescr4 = new ProcessingElementInputDescriptor(
"resource4");
ProcessingElementInputDescriptor peInDescr5 = new ProcessingElementInputDescriptor(
"resource5");
ProcessingElementInputDescriptor peInDescr6 = new ProcessingElementInputDescriptor(
"resource6");
ProcessingElementInputDescriptor peInDescr7 = new ProcessingElementInputDescriptor(
"resource7");
peInDescr1.setArray(false);
// Inserting input sType Primitive SType (String)
SType sTypeIn1 = new PrimitiveSType("String");
peInDescr1.setSType(sTypeIn1);
// Inserting input sType any
peInDescr2.setSType(new AnySType());
// Inserting input sType Array of Tuples with two Primitive STypes and
// rest
TupleSType tuple1 = new TupleSType();
tuple1.addElement("s", new PrimitiveSType("String"));
tuple1.addElement("d", new PrimitiveSType("Double"));
tuple1.setRest(true);
SType sTypeIn3 = new ArraySType(tuple1, 5);
peInDescr3.setSType(sTypeIn3);
// Inserting input array SType of primitive SType
SType sTypeIn5 = new ArraySType(new PrimitiveSType("Integer"), 7);
peInDescr5.setSType(sTypeIn5);
// Inserting input list SType of primitive SType
SType sTypeIn6 = new ListSType(new PrimitiveSType("Integer"));
peInDescr6.setSType(sTypeIn6);
// Inserting input sType tuple with one Primitive SType and rest
TupleSType tuple2 = new TupleSType();
tuple2.addElement("s3", new PrimitiveSType("Integer"));
tuple2.setRest(true);
peInDescr4.setSType(tuple2);
DType dtype1 = new SimpleDType("ColumnIndex",
"http://www.admire-project.eu/ontologies/DataMiningOntology#",
"dm");
peInDescr1.setDType(dtype1);
DType dtype2 = new SimpleDType("ColumnIndex2",
"http://www.admire-project.eu/ontologies/DataMiningOntology#",
null);
peInDescr2.setDType(dtype2);
DType dtype3 = new SimpleDType("ColumnIndex2",
"http://www.admire-project.eu/ontologies/DataMiningOntology#",
null);
peInDescr3.setDType(dtype3);
TupleSType tuple7 = new TupleSType();
tuple7.setRest(true);
peInDescr7.setSType(tuple7);
inputs.add(peInDescr1);
inputs.add(peInDescr2);
inputs.add(peInDescr3);
inputs.add(peInDescr4);