Obtains the service description of the service identified by the URI

@param serviceUri the URI of the service to obtain
@return the service description if it exists or null otherwise
@throws uk.ac.open.kmi.iserve.sal.exception.ServiceException
345292
@Override
    public Service getService(URI serviceUri) throws ServiceException {
        if (serviceUri == null || !serviceUri.isAbsolute()) {
            log.warn("The Service URI is either absent or relative. Provide an absolute URI");
            return null;
        }

        OntModel model = null;
        try {
            model = this.graphStoreManager.getGraph(URIUtil.getNameSpace(serviceUri));
        } catch (URISyntaxException e) {
            log.error("The namespace of the service is not a correct URI", e);
            return null;
        }

        // Parse the service. There should only be one in the response
        ServiceReaderImpl reader = new ServiceReaderImpl();
        List<Service> services = reader.parseService(model);
        if (services != null && !services.isEmpty()) {
            return services.get(0);
        }

        return null;
    }
270594
@Override
    public String getURI() {
        ServletRESTRequestImpl ret = castRequest();
        if (ret != null)
            return ret.getURI();
        return null;
    }
424446
public String getUri() {
        final Object requestUri = getHeader(HttpMessageHeaders.HTTP_REQUEST_URI);

        if (requestUri != null) {
            return requestUri.toString();
        }

        return null;
    }
660884
public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
        try {
            if (com.google.api.ads.admanager.axis.v201808.AdExclusionRuleServiceInterface.class.isAssignableFrom(serviceEndpointInterface)) {
                com.google.api.ads.admanager.axis.v201808.AdExclusionRuleServiceSoapBindingStub _stub = new com.google.api.ads.admanager.axis.v201808.AdExclusionRuleServiceSoapBindingStub(new java.net.URL(AdExclusionRuleServiceInterfacePort_address), this);
                _stub.setPortName(getAdExclusionRuleServiceInterfacePortWSDDServiceName());
                return _stub;
            }
        }
        catch (java.lang.Throwable t) {
            throw new javax.xml.rpc.ServiceException(t);
        }
        throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface:  " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
    }
911160
public String getUri() {

        String uri = m_context.addSiteRoot(m_context.getUri());
        if (m_detailViewId != null) {
            uri += m_detailViewId.toString() + "/";
        }
        return uri;
    }
330704
@Override
    public URI getURI() throws URIException {
        StringBuffer buffer = new StringBuffer();
        if (this.httphost != null) {
            buffer.append(this.httphost.getProtocol().getScheme());
            buffer.append("://");
            buffer.append(this.httphost.getHostName());
            int port = this.httphost.getPort();
            if (port != -1 && port != this.httphost.getProtocol().getDefaultPort()) {
                buffer.append(":");
                buffer.append(port);
            }
        }
        buffer.append(this.path);
        if (this.queryString != null) {
            buffer.append('?');
            buffer.append(this.queryString);
        }
        String charset = getParams().getUriCharset();
        return new URI(buffer.toString(), true, charset);
    }
964153
@Provides
    @Named(JanusConfig.PUB_URI)
    public static URI getPubURIAsURI() {
        final String v = getPUBURIAsString();
        try {
            return NetworkUtil.toURI(v);
        } catch (URISyntaxException e) {
            throw new IOError(e);
        }
    }
1240271
private <T extends IEntity> String getUri(Boolean platformService, String action, Context context, Map<String, String> requestParameters, Boolean entitlementService)
			throws FMSException {
		String uri = null;
		if (!platformService) {
			
			ServiceType serviceType = context.getIntuitServiceType();
			if (entitlementService) {
				uri = prepareEntitlementUri(context);
			}
			else if (ServiceType.QBO == serviceType) {
				uri = prepareQBOUri(action, context, requestParameters);
			} else if (ServiceType.QBOPremier == serviceType) {
				uri = prepareQBOPremierUri(action, context, requestParameters);
			} else {
				throw new FMSException("SDK doesn't support for the service type : " + serviceType);
			}
		} else {
			uri = prepareIPSUri(action, context);
		}

		return uri;
	}
803918
public String getRequestURI() {
    if ((message == null) || (((Request) message).getRequestURI() == null)) {
      return "";
    }

    return ((Request) message).getRequestURI().toString();
  }
468554
@Override
    public String getRestURI(String baseServiceURI) {

        StringBuilder requestURI = new StringBuilder();
        
        requestURI.append(baseServiceURI);

        if (StringUtils.isNotBlank(entityName)) {
            appendToURI(requestURI, entityName);
            if (StringUtils.isNotBlank(entityVersion)) {
                appendToURI(requestURI, entityVersion);
            }
        }
        if (StringUtils.isNotBlank(getOperationPathParam())) {
            appendToURI(requestURI, getOperationPathParam());
        }

        return requestURI.toString();
    }
637540
protected final URI getProviderURI() throws JMSException
    {
        String providerURL = getProviderURL();
        URI parsedURL;
        try
        {
            parsedURL = new URI(providerURL);
        }
        catch (URISyntaxException e)
        {
            throw new FFMQException("Malformed provider URL : "+providerURL,"INVALID_PROVIDER_URL");
        }
        if (!parsedURL.isAbsolute())
            throw new FFMQException("Invalid provider URL : "+providerURL,"INVALID_PROVIDER_URL");
        
        return parsedURL;
    }
442763
public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
        try {
            if (com.google.api.ads.admanager.axis.v201808.ContentBundleServiceInterface.class.isAssignableFrom(serviceEndpointInterface)) {
                com.google.api.ads.admanager.axis.v201808.ContentBundleServiceSoapBindingStub _stub = new com.google.api.ads.admanager.axis.v201808.ContentBundleServiceSoapBindingStub(new java.net.URL(ContentBundleServiceInterfacePort_address), this);
                _stub.setPortName(getContentBundleServiceInterfacePortWSDDServiceName());
                return _stub;
            }
        }
        catch (java.lang.Throwable t) {
            throw new javax.xml.rpc.ServiceException(t);
        }
        throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface:  " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
    }
180528
public java.util.List<ServiceTypeDetail> getServiceType() {
        if (serviceType == null) {
            serviceType = new com.amazonaws.internal.SdkInternalList<ServiceTypeDetail>();
        }
        return serviceType;
    }
570023
private ApplicationDefinition getApplication(String uri, Tenant tenant) {
        if (uri.length() < 2 || uri.startsWith("/_")) {
            return null;    // Non-application request
        }
        String[] pathNodes = uri.substring(1).split("/");
        String appName = Utils.urlDecode(pathNodes[0]);
        ApplicationDefinition appDef = SchemaService.instance().getApplication(tenant, appName);
        if (appDef == null) {
            throw new NotFoundException("Unknown application: " + appName);
        }
        return appDef;
    }
194577
public static void validateURI(String uri) throws ServiceException {
        if (uri == null || uri.isEmpty() || !validateRequiredField(uri, urlRegEx) || !isValidBrace(uri)) {
            throw new ServiceException(ErrorCode.SERVICE_INSTANCE_URI_FORMAT_ERROR);
        }
    }
1300388
public java.util.List<ServiceDetail> getServiceDetails() {
        if (serviceDetails == null) {
            serviceDetails = new com.amazonaws.internal.SdkInternalList<ServiceDetail>();
        }
        return serviceDetails;
    }
860031
@Override
    public Set<URI> listOperations(URI serviceUri) {
        if (serviceUri == null) {
            return ImmutableSet.of();
        }

        ImmutableSet.Builder<URI> result = ImmutableSet.builder();
        for (URI operation : this.svcOpMap.get(serviceUri)) {
            result.add(operation);
        }

        return result.build();
    }