/[cashew-s-editor]/cashews/src/nongnu/cashews/language/process/Produce.java
ViewVC logotype

Diff of /cashews/src/nongnu/cashews/language/process/Produce.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by gnu_andrew, Wed May 4 07:31:55 2005 UTC revision 1.2 by gnu_andrew, Sat May 7 21:22:54 2005 UTC
# Line 22  Line 22 
22  package nongnu.cashews.language.process;  package nongnu.cashews.language.process;
23    
24  import java.net.URI;  import java.net.URI;
25    import java.net.URISyntaxException;
26    
27    import java.io.Serializable;
28    
29  /**  /**
30   * Produces output for a <code>CompositeProcess</code> as a whole.   * Produces output for a <code>CompositeProcess</code> as a whole.
# Line 32  import java.net.URI; Line 35  import java.net.URI;
35   * @see Performance   * @see Performance
36   */   */
37  public class Produce  public class Produce
38      implements Serializable
39  {  {
40    
41    /**    /**
42     * The output of the internal performance.     * The output of the composite process.
43     *     *
44     * @serial the internal performance input.     * @serial the composite process output.
45     */     */
46    private URI fromOutput;    private URI toOutput;
47    
48    /**    /**
49     * The internal performance where the output comes from.     * The internal performance where the output comes from.
# Line 49  public class Produce Line 53  public class Produce
53    private URI fromPerformance;    private URI fromPerformance;
54    
55    /**    /**
56     * The output of the composite process.     * The output of the internal performance.
57     *     *
58     * @serial the composite process output.     * @serial the internal performance input.
59     */     */
60    private URI toOutput;    private URI fromOutput;
61    
62      /**
63       * Construct a new <code>Produce</code> with the specified
64       * source performance and the supplied source and destination
65       * outputs.
66       *
67       * @param fromOutput the output on the composite process.
68       * @param fromPerformance the performance to retrieve the output from.
69       * @param toOutput the output on the destination performance.
70       * @throws URISyntaxException if one of the supplied names is not a valid
71       *                            URI.
72       */
73      public Produce(String fromOutput, String fromPerformance, String toOutput)
74        throws URISyntaxException
75      {
76        setFromOutput(fromOutput);
77        setFromPerformance(fromPerformance);
78        setToOutput(toOutput);
79      }
80    
81      /**
82       * Construct a new <code>Produce</code> with the specified
83       * source performance and the supplied source and destination
84       * outputs.
85       *
86       * @param fromOutput the output on the composite process.
87       * @param fromPerformance the performance to retrieve the output from.
88       * @param toOutput the output on the destination performance.
89       */
90      public Produce(URI fromOutput, URI fromPerformance, URI toOutput)
91      {
92        setFromOutput(fromOutput);
93        setFromPerformance(fromPerformance);
94        setToOutput(toOutput);
95      }
96    
97      /**
98       * Sets the source output on the performance to that specified.
99       *
100       * @param fromOutput the new source output on the performance.
101       * @throws URISyntaxException if the supplied output is not a valid URI.
102       */
103      public void setFromOutput(String fromOutput)
104        throws URISyntaxException
105      {
106        setFromOutput(new URI(fromOutput));
107      }
108    
109      /**
110       * Sets the source output on the performance to that specified.
111       *
112       * @param fromOutput the new source output on the performance.
113       */
114      public void setFromOutput(URI fromOutput)
115      {
116        this.fromOutput = fromOutput;
117      }
118    
119      /**
120       * Sets the source performance to that specified.
121       *
122       * @param fromPerformance the new source performance.
123       * @throws URISyntaxException if the supplied performance is not a valid URI.
124       */
125      public void setFromPerformance(String fromPerformance)
126        throws URISyntaxException
127      {
128        setFromPerformance(new URI(fromPerformance));
129      }
130    
131      /**
132       * Sets the destination performance to that specified.
133       *
134       * @param fromPerformance the new destination performance.
135       */
136      public void setFromPerformance(URI fromPerformance)
137      {
138        this.fromPerformance = fromPerformance;
139      }
140    
141      /**
142       * Sets the destination output on the composite process to that specified.
143       *
144       * @param toOutput the new destination output on the composite process.
145       * @throws URISyntaxException if the supplied output is not a valid URI.
146       */
147      public void setToOutput(String toOutput)
148        throws URISyntaxException
149      {
150        setToOutput(new URI(toOutput));
151      }
152    
153      /**
154       * Sets the destination output on the composite process to that specified.
155       *
156       * @param toOutput the new destination input on the composite process.
157       */
158      public void setToOutput(URI toOutput)
159      {
160        this.toOutput = toOutput;
161      }
162    
163      /**
164       * Returns a <code>String</code> representation of this performance.
165       *
166       * @return a textual representation.
167       */
168      public String toString()
169      {
170        return getClass().getName() +
171          "[fromOutput=" +
172          fromOutput +
173          ",fromPerformance=" +
174          fromPerformance +
175          ",toOutput=" +
176          toOutput +
177          "]";
178      }
179    
180  }  }
181    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26