Examples of SeObjectId


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

        session.issue(new Command<Void>() {
            @Override
            public Void execute(ISession session, SeConnection connection) throws SeException,
                    IOException {
                SeDelete delete = new SeDelete(connection);
                delete.byId(typeName, new SeObjectId(rowId));
                delete.close();
                return null;
            }
        });
View Full Code Here

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

        // edit default version
        SeState newState1 = session.issue(new Command<SeState>() {
            @Override
            public SeState execute(ISession session, SeConnection connection) throws SeException,
                    IOException {
                SeObjectId defVersionStateId = defaultVersion.getStateId();
                SeState defVersionState = new SeState(connection, defVersionStateId);
                // create a new state as a child of the current one, the current
                // one
                // must be closed
                if (defVersionState.isOpen()) {
                    defVersionState.close();
                }
                SeState newState1 = new SeState(connection);
                newState1.create(defVersionState.getId());
                return newState1;
            }
        });

        session.startTransaction();
        testData.insertIntoVersionedTable(session, newState1, versionedTable.getName(),
                "name 1 state 1");
        testData.insertIntoVersionedTable(session, newState1, versionedTable.getName(),
                "name 2 state 1");

        final SeObjectId parentStateId = newState1.getId();
        session.close(newState1);

        final SeState newState2 = session.issue(new Command<SeState>() {
            @Override
            public SeState execute(ISession session, SeConnection connection) throws SeException,
                    IOException {
                SeState newState = new SeState(connection);
                newState.create(parentStateId);
                return newState;
            }
        });

        testData.insertIntoVersionedTable(session, newState2, versionedTable.getName(),
                "name 1 state 2");

        session.issue(new Command<Void>() {
            @Override
            public Void execute(ISession session, SeConnection connection) throws SeException,
                    IOException {
                // Change the version's state pointer to the last edit state.
                defaultVersion.changeState(newState2.getId());

                // Trim the state tree.
                newState2.trimTree(parentStateId, newState2.getId());

                return null;
            }
        });
        session.commitTransaction();

        // we edited the default version, lets query the default version and the
        // new version and assert they have the correct feature count
        final SeObjectId defaultVersionStateId = defaultVersion.getStateId();
        SeState defVersionState = session.createState(defaultVersionStateId);

        int defVersionCount = getTempTableCount(session, versionedTable.getName(), null, null,
                defVersionState);
        assertEquals(3, defVersionCount);
View Full Code Here

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

public class ArcSDEUtilsTest {
    @Test
    public void testFindCompatibleCRS_Projected() throws Exception {

        SeCoordinateReference seCoordRefSys = new SeCoordinateReference();
        seCoordRefSys.setCoordSysByID(new SeObjectId(23030));

        CoordinateReferenceSystem expectedCRS = CRS.decode("EPSG:23030");
        CoordinateReferenceSystem compatibleCRS = ArcSDEUtils.findCompatibleCRS(seCoordRefSys);

        assertSame(expectedCRS, compatibleCRS);
View Full Code Here

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

    }

    @Test
    public void testFindCompatibleCRS_Geographic() throws Exception {
        SeCoordinateReference seCoordRefSys = new SeCoordinateReference();
        seCoordRefSys.setCoordSysByID(new SeObjectId(4326));

        CoordinateReferenceSystem expectedCRS = CRS.decode("EPSG:4326");
        CoordinateReferenceSystem compatibleCRS = ArcSDEUtils.findCompatibleCRS(seCoordRefSys);

        assertSame(expectedCRS, compatibleCRS);
View Full Code Here

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

                public RasterInfo execute(ISession session, SeConnection connection)
                        throws SeException, IOException {
                    SeRow r = q.fetch();
                    SeRasterAttr rAttr = r.getRaster(0);

                    SeObjectId rasterColumnId = rAttr.getRasterColumnId();
                    SeRasterColumn rasterColumn = new SeRasterColumn(connection, rasterColumnId);
                    SeCoordinateReference coordRef = rasterColumn.getCoordRef();
                    String coordRefWKT = coordRef.getCoordSysDescription();
                    CoordinateReferenceSystem crs;
                    try {
View Full Code Here

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

        }

        @Override
        public SeState execute(ISession session, SeConnection connection) throws SeException,
                IOException {
            SeState parentState = new SeState(connection, new SeObjectId(parentStateId));

            SeState realParent = null;

            boolean mergeParentToRealParent = false;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.