Class DomLexicalProcessor
- java.lang.Object
 - 
- com.evolveum.midpoint.prism.impl.lex.dom.DomLexicalProcessor
 
 
- 
- All Implemented Interfaces:
 LexicalProcessor<String>
public class DomLexicalProcessor extends Object implements LexicalProcessor<String>
 
- 
- 
Nested Class Summary
- 
Nested classes/interfaces inherited from interface com.evolveum.midpoint.prism.impl.lex.LexicalProcessor
LexicalProcessor.RootXNodeHandler 
 - 
 
- 
Constructor Summary
Constructors Constructor Description DomLexicalProcessor(@NotNull SchemaRegistry schemaRegistry) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleancanRead(@NotNull File file)Checks if the processor can read from a given file.booleancanRead(@NotNull String dataString)Checks if the processor can read from a given string.@NotNull RootXNodeImplread(@NotNull ParserSource source, @NotNull ParsingContext parsingContext)@NotNull List<RootXNodeImpl>readObjects(@NotNull ParserSource source, @NotNull ParsingContext parsingContext)voidreadObjectsIteratively(@NotNull ParserSource source, @NotNull ParsingContext parsingContext, LexicalProcessor.RootXNodeHandler handler)@NotNull Stringwrite(@NotNull RootXNode xnode, SerializationContext serializationContext)Serializes a root node into XNode tree.@NotNull Stringwrite(@NotNull XNode xnode, @NotNull QName rootElementName, SerializationContext serializationContext)Serializes a non-root node into XNode tree.@NotNull Stringwrite(@NotNull List<RootXNodeImpl> roots, @Nullable SerializationContext context)TODO Not supported for NullLexicalProcessor, though.ElementwriteXMapToElement(MapXNodeImpl xmap, QName elementName)Deprecated.@NotNull ElementwriteXRootListToElement(@NotNull List<RootXNodeImpl> roots)@NotNull ElementwriteXRootToElement(@NotNull RootXNodeImpl xroot) 
 - 
 
- 
- 
Field Detail
- 
LOGGER
public static final Trace LOGGER
 
 - 
 
- 
Constructor Detail
- 
DomLexicalProcessor
public DomLexicalProcessor(@NotNull @NotNull SchemaRegistry schemaRegistry) 
 - 
 
- 
Method Detail
- 
read
@NotNull public @NotNull RootXNodeImpl read(@NotNull @NotNull ParserSource source, @NotNull @NotNull ParsingContext parsingContext) throws SchemaException, IOException
- Specified by:
 readin interfaceLexicalProcessor<String>- Throws:
 SchemaExceptionIOException
 
- 
readObjects
@NotNull public @NotNull List<RootXNodeImpl> readObjects(@NotNull @NotNull ParserSource source, @NotNull @NotNull ParsingContext parsingContext) throws SchemaException, IOException
- Specified by:
 readObjectsin interfaceLexicalProcessor<String>- Throws:
 SchemaExceptionIOException
 
- 
readObjectsIteratively
public void readObjectsIteratively(@NotNull @NotNull ParserSource source, @NotNull @NotNull ParsingContext parsingContext, LexicalProcessor.RootXNodeHandler handler) throws SchemaException, IOException- Specified by:
 readObjectsIterativelyin interfaceLexicalProcessor<String>- Throws:
 SchemaExceptionIOException
 
- 
canRead
public boolean canRead(@NotNull @NotNull File file)Description copied from interface:LexicalProcessorChecks if the processor can read from a given file. (Guessed by file extension, for now.) Used for autodetection of language.- Specified by:
 canReadin interfaceLexicalProcessor<String>
 
- 
canRead
public boolean canRead(@NotNull @NotNull String dataString)Description copied from interface:LexicalProcessorChecks 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:
 canReadin interfaceLexicalProcessor<String>
 
- 
write
@NotNull public @NotNull String write(@NotNull @NotNull XNode xnode, @NotNull @NotNull QName rootElementName, SerializationContext serializationContext) throws SchemaException
Description copied from interface:LexicalProcessorSerializes 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:
 writein interfaceLexicalProcessor<String>- Throws:
 SchemaException
 
- 
write
@NotNull public @NotNull String write(@NotNull @NotNull RootXNode xnode, SerializationContext serializationContext) throws SchemaException
Description copied from interface:LexicalProcessorSerializes a root node into XNode tree.- Specified by:
 writein 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:LexicalProcessorTODO Not supported for NullLexicalProcessor, though.- Specified by:
 writein interfaceLexicalProcessor<String>- Throws:
 SchemaException
 
- 
writeXRootListToElement
@NotNull public @NotNull Element writeXRootListToElement(@NotNull @NotNull List<RootXNodeImpl> roots) throws SchemaException
- Throws:
 SchemaException
 
- 
writeXMapToElement
@Deprecated public Element writeXMapToElement(MapXNodeImpl xmap, QName elementName) throws SchemaException
Deprecated.Seems to be used in strange circumstances (called from various hacks). To be reconsidered eventually. Avoid using in new code.- Throws:
 SchemaException
 
- 
writeXRootToElement
@NotNull public @NotNull Element writeXRootToElement(@NotNull @NotNull RootXNodeImpl xroot) throws SchemaException
- Throws:
 SchemaException
 
 - 
 
 -