jacquard 1.12.0 by The Web Engineering Factory and Toolworks

uk.co.weft.event
Class DayView

java.lang.Object
  extended byuk.co.weft.domutil.DocumentGeneratorImpl
      extended byuk.co.weft.event.DayView
All Implemented Interfaces:
DocumentGenerator

public class DayView
extends DocumentGeneratorImpl

A document generator which generates a DOM tree (effectively an XML document) representing events on a given day. This is an example of new-style Jacquard, using domutil. This class assumes there is a view in the database which returns the following fields:

  ---- EVENTS_VIEW -----------------------------------------------------
  --  A convenience view of events, used by DayView, q.v.				--
  ----------------------------------------------------------------------
  create view events_view as
   select EVENT.Actor, EVENT.Event, 
  		CATEGORY.Description as Type, 
  		LOCATION.Description as Location,
  		EVENT.EventDate, 
  		EVENT.StartTime, 
  		EVENT.EndTime, 
  		EVENT.Description 
     from EVENT, CATEGORY, LOCATION 
    where EVENT.Location = LOCATION.Location 
  	and EVENT.Category = CATEGORY.Category 
    order by EventDate, StartTime;
 

The following arguments may be passed:

day
Date in yyyy-mm-dd format, or the special string 'this', meaning today: The day from which events should be shown. Optional, defaults to today, but from is a synonym which may be used instead.
from
Date in yyyy-mm-dd format, or the special string 'this': synonym for day. If both are present the value of day will be preferred.
month
Date in yyyy-mm format, or the special sting 'this'. Takes precedence over day, from, until. Optional, no default.
until
Date in yyyy-mm-dd format, or the special string 'this', meaning today: The last day on which events should be shown. Optional, no default. If not supplied, events for only one day will be shown.

Version:
$Revision: 1.16.4.4 $ This revision: $Author: simon $
Author:
Simon Brooke

Field Summary
static java.lang.String DAYMAGICTOKEN
          a magic token on which I shall look for the day to output
protected static java.lang.String EVENTDATEFIELD
          the field in that view which represents the date of the event
protected  uk.co.weft.event.DayView.EventElementGenerator eventEltGenerator
          a generate to generate the event elements which will be my children
static java.lang.String FROMMAGICTOKEN
          a magic token on which I shall look for the day from which to start the output
static java.lang.String MONTHMAGICTOKEN
          a magic token on which to look for the month I should output, formatted as yyyy-mm
static java.lang.String THISMAGICVALUE
          A magic value which, if passed as value of any of the paramaters, will be taken to mean the current value
static java.lang.String UNTILMAGICTOKEN
          a magic token on which I shall look for the day until which I should output
protected static java.lang.String VIEW
          the name of the convenience view in the database from which I will collect all the information I need
 
Fields inherited from class uk.co.weft.domutil.DocumentGeneratorImpl
allowXSLFromContext, debug, doctype, dtdPublicId, DTDPUBLICIDCONFIGTOKEN, dtdQualifiedName, DTDQUALIFIEDNAMECONFIGTOKEN, dtdSystemId, DTDSYSTEMIDCONFIGTOKEN, generateDTD, genxml, rootGenerator, rootName, xmlns, xslStylesheetName
 
Constructor Summary
DayView()
           
 
Methods inherited from class uk.co.weft.domutil.DocumentGeneratorImpl
accept, cleanString, destroy, generate, getNamespaceURI, getRootGenerator, getRootGenerator, getTransformURL, init, init, setRootGenerator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

THISMAGICVALUE

public static final java.lang.String THISMAGICVALUE
A magic value which, if passed as value of any of the paramaters, will be taken to mean the current value

See Also:
Constant Field Values

DAYMAGICTOKEN

public static final java.lang.String DAYMAGICTOKEN
a magic token on which I shall look for the day to output

See Also:
Constant Field Values

FROMMAGICTOKEN

public static final java.lang.String FROMMAGICTOKEN
a magic token on which I shall look for the day from which to start the output

See Also:
Constant Field Values

UNTILMAGICTOKEN

public static final java.lang.String UNTILMAGICTOKEN
a magic token on which I shall look for the day until which I should output

See Also:
Constant Field Values

MONTHMAGICTOKEN

public static final java.lang.String MONTHMAGICTOKEN
a magic token on which to look for the month I should output, formatted as yyyy-mm

See Also:
Constant Field Values

VIEW

protected static final java.lang.String VIEW
the name of the convenience view in the database from which I will collect all the information I need

See Also:
Constant Field Values

EVENTDATEFIELD

protected static final java.lang.String EVENTDATEFIELD
the field in that view which represents the date of the event

See Also:
Constant Field Values

eventEltGenerator

protected uk.co.weft.event.DayView.EventElementGenerator eventEltGenerator
a generate to generate the event elements which will be my children

Constructor Detail

DayView

public DayView()

jacquard 1.12.0 by The Web Engineering Factory and Toolworks