Example usage for java.net URI toASCIIString

List of usage examples for java.net URI toASCIIString

Introduction

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

Prototype

public String toASCIIString() 

Source Link

Document

Returns the content of this URI as a US-ASCII string.

Usage

From source file:org.apache.taverna.scufl2.translator.t2flow.defaultactivities.BeanshellActivityParser.java

@Override
public boolean canHandlePlugin(URI activityURI) {
    String activityUriStr = activityURI.toASCIIString();
    if (activityUriStr.startsWith(activityRavenURI.toASCIIString())
            && activityUriStr.endsWith(activityClassName))
        return true;
    if (activityUriStr.startsWith(localWorkerActivityRavenURI.toASCIIString())
            && activityUriStr.endsWith(localWorkerActivityClassName))
        return true;
    return false;
}

From source file:be.ceau.solrtalk.model.Doc.java

@XmlTransient
public void setURI(URI uri) {
    addField(new Field(Attribute.URL, StringEscapeUtils.escapeXml10(uri.toASCIIString())));
}

From source file:net.smktarunabhakti.penjualan.ui.controller.BarangController.java

@RequestMapping(value = "/barang", method = RequestMethod.POST)
@ResponseStatus(HttpStatus.CREATED)// w w w  .j a va 2s.co  m
public void create(@RequestBody @Valid Barang x, HttpServletRequest request, HttpServletResponse response) {
    appService.simpanBarang(x);
    String requesturl = request.getRequestURL().toString();
    URI uri = new UriTemplate("{requestUrl}/{id}").expand(requesturl, x.getId());
    response.setHeader("location", uri.toASCIIString());
}

From source file:org.apache.taverna.scufl2.translator.t2flow.t23activities.RESTActivityParser.java

@Override
public boolean canHandlePlugin(URI activityURI) {
    String activityUriStr = activityURI.toASCIIString();
    return (activityUriStr.startsWith(restRavenURI.toASCIIString())
            || activityUriStr.startsWith(ravenUIURI.toASCIIString())) && activityUriStr.endsWith(className);
}

From source file:com.zotoh.maedr.device.FeedIO.java

@Override
protected void onOneLoop() throws Exception {
    SyndFeedInput input = new SyndFeedInput(_validate);
    //        SyndFeed feed;
    for (URI u : _urls) {
        dispatch(new FeedEvent(this, u.toASCIIString(), input.build(new XmlReader(u.toURL()))));
    }/*from   www  . j  a va 2s  . co m*/
}

From source file:org.apache.olingo.client.core.communication.request.retrieve.v3.ODataLinkCollectionRequestImpl.java

/**
 * Private constructor.//from w  w w . j a v  a2s .  c o  m
 *
 * @param odataClient client instance getting this request
 * @param targetURI target URI.
 * @param linkName link name.
 */
ODataLinkCollectionRequestImpl(final ODataClient odataClient, final URI targetURI, final String linkName) {
    super(odataClient,
            odataClient.newURIBuilder(targetURI.toASCIIString()).appendLinksSegment(linkName).build());
}

From source file:org.gatherdata.data.dao.jpa.model.JpaFlatForm.java

@Override
public void setUid(URI uid) {
    this.uidAsString = uid.toASCIIString();
    this.uid = uid;
}

From source file:com.msopentech.odatajclient.engine.data.json.JSONFeed.java

/**
 * {@inheritDoc }//from  w  w  w  .  j a v  a2 s.  c  o  m
 */
@JsonIgnore
@Override
public void setNext(final URI next) {
    this.next = next.toASCIIString();
}

From source file:com.msopentech.odatajclient.engine.data.json.JSONFeed.java

/**
* Sets URI to context of current entries list.
*
* @param context Context URI.//w  w  w.  j a v a 2 s . c om
*/
@JsonIgnore
public void setContext(final URI context) {
    this.context = context.toASCIIString();
}

From source file:com.artivisi.belajar.restful.ui.controller.PermissionController.java

@RequestMapping(value = "/permission", method = RequestMethod.POST)
@ResponseStatus(HttpStatus.CREATED)/*  w  w  w.j  av a  2s . com*/
public void create(@RequestBody @Valid Permission x, HttpServletRequest request, HttpServletResponse response) {
    belajarRestfulService.save(x);
    String requestUrl = request.getRequestURL().toString();
    URI uri = new UriTemplate("{requestUrl}/{id}").expand(requestUrl, x.getId());
    response.setHeader("Location", uri.toASCIIString());
}