Menu

Data Structures in NiCE

Jay Jay Billings Scott Forest Hull II Dasha
Attachments

Table of Contents

NiCE's Data Structures: Overview

Talk about the NiCE data structure Philosophy, why we do things, the patterns, etc.

The Philosophy

NiCE Data Structure Diagram

XML Parsing

The ability to transform data to one form to another is a common requirement within many modern day programs. The NiCE program allows a majority of it's data structures to persist and load data with the hard disk. The eXtensive Markup Language (XML) handles these interactions through a process of binding the data from the data structures and converting it to a readable XML format. Java's API for XML Binding (JAXB) handles these interactions through a course of marshalling and unmarshalling of the data structures. The JAXB library is unique compared to many other forms of XML parsing because it does not require a major altering of the data structures in order for conversion process to work. With the help of annotations, the data is directly converted between XML and volatile running memory with ease. Since the XML conversion is added directly to the data structure, many other types of use cases for handling the data with the hard disk is solved fairly quickly.

Database Manipulation

NiCE handles Database Manipulation through a library called Java's Persistence API (JPA). Very similarly to JAXB, JPA handles the queries to the database through the use of operations by passing the instances of the objects themselves on a database manager (EntityManager). Only Items, which contain links to other objects, can be called upon to be manipulated with a selected database. Items can be persisted, deleted, edited, or selected for the database. There are a few quirks and requirements needed for the database to run successfully within NiCE. More information can be found in the JPA section.

GUI Interaction

NiCE's Graphical User Interface (GUI) is generated based upon the implementation of specific NiCE data structures, RCP, and JFACE/SWT widgets. An item contains a form, or a visual representation of a page within the NiCE client. A form contains many components, or section parts, that can be either a combination of text boxes, radio buttons, lists, or tables. Usually, the component is a subsection in the form page that contains sub components that can be interacted with. For sections rendering with Datacomponents, lists of entries can be used to specify a menu of items, radio buttons to be checked, or a text box to be filled. For sections rendering with TableComponents, MatrixComponents, or OutputComponents, sections are rendered on the screen to represent a table of values.

There are multiple ways to create a form page (Create a NiCE Item) within NiCE.

  • Create a plugin that subclasses Item.
  • Create a NiCEItem to be loaded internally
  • Loading from specified, persisted xml files

The ways listed above reflect almost directly to creating specific data structures.


Related

Wiki: About NiCE Data Structures
Wiki: Creating a NiCE XML File From Schema
Wiki: Developer Documentation
Wiki: Geometry Editor

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.