public abstract class AbstractJsonLexicalProcessor extends Object implements LexicalProcessor<String>
LexicalProcessor.RootXNodeHandler
Modifier and Type | Field and Description |
---|---|
protected SchemaRegistry |
schemaRegistry |
Modifier and Type | Method and Description |
---|---|
protected abstract com.fasterxml.jackson.core.JsonGenerator |
createJacksonGenerator(StringWriter out) |
protected abstract com.fasterxml.jackson.core.JsonParser |
createJacksonParser(InputStream stream) |
protected QName |
getExplicitType(XNode xnode) |
RootXNode |
read(ParserSource source,
ParsingContext parsingContext) |
List<RootXNode> |
readObjects(ParserSource source,
ParsingContext parsingContext)
Honors multi-document files and multiple objects in a single document ('c:objects', list-as-root mechanisms).
|
void |
readObjectsIteratively(ParserSource source,
ParsingContext parsingContext,
LexicalProcessor.RootXNodeHandler handler) |
protected void |
resetInlineTypeIfPossible(com.evolveum.midpoint.prism.lex.json.AbstractJsonLexicalProcessor.JsonSerializationContext ctx) |
protected abstract boolean |
supportsInlineTypes() |
protected abstract QName |
tagToTypeName(Object tid,
com.evolveum.midpoint.prism.lex.json.AbstractJsonLexicalProcessor.JsonParsingContext ctx) |
String |
write(List<RootXNode> roots,
QName aggregateElementName,
SerializationContext prismSerializationContext)
TODO
Not supported for NullLexicalProcessor, though.
|
String |
write(RootXNode root,
SerializationContext prismSerializationContext)
Serializes a root node into XNode tree.
|
String |
write(XNode xnode,
QName rootElementName,
SerializationContext serializationContext)
Serializes a non-root node into XNode tree.
|
protected abstract void |
writeInlineType(QName typeName,
com.evolveum.midpoint.prism.lex.json.AbstractJsonLexicalProcessor.JsonSerializationContext ctx) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
canRead, canRead
@NotNull protected final SchemaRegistry schemaRegistry
@NotNull public RootXNode read(@NotNull ParserSource source, @NotNull ParsingContext parsingContext) throws SchemaException, IOException
read
in interface LexicalProcessor<String>
SchemaException
IOException
@NotNull public List<RootXNode> readObjects(@NotNull ParserSource source, @NotNull ParsingContext parsingContext) throws SchemaException, IOException
readObjects
in interface LexicalProcessor<String>
SchemaException
IOException
public void readObjectsIteratively(@NotNull ParserSource source, @NotNull ParsingContext parsingContext, LexicalProcessor.RootXNodeHandler handler) throws SchemaException, IOException
readObjectsIteratively
in interface LexicalProcessor<String>
SchemaException
IOException
protected abstract com.fasterxml.jackson.core.JsonParser createJacksonParser(InputStream stream) throws SchemaException, IOException
SchemaException
IOException
protected abstract QName tagToTypeName(Object tid, com.evolveum.midpoint.prism.lex.json.AbstractJsonLexicalProcessor.JsonParsingContext ctx) throws IOException, SchemaException
IOException
SchemaException
@NotNull public String write(@NotNull XNode xnode, @NotNull QName rootElementName, SerializationContext serializationContext) throws SchemaException
LexicalProcessor
write
in interface LexicalProcessor<String>
SchemaException
protected abstract com.fasterxml.jackson.core.JsonGenerator createJacksonGenerator(StringWriter out) throws SchemaException
SchemaException
@NotNull public String write(@NotNull RootXNode root, SerializationContext prismSerializationContext) throws SchemaException
LexicalProcessor
write
in interface LexicalProcessor<String>
SchemaException
@NotNull public String write(@NotNull List<RootXNode> roots, QName aggregateElementName, @Nullable SerializationContext prismSerializationContext) throws SchemaException
LexicalProcessor
write
in interface LexicalProcessor<String>
SchemaException
protected abstract boolean supportsInlineTypes()
protected abstract void writeInlineType(QName typeName, com.evolveum.midpoint.prism.lex.json.AbstractJsonLexicalProcessor.JsonSerializationContext ctx) throws IOException
IOException
protected void resetInlineTypeIfPossible(com.evolveum.midpoint.prism.lex.json.AbstractJsonLexicalProcessor.JsonSerializationContext ctx)
Copyright © 2019 Evolveum. All rights reserved.