Class PrismParserImplNoIO
java.lang.Object
com.evolveum.midpoint.prism.impl.marshaller.PrismParserImplNoIO
- All Implemented Interfaces:
- PrismParser,- PrismParserNoIO
- 
Nested Class SummaryNested classes/interfaces inherited from interface com.evolveum.midpoint.prism.PrismParserPrismParser.ObjectHandler
- 
Constructor SummaryConstructorsConstructorDescriptionPrismParserImplNoIO(ParserSource source, String language, ParsingContext context, PrismContextImpl prismContext, ItemDefinition<?> itemDefinition, QName itemName, QName dataType, Class<?> dataClass) 
- 
Method SummaryModifier and TypeMethodDescription@NotNull PrismParserNoIOcompat()Switches the parser into "compatibility" (or relaxed) parsing mode.@NotNull PrismParserNoIOcontext(@NotNull ParsingContext context) Provides a parsing context for the parser.@NotNull PrismParserNoIOdefinition(ItemDefinition<?> itemDefinition) Tells parser which definition to use when parsing item (or an item value).@NotNull PrismParserNoIODoes not check for existing values during parsing.@NotNull PrismParserNoIOjson()Sets the language of the parser to be JSON.@NotNull PrismParserNoIOFor string inputs: sets the data language that the parser will try to parse; null means auto-detect.@NotNull PrismParserNoIOTells parser what name to use for parsed item.<O extends Objectable>
 @NotNull PrismObject<O>parse()Parses the input as a prism object.<IV extends PrismValue,ID extends ItemDefinition<?>> 
 Item<IV,ID> Parses the input as a prism item.Parses either an item, or a real value.<IV extends PrismValue>
 IVParses the input as a prism value.@NotNull List<PrismObject<? extends Objectable>>Parses the input as a collection of prism objects.voidparseObjectsIteratively(@NotNull PrismParser.ObjectHandler handler) Currently implemented for JSON/YAML only.<T> TParses a real value.<T> TparseRealValue(Class<T> clazz) Parses a real value - either property or container value.<T> jakarta.xml.bind.JAXBElement<T>Parses a real value and stores it into JAXBElement, using item name derived in the usual way.Parses the input into RootXNode.@NotNull PrismParserNoIOstrict()Switches the parser into "strict" parsing mode.@NotNull PrismParserNoIOTells parser what data type to expect.@NotNull PrismParserNoIOTells parser what data type to expect.@NotNull PrismParserNoIOxml()Sets the language of the parser to be XML.@NotNull PrismParserNoIOyaml()Sets the language of the parser to be YAML.
- 
Constructor Details- 
PrismParserImplNoIOpublic PrismParserImplNoIO(ParserSource source, String language, ParsingContext context, PrismContextImpl prismContext, ItemDefinition<?> itemDefinition, QName itemName, QName dataType, Class<?> dataClass) 
 
- 
- 
Method Details- 
languageDescription copied from interface:PrismParserFor string inputs: sets the data language that the parser will try to parse; null means auto-detect. For other kinds of input (DOM and XNode) the language is fixed to XML or none, respectively.- Specified by:
- languagein interface- PrismParser
- Specified by:
- languagein interface- PrismParserNoIO
- Parameters:
- language- The language
- Returns:
- Updated parser.
 
- 
xmlDescription copied from interface:PrismParserSets the language of the parser to be XML.- Specified by:
- xmlin interface- PrismParser
- Specified by:
- xmlin interface- PrismParserNoIO
- Returns:
- Updated parser.
 
- 
jsonDescription copied from interface:PrismParserSets the language of the parser to be JSON.- Specified by:
- jsonin interface- PrismParser
- Specified by:
- jsonin interface- PrismParserNoIO
- Returns:
- Updated parser.
 
- 
yamlDescription copied from interface:PrismParserSets the language of the parser to be YAML.- Specified by:
- yamlin interface- PrismParser
- Specified by:
- yamlin interface- PrismParserNoIO
- Returns:
- Updated parser.
 
- 
contextDescription copied from interface:PrismParserProvides a parsing context for the parser. The context contains e.g. selection of strict/compat mode of operation (set by client) or a list of warnings (maintained by the parser).- Specified by:
- contextin interface- PrismParser
- Specified by:
- contextin interface- PrismParserNoIO
- Parameters:
- context- The parsing context.
- Returns:
- Updated parser.
 
- 
strictDescription copied from interface:PrismParserSwitches the parser into "strict" parsing mode.- Specified by:
- strictin interface- PrismParser
- Specified by:
- strictin interface- PrismParserNoIO
- Returns:
- Updated parser.
 
- 
compatDescription copied from interface:PrismParserSwitches the parser into "compatibility" (or relaxed) parsing mode. TODO description here- Specified by:
- compatin interface- PrismParser
- Specified by:
- compatin interface- PrismParserNoIO
- Returns:
- Updated parser.
 
- 
fastAddOperationsDescription copied from interface:PrismParserDoes not check for existing values during parsing. To be used in situations where the data can be trusted to not contain duplicates - for example, when reading from the repository.- Specified by:
- fastAddOperationsin interface- PrismParser
- Specified by:
- fastAddOperationsin interface- PrismParserNoIO
 
- 
definitionDescription copied from interface:PrismParserTells parser which definition to use when parsing item (or an item value). Optional.- Specified by:
- definitionin interface- PrismParser
- Specified by:
- definitionin interface- PrismParserNoIO
- Parameters:
- itemDefinition- The definition
- Returns:
- Updated parser.
 
- 
nameDescription copied from interface:PrismParserTells parser what name to use for parsed item. Optional.- Specified by:
- namein interface- PrismParser
- Specified by:
- namein interface- PrismParserNoIO
- Parameters:
- itemName- Item name to use.
- Returns:
- Updated parser.
 
- 
typeDescription copied from interface:PrismParserTells parser what data type to expect. Optional.- Specified by:
- typein interface- PrismParser
- Specified by:
- typein interface- PrismParserNoIO
- Parameters:
- typeName- Data type to expect.
- Returns:
- Updated parser.
 
- 
typeDescription copied from interface:PrismParserTells parser what data type to expect. Optional.- Specified by:
- typein interface- PrismParser
- Specified by:
- typein interface- PrismParserNoIO
- Parameters:
- typeClass- Data type to expect.
- Returns:
- Updated parser.
 
- 
parseDescription copied from interface:PrismParserParses the input as a prism object.- Specified by:
- parsein interface- PrismParser
- Specified by:
- parsein interface- PrismParserNoIO
- Returns:
- The object.
- Throws:
- SchemaException
 
- 
parseItempublic <IV extends PrismValue,ID extends ItemDefinition<?>> Item<IV,ID> parseItem() throws SchemaExceptionDescription copied from interface:PrismParserParses the input as a prism item. (Object, container, reference, value.) May return raw property values as part of the prism structure, if definitions are not known.- Specified by:
- parseItemin interface- PrismParser
- Specified by:
- parseItemin interface- PrismParserNoIO
- Returns:
- The item.
- Throws:
- SchemaException
 
- 
parseItemValueDescription copied from interface:PrismParserParses the input as a prism value. (Container value, reference value, property value.) May return raw property values as part of the prism structure, if definitions are not known.- Specified by:
- parseItemValuein interface- PrismParser
- Specified by:
- parseItemValuein interface- PrismParserNoIO
- Returns:
- The item.
- Throws:
- SchemaException
 
- 
parseRealValueDescription copied from interface:PrismParserParses a real value - either property or container value.- Specified by:
- parseRealValuein interface- PrismParser
- Specified by:
- parseRealValuein interface- PrismParserNoIO
- Parameters:
- clazz- Expected class of the data. May be null if unknown.
- Returns:
- Real value - POJO, Containerable, Objectable or Referencable.
- Throws:
- SchemaException
 
- 
parseRealValueDescription copied from interface:PrismParserParses a real value. The class is not supplied by the caller, so it has to be determined from the data source.- Specified by:
- parseRealValuein interface- PrismParser
- Specified by:
- parseRealValuein interface- PrismParserNoIO
- Returns:
- Real value - POJO, Containerable, Objectable or Referencable.
- Throws:
- SchemaException
 
- 
parseRealValueToJaxbElementDescription copied from interface:PrismParserParses a real value and stores it into JAXBElement, using item name derived in the usual way.- Specified by:
- parseRealValueToJaxbElementin interface- PrismParser
- Specified by:
- parseRealValueToJaxbElementin interface- PrismParserNoIO
- Throws:
- SchemaException
 
- 
parseToXNodeDescription copied from interface:PrismParserParses the input into RootXNode. This is a bit unusual approach, skipping the unmarshalling phase altogether. But it is useful at some places.- Specified by:
- parseToXNodein interface- PrismParser
- Specified by:
- parseToXNodein interface- PrismParserNoIO
- Returns:
- RootXNode corresponding to the input.
- Throws:
- SchemaException
 
- 
parseObjects@NotNull public @NotNull List<PrismObject<? extends Objectable>> parseObjects() throws SchemaExceptionDescription copied from interface:PrismParserParses the input as a collection of prism objects. For XML the input must be formatted as a collection of objects (TODO change this). For other languages the input may contain one or more objects.- Specified by:
- parseObjectsin interface- PrismParser
- Specified by:
- parseObjectsin interface- PrismParserNoIO
- Returns:
- A list of objects.
- Throws:
- SchemaException
 
- 
parseObjectsIterativelypublic void parseObjectsIteratively(@NotNull @NotNull PrismParser.ObjectHandler handler) throws SchemaException Description copied from interface:PrismParserCurrently implemented for JSON/YAML only. For XML, use old Validator code.- Specified by:
- parseObjectsIterativelyin interface- PrismParser
- Specified by:
- parseObjectsIterativelyin interface- PrismParserNoIO
- Throws:
- SchemaException
 
- 
parseItemOrRealValueDescription copied from interface:PrismParserParses either an item, or a real value. It depends on the type declaration or item name in the source data. 1) If explicit type is present, it is taken into account. If it corresponds to a prism item, the input is parsed as a prism item. Otherwise, it is parsed as a real value (containerable or simple POJO), if possible. 2) If there is no type, the item name is consulted. If it corresponds to a prism item, the input is parsed as a prism item. Otherwise, an exception is thrown. Pre-set parameters (itemDefinition, typeName, itemName) must NOT be present. Use with utmost care. If at all possible, avoid it.- Specified by:
- parseItemOrRealValuein interface- PrismParser
- Specified by:
- parseItemOrRealValuein interface- PrismParserNoIO
- Returns:
- either prism item (Item) or a real value (Object)
- Throws:
- SchemaException
 
- 
convertMissingTypes- Specified by:
- convertMissingTypesin interface- PrismParser
- Specified by:
- convertMissingTypesin interface- PrismParserNoIO
 
 
-