congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
IData
Code IndexAdd Tabnine to your IDE (free)

How to use
IData
in
org.n52.wps.io.data

Best Java code snippets using org.n52.wps.io.data.IData (Showing top 16 results out of 315)

origin: org.n52.wps/52n-wps-io

public static String getStringRepresentation(String xmlDataTypeURI, IData obj) {
  return obj.getPayload().toString();
}
origin: org.n52.wps/52n-wps-sextante

   return wpsInputParameters.get(0).getPayload();
}else if (type.equals("Multiple Input")){
  return createMultipleInputArray(parameter, wpsInputParameters);
}else if (type.equals("Selection") && wpsInputParameters.size() == 1){
    IData param = wpsInputParameters.get(0);
    if(param.getSupportedClass().equals(String.class)){
      AdditionalInfoSelection ai = (AdditionalInfoSelection) parameter.getParameterAdditionalInfo();
      String[] values = ai.getValues();
      for(int i = 0; i<values.length;i++){
        if(values[i].equals(param.getPayload())){
          return new Integer(i);
    return false;
  return param.getPayload();
    return false;
  String[] sValue = param.getPayload().toString().split(",");
  return new Point2D.Double(Double.parseDouble(sValue[0]),
               Double.parseDouble(sValue[1]));
    return null;
  String sValue = param.getPayload().toString();
  StringTokenizer st = new StringTokenizer(sValue, ",");
  String sToken;
origin: org.n52.wps/52n-wps-mc

private static final IODataType probeMCDataType(IData iData) {
  Class< ? > clazz = iData.getSupportedClass();
  if (clazz == IODataType.BOOLEAN.getSupportedClass()) {
    return IODataType.BOOLEAN;
  }
  if (clazz == IODataType.DOUBLE.getSupportedClass()) {
    return IODataType.DOUBLE;
  }
  if (clazz == IODataType.INTEGER.getSupportedClass()) {
    return IODataType.INTEGER;
  }
  if (clazz == IODataType.STRING.getSupportedClass()) {
    return IODataType.STRING;
  }
  if (clazz == GenericFileData.class) {
    return IODataType.MEDIA;
  }
  // in case we do not find a matching type return null
  return null;
}
origin: org.n52.wps/52n-wps-sextante

private GTRasterLayer wrapRasterLayer(IData rasterLayer) {
  if(!(rasterLayer.getPayload() instanceof GridCoverage)){
    return null;
  }
  GridCoverage coverage = (GridCoverage) rasterLayer.getPayload();
  GTRasterLayer sextanteRasterLayer = new GTRasterLayer();
  sextanteRasterLayer.create(coverage);
  return sextanteRasterLayer;
}
origin: org.n52.wps/52n-wps-ags

public static String loadSingleDataItem(IData dataItem, File workspaceDir){
  Object payload = dataItem.getPayload();
  String fileName = null;
  //File
  if (payload instanceof GenericFileDataWithGT){
    GenericFileDataWithGT gfd = (GenericFileDataWithGT)payload;
    fileName = gfd.writeData(workspaceDir);
  }
  //String
  if (payload instanceof String)
    fileName = (String) payload;
  //Float
  if (payload instanceof Float)
    fileName = ((Float)payload).toString();
  //Integer
  if (payload instanceof Integer)
    fileName = ((Integer)payload).toString();
  //Double
  if (payload instanceof Double)
    fileName = ((Double)payload).toString();
  return fileName;
}
origin: org.n52.wps/52n-wps-unicore

public Map<String, IData> merge(List<Map<String, IData>> outputData)
{
  FeatureCollection mergedFeatureCollection = DefaultFeatureCollections.newCollection();
  for (Map<String, IData> data : outputData)
  {
    FeatureCollection singleFeatureCollection = (FeatureCollection) data.get("result").getPayload();
    mergedFeatureCollection.addAll(singleFeatureCollection);
  }
  Map<String, IData> result = new HashMap<String, IData>();
  result.put("result", new GTVectorDataBinding(mergedFeatureCollection));
  return result;
}
origin: org.n52.wps/52n-wps-ags

private String loadSingleDataItem(IData dataItem){
  
  Object payload = dataItem.getPayload();
  String value = null;
  
  //File
  if (payload instanceof GenericFileDataWithGT){
    GenericFileDataWithGT gfd = (GenericFileDataWithGT)payload;
    value = gfd.writeData(this.workspace.getWorkspace());	
  }
  
  //String
  else if (payload instanceof String)
    value = (String) payload;
  
  //Float
  else if (payload instanceof Float)
    value = ((Float)payload).toString();
  //Integer
  else if (payload instanceof Integer)
    value = ((Integer)payload).toString();
  
  //Double
  else if (payload instanceof Double)
    value = ((Double)payload).toString();
  
  return value;
}

origin: org.n52.wps/52n-wps-grid

public WebProcessingServiceOutput merge(List<WebProcessingServiceOutput> pOutputDataList)
{
  FeatureCollection mergedFeatureCollection = DefaultFeatureCollections.newCollection();
  for (WebProcessingServiceOutput output : pOutputDataList)
  {
    FeatureCollection singleFeatureCollection = (FeatureCollection) output.getOutputData().get("result").getPayload();
    mergedFeatureCollection.addAll(singleFeatureCollection);
  }
  Map<String, IData> outputData = new HashMap<String, IData>();
  outputData.put("result", new GTVectorDataBinding(mergedFeatureCollection));
  
  WebProcessingServiceOutput result = new WebProcessingServiceOutput(outputData);
  return result;
}
origin: org.n52.wps/52n-wps-algorithm-geotools

GridCoverage2D gridCoverage1 = (GridCoverage2D) dataset1.getPayload();
RenderedImage image1 = gridCoverage1.getRenderedImage();
GridCoverage2D gridCoverage2 = (GridCoverage2D) dataset2.getPayload();
RenderedImage image2 = gridCoverage2.getRenderedImage();
origin: org.n52.wps/52n-wps-io-geotools

}else if(data instanceof GTVectorDataBinding){
  SimpleFeatureCollection f = (SimpleFeatureCollection)data.getPayload();
origin: org.n52.wps/52n-wps-sextante

  private GTVectorLayer wrapVectorLayer(IData vectorLayer) throws IOException {
    if(!(vectorLayer.getPayload() instanceof FeatureCollection)){
      return null;
    }
    FeatureCollection<SimpleFeatureType, SimpleFeature> fc  = (FeatureCollection<SimpleFeatureType, SimpleFeature>) vectorLayer.getPayload();
    DataStore datastore = new CollectionDataStore(fc);
    FeatureSource<?, ?> fsource = datastore.getFeatureSource(datastore.getTypeNames()[0]);
    GTVectorLayer gtVectorLayer = new GTVectorLayer();
//        NoPostprocessingGTVectorLayer gtVectorLayer = new NoPostprocessingGTVectorLayer();
    gtVectorLayer.create(fsource);
//        GTVectorLayer gtVectorLayer =  GTVectorLayer.createLayer(datastore, datastore.getTypeNames()[0]);
//        gtVectorLayer.setPostProcessStrategy(new NullStrategy());
    gtVectorLayer.setName("VectorLayer");
    return gtVectorLayer;
  }

origin: org.n52.wps/52n-wps-server

int min = new Integer(allowedRange.getMinimumValue().getStringValue());
int max = new Integer(allowedRange.getMaximumValue().getStringValue());
if((Integer)(parameterObj.getPayload())>=min && (Integer)parameterObj.getPayload()<=max){
  return true;
Double min = new Double(allowedRange.getMinimumValue().getStringValue());
Double max = new Double(allowedRange.getMaximumValue().getStringValue());
if((Double)(parameterObj.getPayload())>=min && (Double)parameterObj.getPayload()<=max){
  return true;
Short min = new Short(allowedRange.getMinimumValue().getStringValue());
Short max = new Short(allowedRange.getMaximumValue().getStringValue());
if((Short)(parameterObj.getPayload())>=min && (Short)parameterObj.getPayload()<=max){
  return true;
Float min = new Float(allowedRange.getMinimumValue().getStringValue());
Float max = new Float(allowedRange.getMaximumValue().getStringValue());
if((Float)(parameterObj.getPayload())>=min && (Float)parameterObj.getPayload()<=max){
  return true;
Long min = new Long(allowedRange.getMinimumValue().getStringValue());
Long max = new Long(allowedRange.getMaximumValue().getStringValue());
if((Long)(parameterObj.getPayload())>=min && (Long)parameterObj.getPayload()<=max){
  return true;
Byte min = new Byte(allowedRange.getMinimumValue().getStringValue());
Byte max = new Byte(allowedRange.getMaximumValue().getStringValue());
if((Byte)(parameterObj.getPayload())>=min && (Byte)parameterObj.getPayload()<=max){
  return true;
origin: org.n52.wps/52n-wps-server

public InputStream getAsStream() throws ExceptionReport {
  try {
    if(obj instanceof ILiteralData){
      return new ByteArrayInputStream(String.valueOf(obj.getPayload()).getBytes(Charsets.UTF_8));
origin: org.n52.wps/52n-wps-sextante

try{
  ge = getGridExtent(
      (Double)inputData.get( GRID_EXTENT_X_MIN).get(0).getPayload(),
      (Double)inputData.get(GRID_EXTENT_X_MAX).get(0).getPayload(),
      (Double)inputData.get(GRID_EXTENT_Y_MIN).get(0).getPayload(),
      (Double)inputData.get(GRID_EXTENT_Y_MAX).get(0).getPayload(),
      (Double)inputData.get(GRID_EXTENT_CELLSIZE).get(0).getPayload());
origin: org.n52.wps/52n-wps-io-geotools

LOGGER.debug("The data passed from the algorithm to the generator is GenericFileDataBinding");
try {
  gvdb = ((GenericFileDataWithGT) data.getPayload()).getAsGTVectorDataBinding();
  isShapefile = true;
} catch (Exception e){
origin: org.n52.wps/52n-wps-mc

  processor.addData(inputID, iData.getPayload());
  break;
case DOUBLE:
  processor.addData(inputID, iData.getPayload());
  break;
case INTEGER:
  processor.addData(inputID, iData.getPayload());
  break;
case STRING:
  processor.addData(inputID, iData.getPayload());
  break;
  GenericFileData gfd = (GenericFileData) iData.getPayload();
  processor.addData(inputID, new MediaData(gfd.getDataStream(), gfd.getMimeType()));
  break;
org.n52.wps.io.dataIData

Most used methods

  • getPayload
  • getSupportedClass

Popular in Java

  • Updating database using SQL prepared statement
  • findViewById (Activity)
  • setRequestProperty (URLConnection)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • Top 12 Jupyter Notebook Extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now