Changeset 1733 for branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/AlignmentAlgorithmFactory.java
- Timestamp:
- 09/05/14 19:33:12 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/AlignmentAlgorithmFactory.java
r1616 r1733 1 1 package de.ugoe.cs.autoquest.tasktrees.alignment.algorithms; 2 2 3 public class AlignmentAlgorithmFactory { 3 4 4 public class AlignmentAlgorithmFactory {5 6 public static void setDefaultAlgorithm(String algorithmname) {7 //TODO: check for valid algorihm class names here8 algorithmclass = algorithmname;9 }10 11 private static String algorithmclass = "de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.SmithWatermanRepeated";12 13 14 15 5 public static AlignmentAlgorithm create() { 16 6 Class<?> newclass; 17 7 Object object = null; 18 8 try { 19 newclass = Class.forName(algorithmclass); 20 object = newclass.newInstance(); 21 22 } catch (ClassNotFoundException | SecurityException | InstantiationException | IllegalAccessException | IllegalArgumentException e) { 9 newclass = Class.forName(algorithmclass); 10 object = newclass.newInstance(); 11 12 } catch (ClassNotFoundException | SecurityException 13 | InstantiationException | IllegalAccessException 14 | IllegalArgumentException e) { 23 15 e.printStackTrace(); 24 16 } 25 17 return (AlignmentAlgorithm) object; 26 18 } 19 20 public static void setDefaultAlgorithm(String algorithmname) { 21 // TODO: check for valid algorihm class names here 22 algorithmclass = algorithmname; 23 } 24 25 private static String algorithmclass = "de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.SmithWatermanRepeated"; 27 26 }
Note: See TracChangeset
for help on using the changeset viewer.