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.ObjectMapperOBJECT_MAPPERprotected @NotNull SchemaRegistryschemaRegistry
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract booleancanRead(@NotNull File file)abstract booleancanRead(@NotNull String dataString)protected 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 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:
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
public abstract boolean canRead(@NotNull @NotNull File file) throws IOException- Throws:
IOException
-
canRead
public abstract boolean canRead(@NotNull @NotNull String dataString)
-
-