本文整理了Java中org.apache.jackrabbit.util.Text.replace()
方法的一些代码示例,展示了Text.replace()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Text.replace()
方法的具体详情如下:
包路径:org.apache.jackrabbit.util.Text
类名称:Text
方法名:replace
[英]Replaces all occurrences of oldString
in text
with newString
.
[中]将text
中所有出现的oldString
替换为newString
。
代码示例来源:origin: org.apache.jackrabbit/jackrabbit-core
/**
* Replace wildcards and return the expanded SQL statement.
*
* @param sql The SQL with embedded wildcards.
* @return The SQL with no wildcards present.
*/
protected String createSchemaSql(String sql) {
// replace prefix variable
return Text.replace(sql, SCHEMA_OBJECT_PREFIX_VARIABLE, schemaObjectPrefix);
}
代码示例来源:origin: apache/jackrabbit
/**
* Replace wildcards and return the expanded SQL statement.
*
* @param sql The SQL with embedded wildcards.
* @return The SQL with no wildcards present.
*/
protected String createSchemaSql(String sql) {
// replace prefix variable
return Text.replace(sql, SCHEMA_OBJECT_PREFIX_VARIABLE, schemaObjectPrefix);
}
代码示例来源:origin: org.apache.jackrabbit/jackrabbit-data
/**
* Get the expanded property value. The following placeholders are supported:
* ${table}: the table name (the default is DATASTORE) and
* ${tablePrefix}: tablePrefix plus schemaObjectPrefix as set in the configuration
*
* @param prop the properties object
* @param key the key
* @param defaultValue the default value
* @return the property value (placeholders are replaced)
*/
protected String getProperty(Properties prop, String key, String defaultValue) {
String sql = prop.getProperty(key, defaultValue);
sql = Text.replace(sql, "${table}", tableSQL).trim();
sql = Text.replace(sql, "${tablePrefix}", tablePrefix + schemaObjectPrefix).trim();
return sql;
}
代码示例来源:origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak
/**
* Get the expanded property value. The following placeholders are supported:
* ${table}: the table name (the default is DATASTORE) and
* ${tablePrefix}: tablePrefix plus schemaObjectPrefix as set in the configuration
*
* @param prop the properties object
* @param key the key
* @param defaultValue the default value
* @return the property value (placeholders are replaced)
*/
protected String getProperty(Properties prop, String key, String defaultValue) {
String sql = prop.getProperty(key, defaultValue);
sql = Text.replace(sql, "${table}", tableSQL).trim();
sql = Text.replace(sql, "${tablePrefix}", tablePrefix + schemaObjectPrefix).trim();
return sql;
}
代码示例来源:origin: apache/jackrabbit
/**
* Get the expanded property value. The following placeholders are supported:
* ${table}: the table name (the default is DATASTORE) and
* ${tablePrefix}: tablePrefix plus schemaObjectPrefix as set in the configuration
*
* @param prop the properties object
* @param key the key
* @param defaultValue the default value
* @return the property value (placeholders are replaced)
*/
protected String getProperty(Properties prop, String key, String defaultValue) {
String sql = prop.getProperty(key, defaultValue);
sql = Text.replace(sql, "${table}", tableSQL).trim();
sql = Text.replace(sql, "${tablePrefix}", tablePrefix + schemaObjectPrefix).trim();
return sql;
}
代码示例来源:origin: org.apache.jackrabbit/jackrabbit-data
/**
* Applies the variable replacement to the given string.
*
* @param sql the string in which to replace variables
* @return the new string
*/
private String replace(String sql) {
String result = sql;
for (Map.Entry<String, String> entry : varReplacement.entrySet()) {
result = Text.replace(result, entry.getKey(), entry.getValue()).trim();
}
return result;
}
}
代码示例来源:origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak
/**
* Applies the variable replacement to the given string.
*
* @param sql the string in which to replace variables
* @return the new string
*/
private String replace(String sql) {
String result = sql;
for (Map.Entry<String, String> entry : varReplacement.entrySet()) {
result = Text.replace(result, entry.getKey(), entry.getValue()).trim();
}
return result;
}
}
代码示例来源:origin: apache/jackrabbit
/**
* Applies the variable replacement to the given string.
*
* @param sql the string in which to replace variables
* @return the new string
*/
private String replace(String sql) {
String result = sql;
for (Map.Entry<String, String> entry : varReplacement.entrySet()) {
result = Text.replace(result, entry.getKey(), entry.getValue()).trim();
}
return result;
}
}
代码示例来源:origin: org.apache.jackrabbit/jackrabbit-core
protected String createSchemaSql(String sql) {
return Text.replace(
super.createSchemaSql(sql), TABLE_SPACE_VARIABLE, tableSpace);
}
}
代码示例来源:origin: apache/jackrabbit
protected String createSchemaSql(String sql) {
return Text.replace(
super.createSchemaSql(sql), TABLE_SPACE_VARIABLE, tableSpace);
}
}
代码示例来源:origin: apache/jackrabbit
sql = Text.replace(sql, SCHEMA_OBJECT_PREFIX_VARIABLE, schemaObjectPrefix);
tspace = "tablespace " + tableSpace;
sql = Text.replace(sql, TABLE_SPACE_VARIABLE, tspace).trim();
代码示例来源:origin: org.apache.jackrabbit/jackrabbit-jcr-commons
if (encodeBlanks) {
textVal = Text.replace(textVal, " ", "_x0020_");
代码示例来源:origin: apache/jackrabbit
if (encodeBlanks) {
textVal = Text.replace(textVal, " ", "_x0020_");
代码示例来源:origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak
if (encodeBlanks) {
textVal = Text.replace(textVal, " ", "_x0020_");
代码示例来源:origin: org.apache.jackrabbit/jackrabbit-jcr-commons
if (decodeBlanks) {
value = Text.replace(value, "_x0020_", " ");
代码示例来源:origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak
if (decodeBlanks) {
value = Text.replace(value, "_x0020_", " ");
代码示例来源:origin: apache/jackrabbit
if (decodeBlanks) {
value = Text.replace(value, "_x0020_", " ");
代码示例来源:origin: org.apache.jackrabbit/com.springsource.org.apache.jackrabbit.commons
if (decodeBlanks) {
value = Text.replace(value, "_x0020_", " ");
代码示例来源:origin: apache/jackrabbit
creation.setTimeInMillis(creationTime);
Name tokenName = session.getQName(Text.replace(ISO8601.format(creation), ":", "."));
NodeImpl tokenNode = super.addNode(tokenParent, tokenName, session.getQName(TOKEN_NT_NAME), NodeId.randomId());
代码示例来源:origin: org.apache.jackrabbit/jackrabbit-core
creation.setTimeInMillis(creationTime);
Name tokenName = session.getQName(Text.replace(ISO8601.format(creation), ":", "."));
NodeImpl tokenNode = super.addNode(tokenParent, tokenName, session.getQName(TOKEN_NT_NAME), NodeId.randomId());
内容来源于网络,如有侵权,请联系作者删除!