<commit_before>//$Header$
/*
 * Copyright 2005 The Apache Software Foundation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * 
 */
package org.apache.jmeter.report;

import java.util.Date;
import java.util.List;
import java.util.Set;

import org.apache.jmeter.visualizers.SamplingStatCalculator;
import org.apache.jmeter.visualizers.Visualizer;

/**
 * @author <NAME>
 *
 * DataSet extends Visualizer so that it can be used with ResultCollector.
 * Classes implementing the interface should create a new instance of
 * ResultCollector and call setListener(Visualizer) passing itself.
 * When the ResultCollector.loadExistingFile is called, it will pass
 * the SampleResults.
 */
public interface DataSet extends Visualizer {

    /**
     * Depending on the implementation, the datasouce could be a file
     * or a RDBMS. It's up to the implementing class to decide.
     * @param datasource
     */
    public void setDataSource(String datasource);
    /**
     * Return the datasource. For files, it should be the absolute path.
     * For databases, it should be the datasource name created in jmeter.
     * @return
     */
    public String getDataSource();
    /**
     * Set the timestamp using the first result from the datasource
     * @param stamp
     */
    public void setStartTimestamp(long stamp);
    /**
     * return the timestamp in millisecond format.
     * @return
     */
    public long getStartTimestamp();
    /**
     * Set the timestamp using the last result from the datasource
     * @param stamp
     */
    public void setEndTimestamp(long stamp);
    /**
     * return the timestamp in millisecond format.
     * @return
     */
    public long getEndTimestamp();
    /**
     * Return the Date object using the start timestamp
     * @return
     */
    public Date getDate();
    /**
     * Classes implementing the method should return the URL's in the 
     * DataSet. It is up to the class to return Strings or URL.
     * @return
     */
    public Set getURLs();
    /**
     * Classes implementing the method should return instance of 
     * SamplingStatCalculator.
     * @return
     */<commit_msg>added some more methods to the dataSource interface for convienance. the implementation has changed a bit. instead of allowing arbitrary input for the x data labels, now there's 2 options: filename or date peter<commit_after>//$Header$
/*
 * Copyright 2005 The Apache Software Foundation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * 
 */
package org.apache.jmeter.report;

import java.util.Date;
import java.util.List;
import java.util.Set;

import org.apache.jmeter.visualizers.SamplingStatCalculator;
import org.apache.jmeter.visualizers.Visualizer;

/**
 * @author <NAME>
 *
 * DataSet extends Visualizer so that it can be used with ResultCollector.
 * Classes implementing the interface should create a new instance of
 * ResultCollector and call setListener(Visualizer) passing itself.
 * When the ResultCollector.loadExistingFile is called, it will pass
 * the SampleResults.
 */
public interface DataSet extends Visualizer {

    /**
     * Depending on the implementation, the datasouce could be a file
     * or a RDBMS. It's up to the implementing class to decide.
     * @param datasource
     */
    public void setDataSource(String datasource);
    /**
     * Return the datasource. For files, it should be the absolute path.
     * For databases, it should be the datasource name created in jmeter.
     * @return
     */
    public String getDataSource();
    /**
     * In some cases, we may want to return a string that isn't the full
     * datasource string or something different. For example, we may
     * want to return just the filename and not the absolutePath of
     * a JTL file.
     * @return
     */
    public String getDataSourceName();
    /**
     * Set the timestamp using the first result from the datasource
     * @param stamp
     */
    public void setStartTimestamp(long stamp);
    /**
     * return the timestamp in millisecond format.
     * @return
     */
    public long getStartTimestamp();
    /**
     * Set the timestamp using the last result from the datasource
     * @param stamp
     */
    public void setEndTimestamp(long stamp);
    /**
     * return the timestamp in millisecond format.
     * @return
     */
    public long getEndTimestamp();
    /**
     * Return the Date object using the start timestamp
     * @return
     */
    public Date getDate();
    /**
     * convienance method for getting the date in mmdd format
     * @return
     */
    public String getMonthDayDate();
    /**
     * convienant method for getting the date in yyyymmdd format
     * @return
     */
    public String getMonthDayYearDate();
    /**
     * Classes implementing the method should return the URL's in the 
     * DataSet. It is up to the class to return Strings or URL.
     * @return
     */
    public Set getURLs();
    /**
     * Classes implementing the method should return instance of 
     * SamplingStatCalculator.
     * @return
     */
{'fraction_non_alphanumeric': 0.07702435813034891, 'fraction_numerical': 0.0027978933508887426, 'mean_word_length': 2.860864040660737, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2645177', 'n_tokens_mistral': 1619, 'n_tokens_neox': 1552, 'n_words': 688}