Class NullLexicalProcessor
- java.lang.Object
-
- com.evolveum.midpoint.prism.impl.lex.json.NullLexicalProcessor
-
- All Implemented Interfaces:
LexicalProcessor<XNodeImpl>
public class NullLexicalProcessor extends Object implements LexicalProcessor<XNodeImpl>
- Author:
- mederly
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.evolveum.midpoint.prism.impl.lex.LexicalProcessor
LexicalProcessor.RootXNodeHandler
-
-
Constructor Summary
Constructors Constructor Description NullLexicalProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canRead(File file)
Checks if the processor can read from a given file.boolean
canRead(String dataString)
Checks if the processor can read from a given string.RootXNodeImpl
read(ParserSource source, ParsingContext parsingContext)
List<RootXNodeImpl>
readObjects(ParserSource source, ParsingContext parsingContext)
void
readObjectsIteratively(ParserSource source, ParsingContext parsingContext, LexicalProcessor.RootXNodeHandler handler)
XNodeImpl
write(RootXNode xnode, SerializationContext serializationContext)
Serializes a root node into XNode tree.XNodeImpl
write(XNode xnode, QName rootElementName, SerializationContext serializationContext)
Serializes a non-root node into XNode tree.XNodeImpl
write(List<RootXNodeImpl> roots, QName aggregateElementName, SerializationContext context)
TODO Not supported for NullLexicalProcessor, though.
-
-
-
Method Detail
-
read
@NotNull public RootXNodeImpl read(@NotNull ParserSource source, @NotNull ParsingContext parsingContext) throws SchemaException, IOException
- Specified by:
read
in interfaceLexicalProcessor<XNodeImpl>
- Throws:
SchemaException
IOException
-
readObjects
@NotNull public List<RootXNodeImpl> readObjects(@NotNull ParserSource source, @NotNull ParsingContext parsingContext) throws SchemaException, IOException
- Specified by:
readObjects
in interfaceLexicalProcessor<XNodeImpl>
- Throws:
SchemaException
IOException
-
readObjectsIteratively
public void readObjectsIteratively(@NotNull ParserSource source, @NotNull ParsingContext parsingContext, LexicalProcessor.RootXNodeHandler handler) throws SchemaException, IOException
- Specified by:
readObjectsIteratively
in interfaceLexicalProcessor<XNodeImpl>
- Throws:
SchemaException
IOException
-
canRead
public boolean canRead(@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.- Specified by:
canRead
in interfaceLexicalProcessor<XNodeImpl>
- Throws:
IOException
-
canRead
public boolean canRead(@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.- Specified by:
canRead
in interfaceLexicalProcessor<XNodeImpl>
-
write
@NotNull public XNodeImpl write(@NotNull RootXNode xnode, @Nullable SerializationContext serializationContext) throws SchemaException
Description copied from interface:LexicalProcessor
Serializes a root node into XNode tree.- Specified by:
write
in interfaceLexicalProcessor<XNodeImpl>
- Throws:
SchemaException
-
write
@NotNull public XNodeImpl write(@NotNull XNode xnode, @NotNull QName rootElementName, @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<XNodeImpl>
- Throws:
SchemaException
-
write
@NotNull public XNodeImpl write(@NotNull List<RootXNodeImpl> roots, @Nullable QName aggregateElementName, @Nullable SerializationContext context) throws SchemaException
Description copied from interface:LexicalProcessor
TODO Not supported for NullLexicalProcessor, though.- Specified by:
write
in interfaceLexicalProcessor<XNodeImpl>
- Returns:
- Throws:
SchemaException
-
-