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
XML parser that reads Vespa documents from an XML stream.
- Author:
- thomasg
-
Constructor Summary
ConstructorDescriptionVespaXMLDocumentReader
(InputStream stream, DocumentTypeManager docTypeManager) Creates a reader that reads from the given stream.VespaXMLDocumentReader
(String fileName, DocumentTypeManager docTypeManager) Creates a reader that reads from the given file.VespaXMLDocumentReader
(XMLStreamReader reader, DocumentTypeManager docTypeManager) Creates a reader that reads using the given reader. -
Method Summary
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 Details
-
VespaXMLDocumentReader
Creates a reader that reads from the given file.- Throws:
Exception
-
VespaXMLDocumentReader
public VespaXMLDocumentReader(InputStream stream, DocumentTypeManager docTypeManager) throws Exception Creates a reader that reads from the given stream.- Throws:
Exception
-
VespaXMLDocumentReader
Creates a reader that reads using the given reader. This is useful if the document is part of a greater XML stream.
-
-
Method Details
-
read
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
-