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 theYamlObjectbeing parsed.
-
-
Constructor Summary
Constructors Constructor Description YamlParseContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectgetDocHint(String key)voidmergeDocHints(Map<String,Object> hints)booleannext()Pop aYamlParseHandlerfrom the handler stack and execute itsYamlParseHandler.handle(YamlObject, YamlParseContext)method on theYamlObjectwith which it was pushed.YamlParseContextpop()YamlParseContextpush(String key, YamlParseHandler handler)Parse a child of the current object if presentYamlParseContextpush(YamlParseHandler handler)Add a handler to the stack handling the current object.YamlParseContextpush(YamlObject scope, String key, YamlParseHandler handler)Parse a child of the specified object if presentYamlParseContextpush(YamlObject obj, YamlParseHandler handler)Add a handler to the stack handling the specified objectvoidsetDocHint(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 aYamlParseHandlerfrom the handler stack and execute itsYamlParseHandler.handle(YamlObject, YamlParseContext)method on theYamlObjectwith which it was pushed.- Returns:
- True if more handlers remain on handler stack; false if the handler stack is empty.
-
-