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
Modifier and TypeFieldDescriptionstatic final com.fasterxml.jackson.databind.ObjectMapper
protected final @NotNull SchemaRegistry
-
Method Summary
Modifier and TypeMethodDescriptionabstract boolean
abstract boolean
protected abstract com.fasterxml.jackson.core.JsonParser
createJacksonParser
(InputStream stream) @NotNull RootXNodeImpl
read
(@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).void
readObjectsIteratively
(@NotNull ParserSource source, @NotNull ParsingContext parsingContext, LexicalProcessor.RootXNodeHandler handler) protected abstract QName
tagToTypeName
(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:
SchemaException
IOException
-
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:
SchemaException
IOException
-
readObjectsIteratively
public void readObjectsIteratively(@NotNull @NotNull ParserSource source, @NotNull @NotNull ParsingContext parsingContext, LexicalProcessor.RootXNodeHandler handler) throws SchemaException, IOException - Throws:
SchemaException
IOException
-
createJacksonParser
protected abstract com.fasterxml.jackson.core.JsonParser createJacksonParser(InputStream stream) throws SchemaException, IOException - Throws:
SchemaException
IOException
-
tagToTypeName
protected abstract QName tagToTypeName(Object tid, com.evolveum.midpoint.prism.impl.lex.json.reader.JsonReadingContext ctx) throws IOException, SchemaException - Throws:
IOException
SchemaException
-
canRead
- Throws:
IOException
-
canRead
-