congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
org.n52.wps.io.data
Code IndexAdd Tabnine to your IDE (free)

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

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

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

public GenericFileDataWithGT(FeatureCollection<?, ?> featureCollection)
    throws IOException {
  this(getShpFile(featureCollection), IOHandler.MIME_TYPE_ZIPPED_SHP);
}
origin: org.n52.wps/52n-wps-io-geotools

@Override
public GenericFileDataWithGTBinding parse(InputStream stream, String mimeType, String schema) {
  GenericFileDataWithGTBinding data = new GenericFileDataWithGTBinding(
      new GenericFileDataWithGT(stream, "text/xml"));
  return data;
}
origin: org.n52.wps/52n-wps-io-geotools

public File getShpFile() {
  return getAsGTVectorDataBinding().getPayloadAsShpFile();
}
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-io-geotools

private GenericFileDataWithGTBinding parseXML(File file) {
  
  SimpleFeatureCollection fc = new GML2BasicParser().parseSimpleFeatureCollection(file);
  
  GenericFileDataWithGTBinding data = null;
  try {
    data = new GenericFileDataWithGTBinding(new GenericFileDataWithGT(fc));
  } catch (IOException e) {
    LOGGER.error("Exception while trying to wrap GenericFileData around GML2 FeatureCollection.", e);
  }
      
  return data;
}
origin: org.n52.wps/52n-wps-io-impl

public GenericFileData(InputStream stream, String mimeType) {
  this.dataStream = stream;
  this.mimeType = mimeType;
  this.fileExtension = GenericFileDataConstants.mimeTypeFileTypeLUT()
      .get(mimeType);
  if(fileExtension == null){
    this.fileExtension = "dat";
  }
}
origin: org.n52.wps/52n-wps-io-impl

@Override
public GenericFileDataBinding parse(InputStream input, String mimeType, String schema) {
  
  GenericFileData theData = new GenericFileData(input, mimeType);
  LOGGER.info("Found File Input " + mimeType);
  
  return new GenericFileDataBinding(theData);
}
origin: org.n52.wps/52n-wps-io-impl

public InputStream generateStream(IData data, String mimeType, String schema) throws IOException {
  
  InputStream theStream = ((GenericFileDataBinding)data).getPayload().getDataStream();
  return theStream;
}

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

public String writeData(File workspaceDir) {
  String fileName = null;
  if (GenericFileDataConstants.getIncludeFilesByMimeType(mimeType) != null) {
    try {
      fileName = unzipData(dataStream, fileExtension,
          workspaceDir);
    } catch (IOException e) {
      LOGGER.error("Could not unzip the archive to " + workspaceDir);
    }
  } else {
    try {
      fileName = justWriteData(dataStream, fileExtension, workspaceDir);
    } catch (IOException e) {
      LOGGER.error("Could not write the input to " + workspaceDir);
    }
  }
  return fileName;
}
origin: org.n52.wps/52n-wps-io-impl

public String writeData(File workspaceDir) {
  String fileName = null;
  if (GenericFileDataConstants.getIncludeFilesByMimeType(mimeType) != null) {
    try {
      fileName = unzipData(dataStream, fileExtension,
          workspaceDir);
    } catch (IOException e) {
      LOGGER.error("Could not unzip the archive to " + workspaceDir);
    }
  } else {
    try {
      fileName = justWriteData(dataStream, fileExtension, workspaceDir);
    } catch (IOException e) {
      LOGGER.error("Could not write the input to " + workspaceDir);
    }
  }
  return fileName;
}
origin: org.n52.wps/52n-wps-io-geotools

public InputStream generateStream(IData data, String mimeType, String schema) throws IOException {
  
  InputStream theStream = ((GenericFileDataWithGTBinding)data).getPayload().getDataStream();
  
  return theStream;
}

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-io-geotools

@Override
public GenericFileDataWithGTBinding parse(InputStream input, String mimeType, String schema) {
  
  GenericFileDataWithGT theData = new GenericFileDataWithGT(input, mimeType);
  LOGGER.info("Found File Input " + mimeType);
  
  return new GenericFileDataWithGTBinding(theData);
}
origin: org.n52.wps/52n-wps-io-geotools

public GenericFileDataWithGT(InputStream stream, String mimeType) {
  this.dataStream = stream;
  this.mimeType = mimeType;
  this.fileExtension = GenericFileDataConstants.mimeTypeFileTypeLUT()
      .get(mimeType);
  if(fileExtension == null){
    this.fileExtension = "dat";
  }
}
origin: org.n52.wps/52n-wps-io-geotools

public InputStream generateStream(IData data, String mimeType, String schema) throws IOException {
  
  InputStream theStream = ((GenericFileDataWithGTBinding)data).getPayload().getDataStream();
  return theStream;
}

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

public File getPayloadAsShpFile(){
  try {
    return GenericFileDataWithGT.getShpFile(featureCollection);
  } catch (IOException e) {
    e.printStackTrace();
    throw new RuntimeException("Could not transform Feature Collection into shp file. Reason " +e.getMessage());
  }
  
}
private synchronized void writeObject(java.io.ObjectOutputStream oos) throws IOException
origin: org.n52.wps/52n-wps-io-geotools

@Override
public GenericFileDataWithGTBinding parse(InputStream input, String mimeType, String schema) {
  
  GenericFileDataWithGT theData = new GenericFileDataWithGT(input, mimeType);
  LOGGER.info("Found File Input " + mimeType);
  
  return new GenericFileDataWithGTBinding(theData);
}
origin: org.n52.wps/52n-wps-io

public static final String[] getMimeTypes (){
  return mimeTypeFileTypeLUT().keySet().toArray(new String[0]);
}

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

public InputStream generateStream(IData data, String mimeType, String schema) throws IOException {
  
  InputStream theStream = ((GenericFileDataWithGTBinding)data).getPayload().getDataStream();
  return theStream;
}

org.n52.wps.io.data

Most used classes

  • IData
  • GenericFileDataConstants
  • GTVectorDataBinding
  • GenericFileData
  • GenericFileDataWithGT
  • GenericFileDataBinding,
  • GenericFileDataWithGTBinding,
  • LiteralBooleanBinding,
  • LiteralDoubleBinding,
  • LiteralStringBinding,
  • FileDataBinding,
  • JTSGeometryBinding,
  • LiteralIntBinding,
  • IBBOXData,
  • IComplexData,
  • BoundingBoxData,
  • ArrayDataBinding,
  • AsciiGrassDataBinding,
  • GenericXMLDataBinding
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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