org.modeshape.schematic.document.Document.getString()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(6.5k)|赞(0)|评价(0)|浏览(135)

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

Document.getString介绍

[英]Get the string value in this document for the given field name. This method will return the string even if the actual value is a Symbol.
[中]获取此文档中给定字段名的字符串值。即使实际值是符号,此方法也将返回字符串。

代码示例

代码示例来源:origin: org.fcrepo/modeshape-jcr

/**
 * Returns the type of the configured binary store.
 *
 * @return the type of the configured binary store, never {@code null}
 */
public String getType() {
  return binaryStorage.getString(FieldName.TYPE, FieldValue.BINARY_STORAGE_TYPE_TRANSIENT);
}

代码示例来源:origin: ModeShape/modeshape

/**
 * Get the name of the thread pool that should be used for optimization work.
 *
 * @return the thread pool name; never null
 */
public String getThreadPoolName() {
  return optimization.getString(FieldName.THREAD_POOL, Default.OPTIMIZATION_POOL);
}

代码示例来源:origin: ModeShape/modeshape

/**
 * Get the name of the thread pool that should be used for sequencing work.
 *
 * @return the thread pool name; never null
 */
public String getThreadPoolName() {
  return sequencing.getString(FieldName.THREAD_POOL, Default.SEQUENCING_POOL);
}

代码示例来源:origin: ModeShape/modeshape

/**
 * Get the time that the first garbage collection process should be run.
 *
 * @return the initial time; never null
 */
public String getInitialTimeExpression() {
  return gc.getString(FieldName.INITIAL_TIME, Default.GARBAGE_COLLECTION_INITIAL_TIME);
}

代码示例来源:origin: ModeShape/modeshape

/**
 * The location of the journal
 *
 * @return a {@code non-null} String
 */
public String location() {
  return this.journalingDoc.getString(FieldName.JOURNAL_LOCATION, Default.JOURNAL_LOCATION);
}

代码示例来源:origin: org.fcrepo/modeshape-jcr

/**
 * Get the time that the first garbage collection process should be run.
 *
 * @return the initial time; never null
 */
public String getInitialTimeExpression() {
  return gc.getString(FieldName.INITIAL_TIME, Default.GARBAGE_COLLECTION_INITIAL_TIME);
}

代码示例来源:origin: org.fcrepo/modeshape-jcr

/**
 * Get the name of the thread pool that should be used for sequencing work.
 *
 * @return the thread pool name; never null
 */
public String getThreadPoolName() {
  return sequencing.getString(FieldName.THREAD_POOL, Default.SEQUENCING_POOL);
}

代码示例来源:origin: org.fcrepo/modeshape-jcr

/**
 * The location of the journal
 *
 * @return a {@code non-null} String
 */
public String location() {
  return this.journalingDoc.getString(FieldName.JOURNAL_LOCATION, Default.JOURNAL_LOCATION);
}

代码示例来源:origin: ModeShape/modeshape

/**
 * Returns the type of the configured binary store.
 *
 * @return the type of the configured binary store, never {@code null}
 */
public String getType() {
  return binaryStorage.getString(FieldName.TYPE, FieldValue.BINARY_STORAGE_TYPE_TRANSIENT);
}

代码示例来源:origin: ModeShape/modeshape

/**
 * Get the name of the thread pool that should be used for garbage collection work.
 *
 * @return the thread pool name; never null
 */
public String getThreadPoolName() {
  return gc.getString(FieldName.THREAD_POOL, Default.GARBAGE_COLLECTION_POOL);
}

代码示例来源:origin: ModeShape/modeshape

/**
 * Get the time that the first optimization process should be run.
 *
 * @return the initial time; never null
 */
public String getInitialTimeExpression() {
  return optimization.getString(FieldName.INITIAL_TIME, Default.OPTIMIZATION_INITIAL_TIME);
}

代码示例来源:origin: ModeShape/modeshape

/**
 * Get the time that the first GC process should be run.
 *
 * @return the initial time; never null
 */
public String getInitialTimeExpression() {
  return journalingDoc.getString(FieldName.INITIAL_TIME, Default.GARBAGE_COLLECTION_INITIAL_TIME);
}

代码示例来源:origin: org.fcrepo/modeshape-jcr

/**
   * Get the name of the JAAS policy.
   *
   * @return the policy name; never null and '{@value Default#JAAS_POLICY_NAME}' by default.
   */
  public String getPolicyName() {
    String policy = jaas.getString(FieldName.JAAS_POLICY_NAME, Default.JAAS_POLICY_NAME);
    return policy != null && policy.trim().length() == 0 ? null : policy;
  }
}

代码示例来源:origin: ModeShape/modeshape

/**
   * Get the name of the JAAS policy.
   *
   * @return the policy name; never null and '{@value Default#JAAS_POLICY_NAME}' by default.
   */
  public String getPolicyName() {
    String policy = jaas.getString(FieldName.JAAS_POLICY_NAME, Default.JAAS_POLICY_NAME);
    return policy != null && policy.trim().length() == 0 ? null : policy;
  }
}

代码示例来源:origin: ModeShape/modeshape

@Override
public WorkspaceMatchRule getWorkspaceMatchRule() {
  String rule = doc.getString(FieldName.WORKSPACES, Default.WORKSPACES);
  return RepositoryIndexDefinition.workspaceMatchRule(rule);
}

代码示例来源:origin: ModeShape/modeshape

/**
 * Get the name of the workspace that should be used for sessions where the client does not specify the name of the workspace.
 *
 * @return the default workspace name; never null
 */
public String getDefaultWorkspaceName() {
  Document workspaces = doc.getDocument(FieldName.WORKSPACES);
  if (workspaces != null) {
    return workspaces.getString(FieldName.DEFAULT, Default.DEFAULT);
  }
  return Default.DEFAULT;
}

代码示例来源:origin: ModeShape/modeshape

/**
   * Gets the way reindexing should be performed.
   * 
   * @return a {@link ReindexingMode} instance, never {@code null}
   */
  public ReindexingMode mode() {
    String defaultMode = ReindexingMode.IF_MISSING.name();
    String reindexingMode = reindexing == null ? defaultMode : reindexing.getString(FieldName.REINDEXING_MODE, defaultMode);
    return ReindexingMode.valueOf(reindexingMode.toUpperCase());
  }
}

代码示例来源:origin: org.fcrepo/modeshape-jcr

public ChildReferencesInfo getChildReferencesInfo( Document document ) {
  // Now look at the 'childrenInfo' document for info about the next block ...
  Document childrenInfo = document.getDocument(CHILDREN_INFO);
  if (childrenInfo != null) {
    long totalSize = childrenInfo.getLong(COUNT, 0L);
    long blockSize = childrenInfo.getLong(BLOCK_SIZE, 0L);
    String nextBlockKey = childrenInfo.getString(NEXT_BLOCK);
    String lastBlockKey = childrenInfo.getString(LAST_BLOCK, nextBlockKey);
    return new ChildReferencesInfo(totalSize, blockSize, nextBlockKey, lastBlockKey);
  }
  return null;
}

代码示例来源:origin: org.fcrepo/modeshape-jcr

private static Document ensureNamed( Document document,
                   String documentName ) {
  String name = document.getString(FieldName.NAME);
  if (isEmpty(name) && documentName != null && documentName.trim().length() != 0) {
    EditableDocument doc = Schematic.newDocument(document);
    doc.setString(FieldName.NAME, documentName);
    document = doc;
  }
  return document;
}

代码示例来源:origin: ModeShape/modeshape

public ChildReferencesInfo getChildReferencesInfo( Document document ) {
  // Now look at the 'childrenInfo' document for info about the next block ...
  Document childrenInfo = document.getDocument(CHILDREN_INFO);
  if (childrenInfo != null) {
    long totalSize = childrenInfo.getLong(COUNT, 0L);
    long blockSize = childrenInfo.getLong(BLOCK_SIZE, 0L);
    String nextBlockKey = childrenInfo.getString(NEXT_BLOCK);
    String lastBlockKey = childrenInfo.getString(LAST_BLOCK, nextBlockKey);
    return new ChildReferencesInfo(totalSize, blockSize, nextBlockKey, lastBlockKey);
  }
  return null;
}

相关文章