本文整理了Java中org.modeshape.schematic.document.Document.getInteger()
方法的一些代码示例,展示了Document.getInteger()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Document.getInteger()
方法的具体详情如下:
包路径:org.modeshape.schematic.document.Document
类名称:Document
方法名:getInteger
[英]Get the integer value in this document for the given field name.
[中]
代码示例来源:origin: org.fcrepo/modeshape-jcr
/**
* Get the optimization interval in hours.
*
* @return the interval; never null
*/
public int getIntervalInHours() {
return optimization.getInteger(FieldName.INTERVAL_IN_HOURS, Default.OPTIMIZATION_INTERVAL_IN_HOURS);
}
代码示例来源:origin: ModeShape/modeshape
/**
* Get the GC interval in hours.
*
* @return the interval; never null
*/
public int getIntervalInHours() {
return journalingDoc.getInteger(FieldName.INTERVAL_IN_HOURS, Default.GARBAGE_COLLECTION_INTERVAL_IN_HOURS);
}
}
代码示例来源:origin: org.fcrepo/modeshape-jcr
/**
* Get the maximum number of threads that can be spawned for sequencing at the same time
*
* @return the max number of threads
*/
public int getMaxPoolSize() {
return textExtracting.getInteger(FieldName.MAX_POOL_SIZE, Default.TEXT_EXTRACTION_MAX_POOL_SIZE);
}
代码示例来源:origin: org.fcrepo/modeshape-jcr
/**
* Get the garbage collection interval in hours.
*
* @return the interval; never null
*/
public int getIntervalInHours() {
return gc.getInteger(FieldName.INTERVAL_IN_HOURS, Default.GARBAGE_COLLECTION_INTERVAL_IN_HOURS);
}
代码示例来源:origin: org.fcrepo/modeshape-jcr
/**
* Get the maximum number of threads that can be spawned for sequencing at the same time
*
* @return the max number of threads
*/
public int getMaxPoolSize() {
return sequencing.getInteger(FieldName.MAX_POOL_SIZE, Default.SEQUENCING_MAX_POOL_SIZE);
}
代码示例来源:origin: org.fcrepo/modeshape-jcr
/**
* The maximum number of days journal entries should be kept on disk
*
* @return the number of days
*/
public int maxDaysToKeepRecords() {
return this.journalingDoc.getInteger(FieldName.MAX_DAYS_TO_KEEP_RECORDS, Default.MAX_DAYS_TO_KEEP_RECORDS);
}
代码示例来源:origin: org.fcrepo/modeshape-jcr
/**
* Get the GC interval in hours.
*
* @return the interval; never null
*/
public int getIntervalInHours() {
return journalingDoc.getInteger(FieldName.INTERVAL_IN_HOURS, Default.GARBAGE_COLLECTION_INTERVAL_IN_HOURS);
}
}
代码示例来源:origin: ModeShape/modeshape
/**
* Get the maximum number of threads that can be spawned for sequencing at the same time
*
* @return the max number of threads
*/
public int getMaxPoolSize() {
return textExtracting.getInteger(FieldName.MAX_POOL_SIZE, Default.TEXT_EXTRACTION_MAX_POOL_SIZE);
}
代码示例来源:origin: ModeShape/modeshape
/**
* Get the optimization interval in hours.
*
* @return the interval; never null
*/
public int getIntervalInHours() {
return optimization.getInteger(FieldName.INTERVAL_IN_HOURS, Default.OPTIMIZATION_INTERVAL_IN_HOURS);
}
代码示例来源:origin: org.fcrepo/modeshape-jcr
public int getEventBusSize() {
return doc.getInteger(FieldName.EVENT_BUS_SIZE, Default.EVENT_BUS_SIZE);
}
代码示例来源:origin: org.fcrepo/modeshape-jcr
/**
* Get the target for the number of children in a single persisted node document.
*
* @return the child count target
*/
public int getChildCountTarget() {
Integer result = optimization.getInteger(FieldName.OPTIMIZATION_CHILD_COUNT_TARGET);
return result == null ? Integer.MAX_VALUE : result.intValue();
}
代码示例来源:origin: ModeShape/modeshape
/**
* Get the target for the number of children in a single persisted node document.
*
* @return the child count target
*/
public int getChildCountTarget() {
Integer result = optimization.getInteger(FieldName.OPTIMIZATION_CHILD_COUNT_TARGET);
return result == null ? Integer.MAX_VALUE : result.intValue();
}
代码示例来源:origin: ModeShape/modeshape
/**
* Get the tolerance for the number of children in a single persisted node document. Generally, the documents are
* optimized only when the actual number of children differs from the target by the tolerance.
*
* @return the child count tolerance
*/
public int getChildCountTolerance() {
Integer result = optimization.getInteger(FieldName.OPTIMIZATION_CHILD_COUNT_TOLERANCE);
return result == null ? 0 : result.intValue();
}
}
代码示例来源:origin: org.fcrepo/modeshape-jcr
/**
* Get the tolerance for the number of children in a single persisted node document. Generally, the documents are
* optimized only when the actual number of children differs from the target by the tolerance.
*
* @return the child count tolerance
*/
public int getChildCountTolerance() {
Integer result = optimization.getInteger(FieldName.OPTIMIZATION_CHILD_COUNT_TOLERANCE);
return result == null ? 0 : result.intValue();
}
}
代码示例来源:origin: org.fcrepo/modeshape-jcr
public int getWorkspaceCacheSize() {
Document storage = doc.getDocument(FieldName.WORKSPACES);
if (storage != null) {
return storage.getInteger(FieldName.WORKSPACE_CACHE_SIZE, Default.WORKSPACE_CACHE_SIZE);
}
return Default.WORKSPACE_CACHE_SIZE;
}
代码示例来源:origin: ModeShape/modeshape
public int getWorkspaceCacheSize() {
Document storage = doc.getDocument(FieldName.WORKSPACES);
if (storage != null) {
return storage.getInteger(FieldName.WORKSPACE_CACHE_SIZE, Default.WORKSPACE_CACHE_SIZE);
}
return Default.WORKSPACE_CACHE_SIZE;
}
代码示例来源:origin: org.modeshape/modeshape-schematic
protected void addValidatorsForMaximumItems( Document parent,
Path parentPath,
Problems problems,
CompositeValidator validators ) {
int maximum = parent.getInteger("maxItems", 0);
if (maximum > 0) {
String requiredName = parentPath.getLast();
if (requiredName != null) {
validators.add(new MaximumItemsValidator(requiredName, maximum));
}
}
}
代码示例来源:origin: org.modeshape/modeshape-schematic
protected void addValidatorsForMaximumLength( Document parent,
Path parentPath,
Problems problems,
CompositeValidator validators ) {
int maximumLength = parent.getInteger("maximumLength", 0);
if (maximumLength > 0) {
String requiredName = parentPath.getLast();
if (requiredName != null) {
validators.add(new MaximumLengthValidator(requiredName, maximumLength));
}
}
}
代码示例来源:origin: org.modeshape/modeshape-schematic
protected void addValidatorsForMinimumItems( Document parent,
Path parentPath,
Problems problems,
CompositeValidator validators ) {
int minimum = parent.getInteger("minItems", 0);
if (minimum > 0) {
String requiredName = parentPath.getLast();
if (requiredName != null) {
validators.add(new MinimumItemsValidator(requiredName, minimum));
}
}
}
代码示例来源:origin: ModeShape/modeshape
protected void addValidatorsForMaximumLength( Document parent,
Path parentPath,
Problems problems,
CompositeValidator validators ) {
int maximumLength = parent.getInteger("maximumLength", 0);
if (maximumLength > 0) {
String requiredName = parentPath.getLast();
if (requiredName != null) {
validators.add(new MaximumLengthValidator(requiredName, maximumLength));
}
}
}
内容来源于网络,如有侵权,请联系作者删除!