public class PrismParserImplNoIO extends Object implements PrismParserNoIO
PrismParser.ObjectHandler
Constructor and Description |
---|
PrismParserImplNoIO(ParserSource source,
String language,
ParsingContext context,
PrismContextImpl prismContext,
ItemDefinition<?> itemDefinition,
QName itemName,
QName dataType,
Class<?> dataClass) |
Modifier and Type | Method and Description |
---|---|
PrismParserNoIO |
compat()
Switches the parser into "compatibility" (or relaxed) parsing mode.
|
PrismParserNoIO |
context(ParsingContext context)
Provides a parsing context for the parser.
|
PrismParserNoIO |
definition(ItemDefinition<?> itemDefinition)
Tells parser which definition to use when parsing item (or an item value).
|
PrismParserNoIO |
json()
Sets the language of the parser to be JSON.
|
PrismParserNoIO |
language(String language)
For string inputs: sets the data language that the parser will try to parse; null means auto-detect.
|
PrismParserNoIO |
name(QName itemName)
Tells parser what name to use for parsed item.
|
<O extends Objectable> |
parse()
Parses the input as a prism object.
|
<IV extends PrismValue,ID extends ItemDefinition> |
parseItem()
Parses the input as a prism item.
|
Object |
parseItemOrRealValue()
Parses either an item, or a real value.
|
<IV extends PrismValue> |
parseItemValue()
Parses the input as a prism value.
|
List<PrismObject<? extends Objectable>> |
parseObjects()
Parses the input as a collection of prism objects.
|
void |
parseObjectsIteratively(PrismParser.ObjectHandler handler)
Currently implemented for JSON/YAML only.
|
<T> T |
parseRealValue()
Parses a real value.
|
<T> T |
parseRealValue(Class<T> clazz)
Parses a real value - either property or container value.
|
<T> JAXBElement<T> |
parseRealValueToJaxbElement()
Parses a real value and stores it into JAXBElement, using item name derived in the usual way.
|
RootXNode |
parseToXNode()
Parses the input into RootXNode.
|
PrismParserNoIO |
strict()
Switches the parser into "strict" parsing mode.
|
PrismParserNoIO |
type(Class<?> typeClass)
Tells parser what data type to expect.
|
PrismParserNoIO |
type(QName typeName)
Tells parser what data type to expect.
|
PrismParserNoIO |
xml()
Sets the language of the parser to be XML.
|
PrismParserNoIO |
yaml()
Sets the language of the parser to be YAML.
|
public PrismParserImplNoIO(ParserSource source, String language, ParsingContext context, PrismContextImpl prismContext, ItemDefinition<?> itemDefinition, QName itemName, QName dataType, Class<?> dataClass)
@NotNull public PrismParserNoIO language(@Nullable String language)
PrismParser
language
in interface PrismParser
language
in interface PrismParserNoIO
language
- The language@NotNull public PrismParserNoIO xml()
PrismParser
xml
in interface PrismParser
xml
in interface PrismParserNoIO
@NotNull public PrismParserNoIO json()
PrismParser
json
in interface PrismParser
json
in interface PrismParserNoIO
@NotNull public PrismParserNoIO yaml()
PrismParser
yaml
in interface PrismParser
yaml
in interface PrismParserNoIO
@NotNull public PrismParserNoIO context(@NotNull ParsingContext context)
PrismParser
context
in interface PrismParser
context
in interface PrismParserNoIO
context
- The parsing context.@NotNull public PrismParserNoIO strict()
PrismParser
strict
in interface PrismParser
strict
in interface PrismParserNoIO
@NotNull public PrismParserNoIO compat()
PrismParser
compat
in interface PrismParser
compat
in interface PrismParserNoIO
@NotNull public PrismParserNoIO definition(ItemDefinition<?> itemDefinition)
PrismParser
definition
in interface PrismParser
definition
in interface PrismParserNoIO
itemDefinition
- The definition@NotNull public PrismParserNoIO name(QName itemName)
PrismParser
name
in interface PrismParser
name
in interface PrismParserNoIO
itemName
- Item name to use.@NotNull public PrismParserNoIO type(QName typeName)
PrismParser
type
in interface PrismParser
type
in interface PrismParserNoIO
typeName
- Data type to expect.@NotNull public PrismParserNoIO type(Class<?> typeClass)
PrismParser
type
in interface PrismParser
type
in interface PrismParserNoIO
typeClass
- Data type to expect.@NotNull public <O extends Objectable> PrismObject<O> parse() throws SchemaException
PrismParser
parse
in interface PrismParser
parse
in interface PrismParserNoIO
SchemaException
public <IV extends PrismValue,ID extends ItemDefinition> Item<IV,ID> parseItem() throws SchemaException
PrismParser
parseItem
in interface PrismParser
parseItem
in interface PrismParserNoIO
SchemaException
public <IV extends PrismValue> IV parseItemValue() throws SchemaException
PrismParser
parseItemValue
in interface PrismParser
parseItemValue
in interface PrismParserNoIO
SchemaException
public <T> T parseRealValue(Class<T> clazz) throws SchemaException
PrismParser
parseRealValue
in interface PrismParser
parseRealValue
in interface PrismParserNoIO
clazz
- Expected class of the data. May be null if unknown.SchemaException
public <T> T parseRealValue() throws SchemaException
PrismParser
parseRealValue
in interface PrismParser
parseRealValue
in interface PrismParserNoIO
SchemaException
public <T> JAXBElement<T> parseRealValueToJaxbElement() throws SchemaException
PrismParser
parseRealValueToJaxbElement
in interface PrismParser
parseRealValueToJaxbElement
in interface PrismParserNoIO
SchemaException
public RootXNode parseToXNode() throws SchemaException
PrismParser
parseToXNode
in interface PrismParser
parseToXNode
in interface PrismParserNoIO
SchemaException
@NotNull public List<PrismObject<? extends Objectable>> parseObjects() throws SchemaException
PrismParser
parseObjects
in interface PrismParser
parseObjects
in interface PrismParserNoIO
SchemaException
public void parseObjectsIteratively(@NotNull PrismParser.ObjectHandler handler) throws SchemaException
PrismParser
parseObjectsIteratively
in interface PrismParser
parseObjectsIteratively
in interface PrismParserNoIO
SchemaException
public Object parseItemOrRealValue() throws SchemaException
PrismParser
parseItemOrRealValue
in interface PrismParser
parseItemOrRealValue
in interface PrismParserNoIO
SchemaException
Copyright © 2019 Evolveum. All rights reserved.