public interface ModelReader extends AutoCloseable
ModelStreamFactory
Modifier and Type | Method and Description |
---|---|
void |
close()
Free resources associated with this reader.
|
BigDecimal |
getBigDecimal()
Converts available context data to
big decimal instance. |
BigInteger |
getBigInteger()
Converts available context data to
big integer instance. |
boolean |
getBoolean()
Converts available context data to
boolean . |
byte[] |
getBytes()
Converts available context data to
bytes . |
double |
getDouble()
Converts available context data to
double . |
String |
getExpression()
Converts available context data to
expression . |
int |
getInt()
Converts available context data to
int . |
long |
getLong()
Converts available context data to
long . |
String |
getString()
Converts available context data to
String . |
ModelType |
getType()
Converts available context data to
model type . |
boolean |
hasNext()
Detects if there is next DMR parsing event available.
|
boolean |
isBigDecimal()
Returns
true if current DMR parsing event is DMR big decimal , false otherwise. |
boolean |
isBigInteger()
Returns
true if current DMR parsing event is DMR big integer , false otherwise. |
boolean |
isBoolean()
Returns
true if current DMR parsing event is DMR boolean token, false otherwise. |
boolean |
isBytes()
Returns
true if current DMR parsing event is DMR bytes , false otherwise. |
boolean |
isDouble()
Returns
true if current DMR parsing event is DMR double , false otherwise. |
boolean |
isExpression()
Returns
true if current DMR parsing event is DMR expression , false otherwise. |
boolean |
isInt()
Returns
true if current DMR parsing event is DMR int , false otherwise. |
boolean |
isListEnd()
Returns
true if current DMR parsing event is DMR list end token, false otherwise. |
boolean |
isListStart()
Returns
true if current DMR parsing event is DMR list start token, false otherwise. |
boolean |
isLong()
Returns
true if current DMR parsing event is DMR long , false otherwise. |
boolean |
isObjectEnd()
Returns
true if current DMR parsing event is DMR object end token, false otherwise. |
boolean |
isObjectStart()
Returns
true if current DMR parsing event is DMR object start token, false otherwise. |
boolean |
isPropertyEnd()
Returns
true if current DMR parsing event is DMR property end token, false otherwise. |
boolean |
isPropertyStart()
Returns
true if current DMR parsing event is DMR property start token, false otherwise. |
boolean |
isString()
Returns
true if current DMR parsing event is DMR string , false otherwise. |
boolean |
isType()
Returns
true if current DMR parsing event is DMR type , false otherwise. |
boolean |
isUndefined()
Returns
true if current DMR parsing event is DMR undefined token, false otherwise. |
ModelEvent |
next()
Returns next DMR parsing event.
|
boolean hasNext()
next()
method.true
if there are more DMR parsing events, false
otherwiseModelEvent next() throws IOException, ModelException
hasNext()
before calling this method.IOException
- if some I/O error occursModelException
- if wrong DMR is detectedboolean isObjectStart()
true
if current DMR parsing event is DMR object start
token, false
otherwise.
Users have to call next()
before calling this method.boolean isObjectEnd()
true
if current DMR parsing event is DMR object end
token, false
otherwise.
Users have to call next()
before calling this method.boolean isPropertyStart()
true
if current DMR parsing event is DMR property start
token, false
otherwise.
Users have to call next()
before calling this method.boolean isPropertyEnd()
true
if current DMR parsing event is DMR property end
token, false
otherwise.
Users have to call next()
before calling this method.boolean isListStart()
true
if current DMR parsing event is DMR list start
token, false
otherwise.
Users have to call next()
before calling this method.boolean isListEnd()
true
if current DMR parsing event is DMR list end
token, false
otherwise.
Users have to call next()
before calling this method.boolean isUndefined()
true
if current DMR parsing event is DMR undefined
token, false
otherwise.
Users have to call next()
before calling this method.boolean isType()
true
if current DMR parsing event is DMR type
, false
otherwise.
Users have to call next()
before calling this method.ModelType getType()
model type
.
Users have to call next()
and should call isType()
before calling this method.IllegalStateException
- if cursor isn't pointing to DMR typeboolean isString()
true
if current DMR parsing event is DMR string
, false
otherwise.
Users have to call next()
before calling this method.String getString()
String
.
Users have to call next()
and should call isString()
before calling this method.IllegalStateException
- if cursor isn't pointing to DMR Stringboolean isExpression()
true
if current DMR parsing event is DMR expression
, false
otherwise.
Users have to call next()
before calling this method.String getExpression()
expression
.
Users have to call next()
and should call isExpression()
before calling this method.IllegalStateException
- if cursor isn't pointing to DMR expressionboolean isBytes()
true
if current DMR parsing event is DMR bytes
, false
otherwise.
Users have to call next()
before calling this method.byte[] getBytes()
bytes
.
Users have to call next()
and should call isBytes()
before calling this method.IllegalStateException
- if cursor isn't pointing to DMR Bytesboolean isBoolean()
true
if current DMR parsing event is DMR boolean
token, false
otherwise.
Users have to call next()
before calling this method.boolean getBoolean()
boolean
.
Users have to call next()
and should call isBoolean()
before calling this method.IllegalStateException
- if cursor isn't pointing to DMR boolean tokenboolean isInt()
true
if current DMR parsing event is DMR int
, false
otherwise.
Users have to call next()
before calling this method.int getInt()
int
.
Users have to call next()
and should call isInt()
before calling this method.boolean isLong()
true
if current DMR parsing event is DMR long
, false
otherwise.
Users have to call next()
before calling this method.long getLong()
long
.
Users have to call next()
and should call isLong()
before calling this method.boolean isDouble()
true
if current DMR parsing event is DMR double
, false
otherwise.
Users have to call next()
before calling this method.double getDouble()
double
.
Users have to call next()
and should call isDouble()
before calling this method.boolean isBigInteger()
true
if current DMR parsing event is DMR big integer
, false
otherwise.
Users have to call next()
before calling this method.BigInteger getBigInteger()
big integer
instance.
Users have to call next()
and should call isBigInteger()
before calling this method.boolean isBigDecimal()
true
if current DMR parsing event is DMR big decimal
, false
otherwise.
Users have to call next()
before calling this method.BigDecimal getBigDecimal()
big decimal
instance.
Users have to call next()
and should call isBigDecimal()
before calling this method.void close() throws ModelException
close
in interface AutoCloseable
ModelException
- if attempting to close this reader before reaching EOF.Copyright © 2019 JBoss by Red Hat. All rights reserved.