/* * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ package org.opendaylight.controller.config.yangjmxgenerator.plugin.ftl.model; import org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator; import java.util.Date; public class HeaderSerializer { private static final String GENERATOR_CLASS = JMXGenerator.class.getCanonicalName(); public static String toString(Header header) { StringBuilder build = new StringBuilder(); build.append("Generated file"); build.append("\n"); build.append("\n"); build.append("Generated from: "); //build.append(header.toString()); build.append("yang module name: "); build.append(header.getYangModuleName()); build.append(" yang module local name: "); build.append(header.getYangModuleLocalName()); build.append("\n"); build.append("Generated by: " + GENERATOR_CLASS); build.append("\n"); build.append("Generated at: " + new Date()); build.append("\n"); build.append("\n"); build.append("Do not modify this file unless it is present under src/main directory "); return build.toString(); } }