KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > zeus > Result


1 /*
2  * Enhydra Java Application Server Project
3  *
4  * The contents of this file are subject to the Enhydra Public License
5  * Version 1.1 (the "License"); you may not use this file except in
6  * compliance with the License. You may obtain a copy of the License on
7  * the Enhydra web site ( http://www.enhydra.org/ ).
8  *
9  * Software distributed under the License is distributed on an "AS IS"
10  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
11  * the License for the specific terms governing rights and limitations
12  * under the License.
13  *
14  * The Initial Developer of the Enhydra Application Server is Lutris
15  * Technologies, Inc. The Enhydra Application Server and portions created
16  * by Lutris Technologies, Inc. are Copyright Lutris Technologies, Inc.
17  * All Rights Reserved.
18  */

19 package org.enhydra.zeus;
20
21 import java.io.IOException JavaDoc;
22
23 /**
24  * <p>
25  * <code>Result</code> provides an interface for all output
26  * means. It details the required contract that other
27  * portions of the Zeus XML data binding framework must
28  * use for processing to an arbitrary output.
29  * </p>
30  * <p>
31  * All output facilities should implement this interface, and
32  * be named <code>XXXResult</code> where <i>XXX</i> reflects the
33  * type of output handled. For example, output to I/O
34  * streams is handled by
35  * <code>{@link org.enhydra.zeus.result.StreamResult}</code>.
36  * </p>
37  *
38  * @author Brett McLaughlin
39  */

40 public interface Result {
41
42     /**
43      * <p>
44      * This will return the system ID associated with
45      * this <code>Result</code>. This is generally in
46      * the form of a URI.
47      * </p>
48      *
49      * @return <code>String</code> - the system ID for the
50      * <code>Result</code>.
51      */

52     public String JavaDoc getSystemID();
53     
54     /**
55      * <p>
56      * This will set the system ID for this
57      * <code>Result</code>. This is important to use,
58      * even when output is in the form of an output stream
59      * (see
60      * <code>{@link org.enhydra.zeus.result.StreamResult}</code>)
61      * for resolving external references, such as to a DTD.
62      * </p>
63      *
64      * @param systemID <code>String</code> system ID to use.
65      */

66     public void setSystemID(String JavaDoc systemID);
67     
68     /**
69      * <p>
70      * This will write a character stream to the output
71      * facility associated with this <code>Result</code>.
72      * No additional formatting is added, so line feeds,
73      * tabs, or other special characters should be handled
74      * by the code performing output.
75      * </p>
76      *
77      * @param output <code>String</code> to output.
78      * @throws <code>IOException</code> - when errors in output occur.
79      */

80     public void write(String JavaDoc output) throws IOException JavaDoc;
81 }
Popular Tags