All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.w3c.rdf.SiRPAC

java.lang.Object
   |
   +----org.w3c.rdf.SiRPAC

public class SiRPAC
extends Object
implements EntityResolver, DTDHandler, DocumentHandler, ErrorHandler, DataSource

Variable Index

 o RDFMS
 o RDFSCHEMA
 o REVISION
 o XMLSCHEMA

Constructor Index

 o SiRPAC()
 o SiRPAC(String)

Method Index

 o addError(String)
Generate an error message as a string
 o addTriple(Resource, Resource, RDFnode)
Create a new triple and add it to the m_triples Vector
 o addWarning(String)
Generate a warning message as a string
 o characters(char[], int, int)
 o createBags(boolean)
createBags method allows one to determine whether SiRPAC produces Bag instances for each Description block.
 o createParser(String)
 o doctype(String, String, String)
 o endConsumers()
Notify all registered consumers that were are at the end of the parsing process
 o endDocument()
 o endElement(String)
For each end of an element scope step back in the element and namespace stack
 o error(SAXParseException)
Report all recoverable errors, and try to continue parsing.
 o errors()
 o fatalError(SAXParseException)
Report all fatal errors, and try to continue parsing.
 o fetchRDF()
 o fetchSchema(String)
 o fetchSchemas(boolean)
Set whether parser recursively fetches and parses every RDF schema it finds in the namespace declarations
 o getRDFSource()
 o ignorableWhitespace(char[], int, int)
 o isAlternative(Element)
Is the element an Alternative
 o isBag(Element)
Is the element a Bag
 o isContainer(Element)
Is the element a Container
 o isDescription(Element)
Is the element a Description
 o isListItem(Element)
Is the element a ListItem
 o isRDF(Element)
Check if the element e is from the namespace of the RDF schema by comparing only the beginning of the expanded element name with the canonical RDFMS URI
 o isRDFroot(Element)
 o isSequence(Element)
Is the element a Sequence
 o isTypedPredicate(Element)
This method matches all properties but those from RDF namespace
 o listNamespaces()
Return all non-RDF namespace URIs recognized by the parser
 o lookforNode(String)
Look for a node by name sID from the Hashtable m_hIDtable of all registered IDs.
 o main(String[])
main method for running SiRPAC as an application
 o makeMarkupChar(String)
 o makeMarkupET(String)
 o makeMarkupST(Element)
 o namespace(String)
Return the full namespace URI for a given prefix sPrefix.
 o newReificationID()
Create a new reification ID by using a name part and an incremental counter m_iReificationCounter.
 o notationDecl(String, String, String)
 o parseLiteral()
Methods to determine whether we are parsing parseType="Literal" or parseType="Resource"
 o parseResource()
 o preserveWhiteSpace()
 o printTriples(PrintStream)
Print all triples to the ps PrintStream
 o processDescription(Element, boolean, boolean, boolean)
processDescription manages Description elements
 o processingInstruction(String, String)
 o processRDF(Element)
Start processing an RDF/XML document instance from the root element rdf.
 o processTypedNode(Element)
Manage the typedNode production in the RDF grammar.
 o processXML(Element)
Given an XML document (well-formed HTML, for example), look for a suitable element to start parsing from
 o register(RDFConsumer)
One can register multiple RDFConsumer objects which will receive notifications about new triples
 o registerID(String, Element)
Add an element e to the Hashtable m_hIDtable which stores all nodes with an ID
 o registerResource(Element)
Add an element e to the Vector m_vResources which stores all nodes with an URI
 o resolve()
Go through the m_vResolveQueue and assign direct object reference for each symbolic reference
 o resolveEntity(String, String)
 o resolveLater(Element)
Add the element e to the m_vResolveQueue to be resolved later.
 o root()
Return the root element pointer.
 o setDocumentLocator(Locator)
 o setRDFSource(InputSource)
 o setSource(String)
setSource methods saves the name of the source document for later inspection if needed
 o source()
 o startConsumers()
Notify all registered consumers that were are about to start parsing
 o startDocument()
 o startElement(String, AttributeList)
Called for each new element.
 o triples()
Return all created triples in an Enumeration instance
 o unparsedEntityDecl(String, String, String, String)
Display unparsed entity declarations as they are reported.
 o unregister(RDFConsumer)
Remove an RDFConsumer object from SiRPAC
 o warning(SAXParseException)
Report all warnings, and continue parsing.
 o warnings()

Variables

 o REVISION
 public static final String REVISION
 o RDFMS
 public static final String RDFMS
 o RDFSCHEMA
 public static final String RDFSCHEMA
 o XMLSCHEMA
 public static final String XMLSCHEMA

Constructors

 o SiRPAC
 public SiRPAC()
 o SiRPAC
 public SiRPAC(String sXMLParser)

Methods

 o parseLiteral
 public boolean parseLiteral()
Methods to determine whether we are parsing parseType="Literal" or parseType="Resource"

 o preserveWhiteSpace
 public boolean preserveWhiteSpace()
 o parseResource
 public boolean parseResource()
 o createBags
 public void createBags(boolean b)
createBags method allows one to determine whether SiRPAC produces Bag instances for each Description block. The default setting is to generate them.

 o fetchSchemas
 public void fetchSchemas(boolean b)
Set whether parser recursively fetches and parses every RDF schema it finds in the namespace declarations

 o setSource
 public void setSource(String sSource)
setSource methods saves the name of the source document for later inspection if needed

 o source
 public String source()
 o listNamespaces
 public Enumeration listNamespaces()
Return all non-RDF namespace URIs recognized by the parser

 o namespace
 public String namespace(String sPrefix)
Return the full namespace URI for a given prefix sPrefix. The default namespace is identified with xmlns prefix. The namespace of xmlns attribute is an empty string.

 o register
 public void register(RDFConsumer c)
One can register multiple RDFConsumer objects which will receive notifications about new triples

 o unregister
 public void unregister(RDFConsumer c)
Remove an RDFConsumer object from SiRPAC

 o startConsumers
 public void startConsumers()
Notify all registered consumers that were are about to start parsing

 o endConsumers
 public void endConsumers()
Notify all registered consumers that were are at the end of the parsing process

 o setRDFSource
 public void setRDFSource(InputSource source)
 o getRDFSource
 public InputSource getRDFSource()
 o fetchRDF
 public void fetchRDF() throws Exception
 o resolveEntity
 public InputSource resolveEntity(String publicId,
                                  String systemId)
 o notationDecl
 public void notationDecl(String name,
                          String publicId,
                          String systemId)
 o unparsedEntityDecl
 public void unparsedEntityDecl(String name,
                                String publicId,
                                String systemId,
                                String notationName)
Display unparsed entity declarations as they are reported.

See Also:
unparsedEntityDecl
 o setDocumentLocator
 public void setDocumentLocator(Locator locator)
 o startDocument
 public void startDocument()
 o endDocument
 public void endDocument() throws SAXException
 o doctype
 public void doctype(String name,
                     String publicID,
                     String systemID)
 o startElement
 public void startElement(String name,
                          AttributeList al) throws SAXException
Called for each new element. Build up the document tree using an element stack

Throws: SAXException
Passed on since we don't handle it.
 o endElement
 public void endElement(String name) throws SAXException
For each end of an element scope step back in the element and namespace stack

Throws: SAXException
Passed on since we don't handle it.
 o root
 public Element root()
Return the root element pointer. This requires the parsing has been already done.

 o characters
 public void characters(char ch[],
                        int start,
                        int length) throws SAXException
 o ignorableWhitespace
 public void ignorableWhitespace(char ch[],
                                 int start,
                                 int length)
 o processingInstruction
 public void processingInstruction(String target,
                                   String data)
 o warning
 public void warning(SAXParseException exception)
Report all warnings, and continue parsing.

See Also:
warning
 o error
 public void error(SAXParseException exception)
Report all recoverable errors, and try to continue parsing.

See Also:
error
 o fatalError
 public void fatalError(SAXParseException exception)
Report all fatal errors, and try to continue parsing.

Note: results are no longer reliable once a fatal error has been reported.

See Also:
fatalError
 o addError
 public void addError(String sMsg)
Generate an error message as a string

 o errors
 public String errors()
 o addWarning
 public void addWarning(String sMsg)
Generate a warning message as a string

 o warnings
 public String warnings()
 o createParser
 public static Parser createParser(String className)
 o processXML
 public void processXML(Element ele) throws SAXException
Given an XML document (well-formed HTML, for example), look for a suitable element to start parsing from

Throws: SAXException
Passed on since we don't handle it.
 o fetchSchema
 public void fetchSchema(String sURI)
 o processRDF
 public void processRDF(Element rdf) throws SAXException
Start processing an RDF/XML document instance from the root element rdf.

Throws: SAXException
Passed on since we don't handle it.
 o processTypedNode
 public String processTypedNode(Element typedNode) throws SAXException
Manage the typedNode production in the RDF grammar.

Throws: SAXException
Passed on since we don't handle it.
 o processDescription
 public String processDescription(Element description,
                                  boolean inPredicate,
                                  boolean reificate,
                                  boolean createBag) throws SAXException
processDescription manages Description elements

Parameters:
description - The Description element itself
inPredicate - Is this is a nested description
reificate - Do we need to reificate
createBag - Do we create a bag container
Returns:
An ID for the description
Throws: SAXException
Passed on since we don't handle it.
 o addTriple
 public void addTriple(Resource predicate,
                       Resource subject,
                       RDFnode object)
Create a new triple and add it to the m_triples Vector

 o printTriples
 public void printTriples(PrintStream ps)
Print all triples to the ps PrintStream

 o triples
 public Enumeration triples()
Return all created triples in an Enumeration instance

 o isDescription
 public boolean isDescription(Element e)
Is the element a Description

 o isListItem
 public boolean isListItem(Element e)
Is the element a ListItem

 o isContainer
 public boolean isContainer(Element e)
Is the element a Container

See Also:
isSequence, isAlternative, isBag
 o isSequence
 public boolean isSequence(Element e)
Is the element a Sequence

 o isAlternative
 public boolean isAlternative(Element e)
Is the element an Alternative

 o isBag
 public boolean isBag(Element e)
Is the element a Bag

 o isTypedPredicate
 public boolean isTypedPredicate(Element e)
This method matches all properties but those from RDF namespace

 o isRDFroot
 public boolean isRDFroot(Element e)
 o isRDF
 public boolean isRDF(Element e)
Check if the element e is from the namespace of the RDF schema by comparing only the beginning of the expanded element name with the canonical RDFMS URI

 o resolveLater
 public void resolveLater(Element e)
Add the element e to the m_vResolveQueue to be resolved later.

 o resolve
 public void resolve()
Go through the m_vResolveQueue and assign direct object reference for each symbolic reference

 o lookforNode
 public Element lookforNode(String sID)
Look for a node by name sID from the Hashtable m_hIDtable of all registered IDs.

 o registerID
 public void registerID(String sID,
                        Element e)
Add an element e to the Hashtable m_hIDtable which stores all nodes with an ID

 o newReificationID
 public String newReificationID()
Create a new reification ID by using a name part and an incremental counter m_iReificationCounter.

 o registerResource
 public void registerResource(Element e)
Add an element e to the Vector m_vResources which stores all nodes with an URI

 o makeMarkupST
 public void makeMarkupST(Element ele)
 o makeMarkupET
 public void makeMarkupET(String name)
 o makeMarkupChar
 public void makeMarkupChar(String s)
 o main
 public static void main(String args[]) throws Exception
main method for running SiRPAC as an application


All Packages  Class Hierarchy  This Package  Previous  Next  Index