Request version information from a given JID.

@param jid
@return the version information or {@code null} if not supported by JID
@throws NoResponseException
@throws XMPPErrorException
@throws NotConnectedException
@throws InterruptedException
967893
public Version getVersion(Jid jid) throws NoResponseException, XMPPErrorException,
                    NotConnectedException, InterruptedException {
        if (!isSupported(jid)) {
            return null;
        }
        return connection().createStanzaCollectorAndSend(new Version(jid)).nextResultOrThrow();
    }
1233869
public OfflineSettings getOfflineSettings() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
        OfflineSettings request = new OfflineSettings();
        request.setType(IQ.Type.get);
        request.setTo(workgroupJID);

        return connection.createStanzaCollectorAndSend(request).nextResultOrThrow();
    }
236646
public List<Jid> getBlockList()
            throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {

        if (blockListCached == null) {
            BlockListIQ blockListIQ = new BlockListIQ();
            BlockListIQ blockListIQResult = connection().createStanzaCollectorAndSend(blockListIQ).nextResultOrThrow();
            blockListCached = blockListIQResult.getBlockedJidsCopy();
        }

        return Collections.unmodifiableList(blockListCached);
    }
348751
public com.google.appengine.v1.CreateVersionRequest getRequest() {
    return request_ == null ? com.google.appengine.v1.CreateVersionRequest.getDefaultInstance() : request_;
  }
273150
public ProtocolVersion getVersion() 
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getVersion");
    
    // The ProtocolVersion to be returned
    ProtocolVersion version = ProtocolVersion.UNKNOWN;
    // Get the MetaData out of the connection
    ConnectionMetaData connMetaData = connection.getMetaData();
    
    // If the MetaData is non-null we can retrieve a version.
    if(connMetaData != null)
      version = connMetaData.getProtocolVersion();
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getVersion", version);
  
    return version;
  }
10004
function(jid) {
        var arrayElements = jid.toString().split('/');
        if(arrayElements.length === 0){
            return null;
        }
        return arrayElements[arrayElements.length-1];
    }
1259833
public int getVersion() {

    Element versionElement = (Element) xmlResponse.getElementsByTagName(
      "version").item(0);

    if (versionElement == null) {

      return 0;
    }

    return Integer.parseInt(versionElement.getFirstChild().getNodeValue());
  }
732347
public static String getJavaVersion() {
        String[] sysPropParms = new String[] {"java.runtime.version", "java.version"};
        for (int i = 0; i < sysPropParms.length; i++) {
            String val = System.getProperty(sysPropParms[i]);
            if (!StringUtil.isEmpty(val)) {
                return val;
            }
        }
        return null;
    }
1113894
public Version version(String versionName, boolean pool) throws VersionException, RepositoryException
   {
      JCRName jcrVersionName = locationFactory.parseJCRName(versionName);
      VersionImpl version =
         (VersionImpl)dataManager.getItem(nodeData(), new QPathEntry(jcrVersionName.getInternalName(), 1), pool,
            ItemType.NODE, false);
      if (version == null)
      {
         throw new VersionException("There are no version with name '" + versionName + "' in the version history "
            + getPath());
      }

      return version;
   }
116990
public boolean enable(Jid pushJid, String node)
            throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
        return enable(pushJid, node, null);
    }
295828
public HashMap<Jid, MUCLightAffiliation> getAffiliations()
            throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
        return getAffiliations(null);
    }
627128
public static String getJenkinsVersion(final HttpResponse response) {
        final Header[] hdrs = response.getHeaders("X-Jenkins");
        return hdrs.length == 0 ? "" : hdrs[0].getValue();
    }
5385
public synchronized DownloadResponse getJnlpFile( JnlpResource jnlpres, DownloadRequest dreq )
            throws IOException
    {
        String path = jnlpres.getPath();
        URL resource = jnlpres.getResource();
        long lastModified = jnlpres.getLastModified();

        _log.addDebug( "lastModified: " + lastModified + " " + new Date( lastModified ) );
        if ( lastModified == 0 )
        {
            _log.addWarning( "servlet.log.warning.nolastmodified", path );
        }

        // fix for 4474854:  use the request URL as key to look up jnlp file
        // in hash map
        String reqUrl = HttpUtils.getRequestURL( dreq.getHttpRequest() ).toString();

        // Check if entry already exist in HashMap
        JnlpFileEntry jnlpFile = (JnlpFileEntry) _jnlpFiles.get( reqUrl );

        if ( jnlpFile != null && jnlpFile.getLastModified() == lastModified )
        {
            // Entry found in cache, so return it
            return jnlpFile.getResponse();
        }

        // Read information from WAR file
        long timeStamp = lastModified;
        String mimeType = _servletContext.getMimeType( path );
        if ( mimeType == null )
        {
            mimeType = JNLP_MIME_TYPE;
        }

        StringBuilder jnlpFileTemplate = new StringBuilder();
        URLConnection conn = resource.openConnection();
        BufferedReader br = new BufferedReader( new InputStreamReader( conn.getInputStream(), "UTF-8" ) );
        String line = br.readLine();
        if ( line != null && line.startsWith( "TS:" ) )
        {
            timeStamp = parseTimeStamp( line.substring( 3 ) );
            _log.addDebug( "Timestamp: " + timeStamp + " " + new Date( timeStamp ) );
            if ( timeStamp == 0 )
            {
                _log.addWarning( "servlet.log.warning.notimestamp", path );
                timeStamp = lastModified;
            }
            line = br.readLine();
        }
        while ( line != null )
        {
            jnlpFileTemplate.append( line );
            line = br.readLine();
        }

        String jnlpFileContent = specializeJnlpTemplate( dreq.getHttpRequest(), path, jnlpFileTemplate.toString() );

        // Convert to bytes as a UTF-8 encoding
        byte[] byteContent = jnlpFileContent.getBytes( "UTF-8" );

        // Create entry
        DownloadResponse resp =
                DownloadResponse.getFileDownloadResponse( byteContent, mimeType, timeStamp, jnlpres.getReturnVersionId() );
        jnlpFile = new JnlpFileEntry( resp, lastModified );
        _jnlpFiles.put( reqUrl, jnlpFile );

        return resp;
    }
886382
def get_version_by_version_id(version_id):
    
    for ver in registry.version_info:
        if ver.version_id == version_id:
            return ver.id

    return None
176164
public JavadocQuirks getJavadocVersion() {
        if ( javadocVersion == null ) {
            String javaVersion = System.getProperty("java.version");
            if ( javaVersion != null && javaVersion.compareTo("1.8") >= 0 ) {
                return JavadocQuirks.V8;
            }
            else {
                return JavadocQuirks.V7;
            }
        }
        return javadocVersion;
    }
1273955
@Override
	public VersionInfo version() {
		return credHubOperations.doWithRest(restOperations -> {
			ResponseEntity<VersionInfo> response = restOperations
					.getForEntity(VERSION_URL_PATH, VersionInfo.class);

			ExceptionUtils.throwExceptionOnError(response);

			return response.getBody();
		});
	}
937766
public static byte[] journalIdStringToBytes(String jid) {
    byte[] byteArray = new byte[jid.length()];
    for (int i = 0; i < jid.length(); i++) {
      byteArray[i] = (byte) jid.charAt(i);
    }
    return byteArray;
  }