本文整理了Java中org.restlet.data.Reference.getTargetRef
方法的一些代码示例,展示了Reference.getTargetRef
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Reference.getTargetRef
方法的具体详情如下:
包路径:org.restlet.data.Reference
类名称:Reference
方法名:getTargetRef
[英]Returns the target reference. This method resolves relative references against the base reference then normalize them.
[中]返回目标引用。该方法将相对引用与基本引用进行解析,然后对它们进行规范化。
代码示例来源:origin: internetarchive/heritrix3
beanPath += field + "]";
info.put("url", new Reference(baseRef, "../beans/" + TextUtils.urlEscape(beanPath)).getTargetRef());
info.put("url", new Reference(baseRef, "../beans/" + key).getTargetRef());
return info;
代码示例来源:origin: internetarchive/heritrix3
bean.put("url", new Reference(baseRef, "../beans/" + getBeanToNameMap().get(obj)).getTargetRef());
bean.put("class", obj.getClass().getName());
代码示例来源:origin: internetarchive/heritrix3
/**
* Constructs a nested Map data structure with the information represented
* by this Resource. The result is particularly suitable for use with with
* {@link XmlMarshaller}.
*
* @return the nested Map data structure
*/
protected ScriptModel makeDataModel() {
String baseRef = getRequest().getResourceRef().getBaseRef().toString();
if(!baseRef.endsWith("/")) {
baseRef += "/";
}
Reference baseRefRef = new Reference(baseRef);
ScriptModel model = new ScriptModel(scriptingConsole,
new Reference(baseRefRef, "..").getTargetRef().toString(),
getAvailableScriptEngines());
return model;
}
代码示例来源:origin: internetarchive/heritrix3
new Reference(getRequest().getResourceRef().getBaseRef(), "..").getTargetRef().toString(),
beanPath,
bean,
代码示例来源:origin: org.restlet/org.restlet
/**
* Returns true if both reference are equivalent, meaning that they resolve
* to the same target reference.
*
* @param ref
* The reference to compare.
* @return True if both reference are equivalent.
*/
public boolean isEquivalentTo(Reference ref) {
return getTargetRef().equals(ref.getTargetRef());
}
代码示例来源:origin: DeviceConnect/DeviceConnect-Android
/**
* Returns true if both reference are equivalent, meaning that they resolve
* to the same target reference.
*
* @param ref
* The reference to compare.
* @return True if both reference are equivalent.
*/
public boolean isEquivalentTo(Reference ref) {
return getTargetRef().equals(ref.getTargetRef());
}
代码示例来源:origin: org.restlet.osgi/org.restlet
/**
* Returns true if both reference are equivalent, meaning that they resolve
* to the same target reference.
*
* @param ref
* The reference to compare.
* @return True if both reference are equivalent.
*/
public boolean isEquivalentTo(Reference ref) {
return getTargetRef().equals(ref.getTargetRef());
}
代码示例来源:origin: DeviceConnect/DeviceConnect-Android
/**
* Converts to a {@link java.net.URI} instance. Note that relative
* references are resolved before conversion using the
* {@link #getTargetRef()} method.
*
* @return A {@link java.net.URI} instance.
*/
public java.net.URI toUri() {
return java.net.URI.create(getTargetRef().toString());
}
代码示例来源:origin: org.restlet.osgi/org.restlet
/**
* Converts to a {@link java.net.URI} instance. Note that relative
* references are resolved before conversion using the {@link #getTargetRef()} method.
*
* @return A {@link java.net.URI} instance.
*/
public java.net.URI toUri() {
return java.net.URI.create(getTargetRef().toString());
}
代码示例来源:origin: org.restlet.osgi/org.restlet
/**
* Constructor.
*
* @param localRef
* The local reference.
*/
public LocalReference(Reference localRef) {
super(localRef.getTargetRef().toString());
}
代码示例来源:origin: org.sonatype.nexus/nexus-rest-api
protected Reference createReference( Reference base, String relPart )
{
Reference ref = new Reference( base, relPart );
return updateBaseRefPath( ref ).getTargetRef();
}
代码示例来源:origin: uk.org.mygrid.remotetaverna/taverna-rest-client
public UserREST getUser() throws NotSuccessException {
if (user == null) {
// Find current user through redirect
// TODO: Support data directly at currentUserURI?
Response response = head(getCurrentUserURI());
user = new UserREST(this, response.getRedirectRef().getTargetRef());
}
return user;
}
代码示例来源:origin: org.sonatype.nexus.plugins/nexus-restlet1x-plugin
protected Reference createRootReference(Request request, String relPart) {
Reference ref = new Reference(getContextRoot(request), relPart);
if (!ref.getBaseRef().getPath().endsWith("/")) {
ref.getBaseRef().setPath(ref.getBaseRef().getPath() + "/");
}
return ref.getTargetRef();
}
代码示例来源:origin: org.restlet.jse/org.restlet.example
public MailRepresentation retrieve() {
MailRepresentation mail = new MailRepresentation();
mail.setStatus("received");
mail.setSubject("Message to self");
mail.setContent("Doh!");
mail.setAccountRef(new Reference(getReference(), "..").getTargetRef()
.toString());
return mail;
}
代码示例来源:origin: org.restlet.jse/org.restlet.example
public Mail retrieve() {
Mail mail = new Mail();
mail.setStatus("received");
mail.setSubject("Message to self");
mail.setContent("Doh!");
mail.setAccountRef(new Reference(getReference(), "..").getTargetRef()
.toString());
return mail;
}
代码示例来源:origin: org.restlet.jse/org.restlet.example
public Mail retrieve() {
Mail mail = new Mail();
mail.setStatus("received");
mail.setSubject("Message to self");
mail.setContent("Doh!");
mail.setAccountRef(new Reference(getReference(), "..").getTargetRef()
.toString());
return mail;
}
代码示例来源:origin: org.restlet.jse/org.restlet.example
public MailRepresentation retrieve() {
MailRepresentation mail = new MailRepresentation();
mail.setStatus("received");
mail.setSubject("Message to self");
mail.setContent("Doh!");
mail.setAccountRef(new Reference(getReference(), "..").getTargetRef()
.toString());
return mail;
}
代码示例来源:origin: org.restlet.jse/org.restlet.example
public Mail retrieve() {
Mail mail = new Mail();
mail.setStatus("received");
mail.setSubject("Message to self");
mail.setContent("Doh!");
mail.setAccountRef(new Reference(getReference(), "..").getTargetRef()
.toString());
return mail;
}
代码示例来源:origin: org.restlet.jse/org.restlet.example
public Mail retrieve() {
Mail mail = new Mail();
mail.setStatus("received");
mail.setSubject("Message to self");
mail.setContent("Doh!");
mail.setAccountRef(new Reference(getReference(), "..").getTargetRef()
.toString());
return mail;
}
代码示例来源:origin: org.restlet.jse/org.restlet.example
@Get
public Representation toJson() {
// Create the mail bean
Mail mail = new Mail();
mail.setStatus("received");
mail.setSubject("Message to self");
mail.setContent("Doh!");
mail.setAccountRef(new Reference(getReference(), "..").getTargetRef()
.toString());
// Wraps the bean with a Jackson representation
return new JacksonRepresentation<Mail>(mail);
}
内容来源于网络,如有侵权,请联系作者删除!