org.daml.validator
Class ParseHelper

java.lang.Object
  |
  +--org.daml.validator.ParseHelper

public class ParseHelper
extends java.lang.Object


Field Summary
 java.util.Vector actuallyLoaded
          URIs that were actually loaded
 java.util.Vector errors
          URIs that had errors during loading
 java.util.Vector importsPredicates
          List of Predicates with the DAML imports semantics.
 java.util.Vector indications
          Indications generated during parsing.
 java.util.Vector loaded
          URIs that have been loaded
 int maxRecurseImports
          The number of levels deep to recursively load imported files.
 int maxRecurseNS
          The number of levels deep to recursively load -1 means infinite.
 boolean printwarnings
          Flag for having the namespace parser to print namespace indications as they are encountered.
 boolean recurseImports
          Flag denoting if imported ontologies should be loaded.
 boolean recurseNS
          Flag denoting if referenced namespaces should be loaded.
 java.util.Stack recurseStack
          Reference Stack for URIs in recurse mode
 boolean VERBOSE
           
 
Constructor Summary
ParseHelper(Preferences preferences, java.util.Vector importsPredicates, DAMLDatatypeValidator datatypeValidator)
           
 
Method Summary
 java.util.Set getImportedURIs(com.hp.hpl.mesa.rdf.jena.model.Model m)
          Returns a set of URIs imported by the model.
static java.lang.String getNamespace(com.hp.hpl.mesa.rdf.jena.model.Resource r)
           
 java.util.Set getReferencedURIs(com.hp.hpl.mesa.rdf.jena.model.Model m)
          Returns a set of URIs referenced by the model.
 void parseURI(java.lang.String initialURI, com.hp.hpl.mesa.rdf.jena.model.Model model, boolean recurseNS)
          Parses a URI into a model.
 void parseURIs(java.util.Collection URIs, com.hp.hpl.mesa.rdf.jena.model.Model model, boolean recurseNS)
          Parses a list of URIs into a model.
 void testNamespace(java.lang.String uri, java.util.Stack stack)
          Tests URI for the existance of a filename extension.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERBOSE

public boolean VERBOSE

loaded

public java.util.Vector loaded
URIs that have been loaded


errors

public java.util.Vector errors
URIs that had errors during loading


actuallyLoaded

public java.util.Vector actuallyLoaded
URIs that were actually loaded


recurseStack

public java.util.Stack recurseStack
Reference Stack for URIs in recurse mode


recurseNS

public boolean recurseNS
Flag denoting if referenced namespaces should be loaded.


maxRecurseNS

public int maxRecurseNS
The number of levels deep to recursively load -1 means infinite.


recurseImports

public boolean recurseImports
Flag denoting if imported ontologies should be loaded.


maxRecurseImports

public int maxRecurseImports
The number of levels deep to recursively load imported files. -1 means infinite.


indications

public java.util.Vector indications
Indications generated during parsing.


printwarnings

public boolean printwarnings
Flag for having the namespace parser to print namespace indications as they are encountered.


importsPredicates

public java.util.Vector importsPredicates
List of Predicates with the DAML imports semantics.

Constructor Detail

ParseHelper

public ParseHelper(Preferences preferences,
                   java.util.Vector importsPredicates,
                   DAMLDatatypeValidator datatypeValidator)
Method Detail

parseURI

public void parseURI(java.lang.String initialURI,
                     com.hp.hpl.mesa.rdf.jena.model.Model model,
                     boolean recurseNS)
              throws com.hp.hpl.mesa.rdf.jena.model.RDFException
Parses a URI into a model. If recurse is true, it recursively fetches all referenced namespace URIs. I wrote this because the SiRPAC fetchSchemas flag didn't work as I expected it to.

com.hp.hpl.mesa.rdf.jena.model.RDFException

parseURIs

public void parseURIs(java.util.Collection URIs,
                      com.hp.hpl.mesa.rdf.jena.model.Model model,
                      boolean recurseNS)
               throws com.hp.hpl.mesa.rdf.jena.model.RDFException
Parses a list of URIs into a model.

com.hp.hpl.mesa.rdf.jena.model.RDFException

getReferencedURIs

public java.util.Set getReferencedURIs(com.hp.hpl.mesa.rdf.jena.model.Model m)
                                throws com.hp.hpl.mesa.rdf.jena.model.RDFException
Returns a set of URIs referenced by the model. Does not include explicitly imported URIs.

com.hp.hpl.mesa.rdf.jena.model.RDFException

getImportedURIs

public java.util.Set getImportedURIs(com.hp.hpl.mesa.rdf.jena.model.Model m)
                              throws com.hp.hpl.mesa.rdf.jena.model.RDFException
Returns a set of URIs imported by the model. Bug: This does *not* check the subject of the imports statement to make sure it is the current document.

com.hp.hpl.mesa.rdf.jena.model.RDFException

getNamespace

public static java.lang.String getNamespace(com.hp.hpl.mesa.rdf.jena.model.Resource r)

testNamespace

public void testNamespace(java.lang.String uri,
                          java.util.Stack stack)
Tests URI for the existance of a filename extension.