- public LocateValidator endpoint(Endpoint e) {
- endpoint_key(e);
- if(e!=null) {
- intRange("Endpoint Major Version",e.getMajor(),0,2000);
- intRange("Endpoint Minor Version",e.getMinor(),0,2000);
- intRange("Endpoint Patch Version",e.getPatch(),0,2000);
- intRange("Endpoint Pkg Version",e.getPkg(),0,2000);
- floatRange("Endpoint Latitude",e.getLatitude(),-90f,90f);
- floatRange("Endpoint Longitude",e.getLongitude(),-180f,180f);
- nullOrBlank("Endpoint Protocol", e.getProtocol());
- for(String s : e.getSubprotocol()) {
- nullOrBlank("Endpoint Subprotocol", s);
- }
- }
- return this;
- }
-
- public LocateValidator endpoints(Endpoints e, boolean emptyNotOK) {
- if(e==null) {
- msg("Endpoints Data is null.");
- } else {
- if(emptyNotOK && e.getEndpoint().size()==0) {
- msg("Endpoints contains no endpoints");
- } else {
- for(Endpoint ep : e.getEndpoint()) {
- endpoint(ep);
- }
- }
- }
- return this;
- }
+ public LocateValidator endpoint(Endpoint e) {
+ endpoint_key(e);
+ if(e!=null) {
+ intRange("Endpoint Major Version",e.getMajor(),0,2000);
+ intRange("Endpoint Minor Version",e.getMinor(),0,2000);
+ intRange("Endpoint Patch Version",e.getPatch(),0,2000);
+ intRange("Endpoint Pkg Version",e.getPkg(),0,2000);
+ floatRange("Endpoint Latitude",e.getLatitude(),-90f,90f);
+ floatRange("Endpoint Longitude",e.getLongitude(),-180f,180f);
+ nullOrBlank("Endpoint Protocol", e.getProtocol());
+ for(String s : e.getSubprotocol()) {
+ nullOrBlank("Endpoint Subprotocol", s);
+ }
+ }
+ return this;
+ }
+
+ public LocateValidator endpoints(Endpoints e, boolean emptyNotOK) {
+ if(e==null) {
+ msg("Endpoints Data is null.");
+ } else {
+ if(emptyNotOK && e.getEndpoint().size()==0) {
+ msg("Endpoints contains no endpoints");
+ } else {
+ for(Endpoint ep : e.getEndpoint()) {
+ endpoint(ep);
+ }
+ }
+ }
+ return this;
+ }