Package com.yahoo.vespaxmlparser
Class VespaXMLDocumentReader
- java.lang.Object
-
- com.yahoo.vespaxmlparser.VespaXMLReader
-
- com.yahoo.vespaxmlparser.VespaXMLFieldReader
-
- com.yahoo.vespaxmlparser.VespaXMLDocumentReader
-
- All Implemented Interfaces:
DocumentReader
,FieldReader
,com.yahoo.vespa.objects.Deserializer
public class VespaXMLDocumentReader extends VespaXMLFieldReader implements DocumentReader
XML parser that reads Vespa documents from an XML stream.- Author:
- thomasg
-
-
Constructor Summary
Constructors Constructor Description VespaXMLDocumentReader(java.io.InputStream stream, DocumentTypeManager docTypeManager)
Creates a reader that reads from the given stream.VespaXMLDocumentReader(java.lang.String fileName, DocumentTypeManager docTypeManager)
Creates a reader that reads from the given file.VespaXMLDocumentReader(javax.xml.stream.XMLStreamReader reader, DocumentTypeManager docTypeManager)
Creates a reader that reads using the given reader.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
read(Document document)
Reads one document from the stream.-
Methods inherited from class com.yahoo.vespaxmlparser.VespaXMLFieldReader
getByte, getBytes, getCondition, getDocumentTypeManager, getDouble, getFloat, getInt, getLong, getShort, getString, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, readDocumentId, readDocumentType
-
Methods inherited from class com.yahoo.vespaxmlparser.VespaXMLReader
isBase64EncodedElement, isBase64EncodingAttribute, newDeserializeException, newException, skipToEnd
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.yahoo.document.serialization.DocumentReader
readDocumentId, readDocumentType
-
-
-
-
Constructor Detail
-
VespaXMLDocumentReader
public VespaXMLDocumentReader(java.lang.String fileName, DocumentTypeManager docTypeManager) throws java.lang.Exception
Creates a reader that reads from the given file.- Throws:
java.lang.Exception
-
VespaXMLDocumentReader
public VespaXMLDocumentReader(java.io.InputStream stream, DocumentTypeManager docTypeManager) throws java.lang.Exception
Creates a reader that reads from the given stream.- Throws:
java.lang.Exception
-
VespaXMLDocumentReader
public VespaXMLDocumentReader(javax.xml.stream.XMLStreamReader reader, DocumentTypeManager docTypeManager)
Creates a reader that reads using the given reader. This is useful if the document is part of a greater XML stream.
-
-
Method Detail
-
read
public void read(Document document)
Reads one document from the stream. Function assumes that the current element in the stream is the start tag for the document.- Specified by:
read
in interfaceDocumentReader
- Parameters:
document
- the document to be read
-
-