Search in sources :

Example 1 with Resource

use of com.revolsys.spring.resource.Resource in project com.revolsys.open by revolsys.

the class TriangulatedIrregularNetwork method newTriangulatedIrregularNetwork.

static TriangulatedIrregularNetwork newTriangulatedIrregularNetwork(final Object source, final MapEx properties) {
    final TriangulatedIrregularNetworkReadFactory factory = IoFactory.factory(TriangulatedIrregularNetworkReadFactory.class, source);
    if (factory == null) {
        return null;
    } else {
        final Resource resource = factory.getZipResource(source);
        final TriangulatedIrregularNetwork tin = factory.newTriangulatedIrregularNetwork(resource, properties);
        return tin;
    }
}
Also used : ScaledIntegerTriangulatedIrregularNetwork(com.revolsys.elevation.tin.compactbinary.ScaledIntegerTriangulatedIrregularNetwork) Resource(com.revolsys.spring.resource.Resource)

Example 2 with Resource

use of com.revolsys.spring.resource.Resource in project com.revolsys.open by revolsys.

the class GriddedElevationModel method newGriddedElevationModel.

static GriddedElevationModel newGriddedElevationModel(final Object source, final Map<String, ? extends Object> properties) {
    final GriddedElevationModelReadFactory factory = IoFactory.factory(GriddedElevationModelReadFactory.class, source);
    if (factory == null) {
        return null;
    } else {
        final Resource resource = Resource.getResource(source);
        final GriddedElevationModel dem = factory.newGriddedElevationModel(resource, properties);
        return dem;
    }
}
Also used : Resource(com.revolsys.spring.resource.Resource)

Example 3 with Resource

use of com.revolsys.spring.resource.Resource in project com.revolsys.open by revolsys.

the class GriddedElevationModelWriter method newGriddedElevationModelWriter.

static GriddedElevationModelWriter newGriddedElevationModelWriter(final Object target, final Map<String, ? extends Object> properties) {
    final GriddedElevationModelWriterFactory factory = IoFactory.factory(GriddedElevationModelWriterFactory.class, target);
    if (factory == null) {
        return null;
    } else {
        final Resource resource = Resource.getResource(target);
        final GriddedElevationModelWriter writer = factory.newGriddedElevationModelWriter(resource);
        writer.setProperties(properties);
        return writer;
    }
}
Also used : Resource(com.revolsys.spring.resource.Resource)

Example 4 with Resource

use of com.revolsys.spring.resource.Resource in project com.revolsys.open by revolsys.

the class GradientLibrary method getDefaultLibrary.

public static GradientLibrary getDefaultLibrary() {
    if (defaultLibrary == null) {
        final Resource resource = Resource.getResource("classpath:com/revolsys/elevation/gridded/rasterizer/gradient/");
        defaultLibrary = new GradientLibrary(resource);
    }
    return defaultLibrary;
}
Also used : Resource(com.revolsys.spring.resource.Resource)

Example 5 with Resource

use of com.revolsys.spring.resource.Resource in project com.revolsys.open by revolsys.

the class AbstractConnectionRegistry method saveAs.

public void saveAs(final Resource parentDirectory, final String directoryName) {
    final Resource connectionsDirectory = parentDirectory.newChildResource(directoryName);
    saveAs(connectionsDirectory);
}
Also used : PathResource(com.revolsys.spring.resource.PathResource) Resource(com.revolsys.spring.resource.Resource)

Aggregations

Resource (com.revolsys.spring.resource.Resource)78 PathResource (com.revolsys.spring.resource.PathResource)23 MapEx (com.revolsys.collection.map.MapEx)9 File (java.io.File)9 IOException (java.io.IOException)8 InputStream (java.io.InputStream)6 LinkedHashMapEx (com.revolsys.collection.map.LinkedHashMapEx)5 GeometryFactory (com.revolsys.geometry.model.GeometryFactory)5 UrlResource (com.revolsys.spring.resource.UrlResource)5 Writer (java.io.Writer)5 Record (com.revolsys.record.Record)4 RecordDefinition (com.revolsys.record.schema.RecordDefinition)4 DataType (com.revolsys.datatype.DataType)3 BoundingBox (com.revolsys.geometry.model.BoundingBox)3 Geometry (com.revolsys.geometry.model.Geometry)3 AbstractRecordWriter (com.revolsys.io.AbstractRecordWriter)3 ArrayRecord (com.revolsys.record.ArrayRecord)3 RecordReader (com.revolsys.record.io.RecordReader)3 RecordWriter (com.revolsys.record.io.RecordWriter)3 Blob (java.sql.Blob)3