Menu

XML_in_NiCE

Scott Forest Hull II Dasha
There is a newer version of this page. You can find it here.

This section will discuss a prototype about implementing a plugin to allow the parsing and creation of XML files in NiCE.

The Reason

What type of Parser

XML Schema for Model Profile

Currently, the Model Profile and Simulator Profile will be shared. Here is a sample ps.app file from the previous version of NiCE 1.0

AppName=ps
ComputingPlatform=derp.derp.com
ExecutionString=ps cat ${MIP}
ProblemTypes=Show Running Processes
Show_Running_Processes_Option=All

This is a sample schema created using Eclipse XML Schema creator:

Schema Model:

 xmlns:tns="http://www.example.org/SimulatorModel" elementFormDefault="qualified">


    <complexType name="Model">

        <sequence>

            <element name="AppName" type="string"></element>

            <element name="ComputingPlatform" type="string"></element>

            <element name="ExecutionString" type="string"></element>

            <element name="ProblemTypes" type="string"></element>

            <element name="Show_Running_Processes_Option" type="string"></element>

        </sequence>


    </complexType>

</schema>

XML Schema for Simulator Profile

-Under Construction-

Implementation

The implementation of the plugin that manages the parsing and creation of XML, known as the XMLManager, will be modeled in RSA and transformed into java. The NiCE program will interface with a set of operations to call upon the XMLManager. NiCE will be able to request parsing of an approved XML file, the creation of a specific type of XML file, and to be able to create an instance of the XMLManager. To contain the information of the data being transported between XML to NiCE and back will be an abstract data structure called XMLFileItem. Currently, there are two types of XML files that NiCE will accept: Simulator Profile and a Model Profile.

The XMLManager will be able to create instances of the objects that parse the XML file, XMLParser, and create delegated XML files, XMLCreator. It can create these instances through a factory call, titled XMLDelegationFactory, where it will return instances of those objects. Once the XMLManager has references to the XMLParse/Creator, it will then be able to call the appropriate function to either parse an XML file given it's directory path, filename and type of profile, or be able to create an XML given the same as stated before plus the XMLFileItem structure with the required information to inject into a new XML file. The XMLFileItem will have cooresponding data to the specific profiles.

Finally, there will be preset schemas to each profile so that the parser's can confirm legal XML files to be put into the program.

Testing