CAD 1.2 NO IDEA Avatar
  1. OMG Issue

CAD12 — CadConnection, CadSystem: Avaliable_models() enhancement

  • Key: CAD12-5
  • Legacy Issue Number: 7140
  • Status: closed  
  • Source: Anonymous
  • Summary:

    Disposition: ?
    OMG Issue No: ?
    Title: CadConnection, CadSystem: Avaliable_models() enhancement
    Markus Helmke, Produktionstechnisches Zentrum (PTZ)
    Technische Universit├Ąt Berlin


    The method "available_models()" provides access to models available to the active CAD System and returns all available models in a list. Up to now the method does not take into account how the models are structured on the server side. When a user selects a model it would be helpful to navigate through the tree structure of the servers file system. A similar problem is the specification of a users file name in that moment when he wants to use "save_model_as()" or "create_model()".
    The proposed methods, data structures and definitions aim to improve navigation capabilities for both systems and users when accessing models. For various reasons a native CAD-system normally is able to access different directories which are presented also to the user. This is to let him structure his work but also in order to offer templates that ease the design process, because in most cases designer aren't starting from scratch, but they are provided with templates that cover predefined parameters or a special design philosophy.
    Assuming a user wants to store, create, or open a model on the (maybe remote) machine running the Cad-Services he expects something like a "FileChooser"-dialog. The method "available_models()" was not designed to support such functionality and therefore needs to be extended.
    The proposed methods allow for implementing the intended functionality because they represent an essential subset of methods needed to do the following:

    • Navigation (get_root_directories(), get_models_and_folders(), get_parent_directory())
    • Create new subfolder (create_new_folder())
    • Providing information to choose a file or folder on the client side (get_models_and_folders())
      The concept provides the possibility not to expose the whole file system to the user by using "root_directories". Every directory can serve as root directory and thus only its subdirectories are exposed to the user. The user starts navigation in the one of the roots.
      The methods were taken from JAVA's abstract class "javax.swing.filechooser.FileSystemView" which serves as "JFileChooser's gateway to the file system" and as such promise to be sufficient. Additionally IWF has implemented against the proposed CAD-Services enhancement with success.


    Revised Text:
    The following typedefs, struct and operations are added to the CadConnection module respectively to the CadSystem interface:

    module CadConnection

    struct Path

    { boolean is_dir; // Indicates whether Path represents a file or a directory string path; // Canonical, absolute, and unique path representing a file or // a directory }


    typedef sequence<string> RootsList;
    typedef sequence<Path> PathList;

    interface CadSystem

    { // Creates a new folder in a given directory. // param parent_dir: The (canonical, absolute, and unique) path of the // directory, in which the folder will be created. This must be either // one of the root directories (see get_root_directories()) or a // directory that exists in one of the root directory's subdirectories // param folder_name: The name of the folder to be created. It must be a // valid and a not already existing name. // raises CadUtility::CadError: If there was an error in creating the // folder. void create_new_folder(in string parent_dir, in string folder_name) raises (CadUtility::CadError); // Returns a list of (canonical, absolute, and unique) pathnames repre- // senting the root directories. In a root directory or in any other // subdirectory, model files can be found. // return: List of pathnames representing root directories. RootsList get_root_directories(); // Returns a list of subdirectories and model files of a given directory. // param directory: (canonical, absolute, and unique) path of the // directory from which to get the list of subdirectories and model // files. This must be either one of the root directories or a subdirectory. // return: A list representing subdirectories and/or model files // of the given directory. // raises CadUtility::CadError If there was an error retrieving the list. PathList get_models_and_folders(in string directory) raises (CadUtility::CadError); // Returns the parent directory of a given directory. // param directory: (canonical, absolute, and unique) path of the // directory from which to get its parent directory. The given directory // should be a subdirectory of one of the root directories. // return: The path of the parent directory. // raises CadUtility::CadError If there was an error retrieving the // parent directory. string get_parent_directory(in string directory) raises (CadUtility::CadError); }


    Disposition: ?
    Disposition Parameter: ?

  • Reported: CAD 1.1 — Wed, 10 Mar 2004 05:00 GMT
  • Disposition: Resolved — CAD 1.2
  • Disposition Summary:

    see below

  • Updated: Fri, 6 Mar 2015 20:58 GMT