Merge "Bug 509: Fixed incorrect merging of Data Store Writes / Events"
[controller.git] / opendaylight / config / yang-jmx-generator-plugin / src / main / java / org / opendaylight / controller / config / yangjmxgenerator / plugin / ftl / model / HeaderSerializer.java
1 /*
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.controller.config.yangjmxgenerator.plugin.ftl.model;
10
11 import org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator;
12
13 import java.util.Date;
14
15 public class HeaderSerializer {
16     private static final String GENERATOR_CLASS = JMXGenerator.class.getCanonicalName();
17
18     public static String toString(Header header) {
19         StringBuilder build = new StringBuilder();
20
21
22         build.append("Generated file");
23         build.append("\n");
24         build.append("\n");
25         build.append("Generated from: ");
26         //build.append(header.toString());
27
28         build.append("yang module name: ");
29         build.append(header.getYangModuleName());
30         build.append(" yang module local name: ");
31         build.append(header.getYangModuleLocalName());
32
33         build.append("\n");
34         build.append("Generated by: " + GENERATOR_CLASS);
35         build.append("\n");
36         build.append("Generated at: " + new Date());
37         build.append("\n");
38         build.append("\n");
39         build.append("Do not modify this file unless it is present under src/main directory ");
40
41         return build.toString();
42     }
43
44 }