SienaXML (v.2.0.0) API documentation

siena.xml
Class XMLProcessor

java.lang.Object
  extended by siena.xml.XMLProcessor

public class XMLProcessor
extends java.lang.Object

This class handles the processing of the XML notification and turning it into a Siena notification. Before it can do anything with the XML notification it has to be given the XSchema for the XML notification. Once this is done then an XML notification can be translated. If the user has any specific ways that they want the XML notification to be handled they can submit a filename that contains the rules they want to be applied.

Since:
11-05-2001
See Also:
Rules

Nested Class Summary
static class XMLProcessor.TEST
          This is an inner class used to test out the private methods of this class.
 
Constructor Summary
XMLProcessor()
          Public constructor
 
Method Summary
 void clearUserRules()
          This method will clear the user rules
 void setLogFileName(java.lang.String fileName)
          This method will set the name of the log file which is used to write to when multiple user rules can match a single XML tag.
 void setStyleSheet(java.lang.String stylesheet)
          This method will set the location of the style sheet.
 void setUserRules(java.lang.String filename)
          This method sets the rules that the user wants to be used.
 siena.Notification translate(java.lang.String xmlNotification)
          This method translates an XML notification into a Siena notification.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLProcessor

public XMLProcessor()
Public constructor

Since:
11-05-2001
Method Detail

setLogFileName

public void setLogFileName(java.lang.String fileName)
This method will set the name of the log file which is used to write to when multiple user rules can match a single XML tag.

Parameters:
fileName - Name of the file to be used as the log file.

setStyleSheet

public void setStyleSheet(java.lang.String stylesheet)
                   throws siena.SienaException
This method will set the location of the style sheet.

Parameters:
stylesheet - Name of the file that contains the XSchema
Throws:
SienaException - Thrown when the file can not be accessed or parsed correctly.

translate

public siena.Notification translate(java.lang.String xmlNotification)
                             throws siena.SienaException
This method translates an XML notification into a Siena notification.

Parameters:
xmlNotification - String containing the the XML Notification to be sent
Returns:
Siena Notification object to be sent to the Siena server
Throws:
SienaException - If the XML notification can not be translated this exception is thrown.
Since:
11-05-2001

setUserRules

public void setUserRules(java.lang.String filename)
                  throws siena.SienaException
This method sets the rules that the user wants to be used.

Parameters:
filename - Name of the file where the user rules are located.
Throws:
SienaException - If the user rules file is uanble to be opened or parse this exception is thrown.

clearUserRules

public void clearUserRules()
This method will clear the user rules


SienaXML (v.2.0.0) API documentation

Copyright © 2000-2002 University of Colorado.
This documentation is maintained by Antonio Carzaniga