Package com.esri.sde.sdk.client

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


        final List<AttributeDescriptor> properties = createAttributeDescriptors(layer, namespace,
                seColumns);

        final SimpleFeatureType featureType = createSchema(typeName, namespace, properties);

        SeRegistration registration = session.createSeRegistration(typeName);

        final boolean isMultiVersioned = registration.isMultiVersion();
        final boolean isView = registration.isView();
        final FIDReader fidStrategy;
        fidStrategy = FIDReader.getFidReader(session, table, layer, registration);
        final boolean canDoTransactions;
        {
            final Integer permMask = session.issue(new Command<Integer>() {
View Full Code Here


                    LOGGER.fine("deleting the 'workaround' column...");
                    table.dropColumn(HACK_COL_NAME);

                    LOGGER.fine("setting up table registration with ArcSDE...");
                    SeRegistration reg = new SeRegistration(connection, table.getName());
                    if (rowIdColumn != null) {
                        LOGGER.fine("setting rowIdColumnName to " + rowIdColumn + " in table "
                                + reg.getTableName());
                        reg.setRowIdColumnName(rowIdColumn);
                        reg.setRowIdColumnType(rowIdType);
                        reg.alter();
                        reg = null;
                    }

                    LOGGER.fine("Schema correctly created: " + featureType);
View Full Code Here

                table.create(colDefs, configKeyword);

                /*
                 * Register the column to be used as feature id and managed by sde
                 */
                SeRegistration reg = new SeRegistration(connection, table.getName());
                LOGGER.fine("setting rowIdColumnName to ROW_ID in table " + reg.getTableName());
                reg.setRowIdColumnName("ROW_ID");
                final int rowIdColumnType = SeRegistration.SE_REGISTRATION_ROW_ID_COLUMN_TYPE_SDE;
                reg.setRowIdColumnType(rowIdColumnType);
                reg.alter();

                /*
                 * Define the attributes of the spatial column
                 */
                layer.setSpatialColumnName(TEST_TABLE_COLS[TEST_TABLE_COLS.length - 1]);
View Full Code Here

                /*
                 * Register the column to be used as feature id and managed by sde
                 */
                if (SeRegistration.SE_REGISTRATION_ROW_ID_COLUMN_TYPE_NONE != rowIdColumnType) {
                    SeRegistration reg = new SeRegistration(connection, table.getName());
                    LOGGER.fine("setting rowIdColumnName to ROW_ID in table " + reg.getTableName());
                    reg.setRowIdColumnName("ROW_ID");
                    reg.setRowIdColumnType(rowIdColumnType);
                    reg.alter();
                }

                // Only tables with an sde maintained rowid column can be
                // versioned
                if (SeRegistration.SE_REGISTRATION_ROW_ID_COLUMN_TYPE_SDE == rowIdColumnType) {
View Full Code Here

            @Override
            public Void execute(ISession session, SeConnection connection) throws SeException,
                    IOException {
                // make the table multiversioned
                LOGGER.fine("Making " + tableName + " versioned...");
                SeRegistration reg = new SeRegistration(connection, tableName);
                reg.getInfo();
                reg.setMultiVersion(true);
                reg.alter();
                System.err.println(tableName + " successfully made versioned");
                return null;
            }
        };
View Full Code Here

                layer.setSpatialColumnName("SHAPE");

                /*
                 * Register the column to be used as feature id and managed by sde
                 */
                SeRegistration reg = new SeRegistration(connection, table.getName());
                LOGGER.fine("setting rowIdColumnName to ROW_ID in table " + reg.getTableName());
                reg.setRowIdColumnName("ROW_ID");
                reg.setRowIdColumnType(SeRegistration.SE_REGISTRATION_ROW_ID_COLUMN_TYPE_SDE);
                reg.alter();

                layer.setShapeTypes(SeLayer.SE_NIL_TYPE_MASK | SeLayer.SE_POINT_TYPE_MASK);
                layer.setGridSizes(1100.0, 0.0, 0.0);
                layer.setDescription("Layer Example");

                SeExtent ext = new SeExtent(0.0, 0.0, 10000.0, 10000.0);
                layer.setExtent(ext);

                /*
                 * Define the layer's Coordinate Reference
                 */
                SeCoordinateReference coordref = getGenericCoordRef();
                layer.setCoordRef(coordref);

                /*
                 * Spatially enable the new table...
                 */
                layer.setCreationKeyword(getConfigKeyword());
                layer.create(3, 4);

                // register the table as versioned
                SeRegistration registration = new SeRegistration(connection, tableName);
                registration.setMultiVersion(true);
                registration.alter();

                return table;
            }
        };

View Full Code Here

                + session.getUser() + "." + tableName;
        tableName = tableName.toUpperCase();

        SeTable table = session.getTable(tableName);
        SeLayer layer = session.getLayer(tableName);
        SeRegistration reg = session.createSeRegistration(tableName);
        fidReader = FIDReader.getFidReader(session, table, layer, reg);
        return fidReader;
    }
View Full Code Here

                    continue;
                }
                if (systemTables.contains(tableName)) {
                    continue;
                }
                SeRegistration reg;
                try {
                    reg = new SeRegistration(connection, tableName);
                    // do not call getInfo or it'll fail with tables owned by other user than the
                    // connection one
                    // reg.getInfo();
                } catch (SeException e) {
                    if (e.getSeError().getSdeError() == SeError.SE_TABLE_NOREGISTERED) {
                        LOGGER.finest("Ignoring non registered table " + tableName);
                        continue;
                    }
                    throw e;
                }

                /*
                 * disable 'row ID allocation' check for featureclass see
                 * http://jira.codehaus.org/browse/GEOT-3486 for more infos
                 */
                // boolean isSystemTable = reg.getRowIdAllocation() ==
                // SeRegistration.SE_REGISTRATION_ROW_ID_ALLOCATION_SINGLE;
                // if (isSystemTable) {
                // LOGGER.finer("Ignoring ArcSDE registered table " + tableName
                // + " as it is a system table");
                // continue;
                // }

                if (reg.isHidden()) {
                    LOGGER.finer("Ignoring ArcSDE registered table " + tableName
                            + " as it is hidden");
                    continue;
                }

                boolean hasLayer = reg.hasLayer();

                if (!hasLayer) {
                    if (!allowNonSpatialTables) {
                        LOGGER.finer("Ignoring ArcSDE registered table " + tableName
                                + " as it is non spatial");
                        continue;
                    }
                    if (reg.getRowIdColumnType() == SeRegistration.SE_REGISTRATION_ROW_ID_COLUMN_TYPE_NONE) {
                        LOGGER.finer("Ignoring ArcSDE registered table " + tableName
                                + " as it has no row id column");
                        continue;
                    }

View Full Code Here

                table.create(colDefs, configKeyword);

                /*
                 * Register the column to be used as feature id and managed by sde
                 */
                SeRegistration reg = new SeRegistration(connection, table.getName());
                LOGGER.fine("setting rowIdColumnName to ROW_ID in table " + reg.getTableName());
                reg.setRowIdColumnName("ROW_ID");
                final int rowIdColumnType = SeRegistration.SE_REGISTRATION_ROW_ID_COLUMN_TYPE_SDE;
                reg.setRowIdColumnType(rowIdColumnType);
                reg.alter();

                /*
                 * Define the attributes of the spatial column
                 */
                layer.setSpatialColumnName("SHAPE");
View Full Code Here

        }

        @Override
        public SeRegistration execute(final ISession session, final SeConnection connection)
                throws SeException, IOException {
            return new SeRegistration(connection, typeName);
        }
View Full Code Here

TOP

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

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.