BrightSide Workbench Full Report + Source Code
org.turro.entities.graph.EntityVertex Class Reference

Public Member Functions

 EntityVertex (String entityPath, String name)
 
String getIdentifier ()
 
String getName ()
 
String getColor ()
 
String getFontColor ()
 
boolean isSource ()
 
void setSource (boolean source)
 
int hashCode ()
 
boolean equals (Object obj)
 

Detailed Description

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

Definition at line 29 of file EntityVertex.java.

Constructor & Destructor Documentation

◆ EntityVertex()

org.turro.entities.graph.EntityVertex.EntityVertex ( String  entityPath,
String  name 
)

Definition at line 34 of file EntityVertex.java.

34  {
35  this.entityPath = entityPath;
36  this.name = name;
37  }
Here is the caller graph for this function:

Member Function Documentation

◆ equals()

boolean org.turro.entities.graph.EntityVertex.equals ( Object  obj)

Definition at line 87 of file EntityVertex.java.

87  {
88  if (this == obj) {
89  return true;
90  }
91  if (obj == null) {
92  return false;
93  }
94  if (getClass() != obj.getClass()) {
95  return false;
96  }
97  final EntityVertex other = (EntityVertex) obj;
98  return Objects.equals(this.entityPath, other.entityPath);
99  }
EntityVertex(String entityPath, String name)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getColor()

String org.turro.entities.graph.EntityVertex.getColor ( )

Definition at line 47 of file EntityVertex.java.

47  {
48  return switch(Path.pathFrom(entityPath).getRoot()) {
49  case "contact" -> (source ? "#fbbd08" : "#a5673f");
50  case "dossier-category" -> "#e03997";
51  case "dossier" -> "#a333c8";
52  case "issue" -> "#6435c9";
53  case "publication" -> "#21ba45";
54  default -> "#777777";
55  };
56  }
Here is the caller graph for this function:

◆ getFontColor()

String org.turro.entities.graph.EntityVertex.getFontColor ( )

Definition at line 58 of file EntityVertex.java.

58  {
59  return Colors.of(getColor()).font().css();
60  }
Here is the call graph for this function:

◆ getIdentifier()

String org.turro.entities.graph.EntityVertex.getIdentifier ( )

Definition at line 39 of file EntityVertex.java.

39  {
40  return entityPath;
41  }

◆ getName()

String org.turro.entities.graph.EntityVertex.getName ( )

Definition at line 43 of file EntityVertex.java.

43  {
44  return escape(name);
45  }

◆ hashCode()

int org.turro.entities.graph.EntityVertex.hashCode ( )

Definition at line 80 of file EntityVertex.java.

80  {
81  int hash = 5;
82  hash = 29 * hash + Objects.hashCode(this.entityPath);
83  return hash;
84  }

◆ isSource()

boolean org.turro.entities.graph.EntityVertex.isSource ( )

Definition at line 62 of file EntityVertex.java.

62  {
63  return source;
64  }

◆ setSource()

void org.turro.entities.graph.EntityVertex.setSource ( boolean  source)

Definition at line 66 of file EntityVertex.java.

66  {
67  this.source = source;
68  }
Here is the caller graph for this function:

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