Skip to content

Commit 213440c

Browse files
author
JW Wesson
committed
rename some classes
1 parent 5fd2698 commit 213440c

40 files changed

+399
-399
lines changed

src/main/java/com/textkernel/tx/SovrenClient.java renamed to src/main/java/com/textkernel/tx/TxClient.java

Lines changed: 191 additions & 191 deletions
Large diffs are not rendered by default.

src/main/java/com/textkernel/tx/SovrenUIClient.java renamed to src/main/java/com/textkernel/tx/TxUIClient.java

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
package com.textkernel.tx;
77

8-
import com.textkernel.tx.exceptions.SovrenException;
8+
import com.textkernel.tx.exceptions.TxException;
99
import com.textkernel.tx.models.api.bimetricscoring.*;
1010
import com.textkernel.tx.models.api.matching.*;
1111
import com.textkernel.tx.models.api.matching.request.FilterCriteria;
@@ -19,13 +19,13 @@
1919

2020
import java.util.List;
2121

22-
/** Extension methods to generate the Sovren Matching UI. Access with {@link SovrenClient#ui(MatchUISettings)}*/
23-
public class SovrenUIClient {
22+
/** Extension methods to generate the Sovren Matching UI. Access with {@link TxClient#ui(MatchUISettings)}*/
23+
public class TxUIClient {
2424

2525
private final MatchUISettings _uiSessionOptions;
26-
private final SovrenClient _client;
26+
private final TxClient _client;
2727

28-
SovrenUIClient(MatchUISettings uiOptions, SovrenClient client) {
28+
TxUIClient(MatchUISettings uiOptions, TxClient client) {
2929
_uiSessionOptions = uiOptions;
3030
_client = client;
3131
}
@@ -41,15 +41,15 @@ public class SovrenUIClient {
4141
* @param settings The settings for this match request. Use {@code null} for defaults.
4242
* @param numResults The number of results to show. Use {@code 0} for the default.
4343
* @return The response containing a URL for the Matching UI session
44-
* @throws SovrenException Thrown when an API error occurs
44+
* @throws TxException Thrown when an API error occurs
4545
*/
4646
public GenerateUIResponse match(
4747
ParsedResume resume,
4848
List<String> indexesToQuery,
4949
CategoryWeights preferredWeights,
5050
FilterCriteria filters,
5151
SearchMatchSettings settings,
52-
int numResults) throws SovrenException {
52+
int numResults) throws TxException {
5353

5454
MatchResumeRequest request = _client.createRequest(resume, indexesToQuery, preferredWeights, filters, settings, numResults);
5555
UIMatchResumeRequest uiRequest = new UIMatchResumeRequest(request, _uiSessionOptions);
@@ -67,15 +67,15 @@ public GenerateUIResponse match(
6767
* @param settings The settings for this match request. Use {@code null} for defaults.
6868
* @param numResults The number of results to show. Use {@code 0} for the default.
6969
* @return The response containing a URL for the Matching UI session
70-
* @throws SovrenException Thrown when an API error occurs
70+
* @throws TxException Thrown when an API error occurs
7171
*/
7272
public GenerateUIResponse match(
7373
ParsedJob job,
7474
List<String> indexesToQuery,
7575
CategoryWeights preferredWeights,
7676
FilterCriteria filters,
7777
SearchMatchSettings settings,
78-
int numResults) throws SovrenException {
78+
int numResults) throws TxException {
7979

8080
MatchJobRequest request = _client.createRequest(job, indexesToQuery, preferredWeights, filters, settings, numResults);
8181
UIMatchJobRequest uiRequest = new UIMatchJobRequest(request, _uiSessionOptions);
@@ -94,7 +94,7 @@ public GenerateUIResponse match(
9494
* @param settings The settings for this match request. Use {@code null} for defaults.
9595
* @param numResults The number of results to show. Use {@code 0} for the default.
9696
* @return The response containing a URL for the Matching UI session
97-
* @throws SovrenException Thrown when an API error occurs
97+
* @throws TxException Thrown when an API error occurs
9898
*/
9999
public GenerateUIResponse match(
100100
String indexId,
@@ -103,7 +103,7 @@ public GenerateUIResponse match(
103103
CategoryWeights preferredWeights,
104104
FilterCriteria filters,
105105
SearchMatchSettings settings,
106-
int numResults) throws SovrenException {
106+
int numResults) throws TxException {
107107

108108
MatchByDocumentIdOptions request = _client.createRequest(indexesToQuery, preferredWeights, filters, settings, numResults);
109109
UIMatchByDocumentIdOptions uiRequest = new UIMatchByDocumentIdOptions(request, _uiSessionOptions);
@@ -117,13 +117,13 @@ public GenerateUIResponse match(
117117
* @param settings The settings for this search request. Use {@code null} for defaults.
118118
* @param pagination Pagination settings. Use {@code null} for defaults.
119119
* @return The response containing a URL for the Matching UI session
120-
* @throws SovrenException Thrown when an API error occurs
120+
* @throws TxException Thrown when an API error occurs
121121
*/
122122
public GenerateUIResponse search(
123123
List<String> indexesToQuery,
124124
FilterCriteria query,
125125
SearchMatchSettings settings,
126-
PaginationSettings pagination) throws SovrenException {
126+
PaginationSettings pagination) throws TxException {
127127

128128
SearchRequest request = _client.createRequest(indexesToQuery, query, settings, pagination);
129129
UISearchRequest uiRequest = new UISearchRequest(request, _uiSessionOptions);
@@ -140,13 +140,13 @@ public GenerateUIResponse search(
140140
* Sovren will determine the best values based on the source resume.
141141
* @param settings The settings for this search request. Use {@code null} for defaults.
142142
* @return The response containing a URL for the Matching UI session
143-
* @throws SovrenException Thrown when an API error occurs
143+
* @throws TxException Thrown when an API error occurs
144144
*/
145145
public <TTarget extends IParsedDocWithId> GenerateUIResponse bimetricScore(
146146
ParsedResumeWithId sourceResume,
147147
List<TTarget> targetDocuments,
148148
CategoryWeights preferredWeights,
149-
SearchMatchSettings settings) throws SovrenException {
149+
SearchMatchSettings settings) throws TxException {
150150
BimetricScoreResumeRequest request = _client.createRequest(sourceResume, targetDocuments, preferredWeights, settings);
151151
UIBimetricScoreResumeRequest uiRequest = new UIBimetricScoreResumeRequest(request, _uiSessionOptions);
152152
return _client.uiBimetricScore(uiRequest);
@@ -162,13 +162,13 @@ public <TTarget extends IParsedDocWithId> GenerateUIResponse bimetricScore(
162162
* Sovren will determine the best values based on the source job.
163163
* @param settings The settings for this search request. Use {@code null} for defaults.
164164
* @return The response containing a URL for the Matching UI session
165-
* @throws SovrenException Thrown when an API error occurs
165+
* @throws TxException Thrown when an API error occurs
166166
*/
167167
public <TTarget extends IParsedDocWithId> GenerateUIResponse bimetricScore(
168168
ParsedJobWithId sourceJob,
169169
List<TTarget> targetDocuments,
170170
CategoryWeights preferredWeights,
171-
SearchMatchSettings settings) throws SovrenException {
171+
SearchMatchSettings settings) throws TxException {
172172
BimetricScoreJobRequest request = _client.createRequest(sourceJob, targetDocuments, preferredWeights, settings);
173173
UIBimetricScoreJobRequest uiRequest = new UIBimetricScoreJobRequest(request, _uiSessionOptions);
174174
return _client.uiBimetricScore(uiRequest);

src/main/java/com/textkernel/tx/exceptions/SovrenException.java renamed to src/main/java/com/textkernel/tx/exceptions/TxException.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
package com.textkernel.tx.exceptions;
77

88
import okhttp3.Response;
9-
import com.textkernel.tx.SovrenClient;
9+
import com.textkernel.tx.TxClient;
1010
import com.textkernel.tx.models.api.ApiResponseInfo;
1111
import com.textkernel.tx.models.api.ApiResponseInfoLite;
1212
import java.util.Optional;
1313

1414
/**
1515
* The most generic exception thrown by the SDK as a result of an error response from the API
1616
*/
17-
public class SovrenException extends Exception {
17+
public class TxException extends Exception {
1818

1919
/** The raw response from the API */
2020
public Response RestResponse;
@@ -28,13 +28,13 @@ public class SovrenException extends Exception {
2828
/** The Id of the transaction, use this when reporting errors to Sovren Support*/
2929
public String TransactionId;
3030

31-
/** The JSON request body, will only have a value if {@link SovrenClient#ShowFullRequestBodyInExceptions} is {@code true}*/
31+
/** The JSON request body, will only have a value if {@link TxClient#ShowFullRequestBodyInExceptions} is {@code true}*/
3232
public String RequestBody;
3333

3434
/** If this exception was caused by another exception, the root cause will be here.*/
3535
public Exception InnerException;
3636

37-
public SovrenException(String requestBody, Response response, ApiResponseInfoLite errorInfo, String transactionId) {
37+
public TxException(String requestBody, Response response, ApiResponseInfoLite errorInfo, String transactionId) {
3838
super(Optional.ofNullable(errorInfo).map(e -> e.Message).orElse("Invalid response object from API"));
3939

4040
RestResponse = response;
@@ -44,7 +44,7 @@ public SovrenException(String requestBody, Response response, ApiResponseInfoLit
4444
RequestBody = requestBody;
4545
}
4646

47-
public SovrenException(String requestBody, Response response, ApiResponseInfo errorInfo) {
47+
public TxException(String requestBody, Response response, ApiResponseInfo errorInfo) {
4848
this(requestBody, response, errorInfo, errorInfo.TransactionId);
4949
}
5050
}

src/main/java/com/textkernel/tx/exceptions/SovrenGeocodeJobException.java renamed to src/main/java/com/textkernel/tx/exceptions/TxGeocodeJobException.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
/**
1313
* This exception is thrown when an error happens during geocoding, but the service was still able to produce a usable Job object (see the {@link Response} property)
1414
*/
15-
public class SovrenGeocodeJobException extends SovrenUsableJobException {
16-
public SovrenGeocodeJobException(Response response, ApiResponseInfoLite errorInfo, String transactionId, ParseJobResponse parseResponse) {
15+
public class TxGeocodeJobException extends TxUsableJobException {
16+
public TxGeocodeJobException(Response response, ApiResponseInfoLite errorInfo, String transactionId, ParseJobResponse parseResponse) {
1717
super(response, errorInfo, transactionId, parseResponse);
1818
}
1919
}

src/main/java/com/textkernel/tx/exceptions/SovrenGeocodeResumeException.java renamed to src/main/java/com/textkernel/tx/exceptions/TxGeocodeResumeException.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
/**
1313
* This exception is thrown when an error happens during geocoding, but the service was still able to produce a usable Resume object (see the {@link Response} property)
1414
*/
15-
public class SovrenGeocodeResumeException extends SovrenUsableResumeException {
16-
public SovrenGeocodeResumeException(Response response, ApiResponseInfoLite errorInfo, String transactionId, ParseResumeResponse parseResponse) {
15+
public class TxGeocodeResumeException extends TxUsableResumeException {
16+
public TxGeocodeResumeException(Response response, ApiResponseInfoLite errorInfo, String transactionId, ParseResumeResponse parseResponse) {
1717
super(response, errorInfo, transactionId, parseResponse);
1818
}
1919
}

src/main/java/com/textkernel/tx/exceptions/SovrenIndexJobException.java renamed to src/main/java/com/textkernel/tx/exceptions/TxIndexJobException.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
/**
1313
* This exception is thrown when an error happens during indexing, but the service was still able to produce a usable Job object (see the {@link Response} property)
1414
*/
15-
public class SovrenIndexJobException extends SovrenUsableJobException {
16-
public SovrenIndexJobException(Response response, ApiResponseInfoLite errorInfo, String transactionId, ParseJobResponse parseResponse) {
15+
public class TxIndexJobException extends TxUsableJobException {
16+
public TxIndexJobException(Response response, ApiResponseInfoLite errorInfo, String transactionId, ParseJobResponse parseResponse) {
1717
super(response, errorInfo, transactionId, parseResponse);
1818
}
1919
}

src/main/java/com/textkernel/tx/exceptions/SovrenIndexResumeException.java renamed to src/main/java/com/textkernel/tx/exceptions/TxIndexResumeException.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
/**
1313
* This exception is thrown when an error happens during indexing, but the service was still able to produce a usable Resume object (see the {@link Response} property)
1414
*/
15-
public class SovrenIndexResumeException extends SovrenUsableResumeException {
16-
public SovrenIndexResumeException(Response response, ApiResponseInfoLite errorInfo, String transactionId, ParseResumeResponse parseResponse) {
15+
public class TxIndexResumeException extends TxUsableResumeException {
16+
public TxIndexResumeException(Response response, ApiResponseInfoLite errorInfo, String transactionId, ParseResumeResponse parseResponse) {
1717
super(response, errorInfo, transactionId, parseResponse);
1818
}
1919
}

src/main/java/com/textkernel/tx/exceptions/SovrenProfessionNormalizationJobException.java renamed to src/main/java/com/textkernel/tx/exceptions/TxProfessionNormalizationJobException.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
/**
1313
* This exception is thrown when an error happens during indexing, but the service was still able to produce a usable Job object (see the {@link Response} property)
1414
*/
15-
public class SovrenProfessionNormalizationJobException extends SovrenUsableJobException {
16-
public SovrenProfessionNormalizationJobException(Response response, ApiResponseInfoLite errorInfo, String transactionId, ParseJobResponse parseResponse) {
15+
public class TxProfessionNormalizationJobException extends TxUsableJobException {
16+
public TxProfessionNormalizationJobException(Response response, ApiResponseInfoLite errorInfo, String transactionId, ParseJobResponse parseResponse) {
1717
super(response, errorInfo, transactionId, parseResponse);
1818
}
1919
}

src/main/java/com/textkernel/tx/exceptions/SovrenProfessionNormalizationResumeException.java renamed to src/main/java/com/textkernel/tx/exceptions/TxProfessionNormalizationResumeException.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
/**
1313
* This exception is thrown when an error happens during indexing, but the service was still able to produce a usable Resume object (see the {@link Response} property)
1414
*/
15-
public class SovrenProfessionNormalizationResumeException extends SovrenUsableResumeException {
16-
public SovrenProfessionNormalizationResumeException(Response response, ApiResponseInfoLite errorInfo, String transactionId, ParseResumeResponse parseResponse) {
15+
public class TxProfessionNormalizationResumeException extends TxUsableResumeException {
16+
public TxProfessionNormalizationResumeException(Response response, ApiResponseInfoLite errorInfo, String transactionId, ParseResumeResponse parseResponse) {
1717
super(response, errorInfo, transactionId, parseResponse);
1818
}
1919
}

src/main/java/com/textkernel/tx/exceptions/SovrenUsableJobException.java renamed to src/main/java/com/textkernel/tx/exceptions/TxUsableJobException.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
/**
1313
* This exception is thrown when an error happens, but the service was still able to produce a usable Resume object (see the {@link Response} property)
1414
*/
15-
public abstract class SovrenUsableJobException extends SovrenException {
15+
public abstract class TxUsableJobException extends TxException {
1616

1717
/** This may or may not be {@code null} or incomplete depending on what specific error occurred*/
1818
public ParseJobResponse Response;
1919

20-
public SovrenUsableJobException(Response response, ApiResponseInfoLite errorInfo, String transactionId, ParseJobResponse parseResponse) {
20+
public TxUsableJobException(Response response, ApiResponseInfoLite errorInfo, String transactionId, ParseJobResponse parseResponse) {
2121
super(null, response, errorInfo, transactionId);
2222

2323
Response = parseResponse;

0 commit comments

Comments
 (0)