Package net.sf.okapi.filters.yaml.parser
Interface IYamlHandler
-
- All Known Implementing Classes:
YamlFilter
public interface IYamlHandler
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidhandleBlockSequenceNodeStart(String dash, int indent)Called at the start of a block sequence element (e.g., after the DASH "- test")voidhandleComment(String c, boolean insideScalar)Handle YAML comment process differently based on if this is inside a current TextUnitvoidhandleDocumentEnd(String end)Document end token.voidhandleDocumentStart(String start)Document start token.voidhandleEnd()Called once at the end of a document.voidhandleKey(Key key)Handle YAML keys, used in resnamevoidhandleMapEnd(boolean flow)voidhandleMappingElementEnd()Called after flow or mapping element is donevoidhandleMapStart(boolean flow)Handle Yaml Maps (BLOCK and FLOW) For contextual information.voidhandleMarker(String marker)Handle separator, i.e., "," or "-"voidhandleOther(String other)Other tokens like ANCHOR, TAG, ALIASvoidhandleScalar(Scalar scalar)Handle YAML valuevoidhandleSequenceEnd(boolean flow)voidhandleSequenceStart(boolean flow)Handle YAML sequences (BLOCK and FLOW) For contextual information.voidhandleStart()Called once at the beginning of a new document.voidhandleWhitespace(String whitespace, boolean insideScalar)Handle YAML whitespace process differently based on if this is inside a current TextUnit
-
-
-
Method Detail
-
handleStart
void handleStart()
Called once at the beginning of a new document.
-
handleEnd
void handleEnd()
Called once at the end of a document.
-
handleComment
void handleComment(String c, boolean insideScalar)
Handle YAML comment process differently based on if this is inside a current TextUnit
-
handleKey
void handleKey(Key key)
Handle YAML keys, used in resname
-
handleMarker
void handleMarker(String marker)
Handle separator, i.e., "," or "-"
-
handleScalar
void handleScalar(Scalar scalar)
Handle YAML value
-
handleWhitespace
void handleWhitespace(String whitespace, boolean insideScalar)
Handle YAML whitespace process differently based on if this is inside a current TextUnit
-
handleMapStart
void handleMapStart(boolean flow)
Handle Yaml Maps (BLOCK and FLOW) For contextual information.
-
handleMapEnd
void handleMapEnd(boolean flow)
-
handleSequenceStart
void handleSequenceStart(boolean flow)
Handle YAML sequences (BLOCK and FLOW) For contextual information.
-
handleSequenceEnd
void handleSequenceEnd(boolean flow)
-
handleOther
void handleOther(String other)
Other tokens like ANCHOR, TAG, ALIAS- Parameters:
other-
-
handleDocumentStart
void handleDocumentStart(String start)
Document start token. If non-null then start clean (clear stacks, finish TextUnits etc..)- Parameters:
start-
-
handleDocumentEnd
void handleDocumentEnd(String end)
Document end token. If non-null then clean up (clear stacks, finish TextUnits etc..)- Parameters:
end-
-
handleMappingElementEnd
void handleMappingElementEnd()
Called after flow or mapping element is done
-
handleBlockSequenceNodeStart
void handleBlockSequenceNodeStart(String dash, int indent)
Called at the start of a block sequence element (e.g., after the DASH "- test")
-
-