11nameapi-client-java
22===================
33
4- Java Client for the NameAPI Web Services at https://www.nameapi.org
4+ Java Client for the NameAPI Web Services at https://www.nameapi.org .
55
66There are functional tests that demonstrate how to use this library.
77
@@ -76,7 +76,7 @@ This code sends a simple ping to nameapi to test the connection:
7676import org.nameapi.client.services.system.ping.PingCommand ;
7777
7878PingCommand command = new PingCommand ();
79- executor. execute(command, mode, null ). get(); // returns "pong"
79+ executor. execute(command, mode, null ). get(); // returns "pong"
8080```
8181
8282## Input / Output
@@ -107,7 +107,7 @@ import org.nameapi.ontology5.input.entities.person.name.InputPersonName;
107107import org.nameapi.ontology5.input.entities.person.name.builder.NameBuilders ;
108108
109109InputPersonName name = NameBuilders . western(). fullname(" John F. Kennedy" ). build();
110- InputPerson inputPerson = new NaturalInputPersonBuilder (). name(name). build();
110+ InputPerson inputPerson = new NaturalInputPersonBuilder (). name(name). build();
111111```
112112
113113
@@ -132,7 +132,7 @@ import org.nameapi.client.services.parser.personnameparser.PersonNameParserComma
132132import org.nameapi.ontology5.services.parser.personnameparser.PersonNameParserResult ;
133133
134134PersonNameParserCommand command = new PersonNameParserCommand ();
135- PersonNameParserResult result = executor. execute(command, mode, inputPerson). get();
135+ PersonNameParserResult result = executor. execute(command, mode, inputPerson). get();
136136```
137137
138138
@@ -147,7 +147,7 @@ import org.nameapi.client.services.genderizer.persongenderizer.PersonGenderizerC
147147import org.nameapi.ontology5.services.genderizer.GenderizerResult ;
148148
149149PersonGenderizerCommand command = new PersonGenderizerCommand ();
150- GenderizerResult result = executor. execute(command, mode, inputPerson). get();
150+ GenderizerResult result = executor. execute(command, mode, inputPerson). get();
151151```
152152
153153
@@ -165,10 +165,10 @@ import org.nameapi.ontology5.input.entities.person.NaturalInputPersonBuilder;
165165import org.nameapi.ontology5.services.matcher.personmatcher.PersonMatcherResult ;
166166
167167PersonMatcherCommand command = new PersonMatcherCommand ();
168- NaturalInputPerson person1 = new NaturalInputPersonBuilder (). name( NameBuilders . western(). fullname(" John F. Kennedy" ). build() ). build();
169- NaturalInputPerson person2 = new NaturalInputPersonBuilder (). name( NameBuilders . western(). fullname(" Jack Kennedy" ). build() ). build();
170- PersonMatcherArgument argument = new PersonMatcherArgument (person1, person2);
171- PersonMatcherResult result = executor. execute(command, mode, argument). get();
168+ NaturalInputPerson person1 = new NaturalInputPersonBuilder (). name( NameBuilders . western(). fullname(" John F. Kennedy" ). build() ). build();
169+ NaturalInputPerson person2 = new NaturalInputPersonBuilder (). name( NameBuilders . western(). fullname(" Jack Kennedy" ). build() ). build();
170+ PersonMatcherArgument argument = new PersonMatcherArgument (person1, person2);
171+ PersonMatcherResult result = executor. execute(command, mode, argument). get();
172172```
173173
174174
@@ -185,10 +185,10 @@ import org.nameapi.ontology5.services.formatter.FormatterProperties;
185185import org.nameapi.ontology5.services.formatter.FormatterResult ;
186186
187187PersonNameFormatterCommand command = new PersonNameFormatterCommand ();
188- NaturalInputPerson person = new NaturalInputPersonBuilder (). name( NameBuilders . western(). fullname(" john f. kennedy" ). build() ). build();
189- FormatterProperties properties = new FormatterProperties (true );
190- PersonNameFormatterArgument argument = new PersonNameFormatterArgument (person, properties);
191- FormatterResult formatterResult = executor. execute(command, mode, argument). get();
188+ NaturalInputPerson person = new NaturalInputPersonBuilder (). name( NameBuilders . western(). fullname(" john f. kennedy" ). build() ). build();
189+ FormatterProperties properties = new FormatterProperties (true );
190+ PersonNameFormatterArgument argument = new PersonNameFormatterArgument (person, properties);
191+ FormatterResult formatterResult = executor. execute(command, mode, argument). get();
192192```
193193
194194
@@ -201,7 +201,7 @@ import org.nameapi.client.services.email.emailnameparser.EmailNameParserCommand;
201201import org.nameapi.ontology5.services.email.emailnameparser.EmailNameParserResult ;
202202
203203EmailNameParserCommand command = new EmailNameParserCommand ();
204- EmailNameParserResult result
= executor
. execute(command, mode,
" [email protected] " )
. get();
204+ EmailNameParserResult result
= executor
. execute(command, mode,
" [email protected] " )
. get();
205205```
206206
207207
@@ -214,6 +214,6 @@ import org.nameapi.client.services.email.disposableemailaddressdetector.Disposab
214214import org.nameapi.ontology5.services.email.disposableemailaddressdetector.DisposableEmailAddressDetectorResult ;
215215
216216DisposableEmailAddressDetectorCommand command = new DisposableEmailAddressDetectorCommand ();
217- DisposableEmailAddressDetectorResult result
= executor
. execute(command, mode,
" [email protected] " )
. get();
217+ DisposableEmailAddressDetectorResult result
= executor
. execute(command, mode,
" [email protected] " )
. get();
218218```
219219
0 commit comments