Examples of InputType


Examples of au.csiro.ontology.input.Input.InputType

     * @return
     * @throws ImportException
     */
    protected IModuleDependencyRefset loadModuleDependencies(RF2Input input) throws ImportException {
        Set<InputStream> iss = new HashSet<InputStream>();
        InputType inputType = input.getInputType();
        for(String md : input.getModuleDependenciesRefsetFiles()) {
            final String message = "Unable to load module " +
                    "dependencias. Please check your input configuration " +
                    "file. (input type = "+inputType+", file="+md+")";
            try {
View Full Code Here

Examples of au.csiro.ontology.input.Input.InputType

        Map<String, RefsetRow> cdMap = new HashMap<String, RefsetRow>();

        RF2Input input = (RF2Input) entry.getInput();

        InputType inputType = input.getInputType();
        Set<String> conceptsFiles = input.getConceptsFiles();
        log.info("Read concepts info");
        for(String conceptsFile : conceptsFiles) {
            final String message = "Unable to load concepts file. " +
                    "Please check your input configuration file. " +
View Full Code Here

Examples of au.csiro.ontology.input.Input.InputType

     * @return
     * @throws ImportException
     */
    protected IModuleDependencyRefset loadModuleDependencies(RF2Input input) throws ImportException {
        Set<InputStream> iss = new HashSet<InputStream>();
        InputType inputType = input.getInputType();
        for(String md : input.getModuleDependenciesRefsetFiles()) {
            final String message = "Unable to load module " +
                    "dependencias. Please check your input configuration " +
                    "file. (input type = "+inputType+", file="+md+")";
            try {
View Full Code Here

Examples of au.csiro.ontology.input.Input.InputType

        Map<String, RefsetRow> cdMap = new HashMap<String, RefsetRow>();

        RF2Input input = (RF2Input) entry.getInput();

        InputType inputType = input.getInputType();
        Set<String> conceptsFiles = input.getConceptsFiles();
        log.info("Reading concepts info: " + conceptsFiles.size());
        for(String conceptsFile : conceptsFiles) {
            final String message = "Unable to load concepts file. " +
                    "Please check your input configuration file. " +
View Full Code Here

Examples of edu.isi.karma.rdf.GenericRDFGenerator.InputType

    createWriters();
    GenericRDFGenerator rdfGenerator = new GenericRDFGenerator(selectionName, killTripleMap, stopTripleMap, POMToKill, rootTripleMap);
    rdfGenerator.addModel(id);

    InputType inputType = null;
    if(this.inputType.equalsIgnoreCase("CSV"))
      inputType = InputType.CSV;
    else if(this.inputType.equalsIgnoreCase("JSON"))
      inputType = InputType.JSON;
    else if(this.inputType.equalsIgnoreCase("XML"))
View Full Code Here

Examples of net.opengis.wps10.InputType

       
        //parse the inputs for the request
        Map<String, Object> inputs = new HashMap();
       
        for ( Iterator i = request.getDataInputs().getInput().iterator(); i.hasNext(); ) {
            InputType input = (InputType) i.next();
           
            //locate the parameter for this request
            Parameter p = pf.getParameterInfo(processName).get( input.getIdentifier().getValue() );
            if ( p == null ) {
                throw new WPSException( "No such parameter: " + input.getIdentifier().getValue() );
            }
           
            //find the ppio
            ProcessParameterIO ppio = ProcessParameterIO.find( p, context );
            if ( ppio == null ) {
                throw new WPSException( "Unable to decode input: " + input.getIdentifier().getValue() );
            }
           
            //read the data
            Object decoded = null;
            if ( input.getReference() != null ) {
                //this is a reference
                InputReferenceType ref = input.getReference();
               
                //grab the location and method
                String href = ref.getHref();
                MethodType meth = ref.getMethod() != null ? ref.getMethod() : MethodType.GET_LITERAL;
               
                //handle get vs post
                if ( meth == MethodType.POST_LITERAL ) {
                    //post, handle the body
                }
                else {
                    //get, parse kvp
                }
            }
            else {
                //actual data, figure out which type
                DataType data = input.getData();
              
                if ( data.getLiteralData() != null ) {
                    LiteralDataType literal = data.getLiteralData();
                    decoded = ((LiteralPPIO)ppio).decode( literal.getValue() );
                }
                else if ( data.getComplexData() != null ) {
                    ComplexDataType complex = data.getComplexData();
                    decoded = complex.getData().get( 0 );
                    try {
                        decoded = ((ComplexPPIO)ppio).decode( decoded );
                    }
                    catch (Exception e) {
                        throw new WPSException( "Unable to decode input: " + input.getIdentifier().getValue() );
                    }
                }
               
            }
           
            //decode the input
            inputs.put( p.key, decoded );
        }
       
        //execute the process
        Map<String,Object> result = null;
        Throwable error = null;
        try {
            Process p = pf.create(processName);
            result = p.execute( inputs, null );   
        }
        catch( Throwable t ) {
            //save the error to report back
            error = t;
        }
       
        //build the response
        Wps10Factory f = Wps10Factory.eINSTANCE;
        ExecuteResponseType response = f.createExecuteResponseType();
        response.setLang("en");
        response.setServiceInstance(ResponseUtils.appendQueryString(ResponseUtils.buildURL(request.getBaseUrl(), "ows", null, URLType.SERVICE), ""));
      
        //process
        final ProcessBriefType process = f.createProcessBriefType();
        response.setProcess( process );
        process.setIdentifier(ct);
        process.setProcessVersion(pf.getVersion(processName));
        process.setTitle( Ows11Util.languageString( pf.getTitle(processName).toString() ) );
        process.setAbstract( Ows11Util.languageString( pf.getDescription(processName).toString() ) );
      
        //status
        response.setStatus( f.createStatusType() );
        response.getStatus().setCreationTime( Converters.convert( started, XMLGregorianCalendar.class ));
       
        if ( error != null ) {
            ProcessFailedType failure = f.createProcessFailedType();
            response.getStatus().setProcessFailed( failure );
           
            failure.setExceptionReport( Ows11Util.exceptionReport( new ServiceException( error ), wps.getGeoServer().getGlobal().isVerboseExceptions()) );
        }
        else {
            response.getStatus().setProcessSucceeded( "Process succeeded.");
        }
     
        //inputs
        response.setDataInputs( f.createDataInputsType1() );
        for ( Iterator i = request.getDataInputs().getInput().iterator(); i.hasNext(); ) {
            InputType input = (InputType) i.next();
            response.getDataInputs().getInput().add( EMFUtils.clone( input, f, true ) );
        }
       
        //output definitions
        OutputDefinitionsType outputs = f.createOutputDefinitionsType();
View Full Code Here

Examples of net.opengis.wps10.InputType

                {
                    // identifier
                    EObject oInput = iterator2.next();
                    if (oInput instanceof DataType) {
                      DataType dt = (DataType) oInput;
                      InputType input = Wps10Factory.eINSTANCE.createInputType();
                      CodeType ct = Ows11Factory.eINSTANCE.createCodeType();
                      ct.setValue((String) key);
                      input.setIdentifier(ct);
                      input.setData((DataType) dt);
                      inputtypes.getInput().add(input);
                    } else if (oInput instanceof InputReferenceType) {
                      InputReferenceType rt = (InputReferenceType) oInput;
                      InputType input = Wps10Factory.eINSTANCE.createInputType();
                      CodeType ct = Ows11Factory.eINSTANCE.createCodeType();
                      ct.setValue((String) key);
                      input.setIdentifier(ct);
                      input.setReference(rt);
                      inputtypes.getInput().add(input);
                    } else {
                        throw new IllegalStateException("The input for key " + key + " contain an unsupported object of type " + oInput.getClass());
                    }
                }
View Full Code Here

Examples of net.opengis.wps10.InputType

        id.setValue("foo");

        DataInputsType1 inputs = f.createDataInputsType1();
        ex.setDataInputs(inputs);

        InputType in = f.createInputType();
        inputs.getInput().add(in);

        DataType data = f.createDataType();
        in.setData(data);

        ComplexDataType cd = f.createComplexDataType();
        data.setComplexData(cd);

        //cd.getData().add(new GeometryFactory().createPoint(new Coordinate(1, 2)));
View Full Code Here

Examples of net.opengis.wps10.InputType

        ExecuteType exec = (ExecuteType)
            p.parse(getClass().getResourceAsStream("wpsExecute_inlineGetFeature_request.xml"));
        assertNotNull(exec);
        assertEquals(1, exec.getDataInputs().getInput().size());

        InputType in = (InputType) exec.getDataInputs().getInput().get(0);
        InputReferenceType ref = in.getReference();
        assertNotNull(ref);

        assertTrue(ref.getBody() instanceof GetFeatureType);
        GetFeatureType gft = (GetFeatureType) ref.getBody();
View Full Code Here

Examples of net.opengis.wps10.InputType

        ExecuteType exec = (ExecuteType)
            p.parse(getClass().getResourceAsStream("wpsExecuteFilterInline.xml"));
        assertNotNull(exec);
        assertEquals(1, exec.getDataInputs().getInput().size());

        InputType in = (InputType) exec.getDataInputs().getInput().get(0);
        ComplexDataType cd = in.getData().getComplexData();
        assertNotNull(cd);
        Filter filter = (Filter) cd.getData().get(0);
        FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();
        Filter expected = ff.or(ff.greaterOrEqual(ff.property("PERSONS"), ff.literal("10000000")), ff.lessOrEqual(ff.property("PERSONS"), ff.literal("20000000")));
        assertEquals(expected, filter);
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.