public void validateServer() throws ServerValidationException {
  try {
    String versionString=adminManager.getServerVersion();
    String alteredString=versionString.replaceAll("[^\\d]+","");
    if (alteredString.length() < 3) {
      alteredString+="0";
    }
    int major=Integer.parseInt(alteredString.substring(0,1));
    int ver=Integer.parseInt(alteredString.substring(0,3));
    boolean isNightly=versionString.matches("[^-]+-\\d{8}");
    if (major < 8 || (!isNightly && ver < 804)) {
      throw new ServerValidationException("Invalid MarkLogic Server Version: " + versionString);
    }
  }
 catch (  ResourceAccessException e) {
    throw new ServerValidationException(e.toString());
  }
}

public void validateServer ( ) throws ServerValidationException { try { String versionString = adminManager . getServerVersion ( ) ; String alteredString = versionString . replaceAll ( "[^\\d]+" , "" ) ; if ( alteredString . length ( ) < 3 ) { alteredString += "0" ; } int major = Integer . parseInt ( alteredString . substring ( 0 , 1 ) ) ; int ver = Integer . parseInt ( alteredString . substring ( 0 , 3 ) ) ; boolean isNightly = versionString . matches ( "[^-]+-\\d{8}" ) ; if ( major < 8 || ( ! isNightly && ver < 804 ) ) { throw new ServerValidationException ( "Invalid MarkLogic Server Version: " + versionString ) ; } } catch ( ResourceAccessException e ) { throw new ServerValidationException ( e . toString ( ) ) ; } }
validates the marklogic server to ensure compatibility with the hub
