org.vfny.geoserver.zserver
Class GeoProfile

java.lang.Object
  extended byorg.vfny.geoserver.zserver.GeoProfile

public class GeoProfile
extends java.lang.Object

Helper class for various parts of the GeoProfile.


Nested Class Summary
 class GeoProfile.Attribute
           
 class GeoProfile.Diag
           
 
Field Summary
static int AFTER
           
static int BEFORE
           
static int BEFORE_OR_DURING
           
static java.lang.String BOUNDING_MATCH
           
static java.lang.String BREIF_SET
           
static int DURING
           
static int DURING_OR_AFTER
           
static int ENCLOSES
           
static int EQUALS
           
static java.lang.String FULL_SET
           
static int FULLY_ENCLOSED
           
static int GREATER_THAN
           
static int GREATER_THAN_EQUAL
           
static int LESS_THAN
           
static int LESS_THAN_EQUAL
           
static java.lang.String MATCH_PREFIX
           
static int NOT_EQUAL
           
static int OVERLAPS
           
static int RELATION
           
static int STRUCTURE
           
static java.lang.String SUMMARY_SET
           
static java.lang.String TRUNCATE
           
static int TRUNCATION
           
static int USE
           
 
Constructor Summary
GeoProfile()
           
 
Method Summary
static java.lang.Double computeExtent(java.lang.String eastbc, java.lang.String westbc, java.lang.String northbc, java.lang.String southbc)
          Computes the extent given the bounding coordinates.
static java.util.Properties getUseAttrMap()
          Gets the mappings of the Use Attribute numbers to xpaths.
static boolean isBoundingField(java.lang.String searchField)
           
static boolean isDateRange(int relation)
          Returns true if the relation is one of BEFORE, BEFORE_OR_DURING, DURING, DURING_OR_AFTER, or AFTER.
static boolean isFGDCdate(java.lang.String name)
          Checks to see if the given name should be computed as a a date.
static boolean isFGDCnum(java.lang.String name)
          Checks to see if the given name should be a number.
static void setUseAttrMap(java.util.Properties useAttrMap)
          Sets the property object that contains the mappings of Use Attribute numbers to xpaths (and keywords).
static void setUseAttrMap(java.lang.String pathToPropFile)
          Opens the file at pathToPropFile and turns it into a properties object, using the newly created properties object as the mappings of use attributes numbers to xpaths and keywords.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LESS_THAN

public static final int LESS_THAN
See Also:
Constant Field Values

LESS_THAN_EQUAL

public static final int LESS_THAN_EQUAL
See Also:
Constant Field Values

EQUALS

public static final int EQUALS
See Also:
Constant Field Values

GREATER_THAN_EQUAL

public static final int GREATER_THAN_EQUAL
See Also:
Constant Field Values

GREATER_THAN

public static final int GREATER_THAN
See Also:
Constant Field Values

NOT_EQUAL

public static final int NOT_EQUAL
See Also:
Constant Field Values

OVERLAPS

public static final int OVERLAPS
See Also:
Constant Field Values

FULLY_ENCLOSED

public static final int FULLY_ENCLOSED
See Also:
Constant Field Values

ENCLOSES

public static final int ENCLOSES
See Also:
Constant Field Values

BEFORE

public static final int BEFORE
See Also:
Constant Field Values

BEFORE_OR_DURING

public static final int BEFORE_OR_DURING
See Also:
Constant Field Values

DURING

public static final int DURING
See Also:
Constant Field Values

DURING_OR_AFTER

public static final int DURING_OR_AFTER
See Also:
Constant Field Values

AFTER

public static final int AFTER
See Also:
Constant Field Values

USE

public static final int USE
See Also:
Constant Field Values

RELATION

public static final int RELATION
See Also:
Constant Field Values

STRUCTURE

public static final int STRUCTURE
See Also:
Constant Field Values

TRUNCATION

public static final int TRUNCATION
See Also:
Constant Field Values

TRUNCATE

public static final java.lang.String TRUNCATE
See Also:
Constant Field Values

FULL_SET

public static final java.lang.String FULL_SET
See Also:
Constant Field Values

SUMMARY_SET

public static final java.lang.String SUMMARY_SET
See Also:
Constant Field Values

BREIF_SET

public static final java.lang.String BREIF_SET
See Also:
Constant Field Values

MATCH_PREFIX

public static final java.lang.String MATCH_PREFIX
See Also:
Constant Field Values

BOUNDING_MATCH

public static final java.lang.String BOUNDING_MATCH
See Also:
Constant Field Values
Constructor Detail

GeoProfile

public GeoProfile()
Method Detail

setUseAttrMap

public static void setUseAttrMap(java.util.Properties useAttrMap)
Sets the property object that contains the mappings of Use Attribute numbers to xpaths (and keywords).

Parameters:
useAttrMap - the attribute mapping to use.

getUseAttrMap

public static java.util.Properties getUseAttrMap()
Gets the mappings of the Use Attribute numbers to xpaths.

Returns:
the current mapping of use attributes.

setUseAttrMap

public static void setUseAttrMap(java.lang.String pathToPropFile)
Opens the file at pathToPropFile and turns it into a properties object, using the newly created properties object as the mappings of use attributes numbers to xpaths and keywords.

Parameters:
pathToPropFile - the full path to the file containing the use mappings.

isDateRange

public static boolean isDateRange(int relation)
Returns true if the relation is one of BEFORE, BEFORE_OR_DURING, DURING, DURING_OR_AFTER, or AFTER.

Parameters:
relation - the int relation number.
Returns:
true if a date range relation, false otherwise.

isBoundingField

public static boolean isBoundingField(java.lang.String searchField)

isFGDCnum

public static boolean isFGDCnum(java.lang.String name)
Checks to see if the given name should be a number. Only checks the end of the string, so the xpath leading up to it does not matter.

Parameters:
name - the name to test.
Returns:
true if it should be stored as a number.

computeExtent

public static java.lang.Double computeExtent(java.lang.String eastbc,
                                             java.lang.String westbc,
                                             java.lang.String northbc,
                                             java.lang.String southbc)
Computes the extent given the bounding coordinates.

Parameters:
eastbc - The eastern bounding coordinate.
westbc - The western bounding coordinate.
northbc - The northern bounding coordinate.
southbc - The southern bounding coordinate.
Returns:
the extent, null if any of the bounds are null.

isFGDCdate

public static boolean isFGDCdate(java.lang.String name)
Checks to see if the given name should be computed as a a date. Only checks the end of the string, so the xpath leading up to it does not matter.

Parameters:
name - the name to test.
Returns:
true if it should be used as a date.