view Postarc/Postarc/Feature/Workspace.cs @ 0:1aca3d413885 tip

Initial import of Postarc
author Christian Lins <christian.lins@intevation.de>
date Fri, 05 Oct 2012 23:55:06 +0200
parents
children
line wrap: on
line source
/*
 * Postarc
 *
 * Author:
 * Christian Lins <christian.lins@intevation.de>
 *
 * Copyright:
 * Copyright (C) 2012 Intevation GmbH <http://www.intevation.de/>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ESRI.ArcGIS.Geodatabase;
using ESRI.ArcGIS.esriSystem;
using System.Diagnostics;

namespace Postarc.Feature
{
    public class Workspace : IWorkspace, IWorkspaceEdit
    {
        protected WorkspaceFactory workspaceFactory = new WorkspaceFactory();
        protected bool isBeingEdited = false;
        protected bool hasEdits = false;

        public IPropertySet ConnectionProperties
        {
            get 
            {
                PropertySetClass props = new PropertySetClass();
                return (IPropertySet)props;
            }
        }

        public void ExecuteSQL(string sqlStmt)
        {
            throw new NotImplementedException();
        }

        public bool Exists()
        {
            throw new NotImplementedException();
        }

        public bool IsDirectory()
        {
            return false;
        }

        /// <summary>
        /// Returns always null as this is a remote workspace.
        /// </summary>
        public string PathName
        {
            get
            {
                return null;
            }
        }

        public esriWorkspaceType Type
        {
            get
            {
                return esriWorkspaceType.esriRemoteDatabaseWorkspace;
            }
        }

        public IWorkspaceFactory WorkspaceFactory
        {
            get 
            {
                return this.workspaceFactory;
            }
        }

        public IEnumDatasetName get_DatasetNames(esriDatasetType DatasetType)
        {
            throw new NotImplementedException();
        }

        public IEnumDataset get_Datasets(esriDatasetType DatasetType)
        {
            throw new NotImplementedException();
        }

        public void AbortEditOperation()
        {
            Debug.WriteLine("Workspace::AbortEditOperation(): FIXME");
        }

        public void DisableUndoRedo()
        {
            throw new NotImplementedException();
        }

        public void EnableUndoRedo()
        {
            throw new NotImplementedException();
        }

        public void HasEdits(ref bool hasEdits)
        {
            hasEdits = this.hasEdits;
        }

        public void HasRedos(ref bool hasRedos)
        {
            hasRedos = false; // TODO
        }

        public void HasUndos(ref bool hasUndos)
        {
            hasUndos = false; // TODO
        }

        public bool IsBeingEdited()
        {
            return this.isBeingEdited;
        }

        public void RedoEditOperation()
        {
            throw new NotImplementedException();
        }

        public void StartEditOperation()
        {
            Debug.WriteLine("Workspace::StartEditOperation");
        }

        public void StartEditing(bool withUndoRedo)
        {
            this.isBeingEdited = true;
        }

        public void StopEditOperation()
        {
            Debug.WriteLine("Workspace::StopEditOperation");
        }

        public void StopEditing(bool saveEdits)
        {
            this.isBeingEdited = false;
        }

        public void UndoEditOperation()
        {
            throw new NotImplementedException();
        }
    }
}
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)