org.openanzo.common.rdb.container.query
Class FindInferred

java.lang.Object
  extended by org.openanzo.common.rdb.container.query.FindInferred

public class FindInferred
extends java.lang.Object

Set of find operations for both regular finds, as well as find with inferred results.

Author:
Matthew Roy ( mroy@cambridgesemantics.com )

Constructor Summary
FindInferred()
           
 
Method Summary
static java.lang.Iterable<Quad> findStatements(RDBConnection container, org.openrdf.model.Resource subj, org.openrdf.model.URI prop, org.openrdf.model.Value obj, java.lang.Long namedGraphId, int metadataGraph, java.lang.String graphTable)
          Find statements in container that match pattern.
static java.lang.Iterable<Quad> findStatements(RDBConnection container, org.openrdf.model.Resource subj, org.openrdf.model.URI prop, org.openrdf.model.Value obj, org.openrdf.model.Resource... contexts)
          Find all statements in container that match the provided parameters
static java.lang.Iterable<Quad> findStatementsInferred(RDBConnection container, org.openrdf.model.Resource subj, org.openrdf.model.URI prop, org.openrdf.model.Value obj, java.lang.Long namedGraphId, int metadataGraph, java.lang.String graphTable, org.openrdf.model.Resource ontology)
          Find statements in container that match pattern.
static java.lang.Iterable<Quad> findStatementsInferred(RDBConnection container, org.openrdf.model.Resource subj, org.openrdf.model.URI prop, org.openrdf.model.Value obj, org.openrdf.model.Resource[] contexts, org.openrdf.model.Resource ontology)
          Find all statements in container that match the provided parameters including inferred statements
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FindInferred

public FindInferred()
Method Detail

findStatementsInferred

public static java.lang.Iterable<Quad> findStatementsInferred(RDBConnection container,
                                                              org.openrdf.model.Resource subj,
                                                              org.openrdf.model.URI prop,
                                                              org.openrdf.model.Value obj,
                                                              org.openrdf.model.Resource[] contexts,
                                                              org.openrdf.model.Resource ontology)
                                                       throws AnzoException
Find all statements in container that match the provided parameters including inferred statements

Parameters:
container - source of data
subj - Subject resource to match, or wildcard if null
prop - Predicate uri to match, or wildcard if null
obj - Object value to match, or wildcard if null
contexts - Context values to match, or wildcard if null
ontology - URI of ontology that contains inferred property and object definitions
Returns:
Iterable set of quads containing results of find operation
Throws:
AnzoException - if there was an error finding statements

findStatementsInferred

public static java.lang.Iterable<Quad> findStatementsInferred(RDBConnection container,
                                                              org.openrdf.model.Resource subj,
                                                              org.openrdf.model.URI prop,
                                                              org.openrdf.model.Value obj,
                                                              java.lang.Long namedGraphId,
                                                              int metadataGraph,
                                                              java.lang.String graphTable,
                                                              org.openrdf.model.Resource ontology)
                                                       throws AnzoException
Find statements in container that match pattern. Include inferred statements.
  • If graphTable is not null, queries are joined against temporary table containing valid graphs for this query
  • Else if the namedGraphId is not null, then queries go against only statements that have the specific namedGraphId
  • Finally, if both the graphTable and namedGraphId are null, query either queries all graphs if metadataGraph==-1, namedGraphs if metadataGraph==0, or metadataGraphs if metadataGraph==1

    Parameters:
    container - source of data
    subj - Subject resource to match, or wildcard if null
    prop - Predicate uri to match, or wildcard if null
    obj - Object value to match, or wildcard if null
    namedGraphId - id of namedGraph to query
    metadataGraph - if both the graphTable and namedGraphId are null, query either queries all graphs if metadataGraph==-1, namedGraphs if metadataGraph==0, or metadataGraphs if metadataGraph==1
    graphTable - temporary table containing valid graphs for this query *
    ontology - URI of ontology that contains inferred property and object definitionss
    Returns:
    Iterable set of quads containing results of find operation
    Throws:
    AnzoException - if there was an error finding statements

  • findStatements

    public static java.lang.Iterable<Quad> findStatements(RDBConnection container,
                                                          org.openrdf.model.Resource subj,
                                                          org.openrdf.model.URI prop,
                                                          org.openrdf.model.Value obj,
                                                          org.openrdf.model.Resource... contexts)
                                                   throws AnzoException
    Find all statements in container that match the provided parameters

    Parameters:
    container - source of data
    subj - Subject resource to match, or wildcard if null
    prop - Predicate uri to match, or wildcard if null
    obj - Object value to match, or wildcard if null
    contexts - Context values to match, or wildcard if null
    Returns:
    Iterable set of quads containing results of find operation
    Throws:
    AnzoException - if there was an error finding statements

    findStatements

    public static java.lang.Iterable<Quad> findStatements(RDBConnection container,
                                                          org.openrdf.model.Resource subj,
                                                          org.openrdf.model.URI prop,
                                                          org.openrdf.model.Value obj,
                                                          java.lang.Long namedGraphId,
                                                          int metadataGraph,
                                                          java.lang.String graphTable)
                                                   throws AnzoException
    Find statements in container that match pattern.
  • If graphTable is not null, queries are joined against temporary table containing valid graphs for this query
  • Else if the namedGraphId is not null, then queries go against only statements that have the specific namedGraphId
  • Finally, if both the graphTable and namedGraphId are null, query either queries all graphs if metadataGraph==-1, namedGraphs if metadataGraph==0, or metadataGraphs if metadataGraph==1

    Parameters:
    container - source of data
    subj - Subject resource to match, or wildcard if null
    prop - Predicate uri to match, or wildcard if null
    obj - Object value to match, or wildcard if null
    namedGraphId - id of namedGraph to query
    metadataGraph - if both the graphTable and namedGraphId are null, query either queries all graphs if metadataGraph==-1, namedGraphs if metadataGraph==0, or metadataGraphs if metadataGraph==1
    graphTable - temporary table containing valid graphs for this query
    Returns:
    Iterable set of quads containing results of find operation
    Throws:
    AnzoException - if there was an error finding statements


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