Project

General

Profile

1
/*
2
License: LGPL as per: http://www.gnu.org/copyleft/lesser.html
3
$Id$
4
*/
5

    
6
/**
7
 * Stores a Web Map Context (WMC) Collection document as defined by the Open 
8
 * GIS Consortium http://opengis.org and extensions the the WMC.  
9
 * @constructor
10
 * @base ModelBase
11
 * @author Mike Adair
12
 * @param modelNode Pointer to the xml node for this model from the config file.
13
 * @param parent    The parent model for the object.
14
 */
15
function ContextCollection(modelNode, parent) {
16
  // Inherit the ModelBase functions and parameters
17
  ModelBase.apply(this, new Array(modelNode, parent));
18

    
19
  /** Insert a new context.
20
    * @param context An XML node which describes the context.
21
    * @param zindex The position to insert this context in the contextList, if set
22
    * to null this context will be inserted at the end.
23
    * @return The identifier string used to reference this context.
24
    */
25
  this.insertContext=function(context,zindex){
26
    //TBD Fill this in.
27
  }
28

    
29
  /** Delete this context.
30
   * @param id The context identifier.
31
   */
32
  this.deleteContext=function(id){
33
    //TBD Fill this in.
34
  }
35

    
36
  /** Move this context to a new position in the contextList.
37
    * @param context The context id to move.
38
    * @param zindex The position to move this context to in the contextList, if set
39
    * to null this context will be inserted at the end.
40
    */
41
  this.reorderContext=function(context,zindex){
42
    //TBD Fill this in.
43
  }
44

    
45
  /** Select this context for further operations 
46
    * @param context The context id to select.
47
    * @param selected Set to true/false.
48
    */
49
  this.selectContext=function(context,selected){
50
    for(var i=0;i<this.listeners["select"].length;i++) {
51
      this.listeners["select"][i][0](context,this.listeners["select"][i][1]);
52
    }
53
  }
54

    
55
}
(3-3/18)