Examples of SimpleProcessingElementDescriptor


Examples of eu.admire.registry.pe.SimpleProcessingElementDescriptor

    metadataMap.put("@description",
        "this is a description, of how good this registry is, right�?");
    metadataMap.put("@convertor",
    "ConvertThisPls");
   
    descriptor = new SimpleProcessingElementDescriptor(peName, inputs,
        outputs);
   
    descriptor.setMetadata(metadataMap);

    for (ProcessingElementInputDescriptor input : descriptor.getInputs()) {
View Full Code Here

Examples of eu.admire.registry.pe.SimpleProcessingElementDescriptor

    peOutDescr1.setSType(sTypeOut1);
    peOutDescr1.setDType(dtypeOut1);

    outputs.add(peOutDescr1);

    descriptor = new SimpleProcessingElementDescriptor(peName, inputs,
        outputs);
  }
View Full Code Here

Examples of eu.admire.registry.pe.SimpleProcessingElementDescriptor

      if (pe instanceof SimpleProcessingElementDescriptor) {
        //System.out.println("TEST: " +
        //    ((SimpleProcessingElementDescriptor) pe).toDispel());
        FileWriter fw = new FileWriter(tmp);
        fw.write("package eu.admire {" + NL);
        SimpleProcessingElementDescriptor spe =
          (SimpleProcessingElementDescriptor) pe;
        fw.write(spe.toDispel() + NL + "}" + NL);
        fw.close();
       
        drs.add(FileRegistryReader.read(tmp.getAbsolutePath()));
       
      }
View Full Code Here

Examples of eu.admire.registry.pe.SimpleProcessingElementDescriptor

    }
   
    public ProcessingElementType(String name, ProcessingElementType supertype)
    {
        super(name, false);
        SimpleProcessingElementDescriptor desc =
            new SimpleProcessingElementDescriptor(
                    name,
                    TypeUtilities.cloneDescriptor(supertype.getDescriptor()),
                    null);
        desc.addSuperType(supertype.getName());
        mDescriptor = desc;
    }
View Full Code Here

Examples of eu.admire.registry.pe.SimpleProcessingElementDescriptor

  @Override
  public List<ProcessingElementDescriptor> getProcessingElementMetadata(
      String processingElementName) {
    List<ProcessingElementDescriptor> listPE;
    listPE = new ArrayList<ProcessingElementDescriptor>();
    ProcessingElementDescriptor peDescriptor = new SimpleProcessingElementDescriptor(
        processingElementName, null, null, "");
    try {
      String SPARQLquery = "PREFIX dmi: <http://www.admire-project.eu/ontologies/CRISP-DMIOntology.owl#> "
          + "PREFIX platform: <http://www.admire-project.eu/ontologies/PlatformOntology.owl#> "
          + "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> "
          + "PREFIX dcterms: <http://purl.org/dc/elements/1.1/> "
          + "SELECT ?p ?value "
          + "WHERE { ?pe dcterms:title \""
          + processingElementName
          + "\" . ?pe platform:hasStatus \"active\" . ?pe ?p ?value } ";

      RDFActivityApp mApp = new RDFActivityApp(mAddress);
      List<List<String>> results;
      results = new ArrayList<List<String>>();
      results = mApp.query(SPARQLquery);

      Map<String, String> metadataMap;
      metadataMap = new HashMap<String, String>();
      for (List<String> list : results) {
        // System.out.println(list);
        if (list.get(0).contains("hasRepositoryLocation")
            | list.get(0).contains("hasInput")
            | list.get(0).contains("hasOutput")
            | list.get(0).contains("hasStatus")
            | list.get(0).contains("22-rdf-syntax-ns#type")) {

        } else {
          metadataMap.put(list.get(0), list.get(1));
        }

      }
      peDescriptor.setMetadata(metadataMap);
      listPE.add(peDescriptor);
    } catch (Exception e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
View Full Code Here

Examples of eu.admire.registry.pe.SimpleProcessingElementDescriptor

        }

      }
      for (List<String> keys : pesMetadata.keySet()) {
        ProcessingElementDescriptor peDescriptor = null;
        peDescriptor = new SimpleProcessingElementDescriptor(keys
            .get(1), null, null, keys.get(0));
        peDescriptor.setMetadata(metadataMap);
        listPE.add(peDescriptor);
      }
View Full Code Here

Examples of eu.admire.registry.pe.SimpleProcessingElementDescriptor

    }

    Iterator<List<String>> keyIterator = peInputs.keySet().iterator();
    while (keyIterator.hasNext()) {
      List<String> key = (List<String>) keyIterator.next();
      SimpleProcessingElementDescriptor descriptor = new SimpleProcessingElementDescriptor(
          key.get(1), peInputs.get(key), peOutputs.get(key), key
              .get(0));
      descriptor.setMetadata(peMetadata.get(key));
      processingElements.add(descriptor);
    }

    return processingElements;
  }
View Full Code Here

Examples of eu.admire.registry.pe.SimpleProcessingElementDescriptor

    {
        DispelObject object = new DispelObject();
        object.dispel = null;
        object.name = name;
        object.type = DispelObjectType.PROCESSING_ELEMENT_TYPE;
        object.metadata = new SimpleProcessingElementDescriptor(
                name,
                Collections.<ProcessingElementInputDescriptor>emptySet(),
                Collections.<ProcessingElementOutputDescriptor>emptySet());
        register(name, object);
    }
View Full Code Here

Examples of eu.admire.registry.pe.SimpleProcessingElementDescriptor

    }
   
    public ProcessingElementTypeType getPEType()
    {
        ProcessingElementDescriptor descriptor =
            new SimpleProcessingElementDescriptor(mInputs, mOutputs, null);
        return new ProcessingElementTypeType(descriptor);
    }
View Full Code Here

Examples of eu.admire.registry.pe.SimpleProcessingElementDescriptor

        if (!(var.getType() instanceof ProcessingElementTypeType))
        {
            throw new TypeMismatchException("ProcessingElementTypeType", var.getValue());
        }
        ProcessingElementTypeType type = (ProcessingElementTypeType)var.getType();
        SimpleProcessingElementDescriptor descriptor = null;
        if (type.getDescriptor() != null)
        {
            descriptor =
                new SimpleProcessingElementDescriptor(null, type.getDescriptor(), null);
            descriptor.addSuperType(mExecutionState.getNamespaceManager().resolve(text));
        }
        mType = new ProcessingElementTypeType(descriptor);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.