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

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

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

Reference.updateIndexes介绍

[英]Updates internal indexes.
[中]更新内部索引。

代码示例

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

/**
 * Constructor from an URI reference (most likely relative).
 * 
 * @param baseRef
 *            The base reference.
 * @param uriRef
 *            The URI reference, either absolute or relative.
 */
public Reference(Reference baseRef, String uriRef) {
  uriRef = encodeInvalidCharacters(uriRef);
  this.baseRef = baseRef;
  this.internalRef = uriRef;
  updateIndexes();
}

代码示例来源:origin: DeviceConnect/DeviceConnect-Android

/**
 * Constructor from an URI reference (most likely relative).
 * 
 * @param baseRef
 *            The base reference.
 * @param uriRef
 *            The URI reference, either absolute or relative.
 */
public Reference(Reference baseRef, String uriRef) {
  uriRef = encodeInvalidCharacters(uriRef);
  this.baseRef = baseRef;
  this.internalRef = uriRef;
  updateIndexes();
}

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

/**
 * Constructor from an URI reference (most likely relative).
 * 
 * @param baseRef
 *            The base reference.
 * @param uriRef
 *            The URI reference, either absolute or relative.
 */
public Reference(Reference baseRef, String uriRef) {
  uriRef = encodeInvalidCharacters(uriRef);
  this.baseRef = baseRef;
  this.internalRef = uriRef;
  updateIndexes();
}

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

/**
 * Sets the absolute resource identifier.
 * 
 * @param identifier
 *            The absolute resource identifier.
 * @throws IllegalArgumentException
 *             If the identifier parameter contains the fragment delimiter
 *             ('#').
 */
public void setIdentifier(String identifier) {
  identifier = encodeInvalidCharacters(identifier);
  if (identifier == null) {
    identifier = "";
  }
  if (identifier.indexOf('#') != -1) {
    throw new IllegalArgumentException(
        "Illegal '#' character detected in parameter");
  }
  if (hasFragment()) {
    // Fragment found
    this.internalRef = identifier
        + this.internalRef.substring(this.fragmentIndex);
  } else {
    // No fragment found
    this.internalRef = identifier;
  }
  updateIndexes();
}

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

/**
 * Sets the absolute resource identifier.
 * 
 * @param identifier
 *            The absolute resource identifier.
 * @throws IllegalArgumentException
 *             If the identifier parameter contains the fragment delimiter
 *             ('#').
 */
public void setIdentifier(String identifier) {
  identifier = encodeInvalidCharacters(identifier);
  if (identifier == null) {
    identifier = "";
  }
  if (identifier.indexOf('#') != -1) {
    throw new IllegalArgumentException(
        "Illegal '#' character detected in parameter");
  }
  if (hasFragment()) {
    // Fragment found
    this.internalRef = identifier
        + this.internalRef.substring(this.fragmentIndex);
  } else {
    // No fragment found
    this.internalRef = identifier;
  }
  updateIndexes();
}

代码示例来源:origin: DeviceConnect/DeviceConnect-Android

/**
 * Sets the absolute resource identifier.
 * 
 * @param identifier
 *            The absolute resource identifier.
 * @throws IllegalArgumentException
 *             If the identifier parameter contains the fragment delimiter
 *             ('#').
 */
public void setIdentifier(String identifier) {
  identifier = encodeInvalidCharacters(identifier);
  if (identifier == null) {
    identifier = "";
  }
  if (identifier.indexOf('#') != -1) {
    throw new IllegalArgumentException(
        "Illegal '#' character detected in parameter");
  }
  if (hasFragment()) {
    // Fragment found
    this.internalRef = identifier
        + this.internalRef.substring(this.fragmentIndex);
  } else {
    // No fragment found
    this.internalRef = identifier;
  }
  updateIndexes();
}

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

updateIndexes();

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

updateIndexes();

代码示例来源:origin: DeviceConnect/DeviceConnect-Android

updateIndexes();

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

updateIndexes();

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

updateIndexes();

代码示例来源:origin: DeviceConnect/DeviceConnect-Android

updateIndexes();

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

updateIndexes();

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

updateIndexes();

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

/**
 * Sets the relative part for relative references only.
 * 
 * @param relativePart
 *            The relative part to set.
 */
public void setRelativePart(String relativePart) {
  relativePart = encodeInvalidCharacters(relativePart);
  if (relativePart == null) {
    relativePart = "";
  }
  if (!hasScheme()) {
    // This is a relative reference, no scheme found
    if (hasQuery()) {
      // Query found
      this.internalRef = relativePart
          + this.internalRef.substring(this.queryIndex);
    } else if (hasFragment()) {
      // Fragment found
      this.internalRef = relativePart
          + this.internalRef.substring(this.fragmentIndex);
    } else {
      // No fragment found
      this.internalRef = relativePart;
    }
  }
  updateIndexes();
}

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

updateIndexes();

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

updateIndexes();

代码示例来源:origin: DeviceConnect/DeviceConnect-Android

updateIndexes();

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

/**
 * Sets the relative part for relative references only.
 * 
 * @param relativePart
 *            The relative part to set.
 */
public void setRelativePart(String relativePart) {
  relativePart = encodeInvalidCharacters(relativePart);
  if (relativePart == null) {
    relativePart = "";
  }
  if (!hasScheme()) {
    // This is a relative reference, no scheme found
    if (hasQuery()) {
      // Query found
      this.internalRef = relativePart
          + this.internalRef.substring(this.queryIndex);
    } else if (hasFragment()) {
      // Fragment found
      this.internalRef = relativePart
          + this.internalRef.substring(this.fragmentIndex);
    } else {
      // No fragment found
      this.internalRef = relativePart;
    }
  }
  updateIndexes();
}

代码示例来源:origin: DeviceConnect/DeviceConnect-Android

/**
 * Sets the relative part for relative references only.
 * 
 * @param relativePart
 *            The relative part to set.
 */
public void setRelativePart(String relativePart) {
  relativePart = encodeInvalidCharacters(relativePart);
  if (relativePart == null) {
    relativePart = "";
  }
  if (!hasScheme()) {
    // This is a relative reference, no scheme found
    if (hasQuery()) {
      // Query found
      this.internalRef = relativePart
          + this.internalRef.substring(this.queryIndex);
    } else if (hasFragment()) {
      // Fragment found
      this.internalRef = relativePart
          + this.internalRef.substring(this.fragmentIndex);
    } else {
      // No fragment found
      this.internalRef = relativePart;
    }
  }
  updateIndexes();
}

相关文章

Reference类方法