source: MILK/trunk/milk_server/milk_server/models/selectedItem.py @ 4469

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/MILK/trunk/milk_server/milk_server/models/selectedItem.py@4469
Revision 4469, 1.6 KB checked in by cbyrom, 12 years ago (diff)

Strip out code not relevant to MILK - mainly WCS and WMS stuff - also including the CSML server code + trackback code
Also tidy up structure of 'public' dir - setting up new 'style' dir and
centralising icons in icons dir + remove all unused icons, javascript and stylesheets.
Also strip out testcase code and populate new test directory structure.

Line 
1# Copyright (C) 2007 STFC & NERC (Science and Technology Facilities Council).
2# This software may be distributed under the terms of the
3# Q Public License, version 1.0 or later.
4# http://ndg.nerc.ac.uk/public_docs/QPublic_license.txt
5#
6"""
7 Simple data class to store basic info on selected items - for use with the selections + view tabs
8
9 @author C Byrom Feb 08
10"""
11
12from milk_server.lib import Utilities
13import logging
14
15log = logging.getLogger(__name__)
16           
17class SelectedItem:
18    ''' A simple object representing key info on selected items '''
19    def __init__(self,entryID,title,kmlURL,wmcURL):
20        """
21        Constructor to initialise the selected item object
22        @param entryID: Entry ID of related DIF record
23        @param title: Title of selected item
24        @param kmlURL: Endpoint of KML doc relating to selected item, if it exists
25        @param wmcURL: WMC Endpoint of selected item, if it exists   
26        """
27       
28        self.entryID = entryID
29        self.title = title
30        self.kmlURL = kmlURL
31        self.wmcURL = wmcURL
32        #self.kmlList = Utilities.recreateListFromUnicode(kmlURL)
33        #self.wmcList = Utilities.recreateListFromUnicode(wmcURL)
34        if kmlURL:
35            self.kmlList = Utilities.urlListDecode(kmlURL)
36        else:
37            self.kmlList = []
38        if wmcURL:
39            self.wmcList = Utilities.urlListDecode(wmcURL)
40        else:
41            self.wmcList = []
42
43
44        log.debug('SelectedItem: kmlURL = %s, wmcURL = %s, kmlList = %s, wmcList = %s' %
45                  tuple(repr(x) for x in (self.kmlURL, self.wmcURL, self.kmlList, self.wmcList)))
Note: See TracBrowser for help on using the repository browser.