Source code: org/embl/ebi/escience/scuflworkers/rdfgenerator/RDFGeneratorProcessorFactory.java
1 /**
2 * This file is a component of the Taverna project,
3 * and is licensed under the GNU LGPL.
4 * Copyright Tom Oinn, EMBL-EBI
5 */
6 package org.embl.ebi.escience.scuflworkers.rdfgenerator;
7 import org.embl.ebi.escience.scufl.DuplicateProcessorNameException;
8 import org.embl.ebi.escience.scufl.Processor;
9 import org.embl.ebi.escience.scufl.ProcessorCreationException;
10 import org.embl.ebi.escience.scufl.ScuflModel;
11 import org.embl.ebi.escience.scuflworkers.ProcessorFactory;
12
13
14
15
16 /**
17 * Implementation of ProcessorFactory that creates
18 * RDFGeneratingProcessor nodes
19 * @author Tom Oinn
20 */
21 public class RDFGeneratorProcessorFactory implements ProcessorFactory {
22
23 /**
24 * Create a new factory configured with the specified
25 * constant value
26 */
27 public RDFGeneratorProcessorFactory() {
28 super();
29 }
30
31 /**
32 * Return a constant value as the name
33 */
34 public String toString() {
35 return "RDF Generator";
36 }
37
38 /**
39 * Create a new RDFGeneratingProcessor and add it to the model
40 */
41 public void createProcessor(String name, ScuflModel model)
42 throws ProcessorCreationException,
43 DuplicateProcessorNameException {
44 Processor theProcessor = new RDFGeneratorProcessor(model, name);
45 model.addProcessor(theProcessor);
46 }
47
48 /**
49 * Return a textual description of the factory
50 */
51 public String getProcessorDescription() {
52 return "A processor that generates rdf tuples";
53 }
54
55 /**
56 * Return the Class object for processors that would
57 * be created by this factory
58 */
59 public Class getProcessorClass() {
60 return org.embl.ebi.escience.scuflworkers.rdfgenerator.RDFGeneratorProcessor.class;
61 }
62
63 }