Revision 36783
Added by Michele Artini about 9 years ago
modules/dnet-node-services/trunk/src/main/java/eu/dnetlib/msro/worker/nodes/SuccessFailureNode.java | ||
---|---|---|
38 | 38 |
|
39 | 39 |
@Override |
40 | 40 |
protected String execute(final NodeToken token) { |
41 |
|
|
42 |
System.out.println("\n\nAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\n\n"); |
|
43 |
|
|
41 | 44 |
final String profileId = token.getFullEnv().getAttribute(WorkflowConstants.SYSTEM_WF_PROFILE_ID).trim(); |
42 | 45 |
|
43 | 46 |
final long now = DateUtils.now(); |
modules/dnet-node-services/trunk/src/main/java/eu/dnetlib/msro/worker/nodes/transform/ApplyXsltJobNode.java | ||
---|---|---|
3 | 3 |
import java.util.HashMap; |
4 | 4 |
import java.util.Map; |
5 | 5 |
|
6 |
import javax.annotation.Resource; |
|
7 |
|
|
6 |
import org.springframework.beans.factory.annotation.Autowired; |
|
8 | 7 |
import org.springframework.core.io.ClassPathResource; |
9 | 8 |
|
10 | 9 |
import com.googlecode.sarasvati.Arc; |
... | ... | |
22 | 21 |
private String outputResultSetParam; |
23 | 22 |
private String xsltClasspath; |
24 | 23 |
|
25 |
@Resource
|
|
24 |
@Autowired
|
|
26 | 25 |
private ResultSetFactory resultSetFactory; |
27 | 26 |
|
28 | 27 |
@Override |
modules/dnet-node-services/trunk/src/main/java/eu/dnetlib/msro/worker/nodes/transform/MdBuilderJobNode.java | ||
---|---|---|
37 | 37 |
@Autowired |
38 | 38 |
private ResultSetFactory resultSetFactory; |
39 | 39 |
|
40 |
@javax.annotation.Resource
|
|
40 |
@Autowired
|
|
41 | 41 |
private DnetServiceLocator serviceLocator; |
42 | 42 |
|
43 | 43 |
@Override |
modules/dnet-node-services/trunk/src/main/java/eu/dnetlib/msro/worker/ui/ProcessJobIcon.java | ||
---|---|---|
1 |
package eu.dnetlib.msro.worker.ui; |
|
2 |
|
|
3 |
import java.awt.BasicStroke; |
|
4 |
import java.awt.Color; |
|
5 |
import java.awt.Font; |
|
6 |
import java.awt.Graphics2D; |
|
7 |
import java.awt.RenderingHints; |
|
8 |
|
|
9 |
import com.googlecode.sarasvati.JoinType; |
|
10 |
import com.googlecode.sarasvati.Node; |
|
11 |
import com.googlecode.sarasvati.NodeToken; |
|
12 |
import com.googlecode.sarasvati.visual.common.NodeDrawConfig; |
|
13 |
import com.googlecode.sarasvati.visual.icon.AbstractNodeIcon; |
|
14 |
import com.googlecode.sarasvati.visual.util.FontUtil; |
|
15 |
|
|
16 |
import eu.dnetlib.common.ifaces.ProgressProvider; |
|
17 |
import eu.dnetlib.msro.worker.WorkflowConstants; |
|
18 |
|
|
19 |
public class ProcessJobIcon extends AbstractNodeIcon { |
|
20 |
|
|
21 |
/** |
|
22 |
* node token. |
|
23 |
*/ |
|
24 |
private NodeToken token; |
|
25 |
|
|
26 |
/** |
|
27 |
* Progress Bar color. |
|
28 |
*/ |
|
29 |
private Color progressBarColor = Color.decode("#205fbc"); |
|
30 |
|
|
31 |
/** |
|
32 |
* Inaccurate Progress Bar color. |
|
33 |
*/ |
|
34 |
private Color inaccurateProgressBarColor = Color.DARK_GRAY; |
|
35 |
|
|
36 |
/** |
|
37 |
* Progress Bar background color. |
|
38 |
*/ |
|
39 |
private Color progressBarBGColor = Color.LIGHT_GRAY; |
|
40 |
|
|
41 |
/** |
|
42 |
* A progress provider to display |
|
43 |
*/ |
|
44 |
private ProgressProvider progressProvider; |
|
45 |
|
|
46 |
/** |
|
47 |
* corner radius. |
|
48 |
*/ |
|
49 |
protected static final int ROUND_CORNER = 10; |
|
50 |
|
|
51 |
/** |
|
52 |
* length of the space between dashes. |
|
53 |
*/ |
|
54 |
protected static final int DASH_EMPTY = 4; |
|
55 |
|
|
56 |
/** |
|
57 |
* length of the dash. |
|
58 |
*/ |
|
59 |
protected static final int DASH_FULL = 8; |
|
60 |
|
|
61 |
/** |
|
62 |
* font size. |
|
63 |
*/ |
|
64 |
protected static final int FONT_SIZE = 10; |
|
65 |
|
|
66 |
/** |
|
67 |
* node. |
|
68 |
*/ |
|
69 |
private Node node; |
|
70 |
|
|
71 |
/** |
|
72 |
* is join. |
|
73 |
* |
|
74 |
*/ |
|
75 |
private boolean join; |
|
76 |
|
|
77 |
/** |
|
78 |
* node label. |
|
79 |
*/ |
|
80 |
private String label; |
|
81 |
|
|
82 |
/** |
|
83 |
* node color. |
|
84 |
*/ |
|
85 |
private Color color; |
|
86 |
|
|
87 |
/** |
|
88 |
* dashes. |
|
89 |
*/ |
|
90 |
private float[] dashes; |
|
91 |
|
|
92 |
/** |
|
93 |
* true if terminal node. |
|
94 |
*/ |
|
95 |
private boolean terminal; |
|
96 |
|
|
97 |
private boolean failed; |
|
98 |
|
|
99 |
public ProcessJobIcon(final Node node, final NodeToken token, final ProgressProvider progressProvider) { |
|
100 |
super(); |
|
101 |
|
|
102 |
this.node = node; |
|
103 |
this.label = node.getAdaptor(String.class); |
|
104 |
|
|
105 |
if (label == null) { |
|
106 |
label = node.getName(); |
|
107 |
} |
|
108 |
|
|
109 |
this.join = node.getJoinType() == null ? false : node.getJoinType() != JoinType.OR; |
|
110 |
this.color = Color.lightGray; |
|
111 |
|
|
112 |
if (join) { |
|
113 |
dashes = new float[] { DASH_FULL, DASH_EMPTY }; |
|
114 |
} |
|
115 |
|
|
116 |
this.terminal = node.getGraph().getOutputArcs(node).size() == 0; |
|
117 |
this.token = token; |
|
118 |
this.progressProvider = progressProvider; |
|
119 |
|
|
120 |
setColor(NodeDrawConfig.getColor(token)); |
|
121 |
|
|
122 |
if (token != null && token.getEnv() != null && "true".equals(token.getEnv().getAttribute(WorkflowConstants.SYSTEM_HAS_FAILED))) { |
|
123 |
setFailed(true); |
|
124 |
setColor(Color.RED); |
|
125 |
} |
|
126 |
|
|
127 |
if (isJoin()) { |
|
128 |
setDashes(new float[] { DASH_FULL, DASH_EMPTY }); |
|
129 |
} |
|
130 |
|
|
131 |
setTerminal(node.getGraph().getOutputArcs(node).size() == 0); |
|
132 |
|
|
133 |
redrawImage(); |
|
134 |
} |
|
135 |
|
|
136 |
public void resetGfx(final Graphics2D gfx) { |
|
137 |
gfx.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); |
|
138 |
gfx.setFont(Font.getFont(Font.MONOSPACED)); |
|
139 |
|
|
140 |
if (isTerminal()) { |
|
141 |
gfx.setFont(gfx.getFont().deriveFont(Font.BOLD)); |
|
142 |
} |
|
143 |
|
|
144 |
gfx.setColor(color); |
|
145 |
} |
|
146 |
|
|
147 |
public boolean isJoin() { |
|
148 |
return join; |
|
149 |
} |
|
150 |
|
|
151 |
public void setJoin(final boolean join) { |
|
152 |
this.join = join; |
|
153 |
} |
|
154 |
|
|
155 |
public String getLabel() { |
|
156 |
return label; |
|
157 |
} |
|
158 |
|
|
159 |
public void setLabel(final String label) { |
|
160 |
this.label = label; |
|
161 |
} |
|
162 |
|
|
163 |
public Color getColor() { |
|
164 |
return color; |
|
165 |
} |
|
166 |
|
|
167 |
public void setColor(final Color color) { |
|
168 |
this.color = color; |
|
169 |
} |
|
170 |
|
|
171 |
public float[] getDashes() { |
|
172 |
return dashes; // NOPMD |
|
173 |
} |
|
174 |
|
|
175 |
public void setDashes(final float[] dashes) { // NOPMD |
|
176 |
this.dashes = dashes; |
|
177 |
} |
|
178 |
|
|
179 |
public Node getNode() { |
|
180 |
return node; |
|
181 |
} |
|
182 |
|
|
183 |
public void setNode(final Node node) { |
|
184 |
this.node = node; |
|
185 |
} |
|
186 |
|
|
187 |
public boolean isTerminal() { |
|
188 |
return terminal; |
|
189 |
} |
|
190 |
|
|
191 |
public void setTerminal(final boolean terminal) { |
|
192 |
this.terminal = terminal; |
|
193 |
} |
|
194 |
|
|
195 |
public boolean isFailed() { |
|
196 |
return failed; |
|
197 |
} |
|
198 |
|
|
199 |
public void setFailed(final boolean failed) { |
|
200 |
this.failed = failed; |
|
201 |
} |
|
202 |
|
|
203 |
@Override |
|
204 |
public void redrawImage(final Graphics2D gfx) { |
|
205 |
resetGfx(gfx); |
|
206 |
|
|
207 |
gfx.fillRoundRect(0, 0, WIDTH - 1, HEIGHT - 1, ROUND_CORNER, ROUND_CORNER); |
|
208 |
|
|
209 |
gfx.setColor(NodeDrawConfig.NODE_BORDER); |
|
210 |
final BasicStroke stroke = new BasicStroke(2, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER, 10, getDashes(), 0); |
|
211 |
gfx.setStroke(stroke); |
|
212 |
gfx.drawRoundRect(0, 0, WIDTH - 1, HEIGHT - 1, ROUND_CORNER, ROUND_CORNER); |
|
213 |
|
|
214 |
gfx.setColor(Color.white); |
|
215 |
final int padding = 6; |
|
216 |
final int startX = padding; |
|
217 |
final int maxWidth = getIconWidth() - (padding << 1); |
|
218 |
FontUtil.setSizedFont(gfx, getLabel(), FONT_SIZE, maxWidth); |
|
219 |
final int strWidth = (int) Math.ceil(gfx.getFontMetrics().getStringBounds(getLabel(), gfx).getWidth()); |
|
220 |
final int strHeight = gfx.getFontMetrics().getAscent(); |
|
221 |
final int left = startX + (maxWidth - strWidth >> 1); |
|
222 |
final int top = getIconHeight() + strHeight >> 1; |
|
223 |
gfx.drawString(getLabel(), left, top); |
|
224 |
|
|
225 |
if (progressProvider != null && token != null && !token.isComplete()) { |
|
226 |
drawProgressBar(gfx); |
|
227 |
} |
|
228 |
|
|
229 |
resetGfx(gfx); |
|
230 |
} |
|
231 |
|
|
232 |
private void drawProgressBar(final Graphics2D gfx) { |
|
233 |
int total = progressProvider.getProgressTotal(); |
|
234 |
int current = progressProvider.getProgressPosition(); |
|
235 |
|
|
236 |
if (progressProvider.isProgressInaccurate() || current > total) { |
|
237 |
gfx.setColor(inaccurateProgressBarColor); |
|
238 |
final String text = Integer.toString(current); |
|
239 |
final int strWidth = (int) Math.ceil(gfx.getFontMetrics().getStringBounds(text, gfx).getWidth()); |
|
240 |
gfx.drawString(text, getIconWidth() - strWidth - 7, getIconHeight() - 3); |
|
241 |
} else { |
|
242 |
int x = 6; |
|
243 |
int y = getIconHeight() - 6; |
|
244 |
|
|
245 |
int widthTot = getIconWidth() - x - x; |
|
246 |
|
|
247 |
int height = 2; |
|
248 |
gfx.setColor(progressBarBGColor); |
|
249 |
gfx.fillRect(x, y, widthTot, height); |
|
250 |
|
|
251 |
gfx.setColor(progressBarColor); |
|
252 |
int widthCurr = 0; |
|
253 |
if (total > 0) { |
|
254 |
widthCurr = Math.round(widthTot * current / total); |
|
255 |
} |
|
256 |
gfx.fillRect(x, y, widthCurr, height); |
|
257 |
} |
|
258 |
} |
|
259 |
|
|
260 |
public NodeToken getToken() { |
|
261 |
return token; |
|
262 |
} |
|
263 |
|
|
264 |
public void setToken(final NodeToken token) { |
|
265 |
this.token = token; |
|
266 |
} |
|
267 |
|
|
268 |
public Color getProgressBarColor() { |
|
269 |
return progressBarColor; |
|
270 |
} |
|
271 |
|
|
272 |
public void setProgressBarColor(final Color progressBarColor) { |
|
273 |
this.progressBarColor = progressBarColor; |
|
274 |
} |
|
275 |
|
|
276 |
public Color getProgressBarBGColor() { |
|
277 |
return progressBarBGColor; |
|
278 |
} |
|
279 |
|
|
280 |
public void setProgressBarBGColor(final Color progressBarBGColor) { |
|
281 |
this.progressBarBGColor = progressBarBGColor; |
|
282 |
} |
|
283 |
|
|
284 |
public Color getInaccurateProgressBarColor() { |
|
285 |
return inaccurateProgressBarColor; |
|
286 |
} |
|
287 |
|
|
288 |
public void setInaccurateProgressBarColor(final Color inaccurateProgressBarColor) { |
|
289 |
this.inaccurateProgressBarColor = inaccurateProgressBarColor; |
|
290 |
} |
|
291 |
|
|
292 |
public ProgressProvider getProgressProvider() { |
|
293 |
return progressProvider; |
|
294 |
} |
|
295 |
|
|
296 |
public void setProgressProvider(final ProgressProvider progressProvider) { |
|
297 |
this.progressProvider = progressProvider; |
|
298 |
} |
|
299 |
} |
modules/dnet-node-services/trunk/src/main/java/eu/dnetlib/msro/worker/ui/ProcessToImageMapHelper.java | ||
---|---|---|
1 |
package eu.dnetlib.msro.worker.ui; |
|
2 |
|
|
3 |
import javax.swing.Icon; |
|
4 |
|
|
5 |
import com.googlecode.sarasvati.Node; |
|
6 |
import com.googlecode.sarasvati.visual.ProcessToImageMapAdapter; |
|
7 |
import com.googlecode.sarasvati.visual.process.VisualProcessNode; |
|
8 |
|
|
9 |
import eu.dnetlib.common.ifaces.ProgressProvider; |
|
10 |
import eu.dnetlib.msro.worker.nodes.ProgressJobNode; |
|
11 |
|
|
12 |
public class ProcessToImageMapHelper extends ProcessToImageMapAdapter { |
|
13 |
|
|
14 |
private String procId; |
|
15 |
|
|
16 |
public ProcessToImageMapHelper(final String procId) { |
|
17 |
super(); |
|
18 |
this.procId = procId; |
|
19 |
} |
|
20 |
|
|
21 |
@Override |
|
22 |
public String hrefForNode(final VisualProcessNode node) { |
|
23 |
return "javascript:getScope('map').getProcessNodeDetails('" + procId + "', '" + node.getNode().getId() + "')"; |
|
24 |
} |
|
25 |
|
|
26 |
@Override |
|
27 |
public String hoverForNode(final VisualProcessNode vnode) { |
|
28 |
final Node node = vnode.getNode(); |
|
29 |
if (node instanceof ProgressJobNode) { |
|
30 |
final ProgressProvider progress = ((ProgressJobNode) node).getProgressProvider(); |
|
31 |
if (progress == null) { |
|
32 |
return "Processed: -"; |
|
33 |
} else if (progress.isProgressInaccurate()) { |
|
34 |
return "Processed: " + progress.getProgressPosition(); |
|
35 |
} else { |
|
36 |
return "Processed: " + progress.getProgressPosition() + " - Total: " + progress.getProgressTotal(); |
|
37 |
} |
|
38 |
} else { |
|
39 |
return "Name: " + node.getName(); |
|
40 |
} |
|
41 |
} |
|
42 |
|
|
43 |
@Override |
|
44 |
public Icon iconForNode(final VisualProcessNode vnode) { |
|
45 |
final Node node = vnode.getNode(); |
|
46 |
|
|
47 |
final ProgressProvider progressProvider = node instanceof ProgressJobNode ? ((ProgressJobNode) node).getProgressProvider() : null; |
|
48 |
|
|
49 |
return new ProcessJobIcon(node, vnode.getToken(), progressProvider); |
|
50 |
} |
|
51 |
} |
modules/dnet-node-services/trunk/src/main/java/eu/dnetlib/msro/worker/ui/WorkflowStatusController.java | ||
---|---|---|
1 |
package eu.dnetlib.msro.worker.ui; |
|
2 |
|
|
3 |
import java.awt.image.BufferedImage; |
|
4 |
import java.io.IOException; |
|
5 |
import java.io.OutputStream; |
|
6 |
|
|
7 |
import javax.imageio.ImageIO; |
|
8 |
import javax.servlet.http.HttpServletResponse; |
|
9 |
|
|
10 |
import org.apache.commons.io.IOUtils; |
|
11 |
import org.springframework.beans.factory.annotation.Autowired; |
|
12 |
import org.springframework.stereotype.Controller; |
|
13 |
import org.springframework.web.bind.annotation.PathVariable; |
|
14 |
import org.springframework.web.bind.annotation.RequestMapping; |
|
15 |
import org.springframework.web.bind.annotation.RequestMethod; |
|
16 |
import org.springframework.web.bind.annotation.ResponseBody; |
|
17 |
|
|
18 |
import com.googlecode.sarasvati.GraphProcess; |
|
19 |
import com.googlecode.sarasvati.visual.ProcessImageMapCreator; |
|
20 |
|
|
21 |
import eu.dnetlib.msro.worker.WorkflowRegistry; |
|
22 |
|
|
23 |
@Controller |
|
24 |
@RequestMapping("/msro/process") |
|
25 |
public class WorkflowStatusController { |
|
26 |
|
|
27 |
@Autowired |
|
28 |
private WorkflowRegistry registry; |
|
29 |
|
|
30 |
@RequestMapping(value = "/{procId}/image", method = RequestMethod.GET) |
|
31 |
public void getProcessImage(final HttpServletResponse response, @PathVariable final String procId) throws IOException { |
|
32 |
final OutputStream out = response.getOutputStream(); |
|
33 |
response.setContentType("image/png"); |
|
34 |
|
|
35 |
final GraphProcess proc = registry.findProcess(procId); |
|
36 |
if (proc != null) { |
|
37 |
try { |
|
38 |
final ProcessImageMapCreator imageMapCreator = new ProcessImageMapCreator(proc, new ProcessToImageMapHelper(procId)); |
|
39 |
final BufferedImage image = imageMapCreator.getImage(); |
|
40 |
ImageIO.write(image, "png", out); |
|
41 |
} catch (Throwable e) { |
|
42 |
IOUtils.copy(getClass().getResourceAsStream("/eu/dnetlib/msro/worker/ui/wf_problem.png"), out); |
|
43 |
} |
|
44 |
} else { |
|
45 |
IOUtils.copy(getClass().getResourceAsStream("/eu/dnetlib/msro/worker/ui/wf_not_found.png"), out); |
|
46 |
} |
|
47 |
out.flush(); |
|
48 |
out.close(); |
|
49 |
} |
|
50 |
|
|
51 |
@RequestMapping(value = "/{procId}/map", method = RequestMethod.GET) |
|
52 |
public @ResponseBody |
|
53 |
String getProcessImageMap(@PathVariable final String procId) throws Exception { |
|
54 |
final GraphProcess proc = registry.findProcess(procId); |
|
55 |
if (proc != null) { |
|
56 |
try { |
|
57 |
final ProcessImageMapCreator imageMapCreator = new ProcessImageMapCreator(proc, new ProcessToImageMapHelper(procId)); |
|
58 |
return imageMapCreator.getMapContents(); |
|
59 |
} catch (Throwable e) {} |
|
60 |
} |
|
61 |
return ""; |
|
62 |
} |
|
63 |
|
|
64 |
} |
modules/dnet-node-services/trunk/src/main/resources/eu/dnetlib/enabling/nodeManager/applicationContext-nodeManager-service.properties | ||
---|---|---|
4 | 4 |
dnet.init.ds.startDelay = 30000 |
5 | 5 |
dnet.init.ds.package = eu.dnetlib.enabling.datastructures |
6 | 6 |
dnet.init.ds.path = classpath*:/eu/dnetlib/enabling/is/setup/ds/**/*.xml |
7 |
|
|
8 |
dnet.msro.launch.wfs.startDelay = 35000 |
|
9 |
dnet.msro.launch.wfs.repeatInterval = 10000 |
modules/dnet-node-services/trunk/src/main/resources/eu/dnetlib/enabling/nodeManager/applicationContext-nodeManager-service.xml | ||
---|---|---|
57 | 57 |
p:targetObject-ref="nodeContentInitializer" p:targetMethod="init" /> |
58 | 58 |
</property> |
59 | 59 |
</bean> |
60 |
<bean class="org.springframework.scheduling.quartz.SimpleTriggerBean" |
|
61 |
p:startDelay="${dnet.msro.launch.wfs.startDelay}" |
|
62 |
p:repeatInterval="${dnet.msro.launch.wfs.repeatInterval}"> |
|
63 |
<property name="jobDetail"> |
|
64 |
<bean class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean" |
|
65 |
p:targetObject-ref="workflowLauncher" p:targetMethod="startsWfsInQueue" /> |
|
66 |
</property> |
|
67 |
</bean> |
|
60 | 68 |
</list> |
61 | 69 |
</property> |
62 | 70 |
</bean> |
modules/dnet-node-services/trunk/src/main/resources/eu/dnetlib/msro/worker/applicationContext-manager-wf-nodes.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<beans xmlns="http://www.springframework.org/schema/beans" |
|
3 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws" |
|
4 |
xmlns:sec="http://cxf.apache.org/configuration/security" xmlns:wsa="http://cxf.apache.org/ws/addressing" |
|
5 |
xmlns:p="http://www.springframework.org/schema/p" xmlns:http="http://cxf.apache.org/transports/http/configuration" |
|
6 |
xmlns:t="http://dnetlib.eu/springbeans/t" xmlns:template="http://dnetlib.eu/springbeans/template" |
|
7 |
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd |
|
8 |
http://cxf.apache.org/ws/addressing http://cxf.apache.org/schemas/ws-addr-conf.xsd |
|
9 |
http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd |
|
10 |
http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd |
|
11 |
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd |
|
12 |
http://dnetlib.eu/springbeans/template http://dnetlib.eu/springbeans/template.xsd"> |
|
13 |
<!-- System nodes --> |
|
14 |
<bean id="wfNodeSuccess" class="eu.dnetlib.msro.worker.nodes.SuccessFailureNode" p:success="true" scope="prototype" /> |
|
15 |
<bean id="wfNodeFailure" class="eu.dnetlib.msro.worker.nodes.SuccessFailureNode" p:success="false" scope="prototype" /> |
|
16 |
|
|
17 |
<!-- Simple nodes --> |
|
18 |
<bean id="wfNodeSelection" class="eu.dnetlib.msro.worker.nodes.sel.SelectiveNode" |
|
19 |
scope="prototype" /> |
|
20 |
|
|
21 |
<!-- Datasources --> |
|
22 |
<bean id="wfNodeSetProviderInfo" |
|
23 |
class="eu.dnetlib.msro.worker.nodes.info.SetProviderInfoJobNode" |
|
24 |
scope="prototype" /> |
|
25 |
|
|
26 |
<bean id="wfNodeValidateDatasource" |
|
27 |
class="eu.dnetlib.msro.worker.nodes.repohi.ValidateDatasourceJobNode" |
|
28 |
scope="prototype" /> |
|
29 |
|
|
30 |
<bean id="wfNodeVerifyDatasource" |
|
31 |
class="eu.dnetlib.msro.worker.nodes.repohi.VerifyDatasourceJobNode" |
|
32 |
scope="prototype" /> |
|
33 |
|
|
34 |
<!-- Unpack --> |
|
35 |
<bean id="wfNodeUnpack" class="eu.dnetlib.msro.worker.nodes.unpack.UnpackJobNode" |
|
36 |
scope="prototype" /> |
|
37 |
|
|
38 |
<!-- ObjectStore --> |
|
39 |
|
|
40 |
<bean id="wfNodeCreateObjectStore" |
|
41 |
class="eu.dnetlib.msro.worker.nodes.objectStore.CreateObjectStoreJobNode" |
|
42 |
scope="prototype" /> |
|
43 |
<bean id="wfNodeDeleteObjectStore" |
|
44 |
class="eu.dnetlib.msro.worker.nodes.objectStore.DeleteObjectStoreJobNode" |
|
45 |
scope="prototype" /> |
|
46 |
|
|
47 |
<bean id="wfNodeRetrieveURLS" |
|
48 |
class="eu.dnetlib.msro.worker.nodes.objectStore.RetrieveURLSJobNode" |
|
49 |
p:xpathMetadataId="${msro.wf.nodes.download.xpathMetadataId}" scope="prototype" /> |
|
50 |
|
|
51 |
<!-- Download Service --> |
|
52 |
<bean id="wfNodeRetrieveMdStoreId" |
|
53 |
class="eu.dnetlib.msro.worker.nodes.objectStore.RetrieveMdStoreId" |
|
54 |
p:metadataFormat="${msro.wf.nodes.mdstoreSearch.format}" |
|
55 |
p:interpretation="${msro.wf.nodes.mdstoreSearch.interpretation}" /> |
|
56 |
|
|
57 |
<bean id="wfNodeDownloadFromMetadata" |
|
58 |
class="eu.dnetlib.msro.worker.nodes.download.DownloadFromMetadataJobNode" |
|
59 |
scope="prototype" /> |
|
60 |
|
|
61 |
<bean id="wfNodeUpdateObjectStoreSize" |
|
62 |
class="eu.dnetlib.msro.worker.nodes.objectStore.UpdateObjectStoreSizeJobNode" |
|
63 |
scope="prototype" /> |
|
64 |
|
|
65 |
<!-- Collector service --> |
|
66 |
<bean id="wfNodeCollectRecords" |
|
67 |
class="eu.dnetlib.msro.worker.nodes.collect.CollectRecordsJobNode" |
|
68 |
scope="prototype" /> |
|
69 |
|
|
70 |
<bean id="wfNodeDateRangeCollectRecords" |
|
71 |
class="eu.dnetlib.msro.worker.nodes.collect.DateRangeCollectRecordsJobNode" |
|
72 |
scope="prototype" /> |
|
73 |
|
|
74 |
<bean id="wfNodeFindDateRangeForIncrementalHarvesting" |
|
75 |
class="eu.dnetlib.msro.worker.nodes.collect.FindDateRangeForIncrementalHarvestingJobNode" |
|
76 |
scope="prototype" /> |
|
77 |
|
|
78 |
<bean id="wfNodeMdBuilder" |
|
79 |
class="eu.dnetlib.msro.worker.nodes.transform.MdBuilderJobNode" |
|
80 |
p:mdBuilderTemplateXslt="${msro.wf.nodes.mdbuilder.xslt.template}" |
|
81 |
scope="prototype" /> |
|
82 |
|
|
83 |
<!-- Transform --> |
|
84 |
<bean id="wfNodeTransform" |
|
85 |
class="eu.dnetlib.msro.worker.nodes.transform.TransformJobNode" |
|
86 |
scope="prototype" /> |
|
87 |
|
|
88 |
<bean id="wfNodeApplyXslt" |
|
89 |
class="eu.dnetlib.msro.worker.nodes.transform.ApplyXsltJobNode" |
|
90 |
scope="prototype" /> |
|
91 |
|
|
92 |
<bean id="wfNodeGroovy" class="eu.dnetlib.msro.worker.nodes.transform.GroovyJobNode" |
|
93 |
scope="prototype" /> |
|
94 |
|
|
95 |
<bean id="wfNodeClean" class="eu.dnetlib.msro.worker.nodes.transform.CleanJobNode" |
|
96 |
scope="prototype" /> |
|
97 |
|
|
98 |
<!-- Index --> |
|
99 |
<bean id="wfNodeUpdateIndex" |
|
100 |
class="eu.dnetlib.msro.worker.nodes.index.UpdateIndexJobNode" |
|
101 |
scope="prototype" |
|
102 |
p:layoutToRecordStylesheet="classpath:/eu/dnetlib/msro/workflows/xslt/layoutToRecordStylesheet.xsl" |
|
103 |
p:defaultIndexId="${msro.wf.nodes.index.defaultIndex}" /> |
|
104 |
|
|
105 |
<bean id="wfNodeCreateIndex" |
|
106 |
class="eu.dnetlib.msro.worker.nodes.index.CreateIndexJobNode" |
|
107 |
scope="prototype" p:defaultBackendId="${msro.wf.nodes.index.defaultIndex}" /> |
|
108 |
|
|
109 |
<bean id="wfNodeDeleteIndex" |
|
110 |
class="eu.dnetlib.msro.worker.nodes.index.DeleteIndexJobNode" |
|
111 |
scope="prototype" p:defaultIndexId="${msro.wf.nodes.index.defaultIndex}" /> |
|
112 |
|
|
113 |
<bean id="wfNodePrepareCreateIndex" |
|
114 |
class="eu.dnetlib.msro.worker.nodes.index.PrepareCreateIndexJobNode" |
|
115 |
scope="prototype" /> |
|
116 |
|
|
117 |
<!-- Database --> |
|
118 |
<bean id="wfNodeUpdateDb" class="eu.dnetlib.msro.worker.nodes.db.UpdateDbJobNode" |
|
119 |
scope="prototype" /> |
|
120 |
|
|
121 |
<bean id="wfNodeQueryDb" class="eu.dnetlib.msro.worker.nodes.db.QueryDbJobNode" |
|
122 |
scope="prototype" /> |
|
123 |
|
|
124 |
<bean id="wfNodeExecuteSql" class="eu.dnetlib.msro.worker.nodes.db.ExecuteSqlJobNode" |
|
125 |
scope="prototype" /> |
|
126 |
|
|
127 |
<!-- MDStore --> |
|
128 |
<bean id="wfNodeCreateMDStore" |
|
129 |
class="eu.dnetlib.msro.worker.nodes.mdstore.CreateMDStoreJobNode" |
|
130 |
scope="prototype" /> |
|
131 |
|
|
132 |
<bean id="wfNodeStoreMDStoreRecords" |
|
133 |
class="eu.dnetlib.msro.worker.nodes.mdstore.StoreMDStoreRecordsJobNode" |
|
134 |
scope="prototype" /> |
|
135 |
|
|
136 |
<bean id="wfNodeFetchMDStoreRecords" |
|
137 |
class="eu.dnetlib.msro.worker.nodes.mdstore.FetchMDStoreRecordsJobNode" |
|
138 |
scope="prototype" /> |
|
139 |
|
|
140 |
<bean id="wfNodeFetchMultipleMDStoreRecords" |
|
141 |
class="eu.dnetlib.msro.worker.nodes.mdstore.FetchMultipleMDStores" |
|
142 |
scope="prototype" /> |
|
143 |
|
|
144 |
<bean id="wfNodeMDStoreToApiExtraField" |
|
145 |
class="eu.dnetlib.msro.worker.nodes.info.MDStoreToApiExtraFieldJobNode" |
|
146 |
scope="prototype" /> |
|
147 |
|
|
148 |
<bean id="wfNodeObjectStoreToApiExtraField" |
|
149 |
class="eu.dnetlib.msro.worker.nodes.info.ObjectStoreToApiExtraFieldJobNode" |
|
150 |
scope="prototype" /> |
|
151 |
|
|
152 |
<bean id="wfNodeRemoveApiExtraFields" |
|
153 |
class="eu.dnetlib.msro.worker.nodes.info.RemoveApiExtraFieldsJobNode" |
|
154 |
scope="prototype" /> |
|
155 |
|
|
156 |
<bean id="wfNodeSetFormatInfo" class="eu.dnetlib.msro.worker.nodes.SetFormatInfoJobNode" |
|
157 |
scope="prototype" /> |
|
158 |
|
|
159 |
<bean id="wfNodeSetEnvParameter" class="eu.dnetlib.msro.worker.nodes.SetEnvParameterJobNode" |
|
160 |
scope="prototype" /> |
|
161 |
|
|
162 |
</beans> |
modules/dnet-node-services/trunk/src/main/resources/eu/dnetlib/msro/worker/applicationContext-manager-wf-nodes.properties | ||
---|---|---|
1 |
msro.wf.nodes.index.defaultIndex = solr |
|
2 |
msro.wf.nodes.download.xpathMetadataId = //*[local-name()='objIdentifier'] |
|
3 |
msro.wf.nodes.mdstoreSearch.format = DMF |
|
4 |
msro.wf.nodes.mdstoreSearch.interprettion = cleaned |
|
5 |
msro.wf.nodes.mdbuilder.xslt.template = classpath:/eu/dnetlib/msro/workflows/xslt/mdBuilder.xslt.st |
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
modules/dnet-node-services/trunk/.springBeans | ||
---|---|---|
10 | 10 |
<config>src/main/resources/eu/dnetlib/data/resultSet/applicationContext-resultSet-service.xml</config> |
11 | 11 |
<config>src/main/resources/eu/dnetlib/enabling/is/applicationContext-is-client.xml</config> |
12 | 12 |
<config>src/main/resources/eu/dnetlib/msro/worker/applicationContext-manager-worker-service.xml</config> |
13 |
<config>src/main/resources/eu/dnetlib/msro/worker/applicationContext-manager-wf-nodes.xml</config> |
|
13 | 14 |
</configs> |
14 | 15 |
<autoconfigs> |
15 | 16 |
</autoconfigs> |
modules/dnet-node-services/trunk/pom.xml | ||
---|---|---|
41 | 41 |
<artifactId>sarasvati-visual</artifactId> |
42 | 42 |
<version>1.0.3</version> |
43 | 43 |
</dependency> |
44 |
<dependency> |
|
45 |
<groupId>javax.servlet</groupId> |
|
46 |
<artifactId>javax.servlet-api</artifactId> |
|
47 |
<version>${javax.servlet.version}</version> |
|
48 |
<scope>provided</scope> |
|
49 |
</dependency> |
|
44 | 50 |
|
45 | 51 |
<!-- Tests --> |
46 | 52 |
<dependency> |
Also available in: Unified diff
Wf visualization