Package org.yaml.snakeyaml.nodes

Examples of org.yaml.snakeyaml.nodes.Tag


            }
        }

        private class RepresentDate implements Represent {
            public Node representData(Object data) {
                return representScalar(new Tag(Tag.PREFIX + "java.sql.Date"),
                        ((java.sql.Date) data).toString());
            }
View Full Code Here


            }
        }

        private class RepresentTime implements Represent {
            public Node representData(Object data) {
                return representScalar(new Tag(Tag.PREFIX + "java.sql.Timestamp"),
                        ((java.sql.Timestamp) data).toString());
            }
View Full Code Here

* @see http://yaml.org/spec/1.1/
*/
public class Example2_24Test extends TestCase {
    class MyConstructor extends Constructor {
        public MyConstructor() {
            this.yamlConstructors.put(new Tag("tag:clarkevans.com,2002:shape"),
                    new ConstructShape());
            this.yamlConstructors.put(new Tag("tag:clarkevans.com,2002:circle"),
                    new ConstructCircle());
            this.yamlConstructors.put(new Tag("tag:clarkevans.com,2002:line"), new ConstructLine());
            this.yamlConstructors.put(new Tag("tag:clarkevans.com,2002:label"),
                    new ConstructLabel());
        }
View Full Code Here

        private class RepresentShape implements Represent {
            public Node representData(Object data) {
                Shape shape = (Shape) data;
                List<Entity> value = shape.getEntities();
                return representSequence(new Tag("!shape"), value, Boolean.FALSE);
            }
View Full Code Here

            public Node representData(Object data) {
                Circle circle = (Circle) data;
                Map<String, Object> map = new TreeMap<String, Object>();
                map.put("center", circle.getCenter());
                map.put("radius", circle.getRadius());
                return representMapping(new Tag("!circle"), map, Boolean.FALSE);
            }
View Full Code Here

            public Node representData(Object data) {
                Line line = (Line) data;
                Map<String, Object> map = new TreeMap<String, Object>();
                map.put("start", line.getStart());
                map.put("finish", line.getFinish());
                return representMapping(new Tag("!line"), map, Boolean.FALSE);
            }
View Full Code Here

                Label label = (Label) data;
                Map<String, Object> map = new TreeMap<String, Object>();
                map.put("start", label.getStart());
                map.put("color", new HexInteger(label.getColor()));
                map.put("text", label.getText());
                return representMapping(new Tag("!label"), map, Boolean.FALSE);
            }
View Full Code Here

    class RepresentInsets implements Represent {

        public Node representData(Object data) {
            Insets insets = (Insets) data;
            return representSequence(
                    getTag(data.getClass(), new Tag(data.getClass())),
                    Arrays.asList(new Object[] { insets.top, insets.left, insets.bottom,
                            insets.right }), true);
        }
View Full Code Here

    class RepresentRectangle implements Represent {

        public Node representData(Object data) {
            Rectangle rect = (Rectangle) data;
            return representSequence(getTag(data.getClass(), new Tag(data.getClass())),
                    Arrays.asList(new Object[] { rect.x, rect.y, rect.width, rect.height }), true);
        }
View Full Code Here

    class RepresentMatteBorder implements Represent {

        public Node representData(Object data) {
            MatteBorder mb = (MatteBorder) data;
            return representSequence(getTag(data.getClass(), new Tag(data.getClass())),
                    Arrays.asList(new Object[] { mb.getBorderInsets(), mb.getMatteColor() }), true);
        }
View Full Code Here

TOP

Related Classes of org.yaml.snakeyaml.nodes.Tag

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.