Chapter 5. Repository

Table of Contents

Tutorial At A Glance
Running The Tutorial Example
Geometry Definition
Geometry XML
GeometryItem
GeometryDescriptorItem
GeometryDescriptor
Geometry Pool
Geometry Association
Style Definition
Style Pool
Style Association
Repository Element Definition
Element Pool
Summary

This tutorial provides Java Application Programmers exposure to additional features of the Tensegrity Graph Framework. Specifically, we provide you important information about creating a repository of graph elements from which users may interactively select and drag into their view documents.

When designing the visual elements of a repository, you specify them in xml and load them programmatically into several runtime “pool” objects (singletons) which cache this information. From then on, you may easily assign geometries and styles to each visual element in your repository or visual graphs.

Note

A Repository in the Tensegrity Graph Framework is not the same thing as the word “Repository” used in other domain vocabularies, such as in RDMS contexts, where the words “database, store, persistence and repository” are quite often used interchangeably. To avoid confusion, you might think of our repository as a “Library” of predefined, domain-specific graph elements that may be copied or “instantiated” into your working design documents.

Tutorial At A Glance

The table below gives you some important information about this tutorial.

Table 5.1. Tutorial Aspects

Tutorial AspectTutorial Description
Approximate Duration35 Minutes
Expected Outcome An application showing a graph document view containing selectable and dragable nodes and edges. This example gives the Java Application Programmer an initial exposure to geometries, styles and rules, which are specified in XML and loaded at application start-up.
Source FilesThe tutorial examples come with two source packages containing the java and configuration files needed to compile and run them. These are “com.tensegrity.firststeps.repository” and “com.tensegrity.firststeps.swt.repository” respectively for the AWT/Swing-based and SWT-based examples.
Creating Files geometry.xml, styles.xml, rules.xml
Modifying FilesNot applicable in this tutorial