org.insolina.ydom
Class YamlDocument

java.lang.Object
  extended by org.insolina.ydom.YamlDocument

public class YamlDocument
extends java.lang.Object

This class represents the Yaml document. An instance can be created either with a String containing the fully qualified name of the Yaml file, or a Java File object representing the Yaml file.


Constructor Summary
YamlDocument(java.io.File file)
          Load the Yaml document using a Java File object.
YamlDocument(java.lang.String file)
          Load the Yaml document using the fully qualified name of the Yaml file.
 
Method Summary
 java.util.List<YamlNode> getChildren()
          Return the children of the document's root node.
 YamlNode getRootNode()
          Return the root node of the Yaml document.
 void print()
          Print out a string representation of the document structure.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

YamlDocument

public YamlDocument(java.lang.String file)
             throws YamlDomException
Load the Yaml document using the fully qualified name of the Yaml file.

Parameters:
file - String
Throws:
YamlDomException

YamlDocument

public YamlDocument(java.io.File file)
             throws YamlDomException
Load the Yaml document using a Java File object.

Parameters:
file - File
Throws:
YamlDomException
Method Detail

getChildren

public java.util.List<YamlNode> getChildren()
Return the children of the document's root node.

Returns:
List of YamlNode

getRootNode

public YamlNode getRootNode()
Return the root node of the Yaml document.

Returns:
YamlNode

print

public void print()
Print out a string representation of the document structure.