eu.monnetproject.lemon.impl.io.xml
Class RDFXMLReader

java.lang.Object
  extended by eu.monnetproject.lemon.impl.io.xml.RDFXMLReader

public class RDFXMLReader
extends Object

RDFHandler RDF reader calling the method 'found' each time it finds a new RDFStatement

Author:
John McCrae modified from Pierre Lindenbaum PhD plindenbaum@yahoo.fr

Nested Class Summary
protected static class RDFXMLReader.RDFEvent
           
 
Constructor Summary
RDFXMLReader(LemonModelImpl model)
          constructor initialize the XMLInputFactory
RDFXMLReader(Visitor visitor)
           
 
Method Summary
protected  URI createAnonymousURI()
           
protected  void found(RDFXMLReader.RDFEvent event)
          called when this handler finds a new RDF triple
 void found(URI subject, URI predicate, Object value, URI dataType, String lang, int index)
          This method should be overridden by the user
 LemonModel getModel()
           
protected  XMLEventReader getReader()
          return XMLEventReader
 void parse(File in)
           
 void parse(InputStream in)
           
 void parse(Reader in)
           
 void parse(URL in)
           
 void setBase(URI base)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RDFXMLReader

public RDFXMLReader(LemonModelImpl model)
constructor initialize the XMLInputFactory


RDFXMLReader

public RDFXMLReader(Visitor visitor)
Method Detail

found

protected void found(RDFXMLReader.RDFEvent event)
              throws XMLStreamException
called when this handler finds a new RDF triple

Parameters:
event -
Throws:
XMLStreamException

found

public void found(URI subject,
                  URI predicate,
                  Object value,
                  URI dataType,
                  String lang,
                  int index)
           throws IOException
This method should be overridden by the user

Parameters:
subject -
predicate -
value -
dataType -
lang -
index -
Throws:
IOException

getModel

public LemonModel getModel()

setBase

public void setBase(URI base)

getReader

protected XMLEventReader getReader()
return XMLEventReader


createAnonymousURI

protected URI createAnonymousURI()
                          throws URISyntaxException
Throws:
URISyntaxException

parse

public void parse(InputStream in)
           throws XMLStreamException
Throws:
XMLStreamException

parse

public void parse(Reader in)
           throws XMLStreamException
Throws:
XMLStreamException

parse

public void parse(File in)
           throws XMLStreamException
Throws:
XMLStreamException

parse

public void parse(URL in)
           throws XMLStreamException
Throws:
XMLStreamException


Copyright © 2012. All Rights Reserved.