gr.forth.ics.rdfsuite.swkm.model.db.impl
Class DBValidator

java.lang.Object
  extended by gr.forth.ics.rdfsuite.swkm.model.db.impl.DBValidator
All Implemented Interfaces:
java.io.Serializable

public class DBValidator
extends java.lang.Object
implements java.io.Serializable

Validates schema and data

See Also:
Serialized Form

Field Summary
protected static org.apache.log4j.Logger log
           
 
Constructor Summary
DBValidator(RDF_Validator v, int repr, RDFDB_Model model, DBRepresentation representation)
          Create a new DBValidator.
 
Method Summary
 java.util.ArrayList getPropertyDomainRange(IRDF_Property property)
          Returns the URIs of the domain & the range classes of the stored RDF property and sets their ids in the hashmap.
 boolean isSubClass(java.lang.String sub, java.lang.String sup, int level, boolean schemaValidation)
          Tests if the class with URI is subset of the class with URI .
 void validateData()
          26-02-07 My purpose is to obtain the same result with validateData by performing only one property domain range fetching query for all properties once,keeping the results in some structure and then using them repeatidly for all property instances
 void validateSchema()
          Validate the schema of the input file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final org.apache.log4j.Logger log
Constructor Detail

DBValidator

public DBValidator(RDF_Validator v,
                   int repr,
                   RDFDB_Model model,
                   DBRepresentation representation)
Create a new DBValidator.

Method Detail

validateData

public void validateData()
                  throws java.sql.SQLException
26-02-07 My purpose is to obtain the same result with validateData by performing only one property domain range fetching query for all properties once,keeping the results in some structure and then using them repeatidly for all property instances

Throws:
java.sql.SQLException - if some query aborts

validateSchema

public void validateSchema()
                    throws java.sql.SQLException
Validate the schema of the input file.

Throws:
java.sql.SQLException - if some query aborts

isSubClass

public boolean isSubClass(java.lang.String sub,
                          java.lang.String sup,
                          int level,
                          boolean schemaValidation)
                   throws java.sql.SQLException
Tests if the class with URI is subset of the class with URI .

Parameters:
schemaValidation - Indicates if the function is used for validating schema or data
Throws:
java.sql.SQLException - if some query aborts

getPropertyDomainRange

public java.util.ArrayList getPropertyDomainRange(IRDF_Property property)
                                           throws java.sql.SQLException
Returns the URIs of the domain & the range classes of the stored RDF property and sets their ids in the hashmap. Copy/Paste from SSRepresentation/HybridRepresentation

Throws:
java.sql.SQLException - if some query aborts