Get the validation state of the geometry. We take the state of the first violation encountered.

@return the invalid state or {@link GeometryValidationState.VALID} if there are no violations.
551610
@Api
	public GeometryValidationState getState() {
		if (violations.isEmpty()) {
			return GeometryValidationState.VALID;
		} else {
			return violations.get(0).getState();
		}
	}
1243951
public boolean validationAsBoolean()
   {
      if (this.getConnectionDefinitions() == null || this.getConnectionDefinitions().isEmpty())
         return false;

      ConnectionDefinition cdm = this.getConnectionDefinitions().get(0);
      if (cdm.getManagedConnectionFactoryClass() == null || cdm.getConnectionFactoryInterface() == null ||
          cdm.getConnectionFactoryImplClass() == null || cdm.getConnectionInterface() == null ||
          cdm.getConnectionImplClass() == null)
         return false;

      return true;
   }
452902
public APIState getAPIState() {
		APIStateRequest request = new APIStateRequest();
		APIStateResponse response = resolveApitraryClient().send(request);

		APIState apiState = null;
		if (HttpStatus.OK.ordinal() == response.getStatusCode()) {
			String result = response.getResult();

			ObjectMapper objectMapper = new ObjectMapper();
			try {
				apiState = objectMapper.readValue(result, APIState.class);
			} catch (Exception e) {
				throw new MappingException(e);
			}
		} else {
			throw new CommunicationErrorException(HttpStatus.getStatus(response.getStatusCode()));
		}
		return apiState;
	}
121160
public synchronized boolean isValid() {
		if (!validState) {
			throw new InvalidStateException();
		}
		final long size = size();
		if (size == 0) {
			return true;
		}
		try {
			final long offset = (size - FOOTER_LEN);
			if (offset < 0) {
				return false;
			}
			if (offset >= offsetOutputCommited) {
				if (bufOutput.position() > 0) {
					log.warn("WARN: autoflush forced");
					flushBuffer();
				}
			}
			bufInput.clear();
			bufInput.limit(FOOTER_LEN);
			final int readed = fcInput.position(offset).read(bufInput);
			if (readed < FOOTER_LEN) {
				return false;
			}
			bufInput.flip();
			final int footer = bufInput.get(); 	// Footer (byte)
			if (footer != MAGIC_FOOT) {
				log.error("MAGIC FOOT fake=" + Integer.toHexString(footer) + " expected="
						+ Integer.toHexString(MAGIC_FOOT));
				return false;
			}
			return true;
		} catch (Exception e) {
			log.error("Exception in isValid()", e);
		}
		return false;
	}
973217
@Override
	protected void checkPrimitiveValidity() {
		BusPrimitiveInvalidity invalidityReason = null;
		if (this.position == null) {
			invalidityReason =
					new BusPrimitiveInvalidity(
							BusPrimitiveInvalidityType.NO_STOP_POSITION,
							null);
		} else {
			final BusNetwork busNetwork = getBusNetwork();
			if (busNetwork == null) {
				invalidityReason = new BusPrimitiveInvalidity(
						BusPrimitiveInvalidityType.STOP_NOT_IN_NETWORK,
						null);
			} else {
				final RoadNetwork roadNetwork = busNetwork.getRoadNetwork();
				if (roadNetwork == null) {
					invalidityReason = new BusPrimitiveInvalidity(
							BusPrimitiveInvalidityType.STOP_NOT_IN_NETWORK,
							null);
				} else {
					final Rectangle2d bounds = roadNetwork.getBoundingBox();
					if (bounds == null || !bounds.contains(this.position.getPoint())) {
						invalidityReason = new BusPrimitiveInvalidity(
								BusPrimitiveInvalidityType.OUTSIDE_MAP_BOUNDS,
								bounds == null ? null : bounds.toString());
					}
				}
			}
		}
		setPrimitiveValidity(invalidityReason);
	}
894013
public GeometryEnvelope getOrBuildEnvelope() {
		GeometryEnvelope envelope = getEnvelope();
		if (envelope == null) {
			Geometry geometry = getGeometry();
			if (geometry != null) {
				envelope = GeometryEnvelopeBuilder.buildEnvelope(geometry);
			}
		}
		return envelope;
	}
856590
public static ValidationStatus getInfoMsgLevel(final String msg) {
    if (msg.startsWith("ERROR")) {
      return ValidationStatus.ERROR;
    }
    if (msg.startsWith("WARN")) {
      return ValidationStatus.WARN;
    }
    return ValidationStatus.PASS;
  }
832911
public String toWkt(Geometry geometry) {
		try {
			return WktService.toWkt(geometry);
		} catch (WktException e) {
			return null;
		}
	}
342439
public String getGeometryType() {
      String geometryType = null;
      if (getParameters().length > 0 && getParameters()[0] != null) {
         geometryType = getParameters()[0].toString();
      }
      return geometryType;
   }
227248
public ValidationRunStatus getLastStatus() {
        ValidationRun run = getLastRun();
        if (run == null) {
            return null;
        } else {
            return run.getLastStatus();
        }
    }
656625
@Override
    public boolean validForState(ImapSessionState state) {
        return state == ImapSessionState.AUTHENTICATED
                || state == ImapSessionState.SELECTED;
    }
176096
public java.util.List<String> getInvalidParameters() {
        if (invalidParameters == null) {
            invalidParameters = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return invalidParameters;
    }
1175763
public boolean intersects(Geometry geometry) {
		if (geometry == null || isEmpty() || geometry.isEmpty()) {
			return false;
		}

		if (geometry.getNumGeometries() > 1) {
			for (int n = 0; n < geometry.getNumGeometries(); n++) {
				if (intersects(geometry.getGeometryN(n))) {
					return true;
				}
			}
		} else {
			final Coordinate[] coords = geometry.getCoordinates();
			if (coords.length > 1 && coordinates.length > 1) {
				for (int i = 0; i < coordinates.length - 1; i++) {
					for (int j = 0; j < coords.length - 1; j++) {
						if (Mathlib.lineIntersects(coordinates[i], coordinates[i + 1], coords[j], coords[j + 1])) {
							return true;
						}
					}
					if (Mathlib.touches(geometry, coordinates[i])) {
						return true;
					}
				}
			} else {
				// TODO implement me
			}
		}

		return false;
	}
204439
public boolean validate() {

        if (m_end >= m_length) {
            m_end = m_length - 1;
        }

        return ((m_start >= 0) && (m_end >= 0) && (m_start <= m_end) && (m_length > 0));
    }
426777
public java.util.List<ValidationError> getValidationErrors() {
        if (validationErrors == null) {
            validationErrors = new com.amazonaws.internal.SdkInternalList<ValidationError>();
        }
        return validationErrors;
    }
823574
public boolean isValid() {
		if (isEmpty()) {
			return true;
		}
		if (!exteriorRing.isValid()) {
			return false;
		}
		if (interiorRings != null) {
			LinearRing ring1;
			LinearRing ring2;
			for (int i = 0; i <= interiorRings.length; i++) {
				if (i == interiorRings.length) {
					ring1 = exteriorRing;
				} else {
					ring1 = interiorRings[i];
					if (!ring1.isValid()) {
						return false;
					}
				}
				for (int j = 0; j <= interiorRings.length; j++) {
					if (i == j) {
						continue;
					}
					if (j == interiorRings.length) {
						ring2 = exteriorRing;
					} else {
						ring2 = interiorRings[j];
					}
					if (ring1.intersects(ring2)) {
						return false;
					}
				}
			}
		}

		return true;
	}
1091434
public ValidationResult getTiffEPValidation() {
    TiffEPProfile bpep = new TiffEPProfile(tiffModel);
    bpep.validate();
    return bpep.getValidation();
  }