BrightSide Workbench Full Report + Source Code
org.turro.web.funnel.graph.FunnelVertex Class Reference
Inheritance diagram for org.turro.web.funnel.graph.FunnelVertex:
Collaboration diagram for org.turro.web.funnel.graph.FunnelVertex:

Public Member Functions

 FunnelVertex (FunnelGraph graph, WebItem item)
 
boolean isActor ()
 
boolean isTarget ()
 
boolean isSolution ()
 
boolean isService ()
 
boolean isChain ()
 
boolean isWrong ()
 
String getWebTag ()
 
WebItemType getActingType ()
 
Set< FunnelVertexgetNexts ()
 
Set< FunnelVertexgetTargets ()
 
Set< FunnelVertexgetSolutions ()
 
Set< FunnelVertexgetServices ()
 
Set< FunnelVertexgetNeighborOf ()
 
Set< FunnelVertexgetSiblings ()
 
WebItem getItem ()
 
List< String > getGoalActions ()
 
String getWebPath (IConstructor constructor)
 
int hashCode ()
 
boolean equals (Object obj)
 
int compareTo (FunnelVertex o)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 42 of file FunnelVertex.java.

Constructor & Destructor Documentation

◆ FunnelVertex()

org.turro.web.funnel.graph.FunnelVertex.FunnelVertex ( FunnelGraph  graph,
WebItem  item 
)

Definition at line 47 of file FunnelVertex.java.

47  {
48  this.graph = graph;
49  this.item = item;
50  }
Here is the caller graph for this function:

Member Function Documentation

◆ compareTo()

int org.turro.web.funnel.graph.FunnelVertex.compareTo ( FunnelVertex  o)

Definition at line 184 of file FunnelVertex.java.

184  {
185  return Comparison.ascendant()
186  .compare(item.getOrdering(), o.getItem().getOrdering())
187  .compare(item.getWebTag(), o.getItem().getWebTag())
188  .get();
189  }
Here is the call graph for this function:

◆ equals()

boolean org.turro.web.funnel.graph.FunnelVertex.equals ( Object  obj)

Definition at line 167 of file FunnelVertex.java.

167  {
168  if (this == obj) {
169  return true;
170  }
171  if (obj == null) {
172  return false;
173  }
174  if (getClass() != obj.getClass()) {
175  return false;
176  }
177  final FunnelVertex other = (FunnelVertex) obj;
178  return Objects.equals(this.item, other.item);
179  }
FunnelVertex(FunnelGraph graph, WebItem item)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getActingType()

WebItemType org.turro.web.funnel.graph.FunnelVertex.getActingType ( )

Definition at line 80 of file FunnelVertex.java.

80  {
81  if(isActor()) return item.getType();
82  Set<WebItemType> types = GraphUtil.deepPredecessorListOf(graph, this, (v) -> v.isActor(), (v) -> v.isActor())
83  .stream().map(v -> v.getItem().getType())
84  .collect(Collectors.toSet());
85  if(types.isEmpty() || types.size() > 1) return null;
86  WebItemType type = CollectionUtil.from(types).first();
87  if(WebItemType.CHAIN.equals(type)) return null;
88  return type;
89  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getGoalActions()

List<String> org.turro.web.funnel.graph.FunnelVertex.getGoalActions ( )

Definition at line 144 of file FunnelVertex.java.

144  {
145  return item.getGoals().stream().map(g -> g.getGoalAction()).toList();
146  }
Here is the call graph for this function:

◆ getItem()

WebItem org.turro.web.funnel.graph.FunnelVertex.getItem ( )

Definition at line 140 of file FunnelVertex.java.

140  {
141  return item;
142  }
Here is the caller graph for this function:

◆ getNeighborOf()

Set<FunnelVertex> org.turro.web.funnel.graph.FunnelVertex.getNeighborOf ( )

Definition at line 117 of file FunnelVertex.java.

117  {
118  return Graphs.neighborSetOf(graph, this).stream()
119  .filter(vertex -> !vertex.equals(this))
120  .collect(Collectors.toSet());
121  }

◆ getNexts()

Set<FunnelVertex> org.turro.web.funnel.graph.FunnelVertex.getNexts ( )

Definition at line 91 of file FunnelVertex.java.

91  {
92  return Graphs.successorListOf(graph, this).stream().collect(Collectors.toCollection(TreeSet::new));
93  }
Here is the caller graph for this function:

◆ getServices()

Set<FunnelVertex> org.turro.web.funnel.graph.FunnelVertex.getServices ( )

Definition at line 110 of file FunnelVertex.java.

110  {
111  return switch(getActingType()) {
112  case TARGET, SOLUTION -> GraphUtil.deepSuccessorListOf(graph, this, (v) -> v.isService());
113  default -> Collections.EMPTY_SET;
114  };
115  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getSiblings()

Set<FunnelVertex> org.turro.web.funnel.graph.FunnelVertex.getSiblings ( )

Definition at line 123 of file FunnelVertex.java.

123  {
124  return switch(getActingType()) {
125  case TARGET -> graph.getTargets().stream()
126  .filter(v -> !v.equals(FunnelVertex.this))
127  .collect(Collectors.toCollection(TreeSet::new));
128  case SOLUTION -> getTargets().stream()
129  .flatMap(v -> v.getSolutions().stream())
130  .filter(v -> !v.equals(FunnelVertex.this))
131  .collect(Collectors.toCollection(TreeSet::new));
132  case SERVICE -> getSolutions().stream()
133  .flatMap(v -> v.getServices().stream())
134  .filter(v -> !v.equals(FunnelVertex.this))
135  .collect(Collectors.toCollection(TreeSet::new));
136  default -> Collections.EMPTY_SET;
137  };
138  }
Here is the call graph for this function:

◆ getSolutions()

Set<FunnelVertex> org.turro.web.funnel.graph.FunnelVertex.getSolutions ( )

Definition at line 102 of file FunnelVertex.java.

102  {
103  return switch(getActingType()) {
104  case TARGET -> GraphUtil.deepSuccessorListOf(graph, this, (v) -> v.isSolution());
105  case SERVICE -> GraphUtil.deepPredecessorListOf(graph, this, (v) -> v.isSolution());
106  default -> Collections.EMPTY_SET;
107  };
108  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTargets()

Set<FunnelVertex> org.turro.web.funnel.graph.FunnelVertex.getTargets ( )

Definition at line 95 of file FunnelVertex.java.

95  {
96  return switch(getActingType()) {
97  case SOLUTION, SERVICE -> GraphUtil.deepPredecessorListOf(graph, this, (v) -> v.isTarget());
98  default -> Collections.EMPTY_SET;
99  };
100  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getWebPath()

String org.turro.web.funnel.graph.FunnelVertex.getWebPath ( IConstructor  constructor)

Definition at line 148 of file FunnelVertex.java.

148  {
149  ElContext context = ElContextMap.getContextFromWebTag(item.getWebTag());
150  if(context != null) {
151  return context.getFullPath();
152  } else {
153  return TagsServlet.navigateAndSet(item.getWebTag(), constructor.getCurrentContext().getPath());
154  }
155  }
Here is the call graph for this function:

◆ getWebTag()

String org.turro.web.funnel.graph.FunnelVertex.getWebTag ( )

Definition at line 76 of file FunnelVertex.java.

76  {
77  return item.getWebTag();
78  }
Here is the call graph for this function:

◆ hashCode()

int org.turro.web.funnel.graph.FunnelVertex.hashCode ( )

Definition at line 160 of file FunnelVertex.java.

160  {
161  int hash = 7;
162  hash = 97 * hash + Objects.hashCode(this.item);
163  return hash;
164  }

◆ isActor()

boolean org.turro.web.funnel.graph.FunnelVertex.isActor ( )

Definition at line 52 of file FunnelVertex.java.

52  {
53  return !(isChain() || isWrong());
54  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isChain()

boolean org.turro.web.funnel.graph.FunnelVertex.isChain ( )

Definition at line 68 of file FunnelVertex.java.

68  {
69  return WebItemType.CHAIN.equals(item.getType());
70  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isService()

boolean org.turro.web.funnel.graph.FunnelVertex.isService ( )

Definition at line 64 of file FunnelVertex.java.

64  {
65  return WebItemType.SERVICE.equals(item.getType());
66  }
Here is the call graph for this function:

◆ isSolution()

boolean org.turro.web.funnel.graph.FunnelVertex.isSolution ( )

Definition at line 60 of file FunnelVertex.java.

60  {
61  return WebItemType.SOLUTION.equals(item.getType());
62  }
Here is the call graph for this function:

◆ isTarget()

boolean org.turro.web.funnel.graph.FunnelVertex.isTarget ( )

Definition at line 56 of file FunnelVertex.java.

56  {
57  return WebItemType.TARGET.equals(item.getType());
58  }
Here is the call graph for this function:

◆ isWrong()

boolean org.turro.web.funnel.graph.FunnelVertex.isWrong ( )

Definition at line 72 of file FunnelVertex.java.

72  {
73  return item.getType() == null;
74  }
Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: