Package com.esri.sde.sdk.client

Examples of com.esri.sde.sdk.client.SeRow


     
      // it is not documented in the ArcSDE API how you know there are no more rows to fetch!
      // I'm assuming: query.fetch returns null (empiric tests indicate this assumption is correct).
      boolean allRowsFetched = false;
      while(! allRowsFetched) {
        SeRow row = query.fetch();
        if(row != null) {
          ByteArrayInputStream bytes = row.getBlob(0);
          byte [] buff = new byte[bytes.available()];
          bytes.read(buff);
          String document = new String(buff, Constants.ENCODING);
          if(document.contains(ISO_METADATA_IDENTIFIER)) {
            System.out.println("ISO metadata found");
View Full Code Here


                    testQuery.execute();
                    LOGGER.fine("definition query executed successfully");

                    LOGGER.fine("fetching row to obtain view's types");

                    SeRow testRow = testQuery.fetch();
                    SeColumnDefinition[] colDefs = testRow.getColumns();
                    return colDefs;
                } finally {
                    try {
                        testQuery.close();
                    } catch (SeException e) {
View Full Code Here

        final Command<Void> updateCmd = new Command<Void>() {
            @Override
            public Void execute(ISession session, SeConnection connection) throws SeException,
                    IOException {
                try {
                    final SeRow row = updateStream.singleRow(seObjectId, typeName, rowColumnNames);

                    setRowProperties(modifiedFeature, seCoordRef, mutableColumns, row);
                    updateStream.execute();
                    // updateStream.flushBufferedWrites();
                } finally {
View Full Code Here

                final SeInsert insertStream = (SeInsert) createStream(SeInsert.class);
                Number newId = null;

                try {
                    final SeRow row;

                    // ensure we get the next sequence id when the fid is user managed
                    // and include it in the attributes to set
                    if (fidReader instanceof FIDReader.UserManagedFidReader) {
                        newId = getNextAvailableUserManagedId();
View Full Code Here

        final QueryRasterCommand queryCommand = new QueryRasterCommand(rConstraint, rasterTable,
                rasterColumn, rasterId);

        session.issue(queryCommand);

        final SeRow row = queryCommand.getSeRow();

        final SeQuery preparedQuery = queryCommand.getPreparedQuery();

        return new QueryObjects(preparedQuery, row);
    }
View Full Code Here

        final int height = 1;
        final GridEnvelope requestTiles = new GridEnvelope2D(tileX, tileY, width, height);

        final QueryObjects singleTileQueryObjects = execute(requestTiles);
        final SeQuery query = singleTileQueryObjects.preparedQuery;
        final SeRow row = singleTileQueryObjects.row;
        final TileFetchCommand command = new TileFetchCommand(row, nativeCellType);
        SeRasterTile[] tileData;

        try {
            tileData = readTile(command);
View Full Code Here

    private TileFetchCommand sequentialFetchCommand;

    private SeRasterTile[] nextTile() throws IOException {
        if (!started) {
            execute();
            SeRow row = queryObjects.row;
            RasterCellType nativeType = nativeCellType;
            sequentialFetchCommand = new TileFetchCommand(row, nativeType);
        }

        SeRasterTile[] tileData = readTile(sequentialFetchCommand);
View Full Code Here

        log("- Executing query " + Arrays.asList(seQueryInfo.getColumns()));
        query.prepareQueryInfo(seQueryInfo);
        query.execute();
        try {
            log("- Iterating: " + Arrays.asList(seQueryInfo.getColumns()));
            SeRow row = query.fetch();
            final int ncols = row.getNumColumns();
            final int shapeIdx = ncols - 1;
            Object value;
            sw.start();
            featureCount = 0;
            totalPoints = 0;
            while (row != null) {
                featureCount++;
                for (int i = 0; i < ncols; i++) {
                    value = row.getObject(i);
                    if (i == shapeIdx) {
                        SeShape shape = (SeShape) value;
                        totalPoints += shape.getNumOfPoints();
                        double[][][] allCoords = shape.getAllCoords();
                        largerPoints = Math.max(largerPoints, shape.getNumOfPoints());
View Full Code Here

        Stopwatch sw = new Stopwatch();
        query.prepareQueryInfo(seQueryInfo);
        query.execute();
        try {
            log("- Iterating: " + Arrays.asList(seQueryInfo.getColumns()));
            SeRow row = query.fetch();
            final int ncols = row.getNumColumns();
            final int shapeIdx = ncols - 1;
            Object value;
            Geometry geom;
            int numPoints;
            featureCount = 0;
            totalPoints = 0;
            largerPoints = 0;
            GeometryFactory seGeomFac = new SeToJTSGeometryFactory();
            sw.start();
            while (row != null) {
                featureCount++;
                for (int i = 0; i < ncols; i++) {
                    if (i == shapeIdx) {
                        geom = (Geometry) row.getGeometry(seGeomFac, i);
                        numPoints = geom.getNumPoints();
                        totalPoints += numPoints;
                        largerPoints = Math.max(largerPoints, numPoints);
                    } else {
                        value = row.getObject(i);
                    }
                }
                row = query.fetch();
            }
            sw.stop();
View Full Code Here

                // Year, month, date, hour, minute, second.
                cal.set(2004, 06, 1, 0, 0, 0);

                try {
                    for (int i = 1; i <= shapes.length; i++) {
                        SeRow row = insert.getRowToSet();
                        // col #0 is the sde managed row id
                        row.setInteger(0, Integer.valueOf(i));
                        row.setShort(1, Short.valueOf((short) i));
                        row.setFloat(2, new Float(i / 10.0F));
                        row.setDouble(3, new Double(i / 10D));
                        row.setString(4, "FEATURE_" + i);
                        row.setNString(5, "NSTRING_" + i);
                        cal.set(Calendar.DAY_OF_MONTH, i);
                        row.setTime(6, cal);
                        SeShape seShape = shapes[i - 1];
                        row.setShape(7, seShape);

                        insert.execute();
                    }
                } finally {
                    insert.close();
View Full Code Here

TOP

Related Classes of com.esri.sde.sdk.client.SeRow

Copyright © 2018 www.massapicom. 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.