Package net.sf.farrago.catalog

Implements the Farrago metadata catalog.

See:
          Description

Interface Summary
FarragoRepos FarragoRepos represents a loaded repository containing Farrago metadata.
FarragoTransientStorage.TxnIndex  
FemSqltypedElement This interface belongs in the UML model, but can't live there due to metamodel problems.
 

Class Summary
FarragoAbstractCatalogInit FarragoAbstractCatalogInit provides an abstract base class for classes that initialize the Farrago catalog.
FarragoCatalogInit FarragoCatalogInit contains one-time persistent initialization procedures for the Farrago catalog.
FarragoCatalogUtil Static utilities for accessing the Farrago catalog.
FarragoCatalogUtil.BackupData Helper class used to represent backup information stored in the backup catalog.
FarragoCatalogUtil.RowCountStat Helper class used to represent a specific type of row count statistic
FarragoColumnHistogram FarragoColumnHistogram reads and interprets statistics for a column of a Farrago column set.
FarragoColumnHistogram.HistogramBarCoverage Describes which points and ranges lie on a histogram bar
FarragoMdrReposImpl Implementation of FarragoRepos using a MDR repository.
FarragoModelLoader FarragoModelLoader is a utility class for loading the catalog model.
FarragoReposImpl Implementation of FarragoRepos using a MDR repository.
FarragoReposImpl.ReposCache  
FarragoReposIntegrityErr FarragoReposIntegrityErr records one integrity error detected by FarragoRepos.verifyIntegrity(javax.jmi.reflect.RefObject).
FarragoReposTxnContext FarragoReposTxnContext manages the state of at most one repository transaction.
FarragoReposUtil Static utilities for manipulating the Farrago repository.
FarragoReposUtil.ExportRefProvider  
FarragoReposUtil.ImportRefResolver  
FarragoReposUtil.InvalidXmlCharFilterInputStream  
FarragoReposUtil.InvalidXmlCharFilterInputStream.ByteOutputStream ByteOutputStream extends ByteArrayOutputStream to provide ByteBuffer-like operations such as compact, array and get.
FarragoSequenceAccessor A FarragoSequenceAccessor optimizes access to sequences.
FarragoSequenceOptions A class for tracking sequence generator options.
FarragoTableStatistics This class reads statistics for a Farrago table from data stored in the catalog.
FarragoTransientStorage FarragoTransientStorage provides storage for transient MDR objects.
FarragoTransientStorage.MVIndex  
FarragoTransientStorage.PVIndex  
FarragoTransientStorage.SVIndex  
FarragoTransientStorageFactory Factory for FarragoTransientStorage.
MockFarragoMetadataFactory Mock implementation of FarragoMetadataFactory.
MockFarragoMetadataFactory.FactoryImpl  
MockMetadataFactory Helps create a mock implementation of an MDR metadata factory interface.
MockMetadataFactory.JmiPrinter Formats a JMI object as XML.
MockMetadataFactory.JmiVisitor Abstract base class for an iterator over a JMI object and its children.
 

Enum Summary
FarragoCatalogUtil.RowCountStatType Enumeration of the different type of row count statistics
FarragoReposTxnContext.State  
FarragoSequenceOptions.OptionType  
 

Package net.sf.farrago.catalog Description

Implements the Farrago metadata catalog.


The Farrago catalog is implemented as an instance of the Netbeans MDR repository. FarragoRepos takes care of starting up and shutting down the repository, as well as exposing root packages and providing utilities for querying and updating the catalog.

Catalog Build

The diagram below provides an overview of the build-time processing which orchestrates catalog definition and access:

There are two inputs to the process:

The first step of the catalog build is to combine the two models into a single XMI file before further processing. This requires a bit of XMI massaging; custom XSL scripts make this reasonably painless. (Since MDR uses MOF, we use the UML2MOF tool to convert FEM.) Some filtering is also performed; for example, Farrago only uses the following CWM packages:

Next, the combined metamodel is imported into a new MDR repository instance and stored in an extent named FarragoMetamodel. A singleton instance of this metamodel is instantiated with extent name FarragoCatalog; this will store actual catalog data.

Besides storage, model-specific Java interfaces are also required for accessing the catalog at runtime. For example, a table is represented by CwmTable. The build calls MDR to generate these from the metamodel. The CWM interfaces are generated under package net.sf.farrago.cwm, and the FEM interfaces are generated under package net.sf.farrago.fem. Custom code-generators in net.sf.farrago.catalog.codegen take care of generating convenience class FarragoMetadataFactory and C++ code used for JNI access to the model (TODO: link).

As shown at the bottom of the diagram, a DTD is also generated which describes the XMI format of catalog import/export data (all of which is implemented by MDR).

For more details on the build process, please study the createCatalog target in //open/dev/farrago/build.xml.

Catalog Population

In addition to preparing an empty catalog, the build also populates it with some initial metadata. Currently, this includes: Eventually, this will include many other things such as the INFORMATION_SCHEMA definition, lists of supported functions, system-owned schemas and procedures, etc. (The sample SALES schema is only for developer testing and will not be present in released distributions.)

Once the system is fully initialized, DDL statements executed by users can also modify the catalog. The geneneric DDL implementation is in net.sf.farrago.ddl. Specific validation and storage rules for various catalog objects are supplied by DdlHandler.

Revision $Id: //open/dev/farrago/src/net/sf/farrago/catalog/package.html#9 $
Copyright Copyright (C) 2005-2009 The Eigenbase Project
Copyright (C) 2005-2009 SQLstream, Inc.
Copyright (C) 2005-2009 LucidEra, Inc.
Author John V. Sichi