comparison artifacts/src/main/java/org/dive4elements/river/exports/AbstractExporter.java @ 7116:3c7471b929d1

Merge branch generator-refectoring into default.
author Andre Heinecke <aheinecke@intevation.de>
date Tue, 24 Sep 2013 12:29:44 +0200
parents e61bb712ee41 41567bf1e131
children 5ef60ed15c25
comparison
equal deleted inserted replaced
7095:bdadffad35b1 7116:3c7471b929d1
63 public static final char DEFAULT_CSV_SEPARATOR = ';'; 63 public static final char DEFAULT_CSV_SEPARATOR = ';';
64 64
65 /** XPath that points to the desired export facet. */ 65 /** XPath that points to the desired export facet. */
66 public static final String XPATH_FACET = "/art:action/@art:type"; 66 public static final String XPATH_FACET = "/art:action/@art:type";
67 67
68 /** The out name to serve. */
69 protected String outName;
70
68 /** The document of the incoming out() request. */ 71 /** The document of the incoming out() request. */
69 protected Document request; 72 protected Document request;
70 73
71 /** The output stream where the data should be written to. */ 74 /** The output stream where the data should be written to. */
72 protected OutputStream out; 75 protected OutputStream out;
113 * @param data The artifact that stores the data that has to be 116 * @param data The artifact that stores the data that has to be
114 * exported. 117 * exported.
115 */ 118 */
116 protected abstract void addData(Object data); 119 protected abstract void addData(Object data);
117 120
118 121 public void setup(Object config) {
119 @Override 122 logger.debug("AbstractExporter.setup");
120 public void init(Document request, OutputStream out, CallContext context) { 123 }
124
125
126 @Override
127 public void init(
128 String outName,
129 Document request,
130 OutputStream out,
131 CallContext context
132 ) {
121 logger.debug("AbstractExporter.init"); 133 logger.debug("AbstractExporter.init");
122 134
135 this.outName = outName;
123 this.request = request; 136 this.request = request;
124 this.out = out; 137 this.out = out;
125 this.context = context; 138 this.context = context;
126 } 139 }
127 140

http://dive4elements.wald.intevation.org