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

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

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

Document.getBoolean介绍

[英]Get the boolean value in this document for the given field name.
[中]获取此文档中给定字段名的布尔值。

代码示例

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

@Override
  public boolean isQueryable() {
    return federatedDocument.getBoolean(DocumentTranslator.QUERYABLE_FIELD, true);
  }
}

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

/**
 * Checks whether journaling is enabled or not, based on a journaling configuration having been provided.
 *
 * @return true if journaling is enabled, or false otherwise
 */
public boolean isEnabled() {
  return this.journalingDoc != EMPTY && this.journalingDoc.getBoolean(FieldName.JOURNAL_ENABLED, true);
}

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

/**
   * Determine whether users that fail all other authentication should be automatically logged in as an anonymous user.
   *
   * @return true if non-authenticated users should be given anonymous sessions, or false if authenication should fail; the
   *         default is '{@value Default#USE_ANONYMOUS_ON_FAILED_LOGINS}'.
   */
  public boolean useAnonymousOnFailedLogings() {
    return anonymous.getBoolean(FieldName.USE_ANONYMOUS_ON_FAILED_LOGINS, Default.USE_ANONYMOUS_ON_FAILED_LOGINS);
  }
}

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

@Override
  public boolean isQueryable() {
    return federatedDocument.getBoolean(DocumentTranslator.QUERYABLE_FIELD, true);
  }
}

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

/**
   * Determine whether users that fail all other authentication should be automatically logged in as an anonymous user.
   *
   * @return true if non-authenticated users should be given anonymous sessions, or false if authenication should fail; the
   *         default is '{@value Default#USE_ANONYMOUS_ON_FAILED_LOGINS}'.
   */
  public boolean useAnonymousOnFailedLogings() {
    return anonymous.getBoolean(FieldName.USE_ANONYMOUS_ON_FAILED_LOGINS, Default.USE_ANONYMOUS_ON_FAILED_LOGINS);
  }
}

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

/**
 * Checks whether journaling is enabled or not, based on a journaling configuration having been provided.
 *
 * @return true if journaling is enabled, or false otherwise
 */
public boolean isEnabled() {
  return this.journalingDoc != EMPTY && this.journalingDoc.getBoolean(FieldName.JOURNAL_ENABLED, true);
}

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

/**
 * Get whether the reindexing should be done synchronously or asynchronously
 * 
 * @return {@code true} if the reindexing should be performed asynchronously, {@code false} otherwise
 */
public boolean isAsync() {
  return reindexing == null || reindexing.getBoolean(FieldName.REINDEXING_ASYNC, true);
}

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

/**
   * Determine whether monitoring is enabled. The default is to enable monitoring, but this can be used to turn off support
   * for monitoring should it not be necessary.
   *
   * @return true if monitoring is enabled, or false if it is disabled
   */
  public boolean enabled() {
    return monitoring.getBoolean(FieldName.MONITORING_ENABLED, Default.MONITORING_ENABLED);
  }
}

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

/**
 * Get whether the reindexing should be done synchronously or asynchronously
 * 
 * @return {@code true} if the reindexing should be performed asynchronously, {@code false} otherwise
 */
public boolean isAsync() {
  return reindexing == null || reindexing.getBoolean(FieldName.REINDEXING_ASYNC, true);
}

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

/**
   * Determine whether monitoring is enabled. The default is to enable monitoring, but this can be used to turn off support
   * for monitoring should it not be necessary.
   *
   * @return true if monitoring is enabled, or false if it is disabled
   */
  public boolean enabled() {
    return monitoring.getBoolean(FieldName.MONITORING_ENABLED, Default.MONITORING_ENABLED);
  }
}

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

@Override
public boolean isSynchronous() {
  return doc.getBoolean(FieldName.SYNCHRONOUS, Default.SYNCHRONOUS);
}

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

/**
 * Whether asynchronous writes shoudl be enabled or not.
 *
 * @return true if anyschronos writes should be enabled.
 */
public boolean asyncWritesEnabled() {
  return this.journalingDoc.getBoolean(FieldName.ASYNC_WRITES_ENABLED, Default.ASYNC_WRITES_ENABLED);
}

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

public boolean isCreatingWorkspacesAllowed() {
  Document workspaces = doc.getDocument(FieldName.WORKSPACES);
  if (workspaces != null) {
    return workspaces.getBoolean(FieldName.ALLOW_CREATION, Default.ALLOW_CREATION);
  }
  return Default.ALLOW_CREATION;
}

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

public boolean isCreatingWorkspacesAllowed() {
  Document workspaces = doc.getDocument(FieldName.WORKSPACES);
  if (workspaces != null) {
    return workspaces.getBoolean(FieldName.ALLOW_CREATION, Default.ALLOW_CREATION);
  }
  return Default.ALLOW_CREATION;
}

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

private Object createReferenceFromString( ReferenceFactory referenceFactory,
                     Document doc,
                     String valueStr ) {
  boolean isForeign = doc.getBoolean("$foreign");
  if (!NodeKey.isValidFormat(valueStr)) {
    throw new IllegalStateException("The reference " + valueStr + " is corrupt: expected a node-key reference");
  }
  return referenceFactory.create(new NodeKey(valueStr), isForeign);
}

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

private Object createReferenceFromString( ReferenceFactory referenceFactory,
                     Document doc,
                     String valueStr ) {
  boolean isForeign = doc.getBoolean("$foreign");
  if (!NodeKey.isValidFormat(valueStr)) {
    throw new IllegalStateException("The reference " + valueStr + " is corrupt: expected a node-key reference");
  }
  return referenceFactory.create(new NodeKey(valueStr), isForeign);
}

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

protected void addValidatorsForRequired( Document parent,
                     Path parentPath,
                     Problems problems,
                     CompositeValidator validators ) {
  Boolean required = parent.getBoolean("required", Boolean.FALSE);
  if (required.booleanValue()) {
    String requiredName = parentPath.getLast();
    if (requiredName != null) {
      validators.add(new RequiredValidator(requiredName));
    }
  }
}

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

protected void addValidatorsForRequired( Document parent,
                     Path parentPath,
                     Problems problems,
                     CompositeValidator validators ) {
  Boolean required = parent.getBoolean("required", Boolean.FALSE);
  if (required.booleanValue()) {
    String requiredName = parentPath.getLast();
    if (requiredName != null) {
      validators.add(new RequiredValidator(requiredName));
    }
  }
}

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

protected void addValidatorsForUniqueItems( Document parent,
                      Path parentPath,
                      Problems problems,
                      CompositeValidator validators ) {
  if (parent.getBoolean("uniqueItems", false)) {
    String requiredName = parentPath.getLast();
    if (requiredName != null) {
      validators.add(new UniqueItemsValidator(requiredName));
    }
  }
}

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

protected void addValidatorsForUniqueItems( Document parent,
                      Path parentPath,
                      Problems problems,
                      CompositeValidator validators ) {
  if (parent.getBoolean("uniqueItems", false)) {
    String requiredName = parentPath.getLast();
    if (requiredName != null) {
      validators.add(new UniqueItemsValidator(requiredName));
    }
  }
}

相关文章