org.raml.parser.visitor
Class YamlDocumentValidator

java.lang.Object
  extended by org.raml.parser.visitor.YamlDocumentValidator
All Implemented Interfaces:
NodeHandler, YamlValidator
Direct Known Subclasses:
RamlDocumentValidator

public class YamlDocumentValidator
extends Object
implements YamlValidator


Constructor Summary
protected YamlDocumentValidator(Class<?> documentClass)
           
protected YamlDocumentValidator(Class<?> documentClass, NodeRuleFactory nodeRuleFactory)
           
 
Method Summary
 List<ValidationResult> getMessages()
           
protected  Stack<NodeRule<?>> getRuleContext()
           
 void onDocumentEnd(MappingNode node)
           
 void onDocumentStart(MappingNode node)
           
 void onIncludeEnd(String includeName)
           
 void onIncludeResourceNotFound(ScalarNode node)
           
 void onIncludeStart(String includeName)
           
 void onMappingNodeEnd(MappingNode mappingNode)
           
 void onMappingNodeStart(MappingNode mappingNode)
           
 void onScalar(ScalarNode node, TupleType tupleType)
           
 void onSequenceElementEnd(Node sequenceNode)
           
 void onSequenceElementStart(Node sequenceNode)
           
 void onSequenceEnd(SequenceNode node, TupleType tupleType)
           
 void onSequenceStart(SequenceNode node, TupleType tupleType)
           
 void onTupleEnd(NodeTuple nodeTuple)
           
 void onTupleStart(NodeTuple nodeTuple)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

YamlDocumentValidator

protected YamlDocumentValidator(Class<?> documentClass)

YamlDocumentValidator

protected YamlDocumentValidator(Class<?> documentClass,
                                NodeRuleFactory nodeRuleFactory)
Method Detail

getRuleContext

protected Stack<NodeRule<?>> getRuleContext()

onMappingNodeStart

public void onMappingNodeStart(MappingNode mappingNode)
Specified by:
onMappingNodeStart in interface NodeHandler

onMappingNodeEnd

public void onMappingNodeEnd(MappingNode mappingNode)
Specified by:
onMappingNodeEnd in interface NodeHandler

onSequenceStart

public void onSequenceStart(SequenceNode node,
                            TupleType tupleType)
Specified by:
onSequenceStart in interface NodeHandler

onSequenceEnd

public void onSequenceEnd(SequenceNode node,
                          TupleType tupleType)
Specified by:
onSequenceEnd in interface NodeHandler

onScalar

public void onScalar(ScalarNode node,
                     TupleType tupleType)
Specified by:
onScalar in interface NodeHandler

onDocumentStart

public void onDocumentStart(MappingNode node)
Specified by:
onDocumentStart in interface NodeHandler

onDocumentEnd

public void onDocumentEnd(MappingNode node)
Specified by:
onDocumentEnd in interface NodeHandler

onTupleEnd

public void onTupleEnd(NodeTuple nodeTuple)
Specified by:
onTupleEnd in interface NodeHandler

onTupleStart

public void onTupleStart(NodeTuple nodeTuple)
Specified by:
onTupleStart in interface NodeHandler

onSequenceElementStart

public void onSequenceElementStart(Node sequenceNode)
Specified by:
onSequenceElementStart in interface NodeHandler

onSequenceElementEnd

public void onSequenceElementEnd(Node sequenceNode)
Specified by:
onSequenceElementEnd in interface NodeHandler

onIncludeStart

public void onIncludeStart(String includeName)
Specified by:
onIncludeStart in interface NodeHandler

onIncludeEnd

public void onIncludeEnd(String includeName)
Specified by:
onIncludeEnd in interface NodeHandler

onIncludeResourceNotFound

public void onIncludeResourceNotFound(ScalarNode node)
Specified by:
onIncludeResourceNotFound in interface NodeHandler

getMessages

public List<ValidationResult> getMessages()
Specified by:
getMessages in interface YamlValidator


Copyright © 2013. All rights reserved.