org.openrdf.sesame.sailimpl.rdbms
Class CustomInferenceServices

java.lang.Object
  extended byorg.openrdf.sesame.sailimpl.rdbms.CustomInferenceServices
All Implemented Interfaces:
InferenceServices, TableNames

public class CustomInferenceServices
extends Object
implements InferenceServices

Title: Custom Inference Rules

Description:

Copyright: Copyright (c) 2003

Company: Ontotext Lab. Sirma AI

Version:
1.0
Author:
Damyan Ognyanoff

Field Summary
static String PARAM_RULE_FILE
           
 
Fields inherited from interface org.openrdf.sesame.sailimpl.rdbms.TableNames
ADDED_TRIPLES_TABLE, ALL_INFERRED_TABLE, ALL_NEW_TRIPLES_TABLE, CLASS_TABLE, DEPEND_TABLE, DIRECT_SUBCLASSOF_TABLE, DIRECT_SUBPROPERTYOF_TABLE, DOMAIN_TABLE, EXPIRED_LITERALS_TABLE, EXPIRED_RESOURCES_TABLE, EXPIRED_TRIPLES_TABLE, EXPIRED_VALUES_TABLE, GROUNDED_TRIPLES_TABLE, INFERRED_TABLE, INSTANCEOF_TABLE, LITERALS_TABLE, NAMESPACES_TABLE, NEW_GROUNDED_TRIPLES_TABLE, NEW_TRIPLES_TABLE, PROPER_INSTANCEOF_TABLE, PROPERTY_TABLE, RANGE_TABLE, RAW_TRIPLES_TABLE, REP_INFO_TABLE, RESOURCES_TABLE, SUBCLASSOF_TABLE, SUBPROPERTYOF_TABLE, TRIPLES_TABLE
 
Constructor Summary
CustomInferenceServices()
           
 
Method Summary
 void afterInitialize()
          invoked to ensure that thre RDBMS instance is already created within Sail
 void createDependenciesTable()
          need to handle creation of DEPEND table because some of the rules may need more than 2 columns to store the dependancy (rules with t=hree or more triple templates in CustomInferencer) An example of such rule: a rdf:type owl:TransitiveProperty x a b b a c infer: x a c so the (x a c) triple is dependant from all those
 void doInferencing()
          the entry point for statement inferencing
static int getMaxTemplateCountsPerRule()
           
 void initialize(RdfSchemaRepository sail, Map configParams)
          invoked within sail.initialize(Map configParam).
 void initRdfSchema()
          invoked to initilize the basic RDFS schema for the repository
 void markAxioms()
          invoked to mark the currently added statements as axioms
 void processNewStatements()
          invoked when some staements are being added so to infer the dependancy information for them
 void removeExpiredStatements()
          invoked when some statements are being removed
 void setDependencyInferencer(boolean useDependencyInferencer)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAM_RULE_FILE

public static final String PARAM_RULE_FILE
See Also:
Constant Field Values
Constructor Detail

CustomInferenceServices

public CustomInferenceServices()
Method Detail

getMaxTemplateCountsPerRule

public static int getMaxTemplateCountsPerRule()

setDependencyInferencer

public void setDependencyInferencer(boolean useDependencyInferencer)
Specified by:
setDependencyInferencer in interface InferenceServices

initialize

public void initialize(RdfSchemaRepository sail,
                       Map configParams)
Description copied from interface: InferenceServices
invoked within sail.initialize(Map configParam). Allows to initialize the custom inferencer(s) with params provided in system.conf

Specified by:
initialize in interface InferenceServices
Parameters:
sail - - to which the inferencer is embedded
configParams - - a map holding the sail's confic parameters

initRdfSchema

public void initRdfSchema()
invoked to initilize the basic RDFS schema for the repository

Specified by:
initRdfSchema in interface InferenceServices

doInferencing

public void doInferencing()
the entry point for statement inferencing

Specified by:
doInferencing in interface InferenceServices

removeExpiredStatements

public void removeExpiredStatements()
                             throws SQLException
invoked when some statements are being removed

Specified by:
removeExpiredStatements in interface InferenceServices
Throws:
SQLException

processNewStatements

public void processNewStatements()
invoked when some staements are being added so to infer the dependancy information for them

Specified by:
processNewStatements in interface InferenceServices
Throws:
SQLException

markAxioms

public void markAxioms()
invoked to mark the currently added statements as axioms

Specified by:
markAxioms in interface InferenceServices
Throws:
SQLException

createDependenciesTable

public void createDependenciesTable()
                             throws SQLException
need to handle creation of DEPEND table because some of the rules may need more than 2 columns to store the dependancy (rules with t=hree or more triple templates in CustomInferencer) An example of such rule: a rdf:type owl:TransitiveProperty x a b b a c infer: x a c so the (x a c) triple is dependant from all those

Specified by:
createDependenciesTable in interface InferenceServices
Throws:
SQLException

afterInitialize

public void afterInitialize()
invoked to ensure that thre RDBMS instance is already created within Sail

Specified by:
afterInitialize in interface InferenceServices


Copyright © 2002-2006 Aduna BV, GNU LGPL License applies.