27.7.10

File Access and Display

  • To manage, manipulate, and represent data

image

Solutions

  • File System
  • Data System
  • Nodes APIs

Four Layers

  • Presentation Layer
  • Logical Layer
  • Abstraction Layer
  • Physical Layer

File System API

image

  • The NetBeans Platform gives transparent access to files and folders by providing the File System API.
  • … as if the data is stored in the form of a virtual XML file system, such as that used by the System Filesystem, a JAR file, or in a normal folder.
  • Operations
    • Obtaining
    • Creating
    • Renaming
    • Deleting
    • Moving
    • Reading and Writing Files
    • Monitoring Changes
      • Only internal events are monitored

Data System API

  • Provides a logical layer on top of the File Systems API
    • While a FileObject manages its data regardless of type, a DataObject is a wrapper for a FileObject of a quite specific type.
    • A DataObject extends a FileObject with type-specific features and functionalities.
    • These are specified through interfaces or abstract classes: so-called cookies.

image

  • DataObject
    • Implementing and Adding Cookies
    • Using Cookies
    • Providing Cookies Dynamically
    • Creating a DataObject Manually
  • DataObject Factory
  • DataLoader
    • Implementation
    • Registration

Nodes API

image

  • Node Container
    • Actions
    • Event Handling
  • Implementing Nodes and Children

Explorer & Property Sheet API

image

No comments: