com.fecresgam.dbsd.translator.dto.data.TextData.java Source code

Java tutorial

Introduction

Here is the source code for com.fecresgam.dbsd.translator.dto.data.TextData.java

Source

/* **********************************************************************
 *   This file is part of DB Schema Definition Translator.              *
 *                                                                      *
 *   DB Schema Definition Translator is free software: you can          *
 *   redistribute it and/or modify it under the terms of the GNU        *
 *   General Public License as published by the Free Software           *
 *   Foundation, either version 2 of the License, or any later version. *
 *                                                                      *
 *   Foobar is distributed in the hope that it will be useful,          *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of     *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the      *
 *   GNU General Public License for more details.                       *
 *                                                                      *
 *   You should have received a copy of the GNU General Public License  *
 *   along with Foobar.  If not, see <http://www.gnu.org/licenses/>.    *
 *                                                                      *
 *   Author: Felipe Crespo Gambade                                      *
 *                                                                      *
 ************************************************************************/

package com.fecresgam.dbsd.translator.dto.data;

import org.apache.commons.lang3.StringEscapeUtils;

/**
 * The intermediate representation of a Text Data
 */
public class TextData extends CommonData {
    /**
     * Creates a new Text Data.
     *
     * @param content such information.
     */
    public TextData(String content) {
        super(StringEscapeUtils.unescapeJava(content));
    }

    @Override
    public DataType getDataType() {
        return DataType.TEXT;
    }
}