Class AbstractReader
java.lang.Object
com.evolveum.midpoint.prism.impl.lex.json.reader.AbstractReader
- Direct Known Subclasses:
JsonReader,YamlReader
Takes care of reading JSON/YAML to XNode.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.fasterxml.jackson.databind.ObjectMapperprotected final @NotNull SchemaRegistry -
Method Summary
Modifier and TypeMethodDescriptionabstract booleanabstract booleanprotected abstract com.fasterxml.jackson.core.JsonParsercreateJacksonParser(InputStream stream) @NotNull RootXNodeImplread(@NotNull ParserSource source, @NotNull ParsingContext parsingContext) @NotNull List<RootXNodeImpl>readObjects(@NotNull ParserSource source, @NotNull ParsingContext parsingContext) Honors multi-document files and multiple objects in a single document (list-as-root mechanisms).voidreadObjectsIteratively(@NotNull ParserSource source, @NotNull ParsingContext parsingContext, LexicalProcessor.RootXNodeHandler handler) protected abstract QNametagToTypeName(Object tid, com.evolveum.midpoint.prism.impl.lex.json.reader.JsonReadingContext ctx)
-
Field Details
-
schemaRegistry
-
OBJECT_MAPPER
public static final com.fasterxml.jackson.databind.ObjectMapper OBJECT_MAPPER
-
-
Method Details
-
read
@NotNull public @NotNull RootXNodeImpl read(@NotNull @NotNull ParserSource source, @NotNull @NotNull ParsingContext parsingContext) throws SchemaException, IOException - Throws:
SchemaExceptionIOException
-
readObjects
@NotNull public @NotNull List<RootXNodeImpl> readObjects(@NotNull @NotNull ParserSource source, @NotNull @NotNull ParsingContext parsingContext) throws SchemaException, IOException Honors multi-document files and multiple objects in a single document (list-as-root mechanisms).- Throws:
SchemaExceptionIOException
-
readObjectsIteratively
public void readObjectsIteratively(@NotNull @NotNull ParserSource source, @NotNull @NotNull ParsingContext parsingContext, LexicalProcessor.RootXNodeHandler handler) throws SchemaException, IOException - Throws:
SchemaExceptionIOException
-
createJacksonParser
protected abstract com.fasterxml.jackson.core.JsonParser createJacksonParser(InputStream stream) throws SchemaException, IOException - Throws:
SchemaExceptionIOException
-
tagToTypeName
protected abstract QName tagToTypeName(Object tid, com.evolveum.midpoint.prism.impl.lex.json.reader.JsonReadingContext ctx) throws IOException, SchemaException - Throws:
IOExceptionSchemaException
-
canRead
- Throws:
IOException
-
canRead
-