The Prajna data package includes a number of low-level classes which can be considered atomic classes. These are simple classes which form building blocks for data objects and applications. The package also includes several simple interfaces.
The GeoCoord class is a class which is used throughout the Prajna Project to represent geographic coordinates. It can be constructed with either native latitude, longitude, and altitude (in degrees and meters), or from formatted strings. It also accepts both DDMMSS format and decimal degrees to represent latitude and longitude. For instance, a latitude string of 401500N, representing 40 degrees 15 minutes north latitude, can also be represented as the string "40.25".
Locatable is a simple interface for objects which have a geographic context.
Location is a lightweight implementation of the Locatable interface. It allows representing a location as a coordinate, a general region (center and radius), or a place name.
The basic temporal data component within Prajna is the TimeSpan. A TimeSpan augments the standard java.util.Date object by including a start and stop time. A TimeSpan may represent either a single instant of time, or a span of time. The class also includes several utility methods.
The Sequential interface provides support for multiple time spans, and can represent arbitrary objects with a temporal component. It can be used to represent periods of activity.
The TimeSequence class is a concrete implementation of the Sequential interface. may include one or more intervals of time.
Unit is an interface for units of measurement. The package also includes several concrete implementations of Unit, namely LengthUnit, TimeUnit, and MassUnit.
The Measure class provides a data component to represents measurements. It uses the Unit class to identify the type of measurement, and supports unit conversions. As instances of a Measure class, comparing 30cm to 12 inches is simple.
In the future, the measure data type will also be used to generate additional measures. For instance, it could be used to derive the kinetic energy of a moving object.
Note: the Measure class and Units classes will likely change or be deprecated when JSR-275: Measures and Units is finalized and added to the Java Specification.
Prajna represents an unstructured text document with the DocData class. The DocData class can store the document name, summary, body, and any key words or terms. The DocData object can also store a link, which can be anything from a URL hyper-link to an action string, based upon the need of the program manipulating the data records. The DocData class can also compute the similarity score between two different DocData objects.
Prajna includes the RenderStyle class which can represent how a particular object is displayed. It is used for both geographic displays and some visualization renderers within Prajna.
MarkerIcon is a simple extension to the ImageIcon class which includes an offset to indicate where the icon should be positioned relative to a particular point. This enables arbitrary icons, such as an icon of a pushpin, to be used at a particular location and be displayed correctly.
Weighted is a simple interface which indicates that the object has a getWeight method. This interface is useful for certain classes of data structures such as graphs with weighted edges.
Xmlizable is an interface which may be implemented by classes which have a standard XML representation. Xmlizable includes two methods. The method loadFromXml initializes an object from an XML element, while toXml converts the object into its native XML representation.