19 package org.turro.parser;
21 import java.util.Collections;
23 import org.turro.annotation.ExternalParser;
24 import org.turro.collections.CollectionUtil;
25 import org.turro.elephant.entities.web.WebGoal;
26 import org.turro.elephant.web.actions.WebLink;
27 import org.turro.elephant.web.tags.TagsServlet;
28 import org.turro.marker.ElephantMarker;
29 import org.turro.web.funnel.graph.FunnelGraphDOT;
30 import org.turro.web.funnel.graph.FunnelVertex;
31 import org.turro.web.funnel.model.FunnelVertices;
42 return "Elephant Web";
51 Set<FunnelVertex> vertices =
switch(
getToken(1)) {
54 default -> Collections.EMPTY_SET;
61 Set<FunnelVertex> vertices =
switch(
getToken(1)) {
64 default -> Collections.EMPTY_SET;
71 Set<FunnelVertex> vertices =
switch(
getToken(1)) {
74 default -> Collections.EMPTY_SET;
80 Set<FunnelVertex> vertices = fv.
nexts();
85 Set<FunnelVertex> vertices = fv.
siblings();
90 Set<WebGoal> goals = fv.
goals();
150 private void vertexMarker(Set<FunnelVertex> vertices, String
template) {
151 if(CollectionUtil.from(vertices).isEmpty())
return;
153 marker.
put(
"vertices", vertices);
155 out.write(marker.
parse(
"web/funnel",
template));
158 private void goalMarker(Set<WebGoal> goals, String
template) {
159 if(CollectionUtil.from(goals).isEmpty())
return;
160 ElephantMarker marker =
new ElephantMarker(
constructor);
161 marker.put(
"goals", goals);
162 out.write(marker.parse(
"web/funnel",
template));
165 private void linkMarker(Set<WebLink> links, String
template) {
166 ElephantMarker marker =
new ElephantMarker(
constructor);
167 marker.put(
"links", links);
168 out.write(marker.parse(
"web/funnel",
template));
String parse(String rootTmpl, String tmpl)
Object put(Object key, Object value)
String getToken(String name)
ParserMacro addMacro(String macroName)
ParserMacro addPossibleValue(String value)
void copyParametersFrom(String macroName, ParserMacroSet macros)
ParserMacro addParameter(String name, boolean optional)
void explainMacros(ParserMacroSet macros)
static void DOT(Writer writer)
Set< FunnelVertex > targets()
Set< FunnelVertex > nexts()
static FunnelVertices load(IConstructor constructor)
Set< FunnelVertex > services()
FunnelVertex currentSolution()
FunnelVertex getVertex(String webTag)
Set< FunnelVertex > siblings()
FunnelVertex currentService()
WebGoal getGoal(String goalAction)
FunnelVertices bySelection(boolean value)
FunnelVertex currentTarget()
Set< WebLink > externals()
Set< FunnelVertex > solutions()