Changeset 4468 for MILK


Ignore:
Timestamp:
20/11/08 15:36:20 (11 years ago)
Author:
cbyrom
Message:

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.

Location:
MILK/trunk/milk_server/milk_server
Files:
2 added
11 deleted
10 edited
2 moved

Legend:

Unmodified
Added
Removed
  • MILK/trunk/milk_server/milk_server/controllers/atom_editor/editatom.py

    r4448 r4468  
    55 @author: C Byrom, Tessella Sep 2008 
    66''' 
    7 from ows_server.lib.base import * 
    8 from ows_server.models.form import * 
    9 from ows_server.models import Utilities 
     7from milk_server.lib.base import * 
     8from milk_server.models.form import * 
    109from ndgUtils import ndgObject 
    1110from paste.request import parse_querystring 
    12 from ows_server.lib import mailer 
    13 from ows_server.lib.ndgInterface import interface  
     11from milk_server.lib import mailer 
     12from milk_server.lib.ndgInterface import interface  
    1413from xml.parsers.expat import ExpatError 
    1514import logging, traceback, sys 
     
    2221from ndgUtils.models.utilities import escapeSpecialCharacters 
    2322from ndgUtils.vocabtermdata import VocabTermData as VTD 
    24 import ows_server.templates.htmlUtilities as utils 
     23import milk_server.lib.htmlUtilities as utils 
    2524from granulatorTool.granulite import granulite as granulite 
    2625 
     
    108107                self.__processCSMLFile(file) 
    109108        except Exception, e: 
    110             return self.__handleError(e, template='atom_granulator') 
     109            return self.__handleError(e, template='atom_editor/atom_granulator') 
    111110 
    112111        # save new data 
     
    116115        # reloaded and displayed 
    117116        logging.info("File data loaded and extracted to atom") 
    118         h.redirect_to(controller = 'editatom', action='edit', \ 
     117        h.redirect_to(controller = 'atom_editor/editatom', action='edit', \ 
    119118                        uri = c.atom.ndgURI) 
    120119 
     
    208207        # now do redirection - NB, this ensures that current atom contents are 
    209208        # reloaded and displayed 
    210         h.redirect_to(controller = 'editatom', action='edit', \ 
     209        h.redirect_to(controller = 'atom_editor/editatom', action='edit', \ 
    211210                        uri = c.atom.ndgURI) 
    212211 
     
    267266        c.uri = c.atom.ndgURI 
    268267         
    269         c.saveLink = h.url_for(controller='editatom',action='saveAtom', \ 
     268        c.saveLink = h.url_for(controller='atom_editor/editatom',action='saveAtom', \ 
    270269                               saveLevel='1',  uri = c.atom.ndgURI) 
    271         c.saveLink2 = h.url_for(controller='editatom',action='saveAtom', saveLevel='2') 
    272         c.saveAssoc = h.url_for(controller='editatom',action='saveAtom', \ 
     270        c.saveLink2 = h.url_for(controller='atom_editor/editatom',action='saveAtom', saveLevel='2') 
     271        c.saveAssoc = h.url_for(controller='atom_editor/editatom',action='saveAtom', \ 
    273272                                 saveLevel = self.REMOVE_ASSOCIATIONS) 
    274273         
     
    279278            atomType = g.vtd.DEPLOYMENT_TERM 
    280279         
    281         c.addEntityLink = h.url_for(controller='listatom',action='list', searchData = '0', \ 
     280        c.addEntityLink = h.url_for(controller='atom_editor/listatom',action='list', searchData = '0', \ 
    282281                               associatedAtomID = c.atom.ndgURI, \ 
    283282                               associatedAtomType = atomType,  
    284283                               associationType = utils.ENTITY_ASSOCIATION) 
    285284             
    286         c.addGranuleLink = h.url_for(controller='listatom',action='list', searchData = '0', \ 
     285        c.addGranuleLink = h.url_for(controller='atom_editor/listatom',action='list', searchData = '0', \ 
    287286                               associatedAtomID = c.atom.ndgURI, \ 
    288287                               associatedAtomType = atomType,  
    289288                               associationType = utils.GRANULE_ASSOCIATION) 
    290289             
    291         c.addDeploymentLink = h.url_for(controller='listatom',action='list', searchData = '0', \ 
     290        c.addDeploymentLink = h.url_for(controller='atom_editor/listatom',action='list', searchData = '0', \ 
    292291                               associatedAtomID = c.atom.ndgURI, \ 
    293292                               associatedAtomType = atomType,  
     
    315314 
    316315        try: 
    317             return render("genshi", 'atom_editor') 
     316            return render("genshi", 'atom_editor/atom_editor') 
    318317         
    319318        except ExpatError, e: 
     
    570569                atom = self.saveAtomToExist(Atom(**dict(inputs))) 
    571570                 
    572                 h.redirect_to(controller = 'editatom', action='edit', 
     571                h.redirect_to(controller = 'atom_editor/editatom', action='edit', 
    573572                               uri = atom.ndgURI) 
    574573            except Invalid, e: 
     
    590589 
    591590        try: 
    592             return render("genshi", 'atom_creator') 
     591            return render("genshi", 'atom_editor/atom_creator') 
    593592 
    594593        except Exception, e: 
     
    604603         
    605604        try: 
    606             return render("genshi", 'atom_granulator') 
     605            return render("genshi", 'atom_editor/atom_granulator') 
    607606 
    608607        except Exception, e: 
  • MILK/trunk/milk_server/milk_server/controllers/atom_editor/listatom.py

    r4442 r4468  
    55 @author: C Byrom, Tessella Sep 2008 
    66''' 
    7 from ows_server.lib.base import * 
    8 from ows_server.models import Utilities 
     7from milk_server.lib.base import * 
    98from ndgUtils import ndgObject 
    109from paste.request import parse_querystring 
    11 from ows_server.lib.ndgInterface import interface  
     10from milk_server.lib.ndgInterface import interface  
    1211from xml.parsers.expat import ExpatError 
    1312import logging 
     
    2120from ndgUtils.models.MolesEntity import MolesEntity as ME 
    2221from ndgUtils.vocabtermdata import VocabTermData as VTD, VocabTermItem as VTI 
    23 import ows_server.templates.htmlUtilities as utils 
     22import milk_server.lib.htmlUtilities as utils 
    2423from editatom import EditatomController as ec 
    2524 
     
    5251        logging.info("Rendering atom home page") 
    5352        c.title = "Atom Editor Home Page" 
    54         return render("genshi", "atom_home") 
     53        return render("genshi", "atom_editor/atom_home") 
    5554 
    5655     
     
    9291            c.associateLink = "" 
    9392            if associatedAtomID: 
    94                 c.associateLink = h.url_for(controller='editatom', action='saveAtom', \ 
     93                c.associateLink = h.url_for(controller='atom_editor/editatom', action='saveAtom', \ 
    9594                    uri = associatedAtomID, saveLevel = ec.ADD_ASSOCIATIONS) 
    96             c.searchLink = h.url_for(controller = 'listatom', action='list', \ 
     95            c.searchLink = h.url_for(controller = 'atom_editor/listatom', action='list', \ 
    9796                                     searchData='1', associatedAtomID = associatedAtomID) 
    9897             
     
    129128                                                     selected = inputs.get('providerID')) 
    130129 
    131             return render("genshi", 'atom_list') 
     130            return render("genshi", 'atom_editor/atom_list') 
    132131 
    133132        except Exception, e: 
  • MILK/trunk/milk_server/milk_server/controllers/discovery.py

    r4259 r4468  
    22import logging 
    33 
    4 from ows_server.lib.base import * 
     4from milk_server.lib.base import * 
    55from paste.request import parse_querystring 
    6 from ows_server.lib.Date import * 
    7 from ows_server.templates import DiscoveryTemplate 
     6from milk_server.lib.Date import * 
     7from milk_server.templates import DiscoveryTemplate 
    88from ndgUtils import ndgSearch 
    99from ndgUtils import DocumentRetrieve 
    1010from ndgUtils.DocumentRetrieve import ndgVocabPOX as VS 
    1111from ndgUtils import ndgObject 
    12 from ows_server.models.DIF import DIF 
    13 from ows_server.models.DiscoveryState import DiscoveryState,constraints 
    14 from ows_server.lib.mailer import mailHandler 
    15 from ndgUtils.xmlHandler2 import xmlHandler 
     12from milk_server.models.DIF import DIF 
     13from milk_server.models.DiscoveryState import DiscoveryState,constraints 
     14from milk_server.lib.mailer import mailHandler 
    1615 
    1716logging.basicConfig(level=logging.DEBUG, 
  • MILK/trunk/milk_server/milk_server/controllers/error.py

    r3536 r4468  
    33from pylons.middleware import media_path, error_document_template 
    44from pylons.util import get_prefix 
    5 from ows_server.lib.base import * 
     5from milk_server.lib.base import * 
    66 
    77class ErrorController(BaseController): 
  • MILK/trunk/milk_server/milk_server/controllers/login.py

    r3919 r4468  
    11 
    2 from ows_server.lib.base import * 
     2from milk_server.lib.base import * 
    33 
    44import logging 
  • MILK/trunk/milk_server/milk_server/controllers/logout.py

    r3901 r4468  
    1 from ows_server.lib.base import * 
     1from milk_server.lib.base import * 
    22import logging 
    33log = logging.getLogger(__name__) 
  • MILK/trunk/milk_server/milk_server/controllers/retrieve.py

    r4445 r4468  
    11 
    2 from ows_server.lib.base import * 
    3 from ows_server.models import Utilities 
     2from milk_server.lib.base import * 
    43from ndgUtils import ndgObject 
    54from paste.request import parse_querystring 
    6 from ows_server.models import stubB,DIF 
    7 from ows_server.lib import mailer 
    8 from ows_server.lib.ndgInterface import interface  
     5from milk_server.models import stubB,DIF 
     6from milk_server.lib import mailer 
     7from milk_server.lib.ndgInterface import interface  
    98from xml.parsers.expat import ExpatError 
    109import logging 
     
    9998            c.atom.lookupDeploymentsInfo(dr, lookupIndirectReferences = \ 
    10099                                         lookupIndirectReferences) 
    101             return render('genshi', 'deployments_data') 
     100            logging.info("- deployments data retrieved - now rendering") 
     101            return render('genshi', 'atom_editor/deployments_data') 
    102102         
    103103        except ExpatError, e: 
     
    158158            elif viewFormat == ndgObject.ATOM_DOC_TYPE or \ 
    159159                viewFormat ==  ndgObject.ATOM_BACKUP_DOC_TYPE: 
    160                 renderTemplate = 'atom_editor' 
     160                renderTemplate = 'atom_editor/atom_editor' 
    161161                c.xmlh=x 
    162162                c.atom = Atom(xmlString=str(x), ndgObject = self.uri) 
    163                 c.r = info = self.__mytb('') 
    164163                c.title = 'Viewing [%s]'%self.uri 
    165164                c.deploymentsURL = h.url_for(controller='retrieve', \ 
     
    175174                renderTemplate = 'stubB' 
    176175                c.doc=stubB.stubB(x.tree,self.cf.config) 
    177                 c.tbinfo=self.__mytb(c.doc.name) 
    178176                name=c.doc.abbreviation 
    179177                 
     
    194192                renderTemplate = 'numsim' 
    195193                c.xmlh=x 
    196                 c.r = info = self.__mytb('') 
    197194                name=x.getText('NS_Name') 
    198195                c.name=name 
     
    265262            c.xml=message 
    266263        return render('content') 
    267          
    268  
    269     def __mytb(self,name): 
    270         ''' Get the trackback info for this page  
    271         (can't do it in Kid because it doesn't do substitutions in comments) ''' 
    272         s='''<!-- 
    273         <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
    274              xmlns:dc="http://purl.org/dc/elements/1.1/" 
    275              xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"> 
    276         <rdf:Description 
    277             rdf:about="%s" 
    278             dc:identifier="%s" 
    279             dc:title="%s" 
    280             trackback:ping="%s" /> 
    281         </rdf:RDF> 
    282         -->'''%(self.uri,g.server+h.url_for(),name,g.server+h.url_for(controller="trackback")) 
    283         return s 
  • MILK/trunk/milk_server/milk_server/controllers/selectedItems.py

    r3842 r4468  
    1111""" 
    1212 
    13 from ows_server.lib.base import * 
     13from milk_server.lib.base import * 
    1414from paste.request import parse_querystring 
    15 from ows_server.models import Utilities 
    16 from ows_server.models import selectedItem 
    17 from ows_server.lib.wmc_util import * 
    18 from ows_server.controllers import viewItems 
     15from milk_server.models import selectedItem 
     16from milk_server.lib.wmc_util import * 
     17from milk_server.controllers import viewItems 
    1918import copy 
    2019import urllib 
  • MILK/trunk/milk_server/milk_server/controllers/template.py

    r2476 r4468  
    1 from ows_server.lib.base import * 
     1from milk_server.lib.base import * 
    22 
    33class TemplateController(BaseController): 
  • MILK/trunk/milk_server/milk_server/controllers/viewItems.py

    r3701 r4468  
    1010""" 
    1111 
    12 from ows_server.lib.base import * 
     12from milk_server.lib.base import * 
    1313from paste.request import parse_querystring 
    14 from ows_server.models import Utilities 
    15 from ows_server.lib.wmc_util import * 
    16 from ows_server.models import selectedItem 
     14from milk_server.lib import Utilities 
     15from milk_server.lib.wmc_util import * 
     16from milk_server.models import selectedItem 
    1717import copy 
    1818 
  • MILK/trunk/milk_server/milk_server/controllers/wayf.py

    r3992 r4468  
    1 from ows_server.lib.base import * 
     1from milk_server.lib.base import * 
    22import logging 
    33log = logging.getLogger(__name__) 
  • MILK/trunk/milk_server/milk_server/docs/index.txt

    r2476 r4468  
    1 ows_server 
     1milk_server 
    22++++++++++ 
    33 
Note: See TracChangeset for help on using the changeset viewer.