-
Notifications
You must be signed in to change notification settings - Fork 0
DatabaseWikiInternals
This page contains a high-level description of the data structures used in the DatabaseWiki system.
The org.dbwiki.data.database package contains classes for DatabaseNodes and related classes for the content of a DatabaseWiki.
The Database interface provides an abstraction of the basic behavior of the system. The interface is as follows:
DatabaseNodes are one of the main concepts of DatabaseWiki. The class hiearchy is as follows:
-
DatabaseNodeprovides basic functionality for nodes that have a label.DatabaseNodes have aDatabaseElementNodeparent and anAnnotationList-
DatabaseElementNodeprovides common functionality for so-called Element nodes that can be parents of other nodes and that have a label and type (Entity).-
DatabaseAttributeNodes are attribute nodes that have a label and aDatabaseNodeValuechild (which is essentially a timestamped sequence ofDatabaseTextNodes) -
DatabaseGroupNodes are nodes that group other nodes, having a list of children all of which must beDatabaseElementNodes.
-
-
DatabaseTextNodes are nodes whose content is a text string.
-
The DatabaseElementList class is used in DatabaseGroupNode and in some other places to hold a list of elements.
All DatabaseNodes are TimestampedObjects. All of the above classes are abstract, and have to be instantiated using concrete subclasses, e.g. RDBMSDatabaseNode. However, code for rendering data as HTML can be written to the DatabaseNode interface, avoiding implementation-dependence.
The Update and NodeUpdate classes are used to colelct updates to nodes as part of an edit form.
The org.dbwiki.data.resource package contains classes for managing identities that link database IDs and URLs, including data nodes, wiki page identities, and schema nodes.
The ResourceIdentifier interface provides methods to compare identifiers,
Its instances are:
-
NodeIdentifier= identifies data nodes -
PageIdentifier- identifies wiki pages -
EntityIdentifier- identifies schema nodes -
PID- Obsolete. Identifies a node via a vector of label:index steps. Uses theLIDclass, which is also obsolete.
In addition, the WRI class contains a DatabaseIdentifier and a ResourceIdentifier, i.e. it is a pair linking
The org.dbwiki.data.schema package contains classes for DatabaseSchema (and its components). A DatabaseSchema is basically a mapping from names to schema nodes, which are currently called Entities. Entities include AttributeEntity, a schema node representing an attribute data node, and GroupEntity, a schema node representing a group data node.
The SchemaParser class parses a schema in from a string.
The org.dbwiki.data.time package contains classes and interfaces for temporal aspects of the data. The TimeInterval class is essentially a struct containing a pair of version numbers representing a n interval of time. The TimeSequence class is a vector of (nonoverlapping, increasing) TimeIntervals. The TimestampedObject class provides basic functionality for objects that have associated TimeIntervals and are arranged in a tree (with a TimestampedObject parent from which timestamps can be inherited).
The org.dbwiki.data.provenance package contains the abstract Provenance class and subclasses representing Activate, Copy, Delete, Import, Insert, Unknown and Update operations.
The module org.dbwiki.data.annotation contains the Annotation and AnnotationList classes.
The org.dbwiki.data.query package contains classes defining path queries and related data structures.
The org.dbwiki.data.wiki package contains classes that provide a simple HTML Wiki functionality, with wiki pages that can contain path queries into the data.
The org.dbwiki.data.security package provides fine-grained security policies. Currently unused/under construction.
There is currently only one driver, in package org.dbwiki.driver.rdbms. This implements the DatabaseNode classes and Database interface.
The org.dbwiki.exception.* packages and classes define some DatabaseWiki-specific exceptions.
The org.dbwiki.main package includes command-line programs that create databases, import data, delete databases, and start the server.
The org.dbwiki.web.* packages define the Web interface to DatabaseWiki. The key components are the WikiServer and DatabaseWiki classes that receive requests, geenrate page templates and content generators, and render pages, and the many small classes in org.dbwiki.web.ui that handle printing out different parts of each page.
Package org.dbwiki.web.html contains some utility classes for HTML pages.
Package org.dbwiki.web.ui contains classes to deal with CSS, HTML templates, and content generation. Basically, a template is a HTML file with some macro calls in it, and a content generator is a symbol table containing functions to call for each macro to fill in its content.
Package org.dbwiki.web.ui.layout defines teh DatabaseLayouter class and associated data structures that provides a way to customize the way a data tree is rendered as HTML.
The org.dbwiki.web.ui.printer package and its subpackages define an interface HtmlContentPrinter and many implementations that can be used to fill in the content macros in templates.