public final class TrackingNumberEntity extends Entity
A parcel tracking number entity extracted from a piece of text. It provides the carrier associated with the parcel and a canonical format for the tracking number.
Nested Class Summary
@interface | TrackingNumberEntity.ParcelTrackingCarrier | The list of supported carriers that could be detected (e.g. |
Constant Summary
int | CARRIER_AMAZON | |
int | CARRIER_DHL | |
int | CARRIER_FEDEX | |
int | CARRIER_ISRAEL_POST | |
int | CARRIER_I_PARCEL | |
int | CARRIER_LASERSHIP | |
int | CARRIER_MSC | |
int | CARRIER_ONTRAC | |
int | CARRIER_SWISS_POST | |
int | CARRIER_UNKNOWN | |
int | CARRIER_UPS | |
int | CARRIER_USPS |
Inherited Constant Summary
int | TYPE_ADDRESS | Identifies a physical address. |
int | TYPE_DATE_TIME | Identifies a time reference that includes a specific time. |
int | TYPE_EMAIL | Identifies an e-mail address. |
int | TYPE_FLIGHT_NUMBER | Identifies a flight number in IATA format. |
int | TYPE_IBAN | Identifies an International Bank Account Number (IBAN). |
int | TYPE_ISBN | Identifies an International Standard Book Number (ISBN). |
int | TYPE_MONEY | Identifies an amount of money. |
int | TYPE_PAYMENT_CARD | Identifies a payment card. |
int | TYPE_PHONE | Identifies a phone number. |
int | TYPE_TRACKING_NUMBER | Identifies a shipment tracking number. |
int | TYPE_URL | Identifies a URL. |
Public Method Summary
int |
getParcelCarrier()
Returns the parcel carrier (e.g.
|
String |
getParcelTrackingNumber()
Returns the parcel tracking number detected for this entity but canonically
formatted.
|
Inherited Method Summary
DateTimeEntity |
asDateTimeEntity()
Convenience method that returns the current entity cast to a
DateTimeEntity.
|
FlightNumberEntity |
asFlightNumberEntity()
Convenience method that returns the current entity cast to a
FlightNumberEntity.
|
IbanEntity |
asIbanEntity()
Convenience method that returns the current entity cast to a IbanEntity.
|
IsbnEntity |
asIsbnEntity()
Convenience method that returns the current entity cast to a IsbnEntity.
|
MoneyEntity |
asMoneyEntity()
Convenience method that returns the current entity cast to a MoneyEntity.
|
PaymentCardEntity |
asPaymentCardEntity()
Convenience method that returns the current entity cast to a
PaymentCardEntity.
|
TrackingNumberEntity |
asTrackingNumberEntity()
Convenience method that returns the current entity cast to a
TrackingNumberEntity.
|
int |
getType()
Returns the type(e.g.
|
String |
toString()
|
Constants
public static final int CARRIER_AMAZON
Constant Value: 10
public static final int CARRIER_DHL
Constant Value: 3
public static final int CARRIER_FEDEX
Constant Value: 1
public static final int CARRIER_ISRAEL_POST
Constant Value: 7
public static final int CARRIER_I_PARCEL
Constant Value: 11
public static final int CARRIER_LASERSHIP
Constant Value: 6
public static final int CARRIER_MSC
Constant Value: 9
public static final int CARRIER_ONTRAC
Constant Value: 5
public static final int CARRIER_SWISS_POST
Constant Value: 8
public static final int CARRIER_UNKNOWN
Constant Value: 0
public static final int CARRIER_UPS
Constant Value: 2
public static final int CARRIER_USPS
Constant Value: 4
Public Methods
public int getParcelCarrier ()
Returns the parcel carrier (e.g.
CARRIER_FEDEX
) detected for this entity.
public String getParcelTrackingNumber ()
Returns the parcel tracking number detected for this entity but canonically formatted.