public class JSONDocBuilder extends DocBuilder
Modifier and Type | Field and Description |
---|---|
protected ByteArrayOutputStream |
baos |
protected Map<String,ColumnDataType> |
datatypeMap |
protected com.fasterxml.jackson.core.JsonGenerator |
generator |
protected com.fasterxml.jackson.core.JsonFactory |
jsonFactory |
static org.apache.commons.logging.Log |
LOG |
sb
Constructor and Description |
---|
JSONDocBuilder() |
Modifier and Type | Method and Description |
---|---|
void |
build()
Build the document.
|
void |
configFields(org.apache.hadoop.conf.Configuration conf,
String[] fields)
Check document header fields.
|
void |
init(org.apache.hadoop.conf.Configuration conf)
Init the document.
|
void |
newDoc()
Start to build the document.
|
void |
put(String key,
String value)
Put a new key-value pair into the document.
|
getDoc
public static final org.apache.commons.logging.Log LOG
protected com.fasterxml.jackson.core.JsonFactory jsonFactory
protected com.fasterxml.jackson.core.JsonGenerator generator
protected ByteArrayOutputStream baos
protected Map<String,ColumnDataType> datatypeMap
public void init(org.apache.hadoop.conf.Configuration conf)
DocBuilder
init
in class DocBuilder
public void newDoc() throws IOException
DocBuilder
newDoc
in class DocBuilder
IOException
public void put(String key, String value) throws Exception
DocBuilder
put
in class DocBuilder
IOException
Exception
public void build() throws IOException
DocBuilder
build
in class DocBuilder
IOException
public void configFields(org.apache.hadoop.conf.Configuration conf, String[] fields) throws IllegalArgumentException, IOException
DocBuilder
configFields
in class DocBuilder
IOException
IllegalArgumentException
Copyright © 2021 MarkLogic Corporation
Complete online documentation for MarkLogic Server, XQuery and related components may be found at developer.marklogic.com