Class VisualizerParameterizer


  • public class VisualizerParameterizer
    extends java.lang.Object
    Utility class to determine the visualizers for a result class. You really should use the parameterization API to configure this class. Manually populating the factory collection is cumbersome, and the parameterization API takes care of this.
    Since:
    0.3
    Author:
    Erich Schubert, Remigius Wojdanowski
    • Field Detail

      • LOG

        private static final Logging LOG
        Get a logger for this class.
      • DEFAULT_SAMPLE_SIZE

        public static final int DEFAULT_SAMPLE_SIZE
        Default sample size to visualize.
        See Also:
        Constant Field Values
      • stylelib

        private StyleLibrary stylelib
        Style library to use.
      • factories

        private java.util.Collection<VisualizationProcessor> factories
        Projections and visualization factories.
      • showVisualizers

        private java.util.regex.Pattern showVisualizers
        Pattern to show additional visualizers
      • samplesize

        private int samplesize
        Sample size
      • rnd

        private RandomFactory rnd
        Random seed for sampling. FIXME: make parameterizable.
    • Constructor Detail

      • VisualizerParameterizer

        public VisualizerParameterizer​(int samplesize,
                                       StyleLibrary stylelib,
                                       java.util.Collection<VisualizationProcessor> factories,
                                       java.util.regex.Pattern showVisualizers)
        Constructor.
        Parameters:
        samplesize -
        stylelib - Style library
        factories - Factories to use
        showVisualizers - Visualizers to force visible (may be null)
    • Method Detail

      • newContext

        public VisualizerContext newContext​(java.lang.Object start)
        Make a new visualization context
        Parameters:
        start - Starting result
        Returns:
        New context
      • getTitle

        public static java.lang.String getTitle​(Database db,
                                                java.lang.Object result)
        Try to automatically generate a title for this.
        Parameters:
        db - Database
        result - Result object
        Returns:
        generated title
      • shortenClassname

        protected static java.lang.String shortenClassname​(java.lang.String nam,
                                                           char c)
        Shorten the class name.
        Parameters:
        nam - Class name
        c - Splitting character
        Returns:
        Shortened name