org.openanzo.glitter.query
Interface QueryValidator

All Known Implementing Classes:
WellDesignedOptionalsValidator

public interface QueryValidator

A QueryValidator is a stateful class that determines whether or not the engine will accept a given query. A single query might have to pass multiple QueryValidators before being evaluated against an RDF dataset.

Author:
Lee

Method Summary
 java.lang.String getValidationError()
          This method's return value is only valid after a call to validateQuery on the same instance returns false.
 java.lang.String getValidatorDescription()
          Returns a human-readable description of what this QueryValidator checks for.
 boolean validateQuery(GraphPattern query)
           
 

Method Detail

validateQuery

boolean validateQuery(GraphPattern query)
Parameters:
query - The query pattern of the query to be validated
Returns:
True, if the query is OK; False, otherwise. If false, then getValidationError() may be called to return the reason for the failure to validate.

getValidationError

java.lang.String getValidationError()
This method's return value is only valid after a call to validateQuery on the same instance returns false.

Returns:
The reason for a failure to validate.

getValidatorDescription

java.lang.String getValidatorDescription()
Returns a human-readable description of what this QueryValidator checks for.

Returns:
A human-readable description of what this QueryValidator checks for.


Copyright © 2007 Cambridge Semantics Inc.. All Rights Reserved.