Class AbstractReader
- java.lang.Object
-
- com.evolveum.midpoint.prism.impl.lex.json.reader.AbstractReader
-
- Direct Known Subclasses:
JsonReader
,YamlReader
public abstract class AbstractReader extends Object
Takes care of reading JSON/YAML to XNode.
-
-
Field Summary
Fields Modifier and Type Field Description static com.fasterxml.jackson.databind.ObjectMapper
OBJECT_MAPPER
protected @NotNull SchemaRegistry
schemaRegistry
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract boolean
canRead(@NotNull File file)
abstract boolean
canRead(@NotNull String dataString)
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 Detail
-
schemaRegistry
@NotNull protected final @NotNull SchemaRegistry schemaRegistry
-
OBJECT_MAPPER
public static final com.fasterxml.jackson.databind.ObjectMapper OBJECT_MAPPER
-
-
Method Detail
-
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
public abstract boolean canRead(@NotNull @NotNull File file) throws IOException
- Throws:
IOException
-
canRead
public abstract boolean canRead(@NotNull @NotNull String dataString)
-
-