org.restlet.data.Reference.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(5.6k)|赞(0)|评价(0)|浏览(144)

本文整理了Java中org.restlet.data.Reference.<init>方法的一些代码示例,展示了Reference.<init>的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Reference.<init>方法的具体详情如下:
包路径:org.restlet.data.Reference
类名称:Reference
方法名:<init>

Reference.<init>介绍

[英]Empty constructor.
[中]空构造函数。

代码示例

代码示例来源:origin: internetarchive/heritrix3

@Override
      protected Reference determineRootRef(Request request) {
        String ref = "file:/";
        return new Reference(ref);
      }};
anypath.setListingAllowed(true);

代码示例来源:origin: internetarchive/heritrix3

@Override
      protected Reference determineRootRef(Request request) {
        try {
          return new Reference(
            EngineApplication.this.getEngine()
            .getJob(TextUtils.urlUnescape(
              (String)request.getAttributes().get("job")))
            .getJobDir().getCanonicalFile().toURI().toString());
        } catch (IOException e) {
          throw new RuntimeException(e);
        }
      }};
jobdir.setListingAllowed(true);

代码示例来源: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

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

new Reference(getRequest().getResourceRef().getBaseRef(), "..").getTargetRef().toString(), 
beanPath, 
bean,

代码示例来源:origin: org.restlet.osgi/org.restlet

/**
 * Constructor with the URI reference to the XML configuration file.
 * 
 * @param xmlConfigurationRef
 *            The URI reference to the XML configuration file.
 * @deprecated Use XML support in the Spring extension instead.
 */
@Deprecated
public Component(String xmlConfigurationRef) {
  this((xmlConfigurationRef == null) ? null : new Reference(
      xmlConfigurationRef));
}

代码示例来源:origin: org.restlet/org.restlet

/**
 * Creates then adds a reference at the end of the list.
 * 
 * @param uri
 *            The uri of the reference to add.
 * @return True (as per the general contract of the Collection.add method).
 */
public boolean add(String uri) {
  return add(new Reference(uri));
}

代码示例来源:origin: org.restlet.osgi/org.restlet

/**
 * Sets the base reference for relative references.
 * 
 * @param baseUri
 *            The base URI for relative references.
 */
public void setBaseRef(String baseUri) {
  setBaseRef(new Reference(baseUri));
}

代码示例来源:origin: org.restlet/org.restlet

/**
 * Sets the base reference for relative references.
 * 
 * @param baseUri
 *            The base URI for relative references.
 */
public void setBaseRef(String baseUri) {
  setBaseRef(new Reference(baseUri));
}

代码示例来源:origin: org.restlet/org.restlet

/**
 * Sets the list reference.
 * 
 * @param identifier
 *            The list identifier as a URI.
 */
public void setIdentifier(String identifier) {
  setIdentifier(new Reference(identifier));
}

代码示例来源:origin: org.restlet.jee/org.restlet.ext.atom

/**
 * Constructor.
 * 
 * @param entryUri
 *            The entry URI.
 * @throws IOException
 */
public Entry(String entryUri) throws IOException {
  this(new Client(new Reference(entryUri).getSchemeProtocol()), entryUri);
}

代码示例来源:origin: org.restlet.jee/org.restlet.ext.atom

/**
 * Constructor.
 * 
 * @param categoriesUri
 *            The feed URI.
 * @throws IOException
 */
public Categories(String categoriesUri) throws IOException {
  this(new Client(new Reference(categoriesUri).getSchemeProtocol()),
      categoriesUri);
}

代码示例来源:origin: org.restlet.osgi/org.restlet

/**
 * Sets the host reference using an URI string. Note that when used with
 * HTTP connectors, this property maps to the "Host" header.
 * 
 * @param hostUri
 *            The host URI.
 */
public void setHostRef(String hostUri) {
  setHostRef(new Reference(hostUri));
}

代码示例来源:origin: org.restlet.android/org.restlet.ext.atom

/**
 * Constructor.
 * 
 * @param feedUri
 *            The feed URI.
 * @throws IOException
 */
public Feed(String feedUri) throws IOException {
  this(new Client(new Reference(feedUri).getSchemeProtocol()), feedUri);
}

代码示例来源: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: org.restlet.jse/org.restlet.example

private void addFoafProperty(Graph graph, Reference subject,
    String predicate, String object) {
  graph.add(subject, new Reference(FOAF_NS + predicate), new Literal(
      object));
}

代码示例来源: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;
}

相关文章

微信公众号

最新文章

更多

Reference类方法