cvm.model.handlers.schema
Class SchemaParser

java.lang.Object
  extended by cvm.model.handlers.schema.SchemaParser

public class SchemaParser
extends java.lang.Object

This class handles the parsing of the schema from text into an object that is used by the system instead.

Author:
Frank Hernandez, Raidel Batista, Eddie Incert

Method Summary
 java.lang.String formatXMLForScriptInterpreterCompatability(java.lang.String xmlSchema)
          This method formats the schema to fit with the script interpreter implementation.
static SchemaParser getInstance()
          Implementation of the singleton pattern.
 NegotiationSchema perseFromXMLToNegotiationSchema(java.lang.String xmlNeg)
           
 java.lang.String reformatSchemaBackIntoXMLFormat(java.lang.String schema)
          This function formats a script generator compatible string and formts it back into an xml schema.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static SchemaParser getInstance()
Implementation of the singleton pattern.

Returns:
Singleton instance

formatXMLForScriptInterpreterCompatability

public java.lang.String formatXMLForScriptInterpreterCompatability(java.lang.String xmlSchema)
This method formats the schema to fit with the script interpreter implementation. At the time of design string was used for the scripts and the schema format messes with the implementation. This function is a quick fix for that.

Parameters:
xmlSchema -
Returns:
script generator compatible string.

reformatSchemaBackIntoXMLFormat

public java.lang.String reformatSchemaBackIntoXMLFormat(java.lang.String schema)
This function formats a script generator compatible string and formts it back into an xml schema.

Parameters:
schema - schema to format
Returns:
new formatted schema.

perseFromXMLToNegotiationSchema

public NegotiationSchema perseFromXMLToNegotiationSchema(java.lang.String xmlNeg)