Example usage for java.net URI getPath

List of usage examples for java.net URI getPath

Introduction

In this page you can find the example usage for java.net URI getPath.

Prototype

public String getPath() 

Source Link

Document

Returns the decoded path component of this URI.

Usage

From source file:com.orange.clara.tool.crawlers.rss.RssCrawler.java

@Override
public String generateTitle(WatchedResource watchedResource) throws CrawlerGetContentException {
    URI uri = URI.create(watchedResource.getLink());
    return "Rss feed from " + uri.getHost() + uri.getPath();
}

From source file:edu.stanford.junction.provider.bluetooth.JunctionProvider.java

@Override
public Junction newJunction(URI uri, ActivityScript script, JunctionActor actor) throws JunctionException {
    mConfig.setUuid(UUID.fromString(uri.getPath().substring(1)));
    return new edu.stanford.junction.provider.bluetooth.Junction(uri, script, actor, mConfig);
}

From source file:be.dnsbelgium.rdap.client.RDAPClient.java

public RDAPClient(HttpClient httpClient, String baseUrl) throws URISyntaxException {
    this.httpClient = httpClient;
    URI uri = new URI(baseUrl);
    this.path = uri.getPath().startsWith("/") ? uri.getPath() : "/" + uri.getPath();
    this.host = Utils.httpHost(baseUrl);
    this.mapper = new CustomObjectMapper();
}

From source file:com.subgraph.vega.internal.model.web.WebModel.java

private String uriToPath(URI uri) {
    return uri.getPath();
}

From source file:cascading.plumber.taps.DfsFactory.java

@Override
@SuppressWarnings({ "unchecked", "rawtypes" })
public <Config, Input, Output, SourceContext, SinkContext> Tap<Config, Input, Output> create(URI uri,
        Scheme<Config, Input, Output, SourceContext, SinkContext> scheme) throws URIException {
    return (Tap) new Dfs((Scheme) scheme, uri.getPath());
}

From source file:cascading.plumber.taps.HfsFactory.java

@Override
@SuppressWarnings({ "unchecked", "rawtypes" })
public <Config, Input, Output, SourceContext, SinkContext> Tap<Config, Input, Output> create(URI uri,
        Scheme<Config, Input, Output, SourceContext, SinkContext> scheme) throws URIException {
    return (Tap) new Hfs((Scheme) scheme, uri.getPath());
}

From source file:cascading.plumber.taps.LfsFactory.java

@Override
@SuppressWarnings({ "unchecked", "rawtypes" })
public <Config, Input, Output, SourceContext, SinkContext> Tap<Config, Input, Output> create(URI uri,
        Scheme<Config, Input, Output, SourceContext, SinkContext> scheme) throws URIException {
    return (Tap) new Lfs((Scheme) scheme, uri.getPath());
}

From source file:edu.si.services.sidora.rest.batch.MimeTypeTest.java

@Test
public void mimeTypeTest() throws URISyntaxException {
    String string = "test-data/mimetype-test-files/Canon5DMkII_50mm_100_f4_001.dng";

    URI path2 = new URI(string);

    System.out//  w  ww  .j  av  a  2s . c  om
            .println(FilenameUtils.getName(path2.getPath()) + " || MIME=" + new Tika().detect(path2.getPath()));

}

From source file:cascading.plumber.taps.FileTapFactory.java

@Override
@SuppressWarnings({ "unchecked", "rawtypes" })
public <Config, Input, Output, SourceContext, SinkContext> Tap<Config, Input, Output> create(URI uri,
        Scheme<Config, Input, Output, SourceContext, SinkContext> scheme) throws URIException {
    return (Tap) new FileTap((Scheme) scheme, uri.getPath());
}

From source file:net.hillsdon.reviki.web.dispatching.impl.DispatcherImpl.java

/**
 * Return the path segment of the URI with ;jssesionid parameter stripped of
 * (if necessary)./*w w  w  . jav  a  2 s.c  o m*/
 *
 * The container handles the jsessionid for us but unfortunately Tomcat and
 * Jetty behave differently with respect to whether they include it in
 * getRequestURI().
 *
 * @param requestURI
 * @return requestURI with the ;jsessionid path segment parameter stripped.
 * @throws AssertionError
 */
String getStrippedPath(final URI requestURI) {
    String path = requestURI.getPath();
    int jsessionId = path.indexOf(";jsessionid");
    if (jsessionId != -1) {
        path = path.substring(0, jsessionId);
    }
    return path;
}