Java tutorial
/* * Sentilab SARE: a Sentiment Analysis Research Environment * Copyright (C) 2013 Sabanci University Sentilab * http://sentilab.sabanciuniv.edu * * This file is part of SARE. * * SARE 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 3 of the License, or * (at your option) any later version. * * SARE 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 SARE. If not, see <http://www.gnu.org/licenses/>. */ package models.document; import org.apache.commons.lang3.StringUtils; import edu.sabanciuniv.sentilab.sare.models.base.document.FullTextDocument; public class FullTextDocumentModel extends PersistentDocumentModel { public String summarizedContent; public FullTextDocumentModel(FullTextDocument document) { super(document); if (document != null) { this.summarizedContent = StringUtils.abbreviate(document.getContent(), 20); } } public FullTextDocumentModel() { this(null); } }