Package uk.num.numlib.internal.modl
Class ModlServices
java.lang.Object
uk.num.numlib.internal.modl.ModlServices
public final class ModlServices
extends java.lang.Object
A class to act as a facade for the MODL interpreter.
-
Constructor Summary
Constructors Constructor Description ModlServices()Default constructor -
Method Summary
Modifier and Type Method Description java.lang.StringinterpretNumRecord(java.lang.String numRecord)Interpret a NUM record MODL string to a JSON String.PopulatorResponseinterpretPopulatorResponse(java.lang.String numRecord)Interpret a NUM record response from the populator.
-
Constructor Details
-
ModlServices
public ModlServices()Default constructor
-
-
Method Details
-
interpretNumRecord
public java.lang.String interpretNumRecord(java.lang.String numRecord) throws NumBadRecordException, NumLookupRedirectInterpret a NUM record MODL string to a JSON String.- Parameters:
numRecord- The NUM record string.- Returns:
- The interpreted result as a JSON string.
- Throws:
NumBadRecordException- on errorNumLookupRedirect- on error
-
interpretPopulatorResponse
public PopulatorResponse interpretPopulatorResponse(java.lang.String numRecord) throws NumBadRecordExceptionInterpret a NUM record response from the populator.- Parameters:
numRecord- The NUM record string.- Returns:
- The interpreted result as a PopulatorResponse object.
- Throws:
NumBadRecordException- on error
-