net.sourceforge.nite.nstyle
Class NStyle

java.lang.Object
  extended by net.sourceforge.nite.nstyle.NStyle

public class NStyle
extends java.lang.Object

NStyle is the top level application which takes an XSL interface spec and some data to populate it and produces the interface.


Constructor Summary
NStyle()
          Constructor with no arguments - creates its own desktop pane and does not need to be synchronized.
NStyle(Clock c)
          Contstructor for the case where we want a separate desktop for the NIE display but we should be synchronized with an existing clock
NStyle(Clock c, javax.swing.JDesktopPane component)
          Constructor providing both a clock with which the NIE display will synchronize and a desktop pane into which the NIE display will be added as an internal frame
NStyle(javax.swing.JDesktopPane component)
          Constructor where we're given a desktop pane to which the NIE display should be added as an internal frame.
 
Method Summary
 javax.swing.JDesktopPane getDesktop()
           
 NMetaData getMetadata()
          Returns the metadata.
static void main(java.lang.String[] args)
          Main method to run from the command line.
 void redisplay(org.jdom.Document d)
           
 void setMetadata(NMetaData metadata)
          Sets the metadata.
 void transform(NMetaData meta, org.jdom.Document input, java.lang.String xslfilename)
          The transform method for simple corpora.
 void transform(NOMCorpus input, java.lang.String xslfilename)
          The transform method for standoff corpora.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NStyle

public NStyle(Clock c,
              javax.swing.JDesktopPane component)
Constructor providing both a clock with which the NIE display will synchronize and a desktop pane into which the NIE display will be added as an internal frame


NStyle

public NStyle(javax.swing.JDesktopPane component)
Constructor where we're given a desktop pane to which the NIE display should be added as an internal frame. No synchronization is attempted.


NStyle

public NStyle(Clock c)
Contstructor for the case where we want a separate desktop for the NIE display but we should be synchronized with an existing clock


NStyle

public NStyle()
Constructor with no arguments - creates its own desktop pane and does not need to be synchronized.

Method Detail

getDesktop

public javax.swing.JDesktopPane getDesktop()

transform

public void transform(NOMCorpus input,
                      java.lang.String xslfilename)
The transform method for standoff corpora. It is assumed the NOM is already loaded, and the XSL filename is the second argument


redisplay

public void redisplay(org.jdom.Document d)

transform

public void transform(NMetaData meta,
                      org.jdom.Document input,
                      java.lang.String xslfilename)
The transform method for simple corpora. This expects a JDOM Document and an xsl filename as input. It creates a display


main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Main method to run from the command line. This will only work for simple corpora and expects to be called using java NStyle xmlfile xslfile .

Throws:
java.lang.Exception

getMetadata

public NMetaData getMetadata()
Returns the metadata.

Returns:
NMetaData

setMetadata

public void setMetadata(NMetaData metadata)
Sets the metadata.

Parameters:
metadata - The metadata to set