| 1 | // Copyright 2015 Georg-August-Universität Göttingen, Germany
|
|---|
| 2 | //
|
|---|
| 3 | // Licensed under the Apache License, Version 2.0 (the "License");
|
|---|
| 4 | // you may not use this file except in compliance with the License.
|
|---|
| 5 | // You may obtain a copy of the License at
|
|---|
| 6 | //
|
|---|
| 7 | // http://www.apache.org/licenses/LICENSE-2.0
|
|---|
| 8 | //
|
|---|
| 9 | // Unless required by applicable law or agreed to in writing, software
|
|---|
| 10 | // distributed under the License is distributed on an "AS IS" BASIS,
|
|---|
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|---|
| 12 | // See the License for the specific language governing permissions and
|
|---|
| 13 | // limitations under the License.
|
|---|
| 14 |
|
|---|
| 15 | package de.ugoe.cs.cpdp.loader;
|
|---|
| 16 |
|
|---|
| 17 | import java.io.File;
|
|---|
| 18 |
|
|---|
| 19 | import weka.core.Instances;
|
|---|
| 20 |
|
|---|
| 21 | /**
|
|---|
| 22 | * Interface for version loaders, i.e., loading of a set of instances from a file
|
|---|
| 23 | *
|
|---|
| 24 | * @author Steffen Herbold
|
|---|
| 25 | */
|
|---|
| 26 | public interface SingleVersionLoader {
|
|---|
| 27 |
|
|---|
| 28 | /**
|
|---|
| 29 | * Loads the instances.
|
|---|
| 30 | *
|
|---|
| 31 | * @param file
|
|---|
| 32 | * handle to the file of the instances
|
|---|
| 33 | * @return the instances
|
|---|
| 34 | */
|
|---|
| 35 | Instances load(File file);
|
|---|
| 36 |
|
|---|
| 37 | /**
|
|---|
| 38 | * Defines a filter for the files to be loaded; only strings that end with the filter are
|
|---|
| 39 | * considered.
|
|---|
| 40 | *
|
|---|
| 41 | * @param filename
|
|---|
| 42 | * string defining the filename filter
|
|---|
| 43 | * @return true if a filename shall be considered
|
|---|
| 44 | */
|
|---|
| 45 | boolean filenameFilter(String endsWith);
|
|---|
| 46 | }
|
|---|