org.openanzo.server.repository.querybuilder
Interface ObjectGrounding.RdbColumn

All Superinterfaces:
ObjectGrounding
All Known Implementing Classes:
LiteralGrounding
Enclosing interface:
ObjectGrounding

public static interface ObjectGrounding.RdbColumn
extends ObjectGrounding

Interface for ObjectGroundings that can: convert to and from database values and RDF objects. generate SQL value constraints from RDF query constraints (RDF triple patterns with a specified object). limit generating SQL constraints to cases where the value type of the RDF object and the database column are compatible.

Author:
Joe Betz

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.openanzo.server.repository.querybuilder.ObjectGrounding
ObjectGrounding.FixedRdfValue, ObjectGrounding.FixedValue, ObjectGrounding.RdbColumn
 
Field Summary
 
Fields inherited from interface org.openanzo.server.repository.querybuilder.ObjectGrounding
RdfValue, Resource
 
Method Summary
 java.lang.Long getId(java.sql.ResultSet resultSet, java.lang.String columnName, CompositeNodeLayout nodeLayout)
          Get the ID of the node for the given column name in the resultset
 IRdbTerm getValue(java.sql.ResultSet resultSet, java.lang.String columnName, CompositeNodeLayout nodeLayout)
          Get the IRdbTerm value from the resultset for a given column name
 java.lang.String toSqlString(org.openrdf.model.Value value, CompositeNodeLayout nodeLayout)
          Convert this grounding into its sql equivalent
 
Methods inherited from interface org.openanzo.server.repository.querybuilder.ObjectGrounding
isValidObject
 

Method Detail

toSqlString

java.lang.String toSqlString(org.openrdf.model.Value value,
                             CompositeNodeLayout nodeLayout)
Convert this grounding into its sql equivalent

Parameters:
value - Value to convert
nodeLayout - CompositeNodeLayout to retrieve URIs and Node values
Returns:
the SQL string representation of this grounding

getValue

IRdbTerm getValue(java.sql.ResultSet resultSet,
                  java.lang.String columnName,
                  CompositeNodeLayout nodeLayout)
                  throws java.sql.SQLException
Get the IRdbTerm value from the resultset for a given column name

Parameters:
resultSet - resultset containing results of a query
columnName - name of column to retrieve from the resultset
nodeLayout - CompositeNodeLayout to retrieve URIs and Node values
Returns:
the IRdbTerm for the given column
Throws:
java.sql.SQLException

getId

java.lang.Long getId(java.sql.ResultSet resultSet,
                     java.lang.String columnName,
                     CompositeNodeLayout nodeLayout)
                     throws java.sql.SQLException
Get the ID of the node for the given column name in the resultset

Parameters:
resultSet - resultset containing results of a query
columnName - name of column to retrieve from the resultset
nodeLayout - CompositeNodeLayout to retrieve URIs and Node values
Returns:
the ID of the node for the given column name in the resultset
Throws:
java.sql.SQLException


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