edu.stanford.db.rdf.syntax.generic
Class GenericXML2RDF

java.lang.Object
  |
  +--org.xml.sax.helpers.DefaultHandler
        |
        +--edu.stanford.db.xml.util.GenericParser
              |
              +--edu.stanford.db.rdf.syntax.generic.GenericXML2RDF
All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler, RDFParser
Direct Known Subclasses:
StrawmanParser, TripleParser

public class GenericXML2RDF
extends GenericParser
implements RDFParser


Field Summary
protected  RDFConsumer consumer
           
protected  NodeFactory nodeFactory
           
static java.lang.String REVISION
           
 
Fields inherited from class edu.stanford.db.xml.util.GenericParser
atoms, current, errorHandler, locator, namespaces, numInParent, parserClass, source
 
Constructor Summary
GenericXML2RDF()
           
GenericXML2RDF(boolean warn)
           
 
Method Summary
protected static void _main(java.lang.String url, RDFParser parser)
           
protected  Literal createLiteral(java.lang.String str)
           
protected  Literal createLiteral(java.lang.String str, boolean isXML)
           
protected  Resource createResource(QName name)
           
protected  Resource createResource(java.lang.String str)
           
protected  Resource createResource(java.lang.String namespace, java.lang.String name)
           
protected  Statement createStatement(Resource subject, Resource predicate, RDFNode object)
           
static void main(java.lang.String[] args)
           
 void parse(InputSource source, RDFConsumer consumer)
          Parse from the given SAX/XML input source.
 
Methods inherited from class edu.stanford.db.xml.util.GenericParser
_endElement, _startElement, addError, addNamespace, addWarning, characters, create, createElement, createQName, createXMLReader, createXMLReader, endElement, getDefaultParserClass, getInputSource, getNamespaces, getParserClass, getSourceURI, initXMLParser, preserveWhiteSpace, resolveEntity, setErrorHandler, startElement
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.w3c.rdf.syntax.RDFParser
setErrorHandler
 

Field Detail

REVISION

public static final java.lang.String REVISION

nodeFactory

protected NodeFactory nodeFactory

consumer

protected RDFConsumer consumer
Constructor Detail

GenericXML2RDF

public GenericXML2RDF()

GenericXML2RDF

public GenericXML2RDF(boolean warn)
Method Detail

createResource

protected Resource createResource(java.lang.String str)
                           throws ModelException

createResource

protected Resource createResource(java.lang.String namespace,
                                  java.lang.String name)
                           throws ModelException

createResource

protected Resource createResource(QName name)
                           throws ModelException

createLiteral

protected Literal createLiteral(java.lang.String str,
                                boolean isXML)
                         throws ModelException

createLiteral

protected Literal createLiteral(java.lang.String str)
                         throws ModelException

createStatement

protected Statement createStatement(Resource subject,
                                    Resource predicate,
                                    RDFNode object)
                             throws ModelException

parse

public void parse(InputSource source,
                  RDFConsumer consumer)
           throws SAXException
Description copied from interface: RDFParser
Parse from the given SAX/XML input source.
Specified by:
parse in interface RDFParser

_main

protected static void _main(java.lang.String url,
                            RDFParser parser)
                     throws java.io.IOException,
                            java.net.MalformedURLException

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception