Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
The NetBeans Platform provides a very substantial concept for creating, managing, manipulating, and presenting data. This concept mainly embraces the File Systems API and the Data Systems API. Additionally, there is the Nodes API and the Explorer API. Each of these APIs is located on its own abstraction level. This system can be divided into four levels together with the concrete data outside the NetBeans Platform application, as shown in Figure 7-1.
Figure 7-1. Architecture for managing data and files within the NetBeans Platform
A data system is initially abstracted using the FileSystem class. Doing so, the physical data, which lie below, can be present in any form. The FileSystem class lets users address physical data from different sources in the same way—for example, a local file system, a file system in the form of an XML file (similar to how the System Filesystem is built, too) or a JAR file. Only an implementation of the abstract FileSystem class has to be provided in the desired form. This way, the File Systems API abstracts from the concrete data and provides it within the application in a virtual file system. Thus access is possible independent from the origin of the data. The abstracted data on the abstraction layer in the form of a FileObject class do not have information yet about what kind of data to manage. So this layer does not contain data-specific logic. Building upon this layer, there is the Data Systems API in the logical layer. There are objects, which represent the data of a very specific type. These objects build upon the DataObject class. For each of the desired data types there exists a DataObject.Factory which is responsible for creating objects. The NodesAPI is the top layer in this concept (it is on the presentation layer). So a node is responsible for the type-specific representation of data. In this respect, a Node represents a DataObject, which itself is responsible for creating the node. In Chapter 12, I will explain in detail how to represent your data by means of nodes and the explorer.