jdrew.oo.util
Class RDFSParser

java.lang.Object
  extended by jdrew.oo.util.RDFSParser

public class RDFSParser
extends java.lang.Object

This class implements a parser for type sorts definitions in RDFS syntax; This allows users to define new types than can be used by the reasoning engine.

Title: OO jDREW

Description: Reasoning Engine for the Semantic Web - Supporting OO RuleML 0.88

Copyright: Copyright (c) 2005

Version:
0.89
Author:
Marcel A. Ball

Constructor Summary
RDFSParser()
           
 
Method Summary
static void parseRDFS(java.lang.String filename)
          Method to parse an RDFS file and load the type information in the RDFS into the engines type sorts.
static void parseRDFSString(java.lang.String contents)
          Method that parses an RDFS document contained in a string and load the type information in the RDFS into the engines type sorts.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RDFSParser

public RDFSParser()
Method Detail

parseRDFS

public static void parseRDFS(java.lang.String filename)
                      throws nu.xom.ParsingException,
                             nu.xom.ValidityException,
                             java.io.IOException
Method to parse an RDFS file and load the type information in the RDFS into the engines type sorts. This method parses the file into a XOM tree and passes the XOM Document object to the parseDocument(Document doc) method.

Parameters:
filename - String A string containing the complete path to the RDFS file.
Throws:
nu.xom.ParsingException - Thrown if there is an error in the RDFS file that causes parsing to fail.
nu.xom.ValidityException - Thrown if the XML document is not wellformed or does not conform to the RDFS DTD.
java.io.IOException - Thrown if there is an error reading the file from disk.

parseRDFSString

public static void parseRDFSString(java.lang.String contents)
                            throws ParseException,
                                   nu.xom.ParsingException,
                                   nu.xom.ValidityException,
                                   java.io.IOException
Method that parses an RDFS document contained in a string and load the type information in the RDFS into the engines type sorts. This method parses the string to an XOM document and passes the Document object to the parseDocument(Document doc) method.

Parameters:
contents - String
Throws:
ParseException - Thrown if there is an error in the RDFS document that causes parsing to fail.
nu.xom.ParsingException - Thrown if there is an error parsing at an XML level.
nu.xom.ValidityException - Thrown if the XML document is not wellformed or does not conform to the RDFS DTD.
java.io.IOException - Thrown if there is an error reading the string - this should not occur.