[bknr-cvs] ksprotte changed trunk/projects/bos/web/poi-handlers.lisp

BKNR Commits bknr at bknr.net
Wed Sep 3 11:33:06 UTC 2008


Revision: 3777
Author: ksprotte
URL: http://bknr.net/trac/changeset/3777

poi-xml-handler is now ready for ptviewer's /poi-xml/PTDefault.html
requests by using :query-function #'find-poi-or-ptdefault

U   trunk/projects/bos/web/poi-handlers.lisp

Modified: trunk/projects/bos/web/poi-handlers.lisp
===================================================================
--- trunk/projects/bos/web/poi-handlers.lisp	2008-09-03 11:04:05 UTC (rev 3776)
+++ trunk/projects/bos/web/poi-handlers.lisp	2008-09-03 11:33:06 UTC (rev 3777)
@@ -441,9 +441,14 @@
             (with-media ("movie" "Video")
               (with-element "url" (text (poi-movie-url movie))))))))))
 
+(defun find-poi-or-ptdefault (string)
+  (if (string= string "PTDefault.html")
+      :ptdefault
+      (find-poi string)))
+
 (defclass poi-xml-handler (object-handler)
   ()
-  (:default-initargs :object-class 'poi :query-function #'find-poi))
+  (:default-initargs :query-function #'find-poi-or-ptdefault))
 
 
 (defmethod handle-object ((handler poi-xml-handler) poi)
@@ -455,6 +460,10 @@
       (with-xml-response (:xsl-stylesheet-name "/static/poi.xsl")
         (write-poi-xml poi lang)))))
 
+(defmethod handle-object ((handler poi-xml-handler) (poi (eql :ptdefault)))
+  "ptviewer will request /poi-xml/PTDefault.html"
+  )
+
 ;;; poi-kml-handler
 (defun poi-description-google-earth (poi language &key (image-width 120))
   (labels ((website-path (path &rest args)




More information about the Bknr-cvs mailing list