All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.citec.tcs.alignment.visualization.StringColumn Maven / Gradle / Ivy

Go to download

This module contains means to visualize Alignments. The most important interface is the Visualizer class. A trivial implementation (essentially just using toString()) is the StringVisualizer. A more sophisticated example that is recommended for outside use is the HTMLVisualizer. All other classes are helper classes for said HTMLVisualizer.

There is a newer version: 3.1.1
Show newest version
/* 
 * TCS Alignment Toolbox Version 3
 * 
 * Copyright (C) 2016
 * Benjamin Paaßen
 * AG Theoretical Computer Science
 * Centre of Excellence Cognitive Interaction Technology (CITEC)
 * University of Bielefeld
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 * 
 * This program 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 Affero General Public License for more details.
 * 
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see .
 */
package de.citec.tcs.alignment.visualization;

/**
 * Applies 'toString' to visualize content in an HTML visualization.
 *
 * @author Benjamin Paassen - bpaassen(at)techfak.uni-bielefeld.de
 * @param  the class of the elements in the left input sequence.
 * @param  the class of the elements in the right input sequence.
 */
public class StringColumn extends AbstractHTMLColumn {

	private static class ToStringVisualizer implements ElementHTMLVisualizer {

		@Override
		public String visualize(X object) {
			return VisualizerUtils.smartObjectToString(object);
		}

	}

	public StringColumn(String keyword) {
		super(keyword, new ToStringVisualizer(), new ToStringVisualizer());
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy