Class DelegatingLexicalProcessor
java.lang.Object
com.evolveum.midpoint.prism.impl.lex.json.DelegatingLexicalProcessor
- All Implemented Interfaces:
LexicalProcessor<String>
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.evolveum.midpoint.prism.impl.lex.LexicalProcessor
LexicalProcessor.RootXNodeHandler
-
Constructor Summary
ConstructorDescriptionDelegatingLexicalProcessor
(@NotNull AbstractReader reader, @NotNull AbstractWriter writer) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks if the processor can read from a given file.boolean
Checks if the processor can read from a given string.@NotNull RootXNodeImpl
read
(@NotNull ParserSource source, @NotNull ParsingContext parsingContext) @NotNull List<RootXNodeImpl>
readObjects
(@NotNull ParserSource source, @NotNull ParsingContext parsingContext) void
readObjectsIteratively
(@NotNull ParserSource source, @NotNull ParsingContext parsingContext, LexicalProcessor.RootXNodeHandler handler) @NotNull String
write
(@NotNull RootXNode xnode, @Nullable SerializationContext serializationContext) Serializes a root node into XNode tree.@NotNull String
write
(@NotNull XNode xnode, @NotNull QName rootElementName, @Nullable SerializationContext serializationContext) Serializes a non-root node into XNode tree.@NotNull String
write
(@NotNull List<RootXNodeImpl> roots, @Nullable SerializationContext context) TODO Not supported for NullLexicalProcessor, though.
-
Constructor Details
-
DelegatingLexicalProcessor
public DelegatingLexicalProcessor(@NotNull @NotNull AbstractReader reader, @NotNull @NotNull AbstractWriter writer)
-
-
Method Details
-
read
@NotNull public @NotNull RootXNodeImpl read(@NotNull @NotNull ParserSource source, @NotNull @NotNull ParsingContext parsingContext) throws SchemaException, IOException - Specified by:
read
in interfaceLexicalProcessor<String>
- Throws:
SchemaException
IOException
-
readObjects
@NotNull public @NotNull List<RootXNodeImpl> readObjects(@NotNull @NotNull ParserSource source, @NotNull @NotNull ParsingContext parsingContext) throws SchemaException, IOException - Specified by:
readObjects
in interfaceLexicalProcessor<String>
- Throws:
SchemaException
IOException
-
readObjectsIteratively
public void readObjectsIteratively(@NotNull @NotNull ParserSource source, @NotNull @NotNull ParsingContext parsingContext, LexicalProcessor.RootXNodeHandler handler) throws SchemaException, IOException - Specified by:
readObjectsIteratively
in interfaceLexicalProcessor<String>
- Throws:
SchemaException
IOException
-
canRead
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.- Specified by:
canRead
in interfaceLexicalProcessor<String>
- Throws:
IOException
-
canRead
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.- Specified by:
canRead
in interfaceLexicalProcessor<String>
-
write
@NotNull public @NotNull String write(@NotNull @NotNull RootXNode xnode, @Nullable @Nullable SerializationContext serializationContext) throws SchemaException Description copied from interface:LexicalProcessor
Serializes a root node into XNode tree.- Specified by:
write
in interfaceLexicalProcessor<String>
- Throws:
SchemaException
-
write
@NotNull public @NotNull String write(@NotNull @NotNull XNode xnode, @NotNull @NotNull QName rootElementName, @Nullable @Nullable SerializationContext serializationContext) throws SchemaException Description copied from interface:LexicalProcessor
Serializes a non-root node into XNode tree. So, xnode SHOULD NOT be a root node (at least for now). TODO consider removing - replacing by the previous form.- Specified by:
write
in interfaceLexicalProcessor<String>
- Throws:
SchemaException
-
write
@NotNull public @NotNull String write(@NotNull @NotNull List<RootXNodeImpl> roots, @Nullable @Nullable SerializationContext context) throws SchemaException Description copied from interface:LexicalProcessor
TODO Not supported for NullLexicalProcessor, though.- Specified by:
write
in interfaceLexicalProcessor<String>
- Throws:
SchemaException
-