All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----com.las.ogdi.OGDIDictionary
The OGDIDictionary class is used in relation with the following classes: OGDIDictionaryItem, OGDISyntaxModel, OGDISyntacticToken, OGDIExpressionSyntacticToken, OGDIItemSyntacticToken, OGDISeparatorSyntacticToken and OGDISyntacticParser. For each driver there is a corresponding class OGDI<Driver Name> Parser such as OGDIVRFParser,OGDIGRASSParser, and so on for the other geospatial data drivers).
The object instanciation process of these different classes is carried out as follows:
Dictionary Items are the building blocks to form a request that will enable you to access a coverage from an opened URL. At its simplest, a driver will have one level of Items i.e. all Items are at the same hierarchical level and organized by family. This is the case for a DTED data source for instance. In that case, you would get the list of dictionary Items from the URL Dictionary by invoking its getItems method (with the MATRIX family argument). That could return a "DTED" Item, which is the name of a coverage for that data source. Other drivers can have several levels of Items (VRF, GRASS. etc.) and sub-levels would be accessed by the getChildren method of an Item.
At that point, you would have to check the proper request syntax by invoking the getSyntaxModel (or getSyntaxDescription) of the dictionary. This would tell you that a DTED data source needs an item, a ( separator, an expression and a ) separator to properly validate a request. Separators are added for you, so you need only provide an item and an expression to the getRequest method of the SyntaxModel. In that case it could be the DTED Item and "DISK". The result is a correctly spelled request, DTED(DISK), that you put as an argument to create a Coverage object that, in turn, will serve as the argument to the setCurrentCoverage of the opened URL.
Here are a few syntax definitions according to the selected driver:
GRASS Driver: <File>@<Mapset>(*) This syntax defines: item (file or layer name), separator (@), item (mapset name), separator "(" (open parenthesis), expression (a * or an expression), separator ")" (closed parenthesis). The object number to be created will be equal to the larger number of mapsets times the number of families available in the GRASS driver (Raster, Area, Line, Point and Text). The values of the different fields of the OGDIItemS.T. objects are defined in the following table:
Driver |
Syntax |
Fields and Values |
GRASS | <File>@<Mapset>(*) | File: _level=0, _father=2, _description=null Mapset: _level=1, _father=-1, _description=null |
VRF | <Coverage>@<Library>(expression) | Coverage: _level=0, _father=2, _description= got from the
dictionary description Library: _level=1, _father=-1, _description=got from the dictionary description. |
RPF | <Coverage> | For each field: _level=0, _father=-1, description=null
|
The number of objects OGDIDictionaryItem for the VRF driver will be equal to the larger number of Library times the number of families (Area, Line, Point, Text).
The number of objects OGDIDictionaryItem for the RPF driver will be equal to the number of coverages defined in the dictionary (there is only one family type: Raster).
public OGDIDictionary(String driver, String urlinfo, String syntaxDescription, OGDISyntaxModel syntaxModel, Object layout, Enumeration items)
public OGDISyntaxModel getSyntaxModel()
public String getSyntaxDescription()
public String getMetadata(int level)
public Enumeration getItems(OGDIFamily family)
public String toString()
All Packages Class Hierarchy This Package Previous Next Index