de.saumya.mojo.gems.spec.yaml
Class YamlGemSpecificationIO

java.lang.Object
  extended by de.saumya.mojo.gems.spec.yaml.YamlGemSpecificationIO
All Implemented Interfaces:
GemSpecificationIO

@Component(role=GemSpecificationIO.class,
           hint="yaml")
public class YamlGemSpecificationIO
extends Object
implements GemSpecificationIO

This is here just be able to quickly switch between snakeYaml and YamlBeans, since they are both good, with their own quirks. SnakeYaml won ;) So we can clear up this later.

Author:
cstamas

Field Summary
protected  org.yaml.snakeyaml.Yaml _yaml
           
 
Constructor Summary
YamlGemSpecificationIO()
           
 
Method Summary
protected  org.yaml.snakeyaml.Yaml getYaml()
           
 GemSpecification read(String string)
           
protected  GemSpecification readGemSpecfromYaml(String gemspecString)
           
protected  GemSpecification readGemSpecfromYamlWithSnakeYaml(String gemspecString)
           
 String write(GemSpecification gemspec)
           
protected  String writeGemSpectoYaml(GemSpecification gemspec)
           
protected  String writeGemSpectoYamlWithSnakeYaml(GemSpecification gemspec)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_yaml

protected org.yaml.snakeyaml.Yaml _yaml
Constructor Detail

YamlGemSpecificationIO

public YamlGemSpecificationIO()
Method Detail

read

public GemSpecification read(String string)
                      throws IOException
Specified by:
read in interface GemSpecificationIO
Throws:
IOException

write

public String write(GemSpecification gemspec)
             throws IOException
Specified by:
write in interface GemSpecificationIO
Throws:
IOException

getYaml

protected org.yaml.snakeyaml.Yaml getYaml()

readGemSpecfromYaml

protected GemSpecification readGemSpecfromYaml(String gemspecString)
                                        throws IOException
Throws:
IOException

writeGemSpectoYaml

protected String writeGemSpectoYaml(GemSpecification gemspec)
                             throws IOException
Throws:
IOException

readGemSpecfromYamlWithSnakeYaml

protected GemSpecification readGemSpecfromYamlWithSnakeYaml(String gemspecString)
                                                     throws IOException
Throws:
IOException

writeGemSpectoYamlWithSnakeYaml

protected String writeGemSpectoYamlWithSnakeYaml(GemSpecification gemspec)
                                          throws IOException
Throws:
IOException


Copyright © 2011. All Rights Reserved.