public class JSONFilter extends AbstractFilter implements IJsonHandler
SUB_FILTER| Constructor and Description |
|---|
JSONFilter() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the input document.
|
EncoderManager |
getEncoderManager()
Gets the EncoderManager object for this filter.
|
Parameters |
getParameters()
Gets the current parameters for this filter.
|
void |
handleComment(String c)
Handle Json comment (illegal but found in partice)
|
void |
handleEnd()
Called once at the end of a document.
|
void |
handleKey(String key,
JsonValueTypes valueType,
JsonKeyTypes keyType)
Handle json key, used in resname
|
void |
handleListEnd() |
void |
handleListStart()
Handle json List: i.e., [ "value1", "value2" ]
For contextual information.
|
void |
handleObjectEnd() |
void |
handleObjectStart()
Handle json Object: i.e., { "key" : "value" }
For contextual information.
|
void |
handleSeparator(String separator)
Handle separator, i.e., ":" or ","
|
void |
handleStart()
Called once at the beginning of a new document.
|
void |
handleValue(String value,
JsonValueTypes valueType)
Handle json value, may be double, single quoted string,
number, boolean symbol or null
|
void |
handleWhitespace(String whitespace)
Handle json whitespace
|
boolean |
hasNext()
Indicates if there is an event to process.
|
protected boolean |
isUtf8Bom()
Does the input have a UTF-8 Byte Order Mark?
|
protected boolean |
isUtf8Encoding()
Is the input encoded as UTF-8?
|
Event |
next()
Gets the next event available.
|
void |
open(RawDocument input)
Opens the input document described in a give RawDocument object.
|
void |
open(RawDocument input,
boolean generateSkeleton)
Opens the input document described in a give RawDocument object, and
optionally creates skeleton information.
|
void |
setParameters(IParameters params)
Sets new parameters for this filter.
|
addConfiguration, addConfiguration, addConfiguration, addConfigurations, cancel, createEndFilterEvent, createFilterWriter, createSkeletonWriter, createStartFilterEvent, findConfiguration, getConfiguration, getConfigurations, getDisplayName, getDocumentId, getDocumentName, getEncoding, getFilterConfigurationMapper, getFilterWriter, getMimeType, getName, getNewlineType, getParameters, getParametersClassName, getParentId, getSrcLoc, getTrgLoc, isCanceled, isGenerateSkeleton, isMultilingual, removeConfiguration, setDisplayName, setDocumentName, setEncoding, setFilterConfigurationMapper, setFilterWriter, setGenerateSkeleton, setMimeType, setMultilingual, setName, setNewlineType, setOptions, setParentId, setSrcLoc, setTrgLocclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemaining, removepublic void close()
IFilterclose in interface AutoCloseableclose in interface IFilterclose in class AbstractFilterpublic boolean hasNext()
IFilterImplementer Note: The caller must be able to call this method several times without changing state.
public Event next()
IFilterpublic void open(RawDocument input)
IFilterpublic void open(RawDocument input, boolean generateSkeleton)
IFilteropen in interface IFilteropen in class AbstractFilterinput - The RawDocument object to use to open the document.generateSkeleton - true to generate the skeleton data, false otherwise.public Parameters getParameters()
IFiltergetParameters in interface IFiltergetParameters in class AbstractFilterpublic void setParameters(IParameters params)
IFiltersetParameters in interface IFiltersetParameters in class AbstractFilterparams - The new parameters to use.public EncoderManager getEncoderManager()
IFiltergetEncoderManager in interface IFiltergetEncoderManager in class AbstractFilterprotected boolean isUtf8Encoding()
AbstractFilterisUtf8Encoding in class AbstractFilterprotected boolean isUtf8Bom()
AbstractFilterisUtf8Bom in class AbstractFilterpublic void handleStart()
IJsonHandlerhandleStart in interface IJsonHandlerpublic void handleEnd()
IJsonHandlerhandleEnd in interface IJsonHandlerpublic void handleComment(String c)
IJsonHandlerhandleComment in interface IJsonHandlerpublic void handleKey(String key, JsonValueTypes valueType, JsonKeyTypes keyType)
IJsonHandlerhandleKey in interface IJsonHandlerpublic void handleWhitespace(String whitespace)
IJsonHandlerhandleWhitespace in interface IJsonHandlerpublic void handleValue(String value, JsonValueTypes valueType)
IJsonHandlerhandleValue in interface IJsonHandlerpublic void handleObjectStart()
IJsonHandlerhandleObjectStart in interface IJsonHandlerpublic void handleObjectEnd()
handleObjectEnd in interface IJsonHandlerpublic void handleListStart()
IJsonHandlerhandleListStart in interface IJsonHandlerpublic void handleListEnd()
handleListEnd in interface IJsonHandlerpublic void handleSeparator(String separator)
IJsonHandlerhandleSeparator in interface IJsonHandlerCopyright © 2022. All rights reserved.