Package eu.admire.registry.pe

Examples of eu.admire.registry.pe.ProcessingElementDescriptor


    }

    @Override
    public List<ProcessingElementDescriptor> lookupProcessingElement(String name)
    {
        ProcessingElementDescriptor result = null;
        DispelObject pe = mRegistered.get(name);
        if (LOG.isDebugEnabled())
        {
            LOG.debug("Looking up PE: " + name + " -> " + pe);
        }
View Full Code Here


    public ProcessingElementDescriptor getPEDescriptor(String name, DispelObject object)
      throws RegistrationFailedException
    {
        if(object.getType() == DispelObjectType.PROCESSING_ELEMENT_TYPE)
        {
          ProcessingElementDescriptor descriptor =
                (ProcessingElementDescriptor) object.getMetadata();
            URI uri = null;
            try
            {  
                uri = storeImplementation(object.getDispel());
                descriptor.setLocation(uri);
                return descriptor;
                //mProcessingElementRegistry.registerProcessingElement(
                 //       descriptor, RegistryConstants.PE_TYPE);
            }
            catch (Throwable e)
View Full Code Here

    {
        switch (object.getType())
        {
        case PROCESSING_ELEMENT_TYPE:
        {
            ProcessingElementDescriptor descriptor =
                (ProcessingElementDescriptor) object.getMetadata();
           
            // add the annotations
            Map<String, String> metadata = descriptor.getMetadata();
            if (metadata == null)
            {
                metadata = new HashMap<String, String>();
                descriptor.setMetadata(metadata);
            }
            for (Entry<String, Object> entry : object.getAnnotations().entrySet())
            {
                metadata.put(entry.getKey(), String.valueOf(entry.getValue()));
            }
           
            URI uri = null;
            try
            {  
                uri = storeImplementation(object.getDispel());
                descriptor.setLocation(uri);
                mProcessingElementRegistry.registerProcessingElement(
                        descriptor, RegistryConstants.PE_TYPE);
            }
            catch (Throwable e)
            {
                if (uri != null)
                {
                    removeImplementation(uri);
                }
                throw new RegistrationFailedException(object, e);
            }
        }
        break;
        case FUNCTION:
        {
            SimpleFunctionDescriptor descriptor =
                new SimpleFunctionDescriptor(object.getName());
            Function function = (Function)object.getMetadata();
            for (Entry<Integer, String> index : function.getIndices().entrySet())
            {
                Type type = function.getParameters().get(index.getValue());
                Parameter parameter = getDescriptor(
                        type,
                        function.getArrayDimensions().get(index.getValue()));
                parameter.setIndex(index.getKey());
                descriptor.addParameter(index.getValue(), parameter);
            }
            descriptor.setReturnType(
                    getDescriptor(
                            function.getReturnType(),
                            function.getReturnTypeArray()));
            URI uri = null;
            try
            {
                uri = storeImplementation(object.getDispel());
                descriptor.setLocation(uri);
                mFunctionRegistry.registerFunction(descriptor);
            }
            catch (Throwable e)
            {
                if (uri != null)
View Full Code Here

            String prefix,
            StringBuilder dot,
            Map<String, Map<Integer, Connection>> inputs,
            RequestNode requestNode)
    {
        ProcessingElementDescriptor desc = null;
        if (requestNode instanceof ProcessingElementNode)
        {
            ProcessingElementNode pe = (ProcessingElementNode)requestNode;
            desc = pe.getProcessingElementDescriptor();
        }
View Full Code Here

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

    peOutDescr1.setDType(dtypeOut1);

    outputsPE.add(peOutDescr1);
    outputsPE.add(peOutDescr2);

    ProcessingElementDescriptor descriptor = new SimpleProcessingElementDescriptor(
        "PEName", inputsPE, outputsPE);
   
    Parameter output = new SimpleRDFParameter("Integer");
    Parameter input1 = new SimpleRDFParameter("Integer");
    Parameter input2 = new SimpleRDFParameter("Integer");
View Full Code Here

TOP

Related Classes of eu.admire.registry.pe.ProcessingElementDescriptor

Copyright © 2018 www.massapicom. 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.