Package org.geotools.ysld.parse
Class YamlParseContext
- Object
-
- YamlParseContext
-
public class YamlParseContext extends Object
Holds the context of a call toYamlParser.parse(YamlParseHandler, Map)
during its descent into theYamlObject
being parsed.
-
-
Constructor Summary
Constructors Constructor Description YamlParseContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
getDocHint(String key)
void
mergeDocHints(Map<String,Object> hints)
boolean
next()
Pop aYamlParseHandler
from the handler stack and execute itsYamlParseHandler.handle(YamlObject, YamlParseContext)
method on theYamlObject
with which it was pushed.YamlParseContext
pop()
YamlParseContext
push(String key, YamlParseHandler handler)
Parse a child of the current object if presentYamlParseContext
push(YamlParseHandler handler)
Add a handler to the stack handling the current object.YamlParseContext
push(YamlObject scope, String key, YamlParseHandler handler)
Parse a child of the specified object if presentYamlParseContext
push(YamlObject obj, YamlParseHandler handler)
Add a handler to the stack handling the specified objectvoid
setDocHint(String key, Object value)
-
-
-
Method Detail
-
push
public YamlParseContext push(String key, YamlParseHandler handler)
Parse a child of the current object if present- Parameters:
key
- key of the child entryhandler
- handler to use- Returns:
- self
-
push
public YamlParseContext push(YamlObject scope, String key, YamlParseHandler handler)
Parse a child of the specified object if present- Parameters:
scope
- object to start fromkey
- key of the child entryhandler
- handler to use- Returns:
- self
-
push
public YamlParseContext push(YamlParseHandler handler)
Add a handler to the stack handling the current object. Used for "inlined"/common properties.- Parameters:
handler
- handler to use- Returns:
- self
-
push
public YamlParseContext push(YamlObject obj, YamlParseHandler handler)
Add a handler to the stack handling the specified object- Parameters:
obj
- the object to parsehandler
- handler to use- Returns:
- self
-
pop
public YamlParseContext pop()
-
next
public boolean next()
Pop aYamlParseHandler
from the handler stack and execute itsYamlParseHandler.handle(YamlObject, YamlParseContext)
method on theYamlObject
with which it was pushed.- Returns:
- True if more handlers remain on handler stack; false if the handler stack is empty.
-
-