Get asterisk version by 'core settings' actions. This is supported from
Asterisk 1.6 onwards.

@return
@throws Exception
322636
protected AsteriskVersion determineVersionByCoreSettings() throws Exception
    {

        ManagerResponse response = sendAction(new CoreSettingsAction());
        if (!(response instanceof CoreSettingsResponse))
        {
            // NOTE: you need system or reporting permissions
            logger.info("Could not get core settings, do we have the necessary permissions?");
            return null;
        }

        String ver = ((CoreSettingsResponse) response).getAsteriskVersion();
        return AsteriskVersion.getDetermineVersionFromString("Asterisk " + ver);
    }
1226110
public int getServerMajorVersion() {
    try {
      StringTokenizer versionTokens = new StringTokenizer(queryExecutor.getServerVersion(), "."); // aaXbb.ccYdd
      return integerPart(versionTokens.nextToken()); // return X
    } catch (NoSuchElementException e) {
      return 0;
    }
  }
968237
public java.util.List<String> getVersions() {
        if (versions == null) {
            versions = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return versions;
    }
801615
public static nsversion get(nitro_service service) throws Exception{
		nsversion obj = new nsversion();
		nsversion[] response = (nsversion[])obj.get_resources(service);
		return response[0];
	}
1024636
public SemanticVersion getPrevVersion() {
    int major = head.getMajorVersion();
    int minor = head.getMinorVersion();
    int patch = head.getPatchVersion();
    if (patch > 0) {
      return new SemanticVersion(major, minor, patch - 1);
    }
    if (minor > 0) {
      return new SemanticVersion(major, minor - 1, 999);
    }
    if (major > 0) {
      return new SemanticVersion(major - 1, 999, 999);
    }
    return new SemanticVersion(0, 0, 0);
  }
1140547
@Override
    public VersionInfo getVersion() {
        int version = tailoring.version;
        int rtVersion = VersionInfo.UCOL_RUNTIME_VERSION.getMajor();
        return VersionInfo.getInstance(
                (version >>> 24) + (rtVersion << 4) + (rtVersion >> 4),
                ((version >> 16) & 0xff), ((version >> 8) & 0xff), (version & 0xff));
    }
1133968
@Override
    public <Y> SingularAttribute<? super X, Y> getVersion(Class<Y> paramClass)
    {
        // TODO: Versioning not yet supported.
        throw new UnsupportedOperationException("Method not supported");
    }
1236228
public ApiResponse<Info> versionInfoWithHttpInfo() throws ApiException {
        com.squareup.okhttp.Call call = versionInfoValidateBeforeCall(null, null);
        Type localVarReturnType = new TypeToken<Info>(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }
1236566
public static String getVersion() {
        Package pkg = RoseVersion.class.getPackage();
        return (pkg != null ? pkg.getImplementationVersion() : null);
    }
801527
public URI call() throws Exception {
		// Save original time stamp for dependency list
		long lastModifiedDep = treeNode.lastModifiedDep();
		long lastModified = resource.lastModified();
		// Parse the javascript code
		Compiler compiler = new Compiler();
		CompilerOptions options = CompilerUtil.getDefaultOptions();
		if (compilerOptionsMap != null) {
			CompilerUtil.applyCompilerOptionsFromMap(options, compilerOptionsMap);
		}
		options.setWarningLevel(DiagnosticGroups.NON_STANDARD_JSDOC,
				CheckLevel.OFF);

		compiler.initOptions(options);
		InputStream in = resource.getInputStream();
		Node node = null;
		try {
			node = compiler.parse(JSSourceFile.fromInputStream(resource.getURI().toString(), in));
			if (compiler.hasErrors()) {
				if (log.isLoggable(Level.WARNING)) {
					JSError[] errors = compiler.getErrors();
					for (JSError error : errors) {
						log.log(Level.WARNING, error.toString());
					}
				}
			}
		} catch (Throwable e) {
			if (log.isLoggable(Level.WARNING)) {
				log.log(Level.WARNING, "Error occurred parsing " + resource.getURI().toString() + ": " + e.getMessage(), e); //$NON-NLS-1$ //$NON-NLS-2$
			}
		} finally {
			in.close();
		}
		if (node != null) {
			// walk the AST for the node looking for define calls
			// and pull out the required dependency list.
			Set<String> features = new HashSet<String>();
			ParseResult parseResult = DepUtils.parseDependencies(node, features);
			Collection<String> defineDeps = parseResult.getDefineDependencies();
			Collection<String> requireDeps = parseResult.getRequireDependencies();
			String[] defineDepArray = (defineDeps == null) ?
					new String[0] : defineDeps.toArray(new String[defineDeps.size()]);
			String[] requireDepArray = (requireDeps == null) ?
					new String[0] : requireDeps.toArray(new String[requireDeps.size()]);
			String[] featureArray = (features == null) ?
					new String[0] : features.toArray(new String[features.size()]);
			/*
			 * Determine if the dependency list has changed.  We keep track of
			 * dependency list changes separate from code changes in general
			 * because a dependency list change necessitates invalidating all
			 * cached responses for the configs that reference this file, and
			 * we want to do this only when necessary.
			 */
			if (lastModifiedDep ==  -1 ||
					!Arrays.equals(defineDepArray, treeNode.getDefineDepArray()) ||
					!Arrays.equals(requireDepArray, treeNode.getRequireDepArray()) ||
					!Arrays.equals(featureArray, treeNode.getDependentFeatures())) {
				lastModifiedDep = lastModified;
			}
			// update the dependency info in the node
			treeNode.setDependencies(defineDepArray, requireDepArray, featureArray,
					lastModified, lastModifiedDep);
		}
		return resource.getURI();
	}
796755
public function checkClientVersion()
    {
        $serverVersion = $this->getServerVersion();
        $clientVersion = $this->getClientVersion();

        if (version_compare($serverVersion, '10') >= 0
            && version_compare($clientVersion, '10') < 0
        ) {
            throw new Exception(Piwik::translate('General_ExceptionIncompatibleClientServerVersions', array('MSSQL', $clientVersion, $serverVersion)));
        }
    }
892671
public static AsteriskVersion getDetermineVersionFromString(String coreLine)
    {
        for (AsteriskVersion version : knownVersions)
        {
            for (Pattern pattern : version.patterns)
            {
                if (pattern.matcher(coreLine).matches())
                {
                    return version;
                }
            }
        }

        return null;
    }
763578
@Restricted(NoExternalUse.class)
    @CheckForNull
    public VersionNumber getCurrentLevel() {
        VersionNumber from = new VersionNumber("1.0");
        File state = getUpdateStateFile();
        if (state.exists()) {
            try {
                from = new VersionNumber(defaultIfBlank(readFileToString(state), "1.0").trim());
            } catch (IOException ex) {
                LOGGER.log(Level.SEVERE, "Cannot read the current version file", ex);
                return null;
            }
        }
        return from;
    }
677760
public byte getGuaranteedProtocolVersion() {
    Byte value = (Byte)jmo.getField(ControlAccess.PROTOCOLVERSION);
    return (value == null) ? 0 : value.byteValue();
  }
804700
double getVersionNumber() {
		if(cassandraVersion > 0) {
			return cassandraVersion;
		}
		
		String version = getReleaseVersion();

		if (version == null) {
			throw new IllegalStateException("Can't get Cassandra release version.");
		}
		
		String[] toks = version.split("\\.");		
		if (toks.length >= 3) {
			try {
				
				StringBuilder b = new StringBuilder();
				
				int len = toks[0].length();
				if(len == 1) {
					b.append("00");
				} else if (len == 2) {
					b.append("0");
				}
				b.append(toks[0]);
				
				len = toks[1].length();
				if(len == 1) {
					b.append("00");
				} else if (len == 2) {
					b.append("0");
				}
				b.append(toks[1]);
				
				for(int i = 0; i < toks[2].length(); i++) {
					char c = toks[2].charAt(i);
					if(Character.isDigit(c)) {
						if(i == 0) {
							b.append('.');
						}
						b.append(c);
					} else {
						break;
					}
				}	
				
				cassandraVersion = Double.valueOf(b.toString());
				return cassandraVersion;
				
			} catch (Exception e) {
			}
		}

		throw new IllegalStateException("Can't parse Cassandra release version string: \"" + version + "\"");
	
	}
231221
public String getVersion()
	{
		String str = null;

		if ((version >= 0) && (version < versionLabels.length))
		{
			str = versionLabels[version];
		}

		return str;
	}
1056310
public Set<VersionResource> getVersions() throws RepositoryException, IllegalResourceTypeException
   {
      Set<VersionResource> resources = new HashSet<VersionResource>();
      VersionIterator versions = versionHistory.getAllVersions();
      while (versions.hasNext())
      {
         Version version = versions.nextVersion();
         if ("jcr:rootVersion".equals(version.getName()))
         {

            continue;
         }
         resources
            .add(new VersionResource(versionURI(version.getName()), versionedResource, version, namespaceContext));
      }
      return resources;
   }