Last change
on this file since 1734 was
1734,
checked in by rkrimmel, 10 years ago
|
Added automatically created javadoc, still needs to be commented properly though
|
File size:
1.0 KB
|
Line | |
---|
1 | /* |
---|
2 | * |
---|
3 | */ |
---|
4 | package de.ugoe.cs.autoquest.tasktrees.alignment.algorithms; |
---|
5 | |
---|
6 | // TODO: Auto-generated Javadoc |
---|
7 | /** |
---|
8 | * A factory for creating AlignmentAlgorithm objects. |
---|
9 | */ |
---|
10 | public class AlignmentAlgorithmFactory { |
---|
11 | |
---|
12 | /** |
---|
13 | * Creates the. |
---|
14 | * |
---|
15 | * @return the alignment algorithm |
---|
16 | */ |
---|
17 | public static AlignmentAlgorithm create() { |
---|
18 | Class<?> newclass; |
---|
19 | Object object = null; |
---|
20 | try { |
---|
21 | newclass = Class.forName(algorithmclass); |
---|
22 | object = newclass.newInstance(); |
---|
23 | |
---|
24 | } catch (ClassNotFoundException | SecurityException |
---|
25 | | InstantiationException | IllegalAccessException |
---|
26 | | IllegalArgumentException e) { |
---|
27 | e.printStackTrace(); |
---|
28 | } |
---|
29 | return (AlignmentAlgorithm) object; |
---|
30 | } |
---|
31 | |
---|
32 | /** |
---|
33 | * Sets the default algorithm. |
---|
34 | * |
---|
35 | * @param algorithmname the new default algorithm |
---|
36 | */ |
---|
37 | public static void setDefaultAlgorithm(String algorithmname) { |
---|
38 | // TODO: check for valid algorihm class names here |
---|
39 | algorithmclass = algorithmname; |
---|
40 | } |
---|
41 | |
---|
42 | /** The algorithmclass. */ |
---|
43 | private static String algorithmclass = "de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.SmithWatermanRepeated"; |
---|
44 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.