/** * Returns true if the specified parameter is a complex one * * @param param * @param applicationContext */ public static boolean isComplex(Parameter<?> param, ApplicationContext applicationContext) { List<ProcessParameterIO> ppios = findAll(param, applicationContext); if (ppios.isEmpty()) { return false; } else { return ppios.get(0) instanceof ComplexPPIO; } }
private static List<ProcessParameterIO> findByDirection( Parameter<?> p, ApplicationContext context, PPIODirection direction) { List<ProcessParameterIO> ppios = new ArrayList<ProcessParameterIO>(); List<ProcessParameterIO> matches = findAll(p, context); for (ProcessParameterIO ppio : matches) { if (ppio.getDirection() == PPIODirection.BOTH || ppio.getDirection() == direction) { ppios.add(ppio); } } return ppios; }
public static ProcessParameterIO find(Parameter<?> p, ApplicationContext context, String mime) { // enum special treatment if (p.type.isEnum()) { return new EnumPPIO(p.type); } // TODO: come up with some way to flag one as "default" List<ProcessParameterIO> all = findAll(p, context); if (all.isEmpty()) { return null; } if (mime != null) { for (ProcessParameterIO ppio : all) { if (ppio instanceof ComplexPPIO && ((ComplexPPIO) ppio).getMimeType().equals(mime)) { return ppio; } } } // fall back on the first found return all.get(0); }
List<ProcessParameterIO> all = findAll(p, context); if (all.isEmpty()) { return null;
boolean hasComplexOutputs() { ProcessFactory pf = Processors.createProcessFactory(request.getProcessName()); Map<String, Parameter<?>> resultInfo = pf.getResultInfo(request.getProcessName(), inputs); for (Parameter<?> param : resultInfo.values()) { List<ProcessParameterIO> ppios = ProcessParameterIO.findAll(param, applicationContext); for (ProcessParameterIO ppio : ppios) { if(ppio instanceof ComplexPPIO) { return true; } } } return false; }
List<ProcessParameterIO> ppios = ProcessParameterIO.findAll(p, context); if (ppios.isEmpty()) { LOGGER.log(Level.INFO, "Blacklisting process " + name.getURI() List<ProcessParameterIO> ppios = ProcessParameterIO.findAll(p, context); if (ppios.isEmpty()) { LOGGER.log(Level.INFO, "Blacklisting process " + name.getURI()
boolean hasComplexOutputs() { ProcessFactory pf = GeoServerProcessors.createProcessFactory(request.getProcessName(), false); Map<String, Parameter<?>> resultInfo = pf.getResultInfo(request.getProcessName(), inputs); for (Parameter<?> param : resultInfo.values()) { List<ProcessParameterIO> ppios = ProcessParameterIO.findAll(param, applicationContext); for (ProcessParameterIO ppio : ppios) { if (ppio instanceof ComplexPPIO) { return true; } } } return false; }
List<ProcessParameterIO> all = ProcessParameterIO.findAll(p, context); if (all.isEmpty()) { if (LOGGER.isLoggable(Level.FINE)) {
throw new WPSException("Unknown data input named '" + ioParam.id + "'"); ProcessParameterIO ppio = ProcessParameterIO.findAll(gtParam, applicationContext).get(0);
List<InputType> parseDataInputs(Map<String, Parameter<?>> inputParams, String inputString) { List<IOParam> params = parseIOParameters(inputString); List<InputType> result = new ArrayList<InputType>(); for (IOParam ioParam : params) { // common Wps10Factory factory = Wps10Factory.eINSTANCE; InputType it = factory.createInputType(); it.setIdentifier(Ows11Util.code(ioParam.id)); it.setData(factory.createDataType()); Parameter<?> gtParam = inputParams.get(ioParam.id); if (gtParam == null) { throw new WPSException("Unknown data input named '" + ioParam.id + "'"); } ProcessParameterIO ppio = ProcessParameterIO.findAll(gtParam, applicationContext).get(0); if (ppio instanceof LiteralPPIO) { it.getData().setLiteralData(parseLiteral(it, factory, ioParam)); } else if (ppio instanceof BoundingBoxPPIO) { it.getData().setBoundingBoxData(parseBoundingBox(it, factory, ioParam)); } else if (ioParam.isReference()) { it.setReference(parseReferenceType(it, factory, ioParam)); } else { it.getData().setComplexData(parseComplex(it, factory, ioParam)); } result.add(it); } return result; }
List<ProcessParameterIO> ppios = ProcessParameterIO.findAll( p, context); if ( ppios.isEmpty() ) { throw new WPSException( "Could not find process parameter for type " + p.key + "," + p.type );
output.setTitle( Ows11Util.languageString( p.title ) ); List<ProcessParameterIO> ppios = ProcessParameterIO.findAll( p, context); if ( ppios.isEmpty() ) { throw new WPSException( "Could not find process parameter for type " + p.key + "," + p.type );