Class YamlLexicalProcessor
- java.lang.Object
-
- com.evolveum.midpoint.prism.impl.lex.json.AbstractJsonLexicalProcessor
-
- com.evolveum.midpoint.prism.impl.lex.json.YamlLexicalProcessor
-
- All Implemented Interfaces:
LexicalProcessor<String>
public class YamlLexicalProcessor extends AbstractJsonLexicalProcessor
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.evolveum.midpoint.prism.impl.lex.LexicalProcessor
LexicalProcessor.RootXNodeHandler
-
-
Field Summary
-
Fields inherited from class com.evolveum.midpoint.prism.impl.lex.json.AbstractJsonLexicalProcessor
schemaRegistry
-
-
Constructor Summary
Constructors Constructor Description YamlLexicalProcessor(@NotNull SchemaRegistry schemaRegistry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canRead(@NotNull File file)
Checks if the processor can read from a given file.boolean
canRead(@NotNull String dataString)
Checks if the processor can read from a given string.com.fasterxml.jackson.dataformat.yaml.YAMLGenerator
createJacksonGenerator(StringWriter out)
protected MidpointYAMLParser
createJacksonParser(InputStream stream)
protected void
resetInlineTypeIfPossible(com.evolveum.midpoint.prism.impl.lex.json.AbstractJsonLexicalProcessor.JsonSerializationContext ctx)
protected boolean
supportsInlineTypes()
protected QName
tagToTypeName(Object tag, com.evolveum.midpoint.prism.impl.lex.json.AbstractJsonLexicalProcessor.JsonParsingContext ctx)
protected void
writeInlineType(QName typeName, com.evolveum.midpoint.prism.impl.lex.json.AbstractJsonLexicalProcessor.JsonSerializationContext ctx)
-
Methods inherited from class com.evolveum.midpoint.prism.impl.lex.json.AbstractJsonLexicalProcessor
read, readObjects, readObjectsIteratively, write, write, write
-
-
-
-
Constructor Detail
-
YamlLexicalProcessor
public YamlLexicalProcessor(@NotNull @NotNull SchemaRegistry schemaRegistry)
-
-
Method Detail
-
canRead
public boolean canRead(@NotNull @NotNull File file) throws IOException
Description copied from interface:LexicalProcessor
Checks if the processor can read from a given file. (Guessed by file extension, for now.) Used for autodetection of language.- Throws:
IOException
-
canRead
public boolean canRead(@NotNull @NotNull String dataString)
Description copied from interface:LexicalProcessor
Checks if the processor can read from a given string. Note this is only an approximative information (for now). Used for autodetection of language.
-
createJacksonGenerator
public com.fasterxml.jackson.dataformat.yaml.YAMLGenerator createJacksonGenerator(StringWriter out) throws SchemaException
- Specified by:
createJacksonGenerator
in classAbstractJsonLexicalProcessor
- Throws:
SchemaException
-
createJacksonParser
protected MidpointYAMLParser createJacksonParser(InputStream stream) throws SchemaException, IOException
- Specified by:
createJacksonParser
in classAbstractJsonLexicalProcessor
- Throws:
SchemaException
IOException
-
tagToTypeName
protected QName tagToTypeName(Object tag, com.evolveum.midpoint.prism.impl.lex.json.AbstractJsonLexicalProcessor.JsonParsingContext ctx) throws IOException, SchemaException
- Specified by:
tagToTypeName
in classAbstractJsonLexicalProcessor
- Throws:
IOException
SchemaException
-
supportsInlineTypes
protected boolean supportsInlineTypes()
- Specified by:
supportsInlineTypes
in classAbstractJsonLexicalProcessor
-
writeInlineType
protected void writeInlineType(QName typeName, com.evolveum.midpoint.prism.impl.lex.json.AbstractJsonLexicalProcessor.JsonSerializationContext ctx) throws IOException
- Specified by:
writeInlineType
in classAbstractJsonLexicalProcessor
- Throws:
IOException
-
resetInlineTypeIfPossible
protected void resetInlineTypeIfPossible(com.evolveum.midpoint.prism.impl.lex.json.AbstractJsonLexicalProcessor.JsonSerializationContext ctx)
- Overrides:
resetInlineTypeIfPossible
in classAbstractJsonLexicalProcessor
-
-