more experimental rss code. Not finished yet though.
authorzapata <zapata>
Thu, 15 May 2003 17:14:59 +0000 (17:14 +0000)
committerzapata <zapata>
Thu, 15 May 2003 17:14:59 +0000 (17:14 +0000)
18 files changed:
bundles/admin_it.properties [new file with mode: 0755]
etc/producer/RSS.template
source/default.properties
source/mir/generator/FreemarkerGenerator.java
source/mir/producer/RSSProducerNode.java
source/mir/producer/reader/DefaultProducerNodeBuilders.java
source/mir/rss/RSSChannel.java [deleted file]
source/mir/rss/RSSData.java
source/mir/rss/RSSItem.java [deleted file]
source/mir/rss/RSSReader.java
source/mir/rss/RSSToMapConverter.java [deleted file]
source/mir/util/ParameterExpander.java
source/mir/util/XMLReader.java
templates/admin/FUNCTIONS.template
templates/admin/commentlist.template
templates/admin/contentlist.template
templates/admin/linksimcslist.template [deleted file]
templates/admin/messagelist.template

diff --git a/bundles/admin_it.properties b/bundles/admin_it.properties
new file mode 100755 (executable)
index 0000000..089a12b
--- /dev/null
@@ -0,0 +1,579 @@
+########## admin #######
+# language: italiano
+# $Id: admin_it.properties,v 1.1 2003/05/15 17:14:59 zapata Exp $
+
+# missing (master value = "English")
+languagename = italiano
+
+# general
+yes = si
+no = no
+dontcare = uguale
+all = tutto
+month = mese
+year = anno
+# changed! (it was "file")
+file = documento
+new = nuovo
+by = da
+help = aiuto
+
+
+# actions
+insert = inserisci
+save = salva
+# changed! (it was "edit")
+edit = edita
+delete = cancella
+add = aggiungi
+filter = filtra
+# changed! (it was "attacca") 
+attach = allega
+list = sfoglia
+back = indietro
+cancel = annulla
+preview = anteprima                      
+# changed! (it was "reset")
+reset = azzera
+administer = amministratore
+search = cerca
+
+
+# special
+fileedit = fileEdit                            
+
+
+# records
+records = entrate
+show_from_to = da {0} a {1}
+# changed! (it was "non risultano entrate!")
+no_matches_found = nessuna corrispondenza trovata!
+list.next = prossimo
+list.previous = precedente
+
+
+# media - used by image, audio, video and other media
+media.created = creato
+media.changed = ultima modifica
+media.published = pubblicato
+media.format = formato
+media.rights = Copyright
+media.type = tipo
+# changed! (it was "media folder")
+media.mediafolder = cartella media
+media.title = titolo
+media.size = grandezza
+media.description = descrizione
+media.date = data
+media.location = luogo di origine
+media.creator = autore
+media.keywords = parola chiave
+media.comment = commento interno
+# changed! in bibliography *slang* is "fonte", that actually means "source" (it was "origine")
+media.source = fonte
+# changed! (it was "da pubblicare" which means "to be published") <-- correct?
+media.is_published = pubblicato
+media.icon = icona
+media.nr_of_media = numero dei media da pubblicare (max 20)
+media.nr_of_media.submit = clicca
+
+medialist.search_text_in = cerca questa parola in
+
+
+# image
+image.htmltitle = immagine
+# changed! (it was "immagini")
+imagelist.htmltitle = lista delle immagini
+
+
+# audio
+audio.htmltitle = audio
+audiolist.htmltitle = lista dei file audio
+
+
+# video
+video.htmltitle = video
+videolist.htmltitle = lista dei video
+
+
+# other
+# changed! (it was "lista di altri media")
+other_media.htmltitle = altro media
+other_medialist.htmltitle = lista di altri media
+
+
+# breaking
+breaking.htmltitle = ultima notizia
+breaking.textinfo = (max. 5 linee / 250 caratteri)
+breaking.text = testo
+breaking.date = data
+
+breakinglist.htmltitle = ultime notizie
+
+
+# comment
+comment.htmltitle = commento
+comment.date = data
+comment.title = titolo
+comment.published = pubblicato
+comment.text = testo
+comment.address = indirizzo
+comment.phone = telefono
+comment.email = email
+comment.url = url
+comment.creator = autore
+comment.article = dell'articolo
+comment.html = HTML
+comment.status = stato
+comment.language = lingua
+
+comment.operation.hide = nascondi
+comment.operation.unhide = rendi visibile
+
+
+#commentlist
+commentlist.htmltitle = lista dei commenti
+commentlist.published = pubblicato
+commentlist.hidden = rimosso
+commentlist.allcomments = tutti i commenti a questo articolo
+commentlist.search = vai!
+commentlist.activate = attiva i cambiamenti
+commentlist.order = ordina
+commentlist.order.datedesc = data (disc.)                  
+commentlist.order.dateasc = data (asc.)                    
+commentlist.order.articletitle = titolo dell'articolo             
+
+commentsearch.field = cerca
+commentsearch.field.title = titolo
+commentsearch.field.creator = autore
+commentsearch.field.description = descrizione
+commentsearch.value = valore
+
+commentsearch.publishedstate = stato di pubblicazione
+commentsearch.publishedstate.hidden = nascosto 
+commentsearch.publishedstate.published = pubblicato
+
+commentsearch.status = stato
+
+commentsearch.order = ordina
+commentsearch.order.datedesc = data (desc.)
+commentsearch.order.dateasc = data (asc.)
+commentsearch.order.articletitle = titolo dell'articolo
+
+commentsearch.searchbutton = cerca
+
+
+# confirm
+confirm.htmltitle = conferma cancella
+confirm.really_delete = vuoi davvero cancellare questa entrata?
+# missing (master value = "This will erase the entry from the database unrecoverably.")
+confirm.text = L'articolo verr\88 cancellato definitivamente dalla banca dati.
+
+
+# content
+content.htmltitle = articolo
+content.owner = proprietario
+content.language = lingua
+content.articletype = tipo di articolo
+# not sure "tema" (theme) is the best translation...
+content.topic = tema
+content.title = titolo lungo
+content.subtitle = sottotitolo
+# not sure about that (context = contesto)
+content.edittitle = contesto
+content.location = provenienza
+content.creator = autore
+content.creator.email = Email
+content.creator.url = Web
+content.creator.address = indirizzo
+content.creator.telephone = telefono
+content.abstract = introduzione
+content.content = contenuto
+content.html = in HTML?
+content.comment = commento interno
+content.internal = (interno)
+
+content.attachments = aggiungi
+content.images = immagini
+content.audio = audio
+content.video = video
+content.other = altri media
+content.media = media
+content.addimage = aggiungi immagine
+content.uploadimage = carica immagine
+content.addaudio = aggiungi audio
+content.uploadaudio = carica audio
+content.addvideo = aggiungi video
+content.uploadvideo = carica video
+content.addother = aggiungi altri media
+content.uploadother = carica altri media
+
+content.creationdate = data
+content.modificationdate = ultima modifica
+content.status = stato
+content.type = tipo di articolo
+content.import_date = data d'importo
+content.lastchange_date = ultima modifica
+content.create_date = data
+content.published = pubblicato
+content.comments = commenti
+
+content.family = Bambini & Genitori
+content.children = Bambini
+content.viewchildren = vedi
+content.parent = Genitore
+content.viewparent = vedi
+content.clearparent = deseleziona
+content.selectparent = seleziona
+
+content.operation.hide = nascondi
+content.operation.unhide = rendi visibile
+# missing (master value = "newswire") no idea... maybe "colonna delle notizie"? (news column)
+content.operation.newswire = 
+
+contentsearch.value = cerca
+contentsearch.field = campo
+contentsearch.field.title = titolo 
+contentsearch.field.creator = autore
+contentsearch.field.contents = contenuto
+
+# missing (master value = "publication state")
+contentsearch.publishedstate = stato di pubblicazione
+# missing (master value = "hidden")
+contentsearch.publishedstate.hidden = nascosto
+# missing (master value = "published")
+contentsearch.publishedstate.published = pubblicato
+
+# missing (master value = "article type")
+contentsearch.articletype = tipo di articolo
+
+contentsearch.order = ordine: 
+contentsearch.order.datedesc = recenti prima
+contentsearch.order.dateasc = vecchi prima
+contentsearch.order.title = titolo
+contentsearch.order.creator = autore
+contentsearch.searchbutton = cerca
+
+
+#contentlist
+contentlist.htmltitle = lista degli articoli
+contentlist.comments = commenti
+contentlist.select = seleziona
+
+
+# language
+language.htmltitle = lingue
+language.name = lingua
+language.code = codice della lingua
+
+languagelist.htmltitle = lista delle lingue
+
+# login
+login.htmltitle = login
+login.info = quest'area \u008f unicamente accessibile a gruppi autorizzati. Se desideri collaborare come editore, per favore contattaci
+login.title = login
+login.name = login
+login.password = password
+login.language = lingua
+login.submit = OK
+
+
+# mediafolder
+mediafolder.htmltitle = mediafolder
+mediafolder.date = data
+mediafolder.name = nome
+mediafolder.location = luogo di origine
+mediafolder.keywords = parola chiave
+mediafolder.comment = commento
+
+# changed! (it was "lista dei mediaFolder")
+mediafolderlist.htmltitle = lista delle cartelle media
+
+
+# message
+message.htmltitle = messaggio
+message.date = data
+message.title = titolo
+message.creator = autore
+message.text = testo
+message.textinfo = (max. 5 linee / 250 caratteri)
+
+messagelist.htmltitle = lista dei messaggi
+
+# admin start page
+# changed! (it was "admin")
+start.htmltitle = amministrazione
+
+start.content.new = nuovo articolo
+start.show = mostra
+start.open_by_id = apri id
+
+# changed! (it was "articoli rimossi")
+start.content.hidden = articoli nascosti
+start.content.not_published = articoli rimossi
+start.content.with_media = articoli con media
+start.content.last_changes = ultimi cambiamenti
+start.content.with_comments = con commento interno
+start.content.all = tutti
+start.content.search = cerca
+
+# missing (master value = "{0}") ???
+start.allarticlesoftype = 
+
+start.producers.title = AGGIORNARE MANUALMENTE
+# changed! (it was "aggiornare tutto il nuovo") <-- not *really* italian
+start.producers.produceAllNew = Aggiornare Tutto 
+# changed! (it was "Advanced Page")
+start.producers.advanced = Aggiornamento Avanzato (usare con cautela)        
+
+start.administer.title = AMMINISTRA
+start.administer.comments = commenti
+
+start.breaking.title = ULTIMA NOTIZIA
+# missing (master value = "LIST")
+start.list.title = 
+# missing (master value = "edit include files")
+start.fileedit.includes.title = 
+# missing (master value = "ADD / EDIT")
+start.addandedit.title = aggiungi / 
+# missing (master value = "EXTRA")
+start.extra.title = 
+# missing (master value = "SEARCH")
+start.search.title = 
+start.other_media.title = MATERIALE DA ALTRI MEDIA
+start.images.title = IMMAGINI
+start.video.title = VIDEO
+start.audio.title = AUDIO
+# missing (master value = "MEDIA")
+start.media.title = 
+start.mediafolder.title = MEDIAFOLDER
+start.languages.title = LINGUA
+start.imcs.title = IMCS
+start.messageboard.title = colonna messaggi interni
+start.messageboard.no_messages = non ci sono messaggi
+
+# missing (master value = "super-user functions (use with care!)")
+start.superusermenu = 
+
+
+# topic
+topic.htmltitle = tema
+topic.title = nome
+topic.description = descrizione
+topic.filename = nome della cartella
+topic.main_url = home page
+topic.archive_url = URL dell' archivio
+
+topiclist.htmltitle = lista dei temi
+
+
+# users
+user.htmltitle = utente
+user.login = login
+user.password = password
+# missing (master value = "Password (confirmation)")
+user.password2 = 
+user.admin = admin
+
+userlist.htmltitle = lista degli utenti
+
+
+#articletype
+# missing (master value = "Article type")
+articletype.htmltitle = 
+# missing (master value = "id")
+articletype.id = 
+# missing (master value = "Name")
+articletype.name = 
+
+# missing (master value = "Article types")
+articletypelist.htmltitle = 
+
+
+
+#commentstatus
+# missing (master value = "Comment status")
+commentstatus.htmltitle = 
+# missing (master value = "id")
+commentstatus.id = 
+# missing (master value = "Name")
+commentstatus.name = 
+
+# missing (master value = "Comment status values")
+commentstatuslist.htmltitle = 
+
+
+
+#file editing
+fileedit.htmltitle = Edit file
+fileedit.filename = nome del file
+# missing (master value = "Subdirectory")
+fileedit.subdirectory = 
+
+fileeditlist.htmltitle = Editable files
+fileeditlist.filename = nome del file
+# missing (master value = "Subdirectory")
+fileeditlist.dirname = 
+
+
+#producers
+producer.producer = Producer name                    
+producer.verb.name = nome del processo                      
+producer.verb.description = descrizione del processo      
+producer.verb.enqueue = in coda                       
+
+producer.job.name = lavoro                              
+producer.job.status = stato                        
+producer.job.date = ultimo cambiamento                      
+producer.job.cancel = annulla                
+producer.job.abort = uccidi            
+# missing (master value = "Queue is empty")
+producer.job.empty = 
+
+producer.jobqueue.title = lavori in corso               
+producer.jobqueue.refresh = aggiorna                    
+producer.producerlist.title = aggiungi un luovo lavoro           
+
+producerqueue.htmltitle = aggiornato manualmente
+
+
+#superusermenu
+# missing (master value = "Super-user functions")
+superusermenu.htmltitle = 
+# missing (master value = "MANAGE")
+superusermenu.manage = 
+# missing (master value = "topics")
+superusermenu.topics = 
+# missing (master value = "article types")
+superusermenu.articletypes = 
+# missing (master value = "comment status values")
+superusermenu.comment_statuses = 
+# missing (master value = "users")
+superusermenu.users = 
+# missing (master value = "languages")
+superusermenu.languages = 
+# missing (master value = "apply anti-abuse measures")
+superusermenu.abuse = 
+# missing (master value = "IMCS (obsolete)")
+superusermenu.imcs = 
+
+
+#abuse
+# missing (master value = "anti-abuse measures")
+abuse.htmltitle = 
+
+# missing (master value = "Setting")
+abuse.setting = 
+# missing (master value = "Value")
+abuse.value = 
+
+# missing (master value = "Turn off open posting")
+abuse.disableopenpostings = 
+# missing (master value = "Require a password for open postings")
+abuse.openpostingpassword = 
+# missing (master value = "Log IPs for open postings")
+abuse.logpostings = 
+# missing (master value = "Logging buffer size")
+abuse.logsize = 
+# missing (master value = "Use cookies for blocked users")
+abuse.cookies = 
+# missing (master value = "Action for blocked article")
+abuse.articleaction = 
+# missing (master value = "Action for blocked comment")
+abuse.commentaction = 
+
+# missing (master value = "Show the IP log")
+abuse.showlog = 
+# missing (master value = "Manage filters")
+abuse.showfilters = 
+
+# missing (master value = "Time")
+abuse.log.time = 
+# missing (master value = "IP number")
+abuse.log.address = 
+# missing (master value = "Object")
+abuse.log.object = 
+# missing (master value = "Browser")
+abuse.log.browser = 
+
+# missing (master value = "Filters")
+abuse.filters = 
+# missing (master value = "Type")
+abuse.filter.type = 
+# missing (master value = "IP Number")
+abuse.filtertype.ip = 
+# missing (master value = "Regular expression")
+abuse.filtertype.regexp = 
+# missing (master value = "Expression")
+abuse.filter.expression = 
+
+
+# head
+head.start = inizio
+head.logout = uscire
+head.help = aiuto
+head.search = cerca
+head.logged_in = sei connesso
+
+# foot
+foot.top = sopra
+
+
+########## dynamic values ##########
+
+# (users can add new types, how to translate these)
+# suggestion if not in bundle use value as Text
+
+
+# Article types
+# missing (master value = "Open posting")
+articletypes.openposting = 
+# missing (master value = "Newswire")
+articletypes.newswire = 
+# missing (master value = "Feature")
+articletypes.feature = 
+# missing (master value = "Topic-special")
+articletypes.topicspecial = 
+# missing (master value = "Startpage-special")
+articletypes.startspecial = 
+
+# Comment status values
+# missing (master value = "normal")
+commentstatus.normal = 
+# missing (master value = "good")
+commentstatus.good = 
+# missing (master value = "bad")
+commentstatus.bad = 
+
+
+
+########## error ##########
+error.htmltitle = il sistema ha causato un errore
+error.title = ahi! ahi! ahi!
+error.text = Pu\u0098 succedere. Se il messaggio seguente non ti \u008e chiaro, potresti <a href="mailto:{0}">{1}</a>:
+error.text2 = Per favore spedisci un e-mail con il <font color="Red">testo che appare in rosso</font> e una descrizione dettagliata al seguente indirizzo <a href="mailto:{0}">{1}</a>. Grazie!
+
+usererror.htmltitle = manca qualchecosa
+usererror.title = ahi! ahi! ahi!
+usererror.text = i dati che hai introdotto hanno causato il seguente errore:
+usererror.what_to_do = Per favore, schiaccia il bottone indietro e riprova
+
+# missing (master value = "The format of the media you uploaded is not supported")
+media.error.unsupportedformat = 
+# missing (master value = "The new password must be entered twice")
+user.error.missingpasswords = 
+# missing (master value = "The passwords are not equal")
+user.error.passwordmismatch = 
+# missing (master value = "A password must be entered")
+user.error.missingpassword = 
+
+
+########## infomessages ##########
+# missing (master value = "Information")
+infomessage.htmltitle = 
+infomessage.produceAllNewAddedToQueue = la tua richiesta \u008e stata aggiunta alla coda.
+
+########## HTML-charset ##########
+# missing (master value = "utf-8")
+htmlcharset = 
+\r
index 26e7c32..3637fd3 100755 (executable)
@@ -1,9 +1,3 @@
-<comment>
-  Template file for an rdf file.
-  
-  Variables:
-
-</comment>
 <?xml version="1.0" encoding="UTF-8"?>
 
 <rdf:RDF
   xmlns:syn="http://purl.org/rss/1.0/modules/syndication/"
 >
 
-  <channel rdf:about="${config["Producer.ProductionHost"]}">
-    <title>Indymedia-XX</title>
-    <link>${config["Producer.ProductionHost"]}</link>
-    <description>Highlights from Indymedia-XX, a revolutionary expirement in democratic media</description>
-    <dc:publisher>IMC Features Working Group &amp;lt;features@someindymedia.org&amp;gt;</dc:publisher>
+  <channel rdf:about="${utility.encodeXML(channelidentifier)}">
+    <title>${utility.encodeXML(channeltitle)}</title>
+    <link>${utility.encodeXML(channellink)}</link>
+    <description>${utility.encodeXML(channeldescription)}</description>
+    <dc:publisher>${utility.encodeXML(channelpublisher)}</dc:publisher>
     <dc:rights>Open Content License, http://www.opencontent.org</dc:rights>
     <dc:date>${config.now.dc}</dc:date>
     <items>
       <rdf:Seq>
         <list articles as i>   
-          <rdf:li rdf:resource="${config["Producer.ProductionHost"]}${config.docRoot}${i.publish_path}${i.id}.shtml" />
+          <rdf:li rdf:resource="${config["Producer.PublicationHost"]}${config.docRoot}${i.publish_path}${i.id}.shtml" />
         </list>
       </rdf:Seq>
     </items>
index 0a1aac4..ef6d5bf 100755 (executable)
@@ -152,6 +152,9 @@ ServletModule.OpenIndy.DefaultMediaUploadItems=1
 # the url of the static site
 Producer.ProductionHost=http://indy.code-fu.de
 
+# the url of the public site
+Producer.PublicationHost=http://indy.code-fu.de
+
 # Produrce.StorageRoot is the directory, in which
 # the generated HTML pages will be stored
 Producer.StorageRoot=/pub/Dokumente/Indymedia/de-tech/Mir/produced
index 11d8610..97ee1e3 100755 (executable)
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  * In addition, as a special exception, The Mir-coders gives permission to link
- * the code of this program with  any library licensed under the Apache Software License, 
- * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library 
- * (or with modified versions of the above that use the same license as the above), 
- * and distribute linked combinations including the two.  You must obey the 
- * GNU General Public License in all respects for all of the code used other than 
- * the above mentioned libraries.  If you modify this file, you may extend this 
- * exception to your version of the file, but you are not obligated to do so.  
+ * the code of this program with  any library licensed under the Apache Software License,
+ * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
+ * (or with modified versions of the above that use the same license as the above),
+ * and distribute linked combinations including the two.  You must obey the
+ * GNU General Public License in all respects for all of the code used other than
+ * the above mentioned libraries.  If you modify this file, you may extend this
+ * exception to your version of the file, but you are not obligated to do so.
  * If you do not wish to do so, delete this exception statement from your version.
  */
 package mir.generator;
@@ -39,7 +39,7 @@ import java.util.Vector;
 import mir.log.LoggerWrapper;
 import mir.util.RewindableIterator;
 
-import org.apache.commons.beanutils.PropertyUtils;
+import org.apache.commons.beanutils.*;
 
 import freemarker.template.FileTemplateCache;
 import freemarker.template.SimpleScalar;
@@ -336,7 +336,10 @@ public class FreemarkerGenerator implements Generator {
 
     public TemplateModel get(String aKey) throws TemplateModelException {
       try {
-        return makeAdapter(PropertyUtils.getSimpleProperty(object, aKey));
+        if (PropertyUtils.isReadable(object, aKey))
+          return makeAdapter(PropertyUtils.getSimpleProperty(object, aKey));
+        else
+          return makeAdapter(MethodUtils.invokeExactMethod(object, "get", aKey));
       }
       catch (Throwable t) {
         throw new TemplateModelException(t.getMessage());
index 05c77e6..ac41f28 100755 (executable)
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  * In addition, as a special exception, The Mir-coders gives permission to link
- * the code of this program with  any library licensed under the Apache Software License, 
- * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library 
- * (or with modified versions of the above that use the same license as the above), 
- * and distribute linked combinations including the two.  You must obey the 
- * GNU General Public License in all respects for all of the code used other than 
- * the above mentioned libraries.  If you modify this file, you may extend this 
- * exception to your version of the file, but you are not obligated to do so.  
+ * the code of this program with  any library licensed under the Apache Software License,
+ * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
+ * (or with modified versions of the above that use the same license as the above),
+ * and distribute linked combinations including the two.  You must obey the
+ * GNU General Public License in all respects for all of the code used other than
+ * the above mentioned libraries.  If you modify this file, you may extend this
+ * exception to your version of the file, but you are not obligated to do so.
  * If you do not wish to do so, delete this exception statement from your version.
  */
 package mir.producer;
@@ -33,8 +33,7 @@ import java.util.Map;
 
 import mir.log.LoggerWrapper;
 import mir.rss.RSSData;
-import mir.rss.RSSReader;
-import mir.rss.RSSToMapConverter;
+import mir.rss.*;
 import mir.util.ExceptionFunctions;
 import mir.util.ParameterExpander;
 
@@ -55,7 +54,7 @@ public class RSSProducerNode implements ProducerNode {
       ParameterExpander.setValueForKey(aValueMap, expandedKey, null);
       RSSReader reader = new RSSReader();
       RSSData rssData = reader.parseUrl(expandedUrl);
-      ParameterExpander.setValueForKey(aValueMap, expandedKey, RSSToMapConverter.convertRSSData(rssData));
+      ParameterExpander.setValueForKey(aValueMap, expandedKey, rssData);
     }
     catch (Throwable t) {
       Throwable s = ExceptionFunctions.traceCauseException(t);
index 3cd24f9..b458fed 100755 (executable)
@@ -78,6 +78,7 @@ public class DefaultProducerNodeBuilders {
     aBuilderLibrary.registerBuilder("While", LoopProducerNodeBuilder.class);
 
     aBuilderLibrary.registerBuilder("RSS", RSSProducerNodeBuilder.class);
+    aBuilderLibrary.registerBuilder("RDFAggregate", RDFAggregatorProducerNodeBuilder.class);
 
     aBuilderLibrary.registerBuilder("FreeQuery", FreeQueryProducerNodeBuilder.class);
 
@@ -773,6 +774,41 @@ public class DefaultProducerNodeBuilders {
 
 ////////////////////////////////////////////////////////////////////////////////
 
+  public static class RDFAggregatorProducerNodeBuilder extends AbstractProducerNodeBuilder {
+    private final static String   RDF_AGGREGATOR_KEY_ATTRIBUTE = KEY_ATTRIBUTE;
+    private final static String   RDF_AGGREGATOR_SOURCE_ATTRIBUTE = "source";
+    private final static String   RDF_AGGREGATOR_ORDER_ATTRIBUTE = ORDER_ATTRIBUTE;
+    private final static String   RDF_AGGREGATOR_FILTER_ATTRIBUTE = "filter";
+
+    private final static String[] RDF_AGGREGATOR_REQUIRED_ATTRIBUTES = { RDF_AGGREGATOR_KEY_ATTRIBUTE, RDF_AGGREGATOR_SOURCE_ATTRIBUTE };
+    private final static String[] RDF_AGGREGATOR_OPTIONAL_ATTRIBUTES = { RDF_AGGREGATOR_ORDER_ATTRIBUTE, RDF_AGGREGATOR_FILTER_ATTRIBUTE };
+    private final static String[] RDF_AGGREGATOR_SUBNODES = {  };
+
+    private String key;
+    private String source;
+    private String order;
+    private String filter;
+
+    public RDFAggregatorProducerNodeBuilder() {
+      super(RDF_AGGREGATOR_SUBNODES);
+    }
+
+    public void setAttributes(Map anAttributes) throws ProducerConfigExc, XMLReader.XMLReaderExc {
+      XMLReaderTool.checkAttributes(anAttributes, RDF_AGGREGATOR_REQUIRED_ATTRIBUTES, RDF_AGGREGATOR_OPTIONAL_ATTRIBUTES);
+
+      key = (String) anAttributes.get( RDF_AGGREGATOR_KEY_ATTRIBUTE );
+      source = (String) anAttributes.get( RDF_AGGREGATOR_SOURCE_ATTRIBUTE );
+      order = XMLReaderTool.getStringAttributeWithDefault(anAttributes, RDF_AGGREGATOR_SOURCE_ATTRIBUTE, "");
+      filter = XMLReaderTool.getStringAttributeWithDefault(anAttributes, RDF_AGGREGATOR_FILTER_ATTRIBUTE, "");
+    };
+
+    public ProducerNode constructNode() {
+      return new RDFAggregatorProducerNode(key, source, order, filter);
+    };
+  }
+
+////////////////////////////////////////////////////////////////////////////////
+
   public static class ScriptedProducerParameterNodeBuilder implements ProducerNodeBuilder {
     private String parameterName;
     private String scriptedNodeName;
diff --git a/source/mir/rss/RSSChannel.java b/source/mir/rss/RSSChannel.java
deleted file mode 100755 (executable)
index 0f1709e..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (C) 2001, 2002 The Mir-coders group
- *
- * This file is part of Mir.
- *
- * Mir is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * Mir is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Mir; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * In addition, as a special exception, The Mir-coders gives permission to link
- * the code of this program with  any library licensed under the Apache Software License, 
- * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library 
- * (or with modified versions of the above that use the same license as the above), 
- * and distribute linked combinations including the two.  You must obey the 
- * GNU General Public License in all respects for all of the code used other than 
- * the above mentioned libraries.  If you modify this file, you may extend this 
- * exception to your version of the file, but you are not obligated to do so.  
- * If you do not wish to do so, delete this exception statement from your version.
- */
-package mir.rss;
-
-import java.util.List;
-import java.util.Vector;
-
-public class RSSChannel {
-  private String title;
-  private String link;
-  private String description;
-  private String identifier;
-  private List items;
-
-  protected RSSChannel(String anIdentifier) {
-    items = new Vector();
-    identifier = anIdentifier;
-  }
-
-  protected void addItem(RSSItem anItem) {
-    items.add(anItem);
-  };
-
-  protected void setItems(List anItems) {
-    items.clear();
-    items.addAll(anItems);
-  };
-
-  public List getItems() {
-    return items;
-  }
-
-  public String getTitle() {
-    return title;
-  }
-
-  public void setTitle(String aTitle) {
-    title = aTitle;
-  }
-
-  public String getLink() {
-    return link;
-  }
-
-  public void setLink(String aLink) {
-    link = aLink;
-  }
-
-  public String getDescription() {
-    return description;
-  }
-
-  public void setDescription(String aDescription) {
-    description = aDescription;
-  }
-
-}
index 184dcf3..a5e6181 100755 (executable)
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  * In addition, as a special exception, The Mir-coders gives permission to link
- * the code of this program with  any library licensed under the Apache Software License, 
- * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library 
- * (or with modified versions of the above that use the same license as the above), 
- * and distribute linked combinations including the two.  You must obey the 
- * GNU General Public License in all respects for all of the code used other than 
- * the above mentioned libraries.  If you modify this file, you may extend this 
- * exception to your version of the file, but you are not obligated to do so.  
+ * the code of this program with  any library licensed under the Apache Software License,
+ * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
+ * (or with modified versions of the above that use the same license as the above),
+ * and distribute linked combinations including the two.  You must obey the
+ * GNU General Public License in all respects for all of the code used other than
+ * the above mentioned libraries.  If you modify this file, you may extend this
+ * exception to your version of the file, but you are not obligated to do so.
  * If you do not wish to do so, delete this exception statement from your version.
  */
 package mir.rss;
@@ -35,34 +35,46 @@ import java.util.Map;
 import java.util.Vector;
 
 public class RSSData {
-  private List items;
-  private Map item;
-  private RSSChannel channel;
+  private List resources;
+  private Map rdfClassToResources;
+  private Map identifierToResource;
 
   protected RSSData() {
-    items = new Vector();
-    item = new HashMap();
-    channel = null;
+    resources = new Vector();
+    rdfClassToResources = new HashMap();
+    identifierToResource = new HashMap();
   }
 
-  protected void addItem(RSSItem anItem) {
-    items.add(anItem);
-    item.put(anItem.getIdentifier(), anItem);
-  };
+  public List getAllResources() {
+    return resources;
+  }
 
-  public void setChannel(RSSChannel aChannel) {
-    channel = aChannel;
+  public void addResource(RDFResource aResource) {
+    resources.add(aResource);
+    List resourcesForClass = (List) rdfClassToResources.get(aResource.getRdfClass());
+    if (resourcesForClass==null) {
+      resourcesForClass = new Vector();
+      rdfClassToResources.put(aResource.getRdfClass(), resourcesForClass);
+    }
+    resourcesForClass.add(aResource);
+    if (aResource.getIdentifier()!=null)
+      identifierToResource.put(aResource.getIdentifier(), aResource);
   }
 
-  public RSSChannel getChannel() {
-    return channel;
+  public List getResourcesForRdfClass(String aClass) {
+    return (List) rdfClassToResources.get(aClass);
   }
 
-  public List getItems() {
-    return items;
+  public RDFResource getResourceForIdentifier(String anIdentifier) {
+    return (RDFResource) identifierToResource.get(anIdentifier);
   }
 
-  public Map getItem() {
-    return item;
+  public Object get(String aKey) {
+    Object result = getResourceForIdentifier(aKey);
+
+    if (result==null)
+      return getResourcesForRdfClass(aKey);
+    else
+      return result;
   }
 }
diff --git a/source/mir/rss/RSSItem.java b/source/mir/rss/RSSItem.java
deleted file mode 100755 (executable)
index 7b18a5e..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (C) 2001, 2002 The Mir-coders group
- *
- * This file is part of Mir.
- *
- * Mir is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * Mir is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Mir; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * In addition, as a special exception, The Mir-coders gives permission to link
- * the code of this program with  any library licensed under the Apache Software License, 
- * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library 
- * (or with modified versions of the above that use the same license as the above), 
- * and distribute linked combinations including the two.  You must obey the 
- * GNU General Public License in all respects for all of the code used other than 
- * the above mentioned libraries.  If you modify this file, you may extend this 
- * exception to your version of the file, but you are not obligated to do so.  
- * If you do not wish to do so, delete this exception statement from your version.
- */
-package mir.rss;
-
-
-public class RSSItem {
-  private String title;
-  private String link;
-  private String description;
-  private String identifier;
-
-  protected RSSItem(String anIdentifier) {
-    identifier = anIdentifier;
-  }
-
-  public String getIdentifier() {
-    return identifier;
-  }
-
-  public String getTitle() {
-    return title;
-  }
-
-  public void setTitle(String aTitle) {
-    title = aTitle;
-  }
-
-  public String getLink() {
-    return link;
-  }
-
-  public void setLink(String aLink) {
-    link = aLink;
-  }
-
-  public String getDescription() {
-    return description;
-  }
-
-  public void setDescription(String aDescription) {
-    description = aDescription;
-  }
-
-}
-
index 8043608..5a67825 100755 (executable)
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  * In addition, as a special exception, The Mir-coders gives permission to link
- * the code of this program with  any library licensed under the Apache Software License, 
- * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library 
- * (or with modified versions of the above that use the same license as the above), 
- * and distribute linked combinations including the two.  You must obey the 
- * GNU General Public License in all respects for all of the code used other than 
- * the above mentioned libraries.  If you modify this file, you may extend this 
- * exception to your version of the file, but you are not obligated to do so.  
+ * the code of this program with  any library licensed under the Apache Software License,
+ * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
+ * (or with modified versions of the above that use the same license as the above),
+ * and distribute linked combinations including the two.  You must obey the
+ * GNU General Public License in all respects for all of the code used other than
+ * the above mentioned libraries.  If you modify this file, you may extend this
+ * exception to your version of the file, but you are not obligated to do so.
  * If you do not wish to do so, delete this exception statement from your version.
  */
 package mir.rss;
@@ -32,11 +32,12 @@ package mir.rss;
 import java.io.InputStream;
 import java.net.URL;
 import java.util.List;
-import java.util.Map;
+import java.util.*;
 import java.util.Vector;
+import java.text.*;
 
 import mir.util.XMLReader;
-import mir.util.XMLReaderTool;
+import mir.util.*;
 
 /**
  *
@@ -49,12 +50,50 @@ import mir.util.XMLReaderTool;
  */
 
 public class RSSReader {
+  private static final String RDF_NAMESPACE_URI = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
+  private static final String RSS_1_0_NAMESPACE_URI = "http://purl.org/rss/1.0/";
+  private static final String DUBLINCORE_NAMESPACE_URI = "http://purl.org/dc/elements/1.1/";
+  private static final String EVENT_NAMESPACE_URI = "http://purl.org/rss/1.0/modules/event/";
+  private static final String TAXONOMY_NAMESPACE_URI = "http://web.resource.org/rss/1.0/modules/taxonomy/";
+
+  private static final XMLReader.XMLName RDF_ABOUT_PARAMETER = new XMLReader.XMLName(RDF_NAMESPACE_URI, "about");
+  private static final XMLReader.XMLName RDF_SEQUENCE_TAG = new XMLReader.XMLName(RDF_NAMESPACE_URI, "Seq");
+  private static final XMLReader.XMLName RDF_BAG_PARAMETER = new XMLReader.XMLName(RDF_NAMESPACE_URI, "Bag");
+
+  private static final XMLReader.XMLName RSS_CHANNEL_TAG = new XMLReader.XMLName(RSS_1_0_NAMESPACE_URI, "channel");
+  private static final XMLReader.XMLName RSS_ITEM_TAG = new XMLReader.XMLName(RSS_1_0_NAMESPACE_URI, "item");
+  private static final XMLReader.XMLName RSS_ITEMS_TAG = new XMLReader.XMLName(RSS_1_0_NAMESPACE_URI, "items");
+
+  private List modules;
+  private Map namespaceURItoModule;
+  private Map moduleToPrefix;
+  private RSSModule rdfModule;
+
   public RSSReader() {
+    modules = new Vector();
+    namespaceURItoModule = new HashMap();
+    moduleToPrefix = new HashMap();
+
+    registerModule(new RSSBasicModule(RDF_NAMESPACE_URI, "RDF module"), "rdf");
+    registerModule(new RSSBasicModule(RSS_1_0_NAMESPACE_URI, "RSS 1.0 module"), "rss");
+
+    RSSBasicModule dcModule = new RSSBasicModule(DUBLINCORE_NAMESPACE_URI, "Dublin Core RSS module 1.1");
+    dcModule.addProperty("date", dcModule.W3CDTF_PROPERTY_TYPE);
+    registerModule(dcModule, "dc");
+
+    registerModule(new RSSBasicModule(EVENT_NAMESPACE_URI, "Event RSS module"), "ev");
+    registerModule(new RSSBasicModule(TAXONOMY_NAMESPACE_URI, "Taxonomy RSS module"), "taxo");
+  }
+
+  public void registerModule(RSSModule aModule, String aPrefix) {
+    modules.add(aModule);
+    namespaceURItoModule.put(aModule.getNamespaceURI(), aModule);
+    moduleToPrefix.put(aModule, aPrefix);
   }
 
   public RSSData parseInputStream(InputStream aStream) throws RSSExc, RSSFailure {
     try {
-      XMLReader xmlReader = new XMLReader();
+      XMLReader xmlReader = new XMLReader(true);
       RSSData result = new RSSData();
       xmlReader.parseInputStream(aStream, new RootSectionHandler(result));
 
@@ -79,15 +118,15 @@ public class RSSReader {
     }
   }
 
-  private static class RootSectionHandler extends XMLReader.AbstractSectionHandler {
+  private class RootSectionHandler extends XMLReader.AbstractSectionHandler {
     private RSSData data;
 
     public RootSectionHandler(RSSData aData) {
       data = aData;
     }
 
-    public XMLReader.SectionHandler startElement(String aTag, Map anAttributes) throws XMLReader.XMLReaderExc {
-      if (XMLReaderTool.getLocalNameFromQualifiedName(aTag).equals("RDF")) {
+    public XMLReader.SectionHandler startElement(XMLReader.XMLName aTag, Map anAttributes) throws XMLReader.XMLReaderExc {
+      if (aTag.getLocalName().equals("RDF")) {
         return new RDFSectionHandler(data);
       }
       else
@@ -106,38 +145,24 @@ public class RSSReader {
     };
   }
 
-  private static class RDFSectionHandler extends XMLReader.AbstractSectionHandler {
+  private class RDFSectionHandler extends XMLReader.AbstractSectionHandler {
     private RSSData data;
 
+
     public RDFSectionHandler(RSSData aData) {
       data = aData;
     }
 
-    public XMLReader.SectionHandler startElement(String aTag, Map anAttributes) throws XMLReader.XMLReaderExc {
-      String identifier = (String) anAttributes.get("rdf:about");
+    public XMLReader.SectionHandler startElement(XMLReader.XMLName aTag, Map anAttributes) throws XMLReader.XMLReaderExc {
+      String identifier = (String) anAttributes.get(RDF_ABOUT_PARAMETER);
+      String rdfClass = makeQualifiedName(aTag);
 
-      if (aTag.equals("channel")) {
-        if (identifier==null)
-          throw new XMLReader.XMLReaderFailure(new RSSExc("Missing rdf:about"));
-        else
-          return new ChannelSectionHandler(identifier);
-      }
-      else if (aTag.equals("item")) {
-        if (identifier==null)
-          throw new XMLReader.XMLReaderFailure(new RSSExc("Missing rdf:about"));
-        else
-          return new ItemSectionHandler(identifier);
-      }
-      else
-        return new DiscardingSectionHandler();
+      return new RDFResourceSectionHandler(rdfClass, identifier);
     };
 
     public void endElement(XMLReader.SectionHandler aHandler) throws XMLReader.XMLReaderExc {
-      if (aHandler instanceof ItemSectionHandler) {
-        data.addItem(((ItemSectionHandler) aHandler).getItem());
-      }
-      else if (aHandler instanceof ChannelSectionHandler) {
-        data.setChannel(((ChannelSectionHandler) aHandler).getChannel());
+      if (aHandler instanceof RDFResourceSectionHandler) {
+        data.addResource(((RDFResourceSectionHandler) aHandler).getResource());
       }
     };
 
@@ -150,41 +175,69 @@ public class RSSReader {
     };
   }
 
-  private static class ChannelSectionHandler extends XMLReader.AbstractSectionHandler {
+  private XMLReader.SectionHandler makePropertyValueSectionHandler(XMLReader.XMLName aTag, Map anAttributes) {
+    RSSModule module = (RSSModule) namespaceURItoModule.get(aTag.getNamespaceURI());
+
+    if (aTag.getLocalName().equals("date"))
+      aTag = aTag;
+
+
+    if (module!=null) {
+      RSSModule.RSSModuleProperty property = module.getPropertyForName(aTag.getLocalName());
+
+      if (property!=null) {
+        switch (property.getType()) {
+          case
+            RSSModule.PCDATA_PROPERTY_TYPE:
+              return new PCDATASectionHandler();
+          case
+            RSSModule.RDFCOLLECTION_PROPERTY_TYPE:
+              return new RDFCollectionSectionHandler();
+//          case
+//            RSSModule.RDF_PROPERTY_TYPE:
+//              return new RDFValueSectionHandler();
+          case
+            RSSModule.W3CDTF_PROPERTY_TYPE:
+              return new DateSectionHandler();
+        }
+      }
+
+    }
+
+    return new FlexiblePropertyValueSectionHandler();
+  }
+
+  private String makeQualifiedName(XMLReader.XMLName aName) {
+    String result=aName.getLocalName();
+    RSSModule module = (RSSModule) namespaceURItoModule.get(aName.getNamespaceURI());
+    if (module!=null) {
+      String prefix = (String) moduleToPrefix.get(module);
+
+      if (prefix!=null && prefix.length()>0)
+        result = prefix+":"+result;
+    }
+
+    return result;
+  }
+
+  private class RDFResourceSectionHandler extends XMLReader.AbstractSectionHandler {
     private String image;
-    private String currentTag;
-    private RSSChannel channel;
+    private XMLReader.XMLName currentTag;
+    private RDFResource resource;
 
-    public ChannelSectionHandler(String anIdentifier) {
-      channel = new RSSChannel(anIdentifier);
+    public RDFResourceSectionHandler(String anRDFClass, String anIdentifier) {
+      resource = new RDFResource(anRDFClass, anIdentifier);
     }
 
-    public XMLReader.SectionHandler startElement(String aTag, Map anAttributes) throws XMLReader.XMLReaderExc {
+    public XMLReader.SectionHandler startElement(XMLReader.XMLName aTag, Map anAttributes) throws XMLReader.XMLReaderExc {
       currentTag = aTag;
-      if (currentTag.equals("items")) {
-        return new ChannelItemsSectionHandler();
-      }
-      else if (currentTag.equals("description") ||
-               currentTag.equals("link") ||
-               currentTag.equals("title")) {
-        return new PCDATASectionHandler();
-      }
 
-      return new DiscardingSectionHandler();
+      return makePropertyValueSectionHandler(aTag, anAttributes);
     };
 
     public void endElement(XMLReader.SectionHandler aHandler) throws XMLReader.XMLReaderExc {
-      if (currentTag.equals("items")) {
-        channel.setItems(((ChannelItemsSectionHandler) aHandler).getItems());
-      }
-      if (currentTag.equals("description")) {
-        channel.setDescription(((PCDATASectionHandler) aHandler).getData());
-      }
-      else if (currentTag.equals("title")) {
-        channel.setTitle(((PCDATASectionHandler) aHandler).getData());
-      }
-      else if (currentTag.equals("link")) {
-        channel.setLink(((PCDATASectionHandler) aHandler).getData());
+      if (aHandler instanceof PropertyValueSectionHandler) {
+        resource.set(makeQualifiedName(currentTag), ( (PropertyValueSectionHandler) aHandler).getValue());
       }
     };
 
@@ -196,20 +249,65 @@ public class RSSReader {
     public void finishSection() throws XMLReader.XMLReaderExc {
     };
 
-    public RSSChannel getChannel () {
-      return channel;
+    public RDFResource getResource() {
+      return resource;
+    }
+  }
+
+  private abstract class PropertyValueSectionHandler extends XMLReader.AbstractSectionHandler {
+    public abstract Object getValue();
+  }
+
+  private class FlexiblePropertyValueSectionHandler extends PropertyValueSectionHandler {
+    private StringBuffer stringData;
+    private Object structuredData;
+
+    public FlexiblePropertyValueSectionHandler() {
+      stringData = new StringBuffer();
+      structuredData=null;
+    }
+
+    public XMLReader.SectionHandler startElement(String aTag, Map anAttributes) throws XMLReader.XMLReaderExc {
+      if (aTag.equals(RDF_SEQUENCE_TAG))
+        return new RDFSequenceSectionHandler();
+      else
+        return new DiscardingSectionHandler();
+    };
+
+    public void endElement(XMLReader.SectionHandler aHandler) throws XMLReader.XMLReaderExc {
+      if (aHandler instanceof RDFSequenceSectionHandler) {
+        structuredData= ((RDFSequenceSectionHandler) aHandler).getItems();
+      }
+    };
+
+    public void characters(String aCharacters) throws XMLReader.XMLReaderExc {
+      stringData.append(aCharacters);
+    };
+
+    public void finishSection() throws XMLReader.XMLReaderExc {
+    };
+
+    public String getData() {
+      return stringData.toString();
+    }
+
+    public Object getValue() {
+      if (structuredData==null)
+        return stringData.toString();
+      else
+        return structuredData;
     }
   }
 
-  private static class ChannelItemsSectionHandler extends XMLReader.AbstractSectionHandler {
+  private class RDFCollectionSectionHandler extends PropertyValueSectionHandler {
     private List items;
 
-    public ChannelItemsSectionHandler() {
+    public RDFCollectionSectionHandler() {
       items = new Vector();
     }
 
     public XMLReader.SectionHandler startElement(String aTag, Map anAttributes) throws XMLReader.XMLReaderExc {
-      if (aTag.equals("rdf:Seq"))
+      if (aTag.equals(RDF_SEQUENCE_TAG))
         return new RDFSequenceSectionHandler();
       else
         return new DiscardingSectionHandler();
@@ -232,57 +330,46 @@ public class RSSReader {
     public List getItems() {
       return items;
     }
+
+    public Object getValue() {
+      return items;
+    }
   }
 
-  private static class ItemSectionHandler extends XMLReader.AbstractSectionHandler {
-    private String currentTag;
-    private RSSItem item;
+  private class PCDATASectionHandler extends PropertyValueSectionHandler {
+    private StringBuffer data;
 
-    public ItemSectionHandler(String anIdentifier) {
-      item = new RSSItem(anIdentifier);
+    public PCDATASectionHandler() {
+      data = new StringBuffer();
     }
 
     public XMLReader.SectionHandler startElement(String aTag, Map anAttributes) throws XMLReader.XMLReaderExc {
-      currentTag = aTag;
-
-      if (currentTag.equals("description") ||
-               currentTag.equals("link") ||
-               currentTag.equals("title")) {
-        return new PCDATASectionHandler();
-      }
-
-      return new DiscardingSectionHandler();
+      throw new XMLReader.XMLReaderFailure(new RSSExc("No subtags allowed here"));
     };
 
     public void endElement(XMLReader.SectionHandler aHandler) throws XMLReader.XMLReaderExc {
-      if (currentTag.equals("description")) {
-        item.setDescription(((PCDATASectionHandler) aHandler).getData());
-      }
-      else if (currentTag.equals("title")) {
-        item.setTitle(((PCDATASectionHandler) aHandler).getData());
-      }
-      else if (currentTag.equals("link")) {
-        item.setLink(((PCDATASectionHandler) aHandler).getData());
-      }
     };
 
     public void characters(String aCharacters) throws XMLReader.XMLReaderExc {
-      if (aCharacters.trim().length()>0)
-        throw new XMLReader.XMLReaderExc("No character data allowed here");
+      data.append(aCharacters);
     };
 
     public void finishSection() throws XMLReader.XMLReaderExc {
     };
 
-    public RSSItem getItem() {
-      return item;
-    };
+    public String getData() {
+      return data.toString();
+    }
+
+    public Object getValue() {
+      return data.toString();
+    }
   }
 
-  private static class PCDATASectionHandler extends XMLReader.AbstractSectionHandler {
+  private class DateSectionHandler extends PropertyValueSectionHandler {
     private StringBuffer data;
 
-    public PCDATASectionHandler() {
+    public DateSectionHandler() {
       data = new StringBuffer();
     }
 
@@ -300,13 +387,49 @@ public class RSSReader {
     public void finishSection() throws XMLReader.XMLReaderExc {
     };
 
-    public String getData() {
-      return data.toString();
+    private final static String SPACE = "[\t\n\r ]*";
+    private final static String NUMBER = "[0-9]*";
+    private final static String SIGN = "[-+]";
+
+    public Object getValue() {
+      try {
+        String expression = data.toString().trim();
+        SimpleParser parser = new SimpleParser(expression);
+
+        String year="";
+        String month="";
+        String day="";
+        String hour="";
+        String minutes="";
+
+          year = parser.parse(NUMBER);
+          parser.skip("-");
+          month = parser.parse(NUMBER);
+          parser.skip("-");
+          day = parser.parse(NUMBER);
+          parser.skip("T");
+          hour = parser.parse(NUMBER);
+          parser.skip(":");
+          minutes = parser.parse(NUMBER);
+
+          SimpleDateFormat d = new SimpleDateFormat("yyyy-MM-dd HH:mm");
+          d.setLenient(true);
+          expression = year + "-" + month + "-" + day + " " + hour + ":" + minutes;
+
+        System.out.println(expression);
+
+        Date result = d.parse(expression);
+
+        return result;
+      }
+      catch (Throwable t) {
+        return null;
+      }
     }
   }
 
 
-  private static class RDFSequenceSectionHandler extends XMLReader.AbstractSectionHandler {
+  private class RDFSequenceSectionHandler extends XMLReader.AbstractSectionHandler {
     private List items;
 
     public RDFSequenceSectionHandler() {
@@ -338,7 +461,7 @@ public class RSSReader {
     }
   }
 
-  private static class RDFLiteralSectionHandler extends XMLReader.AbstractSectionHandler {
+  private class RDFLiteralSectionHandler extends PropertyValueSectionHandler {
     private StringBuffer data;
     private String tag;
 
@@ -368,9 +491,13 @@ public class RSSReader {
 
     public void finishSection() throws XMLReader.XMLReaderExc {
     };
+
+    public Object getValue() {
+      return data.toString();
+    }
   }
 
-  private static class DiscardingSectionHandler extends XMLReader.AbstractSectionHandler {
+  private class DiscardingSectionHandler extends XMLReader.AbstractSectionHandler {
     public XMLReader.SectionHandler startElement(String aTag, Map anAttributes) throws XMLReader.XMLReaderExc {
       return this;
     };
diff --git a/source/mir/rss/RSSToMapConverter.java b/source/mir/rss/RSSToMapConverter.java
deleted file mode 100755 (executable)
index a9852e8..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (C) 2001, 2002 The Mir-coders group
- *
- * This file is part of Mir.
- *
- * Mir is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * Mir is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Mir; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * In addition, as a special exception, The Mir-coders gives permission to link
- * the code of this program with  any library licensed under the Apache Software License, 
- * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library 
- * (or with modified versions of the above that use the same license as the above), 
- * and distribute linked combinations including the two.  You must obey the 
- * GNU General Public License in all respects for all of the code used other than 
- * the above mentioned libraries.  If you modify this file, you may extend this 
- * exception to your version of the file, but you are not obligated to do so.  
- * If you do not wish to do so, delete this exception statement from your version.
- */
-package mir.rss;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Vector;
-
-public class RSSToMapConverter {
-  private RSSToMapConverter() {
-  }
-
-  public static Map convertRSSItem(RSSItem anItem) {
-    Map result = new HashMap();
-
-    result.put("title", anItem.getTitle());
-    result.put("description", anItem.getDescription());
-    result.put("link", anItem.getLink());
-
-    return result;
-  }
-
-  public static Map convertRSSData(RSSData anRSSData) {
-    Map result = new HashMap();
-
-    Map channel = null;
-    if (anRSSData.getChannel()!=null) {
-      channel = new HashMap();
-      channel.put("title", anRSSData.getChannel().getTitle());
-      channel.put("description", anRSSData.getChannel().getDescription());
-      channel.put("link", anRSSData.getChannel().getLink());
-
-      List items = new Vector();
-      Iterator i = anRSSData.getChannel().getItems().iterator();
-
-      while (i.hasNext()) {
-        RSSItem item = (RSSItem) anRSSData.getItem().get(i.next());
-        if (item!=null) {
-          items.add(convertRSSItem(item));
-        }
-      }
-
-      channel.put("items", items);
-    }
-    result.put("channel", channel);
-    result.put("data", anRSSData);
-
-    return result;
-  }
-}
\ No newline at end of file
index 1378728..fa60689 100755 (executable)
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  * In addition, as a special exception, The Mir-coders gives permission to link
- * the code of this program with  any library licensed under the Apache Software License, 
- * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library 
- * (or with modified versions of the above that use the same license as the above), 
- * and distribute linked combinations including the two.  You must obey the 
- * GNU General Public License in all respects for all of the code used other than 
- * the above mentioned libraries.  If you modify this file, you may extend this 
- * exception to your version of the file, but you are not obligated to do so.  
+ * the code of this program with  any library licensed under the Apache Software License,
+ * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
+ * (or with modified versions of the above that use the same license as the above),
+ * and distribute linked combinations including the two.  You must obey the
+ * GNU General Public License in all respects for all of the code used other than
+ * the above mentioned libraries.  If you modify this file, you may extend this
+ * exception to your version of the file, but you are not obligated to do so.
  * If you do not wish to do so, delete this exception statement from your version.
  */
 package mir.util;
@@ -35,9 +35,12 @@ import java.util.List;
 import java.util.Map;
 import java.util.Vector;
 
+import org.apache.commons.beanutils.*;
+
+import multex.Exc;
+
 import mir.generator.Generator;
 import mir.generator.GeneratorExc;
-import multex.Exc;
 
 public class ParameterExpander {
   final static String NODE_SEPARATOR = ".";
@@ -574,6 +577,28 @@ public class ParameterExpander {
       return result;
     }
 
+    private Object evaluateObjectField(Object anObject, Object aField) {
+      if (anObject instanceof Map) {
+        return ((Map) anObject).get(aField);
+      }
+      else if ((aField instanceof String) && PropertyUtils.isReadable(anObject, (String) aField)) {
+        try {
+          return PropertyUtils.getProperty(anObject, (String) aField);
+        }
+        catch (Throwable t) {
+          throw new RuntimeException(t.getMessage());
+        }
+      }
+      else {
+        try {
+          return MethodUtils.invokeExactMethod(anObject, "get", aField);
+        }
+        catch (Throwable t) {
+          throw new RuntimeException("Invalid reference of " + aField + "into " + anObject);
+        }
+      }
+    }
+
     private Object parseVariable() {
       boolean done;
       Token token;
@@ -591,23 +616,13 @@ public class ParameterExpander {
           if (!(token instanceof RightSquareBraceToken))
             throw new RuntimeException("] expected");
 
-          if (currentValue instanceof Map) {
-            currentValue = ((Map) currentValue).get(qualifier);
-          }
-          else {
-            throw new RuntimeException("cannot reference into anything other than a map ('"+qualifier+"')");
-          }
+          currentValue = evaluateObjectField(currentValue, qualifier);
         }
         else if (token instanceof IdentifierToken) {
           scanner.scan();
           qualifier = ((IdentifierToken) token).getName();
 
-          if (currentValue instanceof Map) {
-            currentValue = ((Map) currentValue).get(qualifier);
-          }
-          else {
-            throw new RuntimeException("cannot reference into anything other than a map ('"+qualifier+"')");
-          }
+          currentValue = evaluateObjectField(currentValue, qualifier);
         }
         else if (token instanceof LeftParenthesisToken) {
           if (currentValue instanceof Generator.GeneratorFunction) {
index 2947bfe..19628c8 100755 (executable)
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  * In addition, as a special exception, The Mir-coders gives permission to link
- * the code of this program with  any library licensed under the Apache Software License, 
- * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library 
- * (or with modified versions of the above that use the same license as the above), 
- * and distribute linked combinations including the two.  You must obey the 
- * GNU General Public License in all respects for all of the code used other than 
- * the above mentioned libraries.  If you modify this file, you may extend this 
- * exception to your version of the file, but you are not obligated to do so.  
+ * the code of this program with  any library licensed under the Apache Software License,
+ * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
+ * (or with modified versions of the above that use the same license as the above),
+ * and distribute linked combinations including the two.  You must obey the
+ * GNU General Public License in all respects for all of the code used other than
+ * the above mentioned libraries.  If you modify this file, you may extend this
+ * exception to your version of the file, but you are not obligated to do so.
  * If you do not wish to do so, delete this exception statement from your version.
  */
 package mir.util;
@@ -77,7 +77,7 @@ public class XMLReader {
     try {
       SAXParserFactory parserFactory = SAXParserFactory.newInstance();
 
-      parserFactory.setNamespaceAware(namespaceAware);
+      parserFactory.setNamespaceAware(true);
       parserFactory.setValidating(true);
 
       XMLReaderHandler handler = new XMLReaderHandler(parserFactory, aRootHandler);
@@ -133,16 +133,21 @@ public class XMLReader {
       }
     }
 
-    public void startElement(String aUri, String aTag, String aQualifiedName, Attributes anAttributes) throws SAXException {
+    public void startElement(String aUri, String aLocalName, String aQualifiedName, Attributes anAttributes) throws SAXException {
       Map attributesMap;
       int i;
 
       try {
         attributesMap = new HashMap();
-        for (i=0; i<anAttributes.getLength(); i++)
-          attributesMap.put(anAttributes.getQName(i), anAttributes.getValue(i));
 
-        SectionHandler handler = manager.currentHandler().startElement(aQualifiedName, attributesMap);
+        if (namespaceAware)
+          for (i=0; i<anAttributes.getLength(); i++)
+            attributesMap.put(new XMLName(anAttributes.getURI(i), anAttributes.getLocalName(i)), anAttributes.getValue(i));
+        else
+          for (i=0; i<anAttributes.getLength(); i++)
+            attributesMap.put(anAttributes.getLocalName(i), anAttributes.getValue(i));
+
+        SectionHandler handler = manager.currentHandler().startElement(new XMLName(aUri, aLocalName), attributesMap);
 
         manager.pushHandler( handler );
       }
@@ -154,7 +159,7 @@ public class XMLReader {
       }
     }
 
-    public void endElement(String aUri, String aTag, String aQualifiedName) throws SAXException {
+    public void endElement(String aUri, String aLocalName, String aQualifiedName) throws SAXException {
       try
       {
         if (!aQualifiedName.equals("include")) {
@@ -215,7 +220,7 @@ public class XMLReader {
   }
 
   public static interface SectionHandler {
-    public abstract SectionHandler startElement(String aTag, Map anAttributes) throws XMLReaderExc;
+    public abstract SectionHandler startElement(XMLName aTag, Map anAttributes) throws XMLReaderExc;
 
     public abstract void endElement(SectionHandler aHandler) throws XMLReaderExc;
 
@@ -225,7 +230,11 @@ public class XMLReader {
   }
 
   public static abstract class AbstractSectionHandler implements SectionHandler {
-    public SectionHandler startElement(String aTag, Map anAttributes) throws XMLReaderExc {
+    public SectionHandler startElement(XMLName aTag, Map anAttributes) throws XMLReaderExc {
+      return startElement(aTag.getLocalName(), anAttributes);
+    };
+
+    public SectionHandler startElement(String aLocalName, Map anAttributes) throws XMLReaderExc {
       return null;
     };
 
@@ -287,4 +296,50 @@ public class XMLReader {
     }
   }
 
+  public static class XMLName {
+    private String namespaceURI;
+    private String localName;
+
+    public XMLName(String aLocalName) {
+      this(aLocalName, null);
+    }
+
+    public XMLName(String aNamespaceURI, String aLocalName) {
+      namespaceURI = aNamespaceURI;
+      localName = aLocalName;
+    }
+
+    public String getNamespaceURI() {
+      return namespaceURI;
+    }
+
+    public String getLocalName() {
+      return localName;
+    }
+
+    public int hashCode() {
+      if (namespaceURI == null)
+        return localName.hashCode();
+      else
+        return localName.hashCode() + 3*namespaceURI.hashCode();
+    }
+
+    public String toString() {
+      return namespaceURI+":"+localName;
+    }
+
+    public boolean equals(Object anObject) {
+      if (anObject instanceof XMLName) {
+        if (namespaceURI==null)
+          return (((XMLName) anObject).namespaceURI == null) &&
+                 localName.equals(((XMLName) anObject).localName);
+        else
+          return namespaceURI.equals(((XMLName) anObject).namespaceURI) &&
+                 localName.equals(((XMLName) anObject).localName);
+      }
+      else
+        return false;
+    }
+  }
+
 }
\ No newline at end of file
index 48d433a..4befc08 100755 (executable)
   </if>
 </function>
 
+
+<comment>previous next links</comment>
+<function showPrevNextLinks (aPreviousUrl, aNextUrl, anAlignment)>
+  <if aPreviousUrl || aNextUrl>      
+    <p align="${anAlignment}">
+    <if aPreviousUrl>
+      <a class="link-box" href="${config.actionRoot}?${aPreviousUrl}"> [ &lt; ] ${lang("list.previous")}</a>
+    </if>
+    <if aPreviousUrl && aNextUrl>      
+      &nbsp;&nbsp; 
+    </if>
+    <if aNextUrl>
+      <a class="link-box" href="${config.actionRoot}?${aNextUrl}">   ${lang("list.next")} [ &gt; ]</a>
+    </if>
+    </p>
+  </if>
+</function>
+
+
 <comment>multifunctional help - popup or not - big or small designs</comment>
 <function Help (HelpUrl, popup, big )>
   <if popup>
index c3b0695..38fce1b 100755 (executable)
@@ -7,6 +7,7 @@
 
 <body marginwidth="0" marginheight="0" topmargin="0" leftmargin="0">
 
+<include "FUNCTIONS.template">
 <include "head.template">
 
 <assign grey="0">
 </form>
 
 <if comments>
-<if config["Mir.Localizer.Admin.ListOperationsFlavor"]!="0">
-  <form method="post" action="${config.actionRoot}">
-    <input type="hidden" name="module" value="Localizer">
-    <input type="hidden" name="do" value="commentoperationbatch">
-    <input type="hidden" name="returnurl" value="${utility.encodeHTML(thisurl)}">
-    <p class="box">
-      <input class="majorbutton" type="submit" name="save" value="${lang("save")}">&nbsp; (${lang("commentlist.activate")})
-    </p>
-</if>    
-
-<table border="0" cellpadding="2" cellspacing="3">  
-  <if comments>
-    <tr>
+  <if config["Mir.Localizer.Admin.ListOperationsFlavor"]!="0">
+    <form method="post" action="${config.actionRoot}">
+      <input type="hidden" name="module" value="Localizer">
+      <input type="hidden" name="do" value="commentoperationbatch">
+      <input type="hidden" name="returnurl" value="${utility.encodeHTML(thisurl)}">
+      <p class="box">
+        <input class="majorbutton" type="submit" name="save" value="${lang("save")}">&nbsp; (${lang("commentlist.activate")})
+      </p>
+  </if>    
+
+  <call showPrevNextLinks (prevurl, nexturl, "right")>
+  
+  <table border="0" cellpadding="2" cellspacing="3">  
+  
+    <tr class="table-head">
+      <td valign="top">
+        ${lang("comment.date")}
+      </td>
       <td>
-        <if prevurl>
-          <a href="${config.actionRoot}?${prevurl}">[ ${lang("list.previous")} ]</a>&nbsp;
-        </if>
-        <if nexturl>
-          <a href="${config.actionRoot}?${nexturl}">[ ${lang("list.next")} ]</a>&nbsp;
-        </if>
+        ${lang("comment.article")} / ${lang("comment.title")} / ${lang("comment.creator")} / ${lang("comment.text")}
+      </td>
+      <td>
+        &nbsp;
       </td>
     </tr>
-  </if>
-
-  <tr class="table-head">
-    <td valign="top">
-      ${lang("comment.date")}
-    </td>
-    <td>
-      ${lang("comment.article")} / ${lang("comment.title")} / ${lang("comment.creator")} / ${lang("comment.text")}
-    </td>
-    <td>
-      &nbsp;
-    </td>
-  </tr>
-    
-<list comments as entry>
-  <tr <if grey=="1"><assign grey="0">class="listrow1"<else><assign grey="1">class="listrow2"</if>>
-    <td valign="top" class="small">
-      ${entry.creationdate.formatted["dd.MM.yyyy HH:mm"]}<br>
-      <if entry.is_published=="0"><b>${lang("commentlist.hidden")}</b><else>-</if><br>
-      <br>
-      ${lang("comment.status")}: <br>
-      <if entry.status>
-        <b>
-          ${lang("commentstatus." + entry.status.name)}
-        </b>
-      <else> 
-        - 
-      </if>
-    </td>
-        
-    <td>
-      <a name="${entry.id}"></a>
-      <if entry.to_content>
-          <div class="small">
-          ${lang("comment.article")}:
-          <a href="${config.actionRoot}?module=Content&do=edit&id=${entry.to_content.id}">
-            ${utility.encodeHTML(entry.to_content.title)}
-          </a>
-            (${lang("articletypes."+entry.to_content.article_type.name)}) 
-
-            [
+      
+  <list comments as entry>
+    <tr <if grey=="1"><assign grey="0">class="listrow1"<else><assign grey="1">class="listrow2"</if>>
+      <td valign="top" class="small">
+        ${entry.creationdate.formatted["dd.MM.yyyy HH:mm"]}<br>
+        <if entry.is_published=="0"><b>${lang("commentlist.hidden")}</b><else>-</if><br>
+        <br>
+        ${lang("comment.status")}: <br>
+        <if entry.status>
+          <b>
+            ${lang("commentstatus." + entry.status.name)}
+          </b>
+        <else> 
+          - 
+        </if>
+      </td>
+          
+      <td>
+        <a name="${entry.id}"></a>
+        <if entry.to_content>
+            <div class="small">
+            ${lang("comment.article")}:
             <a href="${config.actionRoot}?module=Content&do=edit&id=${entry.to_content.id}">
-            ${lang("edit")}
-            </a> |
-            <a href="${entry.publicurl}">
-              ${lang("start.show")}
-            </a> |
-            <a href="${config.actionRoot}?module=Comment&do=articlecomments&articleid=${entry.to_content.id}">
-              ${lang("commentlist.allcomments")}
+              ${utility.encodeHTML(entry.to_content.title)}
             </a>
-            ]
-            </div>
-          </if>
-
-      
-      <b>${entry.title}</b> &nbsp;
-      <if entry.creator>
-        ${lang("by")}: ${entry.creator}
-      </if>
-      <br>
-      ${utility.encodeHTML(entry.description)}
-      
-      <if entry.main_url><br>URL: ${entry.main_url}</if>
-      <br>
-<!--      <div class="bg-neutral small">-->
-      <if config["Mir.Localizer.Admin.ListOperationsFlavor"]=="0">
-        <list entry.operations as op>
-          [ <a href="${config.actionRoot}?module=Localizer&do=commentoperation&operation=${op}&id=${entry.id}&returnurl=${utility.encodeURI(thisurl + "#" + entry.id)}">${lang("comment.operation."+op)}</a> ]
-        </list>
-      </if>
-      <if config["Mir.Localizer.Admin.ListOperationsFlavor"]=="1">
-        <list entry.operations as op>
-           <input type="checkbox" name="operation" value="${entry.id};${op}">${lang("comment.operation."+op)} 
-        </list>
-      </if>
-      <if config["Mir.Localizer.Admin.ListOperationsFlavor"]=="2">
-        <select name="operation">
-          <option value="" selected>&nbsp;</option>
+              (${lang("articletypes."+entry.to_content.article_type.name)}) 
+  
+              [
+              <a href="${config.actionRoot}?module=Content&do=edit&id=${entry.to_content.id}">
+              ${lang("edit")}
+              </a> |
+              <a href="${entry.publicurl}">
+                ${lang("start.show")}
+              </a> |
+              <a href="${config.actionRoot}?module=Comment&do=articlecomments&articleid=${entry.to_content.id}">
+                ${lang("commentlist.allcomments")}
+              </a>
+              ]
+              </div>
+            </if>
+  
+        
+        <b>${entry.title}</b> &nbsp;
+        <if entry.creator>
+          ${lang("by")}: ${entry.creator}
+        </if>
+        <br>
+        ${utility.encodeHTML(entry.description)}
+        
+        <if entry.main_url><br>URL: ${entry.main_url}</if>
+        <br>
+  <!--      <div class="bg-neutral small">-->
+        <if config["Mir.Localizer.Admin.ListOperationsFlavor"]=="0">
           <list entry.operations as op>
-            <option value="${entry.id};${op}">${lang("comment.operation."+op)}</option>
+            [ <a href="${config.actionRoot}?module=Localizer&do=commentoperation&operation=${op}&id=${entry.id}&returnurl=${utility.encodeURI(thisurl + "#" + entry.id)}">${lang("comment.operation."+op)}</a> ]
           </list>
-        </select>
-      </if>
-      <if entry.operations>&nbsp;|&nbsp;</if>
-      <a href="${config.actionRoot}?module=Comment&do=edit&id=${entry.id}">${lang("edit")}</a>                
-<!--      </div>-->
-    </td>
-      
-    <td valign="top">
-      &nbsp;
-      <if config["Mir.Localizer.Admin.AllowDeleteComment"]=="1">
-        <a class="small" href="${config.actionRoot}?module=Comment&do=delete&id=${entry.id}&searchtext=${utility.encodeHTML(searchtext)}&searchfield=${utility.encodeHTML(searchfield)}&searchispublished=${searchispublished}&searchorder=${searchorder}&offset=${offset}">[${lang("delete")}]</a>
-      </if>
-    </td>    
-  </tr>
-</list>
-      
-  <tr>
-    <td colspan="3" class="table-foot">
-      ${count} ${lang("records")} / ${lang("show_from_to", from, to)}
-    </td>
-  </tr>
-
-  <tr>
-    <td>
-      <if prevurl>
-        <a href="${config.actionRoot}?${prevurl}">[ ${lang("list.previous")} ]</a>&nbsp;
-      </if>
-      <if nexturl>
-        <a href="${config.actionRoot}?${nexturl}">[ ${lang("list.next")} ]</a>&nbsp;
-      </if>
-    </td>
-  </tr>
-</table>
-
-<if config["Mir.Localizer.Admin.ListOperationsFlavor"]!="0">
-  <p class="box">
-    <input class="majorbutton" type="submit" name="save" value="${lang("save")}"> &nbsp; (${lang("commentlist.activate")})
-  </p>
-  </form> 
-</if>  
+        </if>
+        <if config["Mir.Localizer.Admin.ListOperationsFlavor"]=="1">
+          <list entry.operations as op>
+             <input type="checkbox" name="operation" value="${entry.id};${op}">${lang("comment.operation."+op)} 
+          </list>
+        </if>
+        <if config["Mir.Localizer.Admin.ListOperationsFlavor"]=="2">
+          <select name="operation">
+            <option value="" selected>&nbsp;</option>
+            <list entry.operations as op>
+              <option value="${entry.id};${op}">${lang("comment.operation."+op)}</option>
+            </list>
+          </select>
+        </if>
+        <if entry.operations>&nbsp;|&nbsp;</if>
+        <a href="${config.actionRoot}?module=Comment&do=edit&id=${entry.id}">${lang("edit")}</a>                
+  <!--      </div>-->
+      </td>
+        
+      <td valign="top">
+        &nbsp;
+        <if config["Mir.Localizer.Admin.AllowDeleteComment"]=="1">
+          <a class="small" href="${config.actionRoot}?module=Comment&do=delete&id=${entry.id}&searchtext=${utility.encodeHTML(searchtext)}&searchfield=${utility.encodeHTML(searchfield)}&searchispublished=${searchispublished}&searchorder=${searchorder}&offset=${offset}">[${lang("delete")}]</a>
+        </if>
+      </td>    
+    </tr>
+  </list>
+        
+    <tr>
+      <td colspan="3" class="table-foot">
+        ${count} ${lang("records")} / ${lang("show_from_to", from, to)}
+      </td>
+    </tr>
+  </table>
+  
+  <if config["Mir.Localizer.Admin.ListOperationsFlavor"]!="0">
+    <p class="box">
+      <input class="majorbutton" type="submit" name="save" value="${lang("save")}"> &nbsp; (${lang("commentlist.activate")})
+    </p>
+    </form> 
+  </if>  
+  
+  <call showPrevNextLinks (prevurl, nexturl, "right")>
   
 <else>
-<P align="center" class="box">${lang("no_matches_found")}</p>
+  <P align="center" class="box">${lang("no_matches_found")}</p>
 </if>
 
 <include "foot.template">
index 26482dd..f1b2503 100755 (executable)
@@ -38,7 +38,7 @@
   </if>    
 </if>
 
-<call PrevNext ("right")>
+<call showPrevNextLinks(prevurl, nexturl, "right")>
 
 <table border="0" width="100%" cellspacing="3" cellpadding="2">
   <tr>
 </if>
 
 
-<call PrevNext ("right")>
+<call showPrevNextLinks(prevurl, nexturl, "right")>
 
 
 
diff --git a/templates/admin/linksimcslist.template b/templates/admin/linksimcslist.template
deleted file mode 100755 (executable)
index 6d6c2f4..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-<html>
-<head>
-  <title>${config["Mir.Name"]} | ${lang("linkimcslist.htmltitle")}</title>
-        <link rel="stylesheet" type="text/css" href="${config.docRoot}/style/admin.css">
-</head>
-
-<body marginwidth="0" marginheight="0" topmargin="0" leftmargin="0">
-
-<include "head.template">
-
-<form method="post" action="${config.actionRoot}">
-  <input type="hidden" name="module" value="LinksImcs">
-  <input type="hidden" name="do" value="list">
-  <input type="hidden" name="cid" value="">
-  <table border="0">
-  <tr class="table-head">
-    <td>${lang("linkimcslist.search_in")}:</td>
-    <td>${lang("linkimcs.parent")}:</td>
-    <td>${lang("linkimcs.language")}:</td>
-    <td>&nbsp;</td>
-  </tr>
-  
-  <tr>
-  <td>
-    <input type="text" size="10" maxlength="20" name="query_text" value="${data.query_text}">
-    <select name="query_field">
-      <option value="title"<if data.query_field == "title"> selected</if>>${lang("linkimcs.name")}
-      <option value="url"<if data.query_field == "url"> selected</if>>${lang("linkimcs.url")}
-      </select>
-  </td>
-  <td>
-    <select name="to_parent_id">
-      <option value=""></option>
-        <list data.parentlist as parent><option value="${parent.id}"<if to_parent_id == parent.id> selected</if>>${parent.title}</option>
-      </list>
-      </select>
-  </td>
-  <td>
-    <select name="to_language">
-      <option value="">${lang("all")}</option>
-      <list data.languagelist as language><option value="${language.id}"<if to_language == language.id> selected</if>>${language.name}</option>
-      </list> 
-      </select>
-  </td>
-  <td>
-    <input type="submit" name="search" value="${lang("filter")}">
-  </td>
-  </tr> 
-  </table>
-  </form>
-  
-<if data.imcslist>
-<table border="0">
-  <tr class="darkgrey">
-    <td><span class="witesmall">
-    <b>${lang("linkimcs.name")}</b></span></td>
-    <td><span class="witesmall">
-    <b>${lang("linkimcs.parent")}</b></span></td>
-  <td><span class="witesmall">
-    <b>${lang("linkimcs.url")}</b></span></td>
-  <td><span class="witesmall">
-    <b>${lang("linkimcs.sort_by")}</b></span></td>
-  <td><span class="witesmall">
-    <b>${lang("linkimcs.language")}</b></span></td>
-  <td><span class="witesmall">
-    <b>&nbsp;</b></span></td>
-  </tr>
-  <list data.imcslist as entry>
-  <assign parent = "">
-  <assign language = "">
-  <list data.parentlist as p>
-    <if entry.to_parent_id == p.id><assign parent = p.title></if>
-  </list>
-  <list data.languagelist as l>
-    <if entry.to_language == l.id><assign language = l.name></if>
-  </list>
-
-  <tr <if grey=="1"><assign grey="0">class="list1"<else>class="list2"<assign grey="1"> </if>>
-    <td><span class="small">${entry.title}&nbsp;</span></td>
-    <td><span class="small">${parent}</span></td>
-  <td><span class="small">${entry.url}</span></td>
-    <td><span class="small">${entry.sortpriority}</span></td>
-    <td><span class="small">${data.language}</span></td>
-  <td><span class="text">&nbsp;<a href="${actionRoot}?module=LinksImcs&do=delete&id=${entry.id}">${lang("delete")}</a>
-      | <a href="${actionRoot}?module=LinksImcs&do=edit&id=${entry.id}">${lang("edit")}</a></span>
-    </td>
-  </tr>
-  </list>
-  <tr>
-  <td colspan="6" class="darkgrey"><span class="witesmall">
-    ${data.count} ${lang("records")} / ${lang("show_from_to", data.from, data.to)}</span></td>
-  <td>&nbsp;</td>
-  </tr>
-</table>
-<P>
-<if data.prev>
-  <a href="${config.actionRoot}?module=LinksImcs&do=list&order=${data.order}&query_text=${data.query_text_encoded}&query_field=${data.query_field}&to_parent_id=${data.to_parent_id}&to_language=${data.to_language}&prevoffset=${data.prev}&prev=zur&uuml;ck">${lang("list.previous")}</a>&nbsp;
-</if>
-<if data.next>
-<a href="${config.actionRoot}?module=LinksImcs&do=list&order=${data.order}&query_text=${data.query_text_encoded}&query_field=${data.query_field}&to_parent_id=${data.to_parent_id}&to_language=${data.to_language}&nextoffset=${data.next}&next=weiter">${lang("list.next")}</a>
-</if>
-
-<else>
-  <P align="center">${lang("no_matches_found")}</p>
-</if>
-<include "foot.template">
-</body>
-</html>
index c487cb6..42cb181 100755 (executable)
 
 </table>
 
-      <P>
-<if data.prev>
-  <a class="majorcommand" href="${config.actionRoot}?module=Message&do=list&where=${data.where}&offset=${data.prev}&prev=zurück">[&nbsp;${lang("list.previous")}&nbsp;]</a>&nbsp;
-</if>
-<if data.next>
-  <a class="majorcommand" href="${config.actionRoot}?module=Message&do=list&where=${data.where}&offset=${data.next}&next=weiter">[&nbsp;${lang("list.next")}&nbsp;]</a>
-</if>
+<P>
+  <if data.prev>
+    <a class="majorcommand" href="${config.actionRoot}?module=Message&do=list&where=${data.where}&offset=${data.prev}">[&nbsp;${lang("list.previous")}&nbsp;]</a>&nbsp;
+  </if>
+  <if data.next>
+    <a class="majorcommand" href="${config.actionRoot}?module=Message&do=list&where=${data.where}&offset=${data.next}">[&nbsp;${lang("list.next")}&nbsp;]</a>
+  </if>
 
 <else>
   <P align="center">${lang("no_matches_found")}</p>