pt.tumba.parser
Class WebCAT

java.lang.Object
  extended by pt.tumba.parser.WebCAT

public class WebCAT
extends java.lang.Object

The main class of the WebCAT package. Dumps the metadata information to the standard output, in the RDF format.

Author:
Bruno Martins

Field Summary
private static WebCAT _theInstance
          The single instance of this class
 
Constructor Summary
private WebCAT()
          The constructor of the class
 
Method Summary
static java.lang.String encodeSGML(java.lang.String input)
           
static WebCAT getInstance()
          This class implements the singleton pattern.
static java.lang.String getRDFData(HTMLParser parser)
          Returns a string with an RDF representation of the parser object
static HTMLParser initParser(java.io.InputStream src, java.lang.String t, HTMLParser aux)
          Initializes a parser object, with basis on the supplied MIME type
static HTMLParser initParser(java.lang.String src, HTMLParser aux)
          Initializes a parser object, with basis on the file extension
static void main(java.lang.String[] args)
          The main method of this class, parsing parameters from the command line, invoquing the parser to process the given input, and dumping the results in RDF.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_theInstance

private static final WebCAT _theInstance
The single instance of this class

Constructor Detail

WebCAT

private WebCAT()
The constructor of the class

Method Detail

getInstance

public static WebCAT getInstance()
This class implements the singleton pattern. Within a JVM, there exists a single instance of this class.

Returns:
The single instance of this class

encodeSGML

public static java.lang.String encodeSGML(java.lang.String input)

getRDFData

public static java.lang.String getRDFData(HTMLParser parser)
Returns a string with an RDF representation of the parser object

Parameters:
parser - The parser object, with the metadata for a given resource
Returns:
A string with the RDF representation of the meta-data.

initParser

public static HTMLParser initParser(java.io.InputStream src,
                                    java.lang.String t,
                                    HTMLParser aux)
                             throws java.lang.Exception
Initializes a parser object, with basis on the supplied MIME type

Parameters:
src - An InputStream to the source document
t - The MIME type of the source document
aux - The parser object to be initialized
Throws:
java.lang.Exception

initParser

public static HTMLParser initParser(java.lang.String src,
                                    HTMLParser aux)
                             throws java.lang.Exception
Initializes a parser object, with basis on the file extension

Parameters:
src - An InputStream to the source document
aux - The parser object to be initialized
Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
The main method of this class, parsing parameters from the command line, invoquing the parser to process the given input, and dumping the results in RDF.

Parameters:
args - The command line arguments
Throws:
java.lang.Exception