BrightSide Workbench Full Report + Source Code
org.turro.jpa.embeddables.ComplexName Class Reference
Inheritance diagram for org.turro.jpa.embeddables.ComplexName:
Collaboration diagram for org.turro.jpa.embeddables.ComplexName:

Public Member Functions

String getInformal ()
 
void setInformal (String informal)
 
String getFormal ()
 
void setFormal (String formal)
 
String getFull ()
 
void setFull (String full)
 
String getFriendly ()
 
String getSerious ()
 
void guessFrom (String name, boolean entity)
 

Detailed Description

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

Definition at line 33 of file ComplexName.java.

Member Function Documentation

◆ getFormal()

String org.turro.jpa.embeddables.ComplexName.getFormal ( )

Definition at line 45 of file ComplexName.java.

45  {
46  return formal;
47  }
Here is the caller graph for this function:

◆ getFriendly()

String org.turro.jpa.embeddables.ComplexName.getFriendly ( )

Definition at line 63 of file ComplexName.java.

63  {
64  if(!Strings.isBlank(informal)) return getInformal();
65  return getSerious();
66  }
Here is the call graph for this function:

◆ getFull()

String org.turro.jpa.embeddables.ComplexName.getFull ( )

Definition at line 53 of file ComplexName.java.

53  {
54  return full;
55  }
Here is the caller graph for this function:

◆ getInformal()

String org.turro.jpa.embeddables.ComplexName.getInformal ( )

Definition at line 37 of file ComplexName.java.

37  {
38  return informal;
39  }
Here is the caller graph for this function:

◆ getSerious()

String org.turro.jpa.embeddables.ComplexName.getSerious ( )

Definition at line 68 of file ComplexName.java.

68  {
69  if(!Strings.isBlank(formal)) return getFormal();
70  return getFull();
71  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ guessFrom()

void org.turro.jpa.embeddables.ComplexName.guessFrom ( String  name,
boolean  entity 
)

Definition at line 75 of file ComplexName.java.

75  {
76  if(entity || isJuridical(name)) {
77  setFull(Strings.normalize(name));
78  setInformal(null);
79  setFormal(null);
80  } else {
81  String first = NamesDB.firstName(Strings.normalize(name));
82  if(!Strings.isBlank(first)) {
83  setFull(capitalize(name));
84  setInformal(first);
85  if(!Strings.isBlank(getInformal())) {
86  String remaining = Strings.killPrefix(getFull(), getInformal()).trim();
87  String surname = firstSurname(remaining);
88  if(!Strings.isBlank(surname)) {
89  setFormal(getInformal() + " " + surname);
90  }
91  }
92  }
93  }
94  normalize();
95  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setFormal()

void org.turro.jpa.embeddables.ComplexName.setFormal ( String  formal)

Definition at line 49 of file ComplexName.java.

49  {
50  this.formal = formal;
51  }
Here is the caller graph for this function:

◆ setFull()

void org.turro.jpa.embeddables.ComplexName.setFull ( String  full)

Definition at line 57 of file ComplexName.java.

57  {
58  this.full = full;
59  }
Here is the caller graph for this function:

◆ setInformal()

void org.turro.jpa.embeddables.ComplexName.setInformal ( String  informal)

Definition at line 41 of file ComplexName.java.

41  {
42  this.informal = informal;
43  }
Here is the caller graph for this function:

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