com.hp.hpl.jena.eyeball
Class Eyeball

java.lang.Object
  |
  +--com.hp.hpl.jena.eyeball.Eyeball

public class Eyeball
extends java.lang.Object


Field Summary
static com.hp.hpl.jena.rdf.model.Property ANY
          A handy constant to use as wildcard in listStatements et al.
protected  com.hp.hpl.jena.rdf.model.Model config
          The loaded configuration file; defaults to etc/config.n3, but can be anything required.
static java.lang.String defaultInspectorRoot
          The shortname used as the default (from the command line) when no inspectors are requested explicitly.
static com.hp.hpl.jena.util.FileManager fileManager
          The file manager that Eyeball uses for its load/lookup operations.
static com.hp.hpl.jena.util.iterator.Map1 getObject
          a Map1 that extracts the object of a Statement.
static com.hp.hpl.jena.util.iterator.Map1 getSubject
          a Map1 that extracts the subject of a Statement.
protected  java.util.List inspectorClassNames
          The class names of the inspectors to be used in this eyeballing.
static com.hp.hpl.jena.rdf.model.Model rdf
          A Model containing the RDF schema.
static com.hp.hpl.jena.rdf.model.Model rdfBoth
          A Model containing the (dynamic) union of the RDF and RDFS schemas.
static com.hp.hpl.jena.rdf.model.Model rdfs
          A Model containing the RDFS schema.
protected  PredicateRegister register
          Predicate register which holds the predicates registered by the loaded inspectors and can supply a sorted list of them on demand.
protected  SchemaList schemas
          The schemas that have been specified for this eyeballing.
protected  java.util.Map schemeExpressions
          Mapping from scheme names to collection of allowable expressions
static java.lang.String XSDSchemaURI
           
 
Constructor Summary
Eyeball()
          Initialise this Eyeball with no schemas, the default configuration, and the default inspector list.
Eyeball(java.util.List inspectorClassNames, SchemaList schemas)
          Initialise this Eyeball with the inspectors given by their class names and the schema list, with the default configuration.
Eyeball(com.hp.hpl.jena.rdf.model.Model schema)
          Initialise this Eyeball with a single schema schema, the default configuration, and the default inspector list.
Eyeball(com.hp.hpl.jena.rdf.model.Model config, java.util.List inspectorClassNames, SchemaList schemas)
          Initialise this Eyeball explicitly with all fields:
Eyeball(com.hp.hpl.jena.rdf.model.Model config, SchemaList schemas)
          Initialise this Eyeball with the specified configuration model, the default inspector list, and the specified schemas.
Eyeball(SchemaList schemas)
          Initialise this Eyeball with the schemas from schemas, the default configuration, and the default inspector list.
 
Method Summary
protected  void checkSchemes(java.util.List messages, java.lang.String uri)
           
protected static com.hp.hpl.jena.util.FileManager constructFileManager()
           
protected static com.hp.hpl.jena.util.FileManager constructFileManager(com.hp.hpl.jena.util.LocationMapper mapper)
           
protected  java.util.Map constructSchemeExpressions(com.hp.hpl.jena.rdf.model.Model config)
           
static java.util.List defaultInspectors(com.hp.hpl.jena.rdf.model.Model config)
          Answer the default list of inspector class names
static java.lang.String expandPrefix(java.lang.String root)
           
 com.hp.hpl.jena.rdf.model.Model getConfig()
          Answer the configuration model of this Eyeball.
static com.hp.hpl.jena.rdf.model.Model getDefaultConfig()
          Answer the default configuration model (etc/eyeball-config.n3).
static Eyeball getDefaultEyeball()
           
static java.util.List getInspectorNames(com.hp.hpl.jena.rdf.model.Model config, java.util.List shortNames)
          Answer the complete list of inspector class names implied by the shortNames and the configuration file.
static java.util.List getInspectors(com.hp.hpl.jena.rdf.model.Model config, java.util.List inspect, java.util.List except)
          Answer a list of Inspector class names derived from the lists of shortnames of inspector groups to include / exclude.
protected static com.hp.hpl.jena.rdf.model.Model getMappingModel()
           
 PredicateRegister getPredicateRegister()
          Answer the predicate register associated with this Eyeball
 Report inspect(com.hp.hpl.jena.rdf.model.Model toTest)
           
protected  void inspectByModel(com.hp.hpl.jena.rdf.model.Model toTest, Inspector[] inspectors, Report r, java.util.Set items)
           
protected  void inspectByStatement(com.hp.hpl.jena.rdf.model.Model toTest, Inspector[] inspectors, Report r, java.util.Set items)
           
protected  Inspector loadInspector(SchemaList schemas, java.lang.String className)
           
protected  Inspector[] loadInspectors(SchemaList schemas)
           
protected static void loadOptionalModel(com.hp.hpl.jena.rdf.model.Model m, java.lang.String loc)
           
protected  java.util.List reportAnyURIReason(Report rep, java.lang.String rawURI)
           
 ReportItem reportProblem(Report rep, com.hp.hpl.jena.rdf.model.Statement anchor, java.lang.String namespace)
           
 ReportItem reportProblem(Report rep, java.lang.String namespace)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ANY

public static final com.hp.hpl.jena.rdf.model.Property ANY
A handy constant to use as wildcard in listStatements et al.


getSubject

public static final com.hp.hpl.jena.util.iterator.Map1 getSubject
a Map1 that extracts the subject of a Statement.


getObject

public static final com.hp.hpl.jena.util.iterator.Map1 getObject
a Map1 that extracts the object of a Statement.


fileManager

public static final com.hp.hpl.jena.util.FileManager fileManager
The file manager that Eyeball uses for its load/lookup operations.


defaultInspectorRoot

public static final java.lang.String defaultInspectorRoot
The shortname used as the default (from the command line) when no inspectors are requested explicitly.

See Also:
Constant Field Values

rdf

public static final com.hp.hpl.jena.rdf.model.Model rdf
A Model containing the RDF schema.


rdfs

public static final com.hp.hpl.jena.rdf.model.Model rdfs
A Model containing the RDFS schema.


rdfBoth

public static final com.hp.hpl.jena.rdf.model.Model rdfBoth
A Model containing the (dynamic) union of the RDF and RDFS schemas.


config

protected final com.hp.hpl.jena.rdf.model.Model config
The loaded configuration file; defaults to etc/config.n3, but can be anything required.


schemas

protected final SchemaList schemas
The schemas that have been specified for this eyeballing.


inspectorClassNames

protected final java.util.List inspectorClassNames
The class names of the inspectors to be used in this eyeballing.


schemeExpressions

protected final java.util.Map schemeExpressions
Mapping from scheme names to collection of allowable expressions


register

protected final PredicateRegister register
Predicate register which holds the predicates registered by the loaded inspectors and can supply a sorted list of them on demand.


XSDSchemaURI

public static final java.lang.String XSDSchemaURI
See Also:
Constant Field Values
Constructor Detail

Eyeball

public Eyeball()
Initialise this Eyeball with no schemas, the default configuration, and the default inspector list.


Eyeball

public Eyeball(com.hp.hpl.jena.rdf.model.Model schema)
Initialise this Eyeball with a single schema schema, the default configuration, and the default inspector list.


Eyeball

public Eyeball(SchemaList schemas)
Initialise this Eyeball with the schemas from schemas, the default configuration, and the default inspector list.


Eyeball

public Eyeball(com.hp.hpl.jena.rdf.model.Model config,
               SchemaList schemas)
Initialise this Eyeball with the specified configuration model, the default inspector list, and the specified schemas.


Eyeball

public Eyeball(java.util.List inspectorClassNames,
               SchemaList schemas)
Initialise this Eyeball with the inspectors given by their class names and the schema list, with the default configuration.


Eyeball

public Eyeball(com.hp.hpl.jena.rdf.model.Model config,
               java.util.List inspectorClassNames,
               SchemaList schemas)
Initialise this Eyeball explicitly with all fields:

Parameters:
config - the configuration model
inspectorClassNames - the inspector class name list
schemas - the schemas to check against
Method Detail

getConfig

public com.hp.hpl.jena.rdf.model.Model getConfig()
Answer the configuration model of this Eyeball.


getPredicateRegister

public PredicateRegister getPredicateRegister()
Answer the predicate register associated with this Eyeball


getDefaultConfig

public static com.hp.hpl.jena.rdf.model.Model getDefaultConfig()
Answer the default configuration model (etc/eyeball-config.n3).


defaultInspectors

public static java.util.List defaultInspectors(com.hp.hpl.jena.rdf.model.Model config)
Answer the default list of inspector class names


getInspectorNames

public static java.util.List getInspectorNames(com.hp.hpl.jena.rdf.model.Model config,
                                               java.util.List shortNames)
Answer the complete list of inspector class names implied by the shortNames and the configuration file.


getInspectors

public static java.util.List getInspectors(com.hp.hpl.jena.rdf.model.Model config,
                                           java.util.List inspect,
                                           java.util.List except)
Answer a list of Inspector class names derived from the lists of shortnames of inspector groups to include / exclude.

Parameters:
inspect - the list of short names of inspector [group]s to include
except - the list of short names of inspector [group]s to exclude
Returns:
the completed list of classnames

getMappingModel

protected static com.hp.hpl.jena.rdf.model.Model getMappingModel()

loadOptionalModel

protected static void loadOptionalModel(com.hp.hpl.jena.rdf.model.Model m,
                                        java.lang.String loc)

constructFileManager

protected static com.hp.hpl.jena.util.FileManager constructFileManager()

constructFileManager

protected static com.hp.hpl.jena.util.FileManager constructFileManager(com.hp.hpl.jena.util.LocationMapper mapper)

expandPrefix

public static java.lang.String expandPrefix(java.lang.String root)

inspect

public Report inspect(com.hp.hpl.jena.rdf.model.Model toTest)

inspectByModel

protected void inspectByModel(com.hp.hpl.jena.rdf.model.Model toTest,
                              Inspector[] inspectors,
                              Report r,
                              java.util.Set items)

inspectByStatement

protected void inspectByStatement(com.hp.hpl.jena.rdf.model.Model toTest,
                                  Inspector[] inspectors,
                                  Report r,
                                  java.util.Set items)

loadInspectors

protected Inspector[] loadInspectors(SchemaList schemas)

loadInspector

protected Inspector loadInspector(SchemaList schemas,
                                  java.lang.String className)

reportProblem

public ReportItem reportProblem(Report rep,
                                com.hp.hpl.jena.rdf.model.Statement anchor,
                                java.lang.String namespace)

reportProblem

public ReportItem reportProblem(Report rep,
                                java.lang.String namespace)

reportAnyURIReason

protected java.util.List reportAnyURIReason(Report rep,
                                            java.lang.String rawURI)

checkSchemes

protected void checkSchemes(java.util.List messages,
                            java.lang.String uri)
                     throws java.net.URISyntaxException
java.net.URISyntaxException

constructSchemeExpressions

protected java.util.Map constructSchemeExpressions(com.hp.hpl.jena.rdf.model.Model config)

getDefaultEyeball

public static Eyeball getDefaultEyeball()