repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
partition
stringclasses
1 value
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/cache/SiblingCounter.java
SiblingCounter.constant
public static SiblingCounter constant( final int count ) { assert count > -1; return new SiblingCounter() { @Override public int countSiblingsNamed( Name childName ) { return count; } }; }
java
public static SiblingCounter constant( final int count ) { assert count > -1; return new SiblingCounter() { @Override public int countSiblingsNamed( Name childName ) { return count; } }; }
[ "public", "static", "SiblingCounter", "constant", "(", "final", "int", "count", ")", "{", "assert", "count", ">", "-", "1", ";", "return", "new", "SiblingCounter", "(", ")", "{", "@", "Override", "public", "int", "countSiblingsNamed", "(", "Name", "childName...
Create a sibling counter that always return the supplied count, regardless of the name or node. @param count the count to be returned; may not be negative @return the counter that always returns {@code count}; never null
[ "Create", "a", "sibling", "counter", "that", "always", "return", "the", "supplied", "count", "regardless", "of", "the", "name", "or", "node", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/cache/SiblingCounter.java#L60-L68
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/cache/SiblingCounter.java
SiblingCounter.alter
public static SiblingCounter alter( final SiblingCounter counter, final int delta ) { assert counter != null; return new SiblingCounter() { @Override public int countSiblingsNamed( Name childName ) { int count = counter.coun...
java
public static SiblingCounter alter( final SiblingCounter counter, final int delta ) { assert counter != null; return new SiblingCounter() { @Override public int countSiblingsNamed( Name childName ) { int count = counter.coun...
[ "public", "static", "SiblingCounter", "alter", "(", "final", "SiblingCounter", "counter", ",", "final", "int", "delta", ")", "{", "assert", "counter", "!=", "null", ";", "return", "new", "SiblingCounter", "(", ")", "{", "@", "Override", "public", "int", "cou...
Creates a sibling counter that alters another counter by a constant value. @param counter the sibling counter; may not be null @param delta the positive or negative amount by which the {@code counter}'s value is altered @return the sibling counter; never null
[ "Creates", "a", "sibling", "counter", "that", "alters", "another", "counter", "by", "a", "constant", "value", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/cache/SiblingCounter.java#L112-L122
train
ModeShape/modeshape
web/modeshape-web-jcr-rest/src/main/java/org/modeshape/web/jcr/rest/handler/RestRepositoryHandler.java
RestRepositoryHandler.getWorkspaces
public RestWorkspaces getWorkspaces( HttpServletRequest request, String repositoryName ) throws RepositoryException { assert request != null; assert repositoryName != null; RestWorkspaces workspaces = new RestWorkspaces(); Session session = getSe...
java
public RestWorkspaces getWorkspaces( HttpServletRequest request, String repositoryName ) throws RepositoryException { assert request != null; assert repositoryName != null; RestWorkspaces workspaces = new RestWorkspaces(); Session session = getSe...
[ "public", "RestWorkspaces", "getWorkspaces", "(", "HttpServletRequest", "request", ",", "String", "repositoryName", ")", "throws", "RepositoryException", "{", "assert", "request", "!=", "null", ";", "assert", "repositoryName", "!=", "null", ";", "RestWorkspaces", "wor...
Returns the list of workspaces available to this user within the named repository. @param request the servlet request; may not be null @param repositoryName the name of the repository; may not be null @return the list of workspaces available to this user within the named repository, as a {@link RestWorkspaces} object ...
[ "Returns", "the", "list", "of", "workspaces", "available", "to", "this", "user", "within", "the", "named", "repository", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/web/modeshape-web-jcr-rest/src/main/java/org/modeshape/web/jcr/rest/handler/RestRepositoryHandler.java#L66-L78
train
ModeShape/modeshape
web/modeshape-web-jcr-rest/src/main/java/org/modeshape/web/jcr/rest/handler/RestRepositoryHandler.java
RestRepositoryHandler.backupRepository
public Response backupRepository( ServletContext context, HttpServletRequest request, String repositoryName, BackupOptions options ) throws RepositoryException { final File backupLocation = resolv...
java
public Response backupRepository( ServletContext context, HttpServletRequest request, String repositoryName, BackupOptions options ) throws RepositoryException { final File backupLocation = resolv...
[ "public", "Response", "backupRepository", "(", "ServletContext", "context", ",", "HttpServletRequest", "request", ",", "String", "repositoryName", ",", "BackupOptions", "options", ")", "throws", "RepositoryException", "{", "final", "File", "backupLocation", "=", "resolv...
Performs a repository backup.
[ "Performs", "a", "repository", "backup", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/web/modeshape-web-jcr-rest/src/main/java/org/modeshape/web/jcr/rest/handler/RestRepositoryHandler.java#L83-L118
train
ModeShape/modeshape
web/modeshape-web-jcr-rest/src/main/java/org/modeshape/web/jcr/rest/handler/RestRepositoryHandler.java
RestRepositoryHandler.restoreRepository
public Response restoreRepository( ServletContext context, HttpServletRequest request, String repositoryName, String backupName, RestoreOptions options ) throws ...
java
public Response restoreRepository( ServletContext context, HttpServletRequest request, String repositoryName, String backupName, RestoreOptions options ) throws ...
[ "public", "Response", "restoreRepository", "(", "ServletContext", "context", ",", "HttpServletRequest", "request", ",", "String", "repositoryName", ",", "String", "backupName", ",", "RestoreOptions", "options", ")", "throws", "RepositoryException", "{", "if", "(", "St...
Restores a repository using an existing backup.
[ "Restores", "a", "repository", "using", "an", "existing", "backup", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/web/modeshape-web-jcr-rest/src/main/java/org/modeshape/web/jcr/rest/handler/RestRepositoryHandler.java#L123-L147
train
ModeShape/modeshape
modeshape-common/src/main/java/org/modeshape/common/statistic/SimpleStatistics.java
SimpleStatistics.add
public void add( T value ) { Lock lock = this.lock.writeLock(); try { lock.lock(); doAddValue(value); } finally { lock.unlock(); } }
java
public void add( T value ) { Lock lock = this.lock.writeLock(); try { lock.lock(); doAddValue(value); } finally { lock.unlock(); } }
[ "public", "void", "add", "(", "T", "value", ")", "{", "Lock", "lock", "=", "this", ".", "lock", ".", "writeLock", "(", ")", ";", "try", "{", "lock", ".", "lock", "(", ")", ";", "doAddValue", "(", "value", ")", ";", "}", "finally", "{", "lock", ...
Add a new value to these statistics. @param value the new value
[ "Add", "a", "new", "value", "to", "these", "statistics", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-common/src/main/java/org/modeshape/common/statistic/SimpleStatistics.java#L64-L72
train
ModeShape/modeshape
modeshape-common/src/main/java/org/modeshape/common/statistic/SimpleStatistics.java
SimpleStatistics.getTotal
public T getTotal() { Lock lock = this.lock.readLock(); lock.lock(); try { return this.total; } finally { lock.unlock(); } }
java
public T getTotal() { Lock lock = this.lock.readLock(); lock.lock(); try { return this.total; } finally { lock.unlock(); } }
[ "public", "T", "getTotal", "(", ")", "{", "Lock", "lock", "=", "this", ".", "lock", ".", "readLock", "(", ")", ";", "lock", ".", "lock", "(", ")", ";", "try", "{", "return", "this", ".", "total", ";", "}", "finally", "{", "lock", ".", "unlock", ...
Get the aggregate sum of the values in the series. @return the total of the values, or 0.0 if the {@link #getCount() count} is 0
[ "Get", "the", "aggregate", "sum", "of", "the", "values", "in", "the", "series", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-common/src/main/java/org/modeshape/common/statistic/SimpleStatistics.java#L107-L115
train
ModeShape/modeshape
modeshape-common/src/main/java/org/modeshape/common/statistic/SimpleStatistics.java
SimpleStatistics.getMaximum
public T getMaximum() { Lock lock = this.lock.readLock(); lock.lock(); try { return this.maximum; } finally { lock.unlock(); } }
java
public T getMaximum() { Lock lock = this.lock.readLock(); lock.lock(); try { return this.maximum; } finally { lock.unlock(); } }
[ "public", "T", "getMaximum", "(", ")", "{", "Lock", "lock", "=", "this", ".", "lock", ".", "readLock", "(", ")", ";", "lock", ".", "lock", "(", ")", ";", "try", "{", "return", "this", ".", "maximum", ";", "}", "finally", "{", "lock", ".", "unlock...
Get the maximum value in the series. @return the maximum value, or 0.0 if the {@link #getCount() count} is 0
[ "Get", "the", "maximum", "value", "in", "the", "series", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-common/src/main/java/org/modeshape/common/statistic/SimpleStatistics.java#L122-L130
train
ModeShape/modeshape
modeshape-common/src/main/java/org/modeshape/common/statistic/SimpleStatistics.java
SimpleStatistics.getMinimum
public T getMinimum() { Lock lock = this.lock.readLock(); lock.lock(); try { return this.minimum != null ? this.minimum : (T)this.math.createZeroValue(); } finally { lock.unlock(); } }
java
public T getMinimum() { Lock lock = this.lock.readLock(); lock.lock(); try { return this.minimum != null ? this.minimum : (T)this.math.createZeroValue(); } finally { lock.unlock(); } }
[ "public", "T", "getMinimum", "(", ")", "{", "Lock", "lock", "=", "this", ".", "lock", ".", "readLock", "(", ")", ";", "lock", ".", "lock", "(", ")", ";", "try", "{", "return", "this", ".", "minimum", "!=", "null", "?", "this", ".", "minimum", ":"...
Get the minimum value in the series. @return the minimum value, or 0.0 if the {@link #getCount() count} is 0
[ "Get", "the", "minimum", "value", "in", "the", "series", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-common/src/main/java/org/modeshape/common/statistic/SimpleStatistics.java#L137-L145
train
ModeShape/modeshape
modeshape-common/src/main/java/org/modeshape/common/statistic/SimpleStatistics.java
SimpleStatistics.getCount
public int getCount() { Lock lock = this.lock.readLock(); lock.lock(); try { return this.count; } finally { lock.unlock(); } }
java
public int getCount() { Lock lock = this.lock.readLock(); lock.lock(); try { return this.count; } finally { lock.unlock(); } }
[ "public", "int", "getCount", "(", ")", "{", "Lock", "lock", "=", "this", ".", "lock", ".", "readLock", "(", ")", ";", "lock", ".", "lock", "(", ")", ";", "try", "{", "return", "this", ".", "count", ";", "}", "finally", "{", "lock", ".", "unlock",...
Get the number of values that have been measured. @return the count
[ "Get", "the", "number", "of", "values", "that", "have", "been", "measured", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-common/src/main/java/org/modeshape/common/statistic/SimpleStatistics.java#L152-L160
train
ModeShape/modeshape
modeshape-common/src/main/java/org/modeshape/common/statistic/SimpleStatistics.java
SimpleStatistics.reset
public void reset() { Lock lock = this.lock.writeLock(); lock.lock(); try { doReset(); } finally { lock.unlock(); } }
java
public void reset() { Lock lock = this.lock.writeLock(); lock.lock(); try { doReset(); } finally { lock.unlock(); } }
[ "public", "void", "reset", "(", ")", "{", "Lock", "lock", "=", "this", ".", "lock", ".", "writeLock", "(", ")", ";", "lock", ".", "lock", "(", ")", ";", "try", "{", "doReset", "(", ")", ";", "}", "finally", "{", "lock", ".", "unlock", "(", ")",...
Reset the statistics in this object, and clear out any stored information.
[ "Reset", "the", "statistics", "in", "this", "object", "and", "clear", "out", "any", "stored", "information", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-common/src/main/java/org/modeshape/common/statistic/SimpleStatistics.java#L197-L205
train
ModeShape/modeshape
modeshape-schematic/src/main/java/org/modeshape/schematic/internal/schema/DocumentTransformer.java
DocumentTransformer.getSubstitutedProperty
public static String getSubstitutedProperty( String value, PropertyAccessor propertyAccessor ) { if (value == null || value.trim().length() == 0) return value; StringBuilder sb = new StringBuilder(value); // Get the index of the first constant,...
java
public static String getSubstitutedProperty( String value, PropertyAccessor propertyAccessor ) { if (value == null || value.trim().length() == 0) return value; StringBuilder sb = new StringBuilder(value); // Get the index of the first constant,...
[ "public", "static", "String", "getSubstitutedProperty", "(", "String", "value", ",", "PropertyAccessor", "propertyAccessor", ")", "{", "if", "(", "value", "==", "null", "||", "value", ".", "trim", "(", ")", ".", "length", "(", ")", "==", "0", ")", "return"...
getSubstitutedProperty is called to perform the property substitution on the value. @param value @param propertyAccessor @return String
[ "getSubstitutedProperty", "is", "called", "to", "perform", "the", "property", "substitution", "on", "the", "value", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-schematic/src/main/java/org/modeshape/schematic/internal/schema/DocumentTransformer.java#L78-L151
train
ModeShape/modeshape
modeshape-schematic/src/main/java/org/modeshape/schematic/internal/schema/DocumentTransformer.java
DocumentTransformer.split
private static List<String> split( String str, String splitter ) { StringTokenizer tokens = new StringTokenizer(str, splitter); ArrayList<String> l = new ArrayList<>(tokens.countTokens()); while (tokens.hasMoreTokens()) { l.add(tokens.nextToken(...
java
private static List<String> split( String str, String splitter ) { StringTokenizer tokens = new StringTokenizer(str, splitter); ArrayList<String> l = new ArrayList<>(tokens.countTokens()); while (tokens.hasMoreTokens()) { l.add(tokens.nextToken(...
[ "private", "static", "List", "<", "String", ">", "split", "(", "String", "str", ",", "String", "splitter", ")", "{", "StringTokenizer", "tokens", "=", "new", "StringTokenizer", "(", "str", ",", "splitter", ")", ";", "ArrayList", "<", "String", ">", "l", ...
Split a string into pieces based on delimiters. Similar to the perl function of the same name. The delimiters are not included in the returned strings. @param str Full string @param splitter Characters to split on @return List of String pieces from full string
[ "Split", "a", "string", "into", "pieces", "based", "on", "delimiters", ".", "Similar", "to", "the", "perl", "function", "of", "the", "same", "name", ".", "The", "delimiters", "are", "not", "included", "in", "the", "returned", "strings", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-schematic/src/main/java/org/modeshape/schematic/internal/schema/DocumentTransformer.java#L161-L169
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/connector/filesystem/FileSystemConnector.java
FileSystemConnector.checkFileNotExcluded
protected void checkFileNotExcluded( String id, File file ) { if (isExcluded(file)) { String msg = JcrI18n.fileConnectorCannotStoreFileThatIsExcluded.text(getSourceName(), id, file.getAbsolutePath()); throw new DocumentStoreException(id, msg); ...
java
protected void checkFileNotExcluded( String id, File file ) { if (isExcluded(file)) { String msg = JcrI18n.fileConnectorCannotStoreFileThatIsExcluded.text(getSourceName(), id, file.getAbsolutePath()); throw new DocumentStoreException(id, msg); ...
[ "protected", "void", "checkFileNotExcluded", "(", "String", "id", ",", "File", "file", ")", "{", "if", "(", "isExcluded", "(", "file", ")", ")", "{", "String", "msg", "=", "JcrI18n", ".", "fileConnectorCannotStoreFileThatIsExcluded", ".", "text", "(", "getSour...
Utility method to ensure that the file is writable by this connector. @param id the identifier of the node @param file the file @throws DocumentStoreException if the file is expected to be writable but is not or is excluded, or if the connector is readonly
[ "Utility", "method", "to", "ensure", "that", "the", "file", "is", "writable", "by", "this", "connector", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/connector/filesystem/FileSystemConnector.java#L471-L477
train
ModeShape/modeshape
web/modeshape-webdav/src/main/java/org/modeshape/webdav/fromcatalina/RequestUtil.java
RequestUtil.filter
public static String filter( String message ) { if (message == null) { return (null); } char content[] = new char[message.length()]; message.getChars(0, message.length(), content, 0); StringBuilder result = new StringBuilder(content.length + 50); for (int i ...
java
public static String filter( String message ) { if (message == null) { return (null); } char content[] = new char[message.length()]; message.getChars(0, message.length(), content, 0); StringBuilder result = new StringBuilder(content.length + 50); for (int i ...
[ "public", "static", "String", "filter", "(", "String", "message", ")", "{", "if", "(", "message", "==", "null", ")", "{", "return", "(", "null", ")", ";", "}", "char", "content", "[", "]", "=", "new", "char", "[", "message", ".", "length", "(", ")"...
Filter the specified message string for characters that are sensitive in HTML. This avoids potential attacks caused by including JavaScript codes in the request URL that is often reported in error messages. @param message The message string to be filtered @return the filtered message
[ "Filter", "the", "specified", "message", "string", "for", "characters", "that", "are", "sensitive", "in", "HTML", ".", "This", "avoids", "potential", "attacks", "caused", "by", "including", "JavaScript", "codes", "in", "the", "request", "URL", "that", "is", "o...
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/web/modeshape-webdav/src/main/java/org/modeshape/webdav/fromcatalina/RequestUtil.java#L97-L126
train
ModeShape/modeshape
web/modeshape-webdav/src/main/java/org/modeshape/webdav/fromcatalina/RequestUtil.java
RequestUtil.parseCookieHeader
public static Cookie[] parseCookieHeader( String header ) { if ((header == null) || (header.length() < 1)) { return (new Cookie[0]); } ArrayList<Cookie> cookies = new ArrayList<Cookie>(); while (header.length() > 0) { int semicolon = header.indexOf(';'); ...
java
public static Cookie[] parseCookieHeader( String header ) { if ((header == null) || (header.length() < 1)) { return (new Cookie[0]); } ArrayList<Cookie> cookies = new ArrayList<Cookie>(); while (header.length() > 0) { int semicolon = header.indexOf(';'); ...
[ "public", "static", "Cookie", "[", "]", "parseCookieHeader", "(", "String", "header", ")", "{", "if", "(", "(", "header", "==", "null", ")", "||", "(", "header", ".", "length", "(", ")", "<", "1", ")", ")", "{", "return", "(", "new", "Cookie", "[",...
Parse a cookie header into an array of cookies according to RFC 2109. @param header Value of an HTTP "Cookie" header @return the cookies
[ "Parse", "a", "cookie", "header", "into", "an", "array", "of", "cookies", "according", "to", "RFC", "2109", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/web/modeshape-webdav/src/main/java/org/modeshape/webdav/fromcatalina/RequestUtil.java#L225-L259
train
ModeShape/modeshape
web/modeshape-webdav/src/main/java/org/modeshape/webdav/fromcatalina/RequestUtil.java
RequestUtil.URLDecode
public static String URLDecode( String str, String enc ) { if (str == null) { return (null); } // use the specified encoding to extract bytes out of the // given string so that the encoding is not lost. If an // encoding is not sp...
java
public static String URLDecode( String str, String enc ) { if (str == null) { return (null); } // use the specified encoding to extract bytes out of the // given string so that the encoding is not lost. If an // encoding is not sp...
[ "public", "static", "String", "URLDecode", "(", "String", "str", ",", "String", "enc", ")", "{", "if", "(", "str", "==", "null", ")", "{", "return", "(", "null", ")", ";", "}", "// use the specified encoding to extract bytes out of the", "// given string so that t...
Decode and return the specified URL-encoded String. @param str The url-encoded string @param enc The encoding to use; if null, the default encoding is used @return the decoded URL @throws IllegalArgumentException if a '%' character is not followed by a valid 2-digit hexadecimal number
[ "Decode", "and", "return", "the", "specified", "URL", "-", "encoded", "String", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/web/modeshape-webdav/src/main/java/org/modeshape/webdav/fromcatalina/RequestUtil.java#L320-L342
train
ModeShape/modeshape
web/modeshape-webdav/src/main/java/org/modeshape/webdav/fromcatalina/RequestUtil.java
RequestUtil.URLDecode
public static String URLDecode( byte[] bytes, String enc ) { if (bytes == null) { return (null); } int len = bytes.length; int ix = 0; int ox = 0; while (ix < len) { byte b = bytes[ix++]; // Get byte to test ...
java
public static String URLDecode( byte[] bytes, String enc ) { if (bytes == null) { return (null); } int len = bytes.length; int ix = 0; int ox = 0; while (ix < len) { byte b = bytes[ix++]; // Get byte to test ...
[ "public", "static", "String", "URLDecode", "(", "byte", "[", "]", "bytes", ",", "String", "enc", ")", "{", "if", "(", "bytes", "==", "null", ")", "{", "return", "(", "null", ")", ";", "}", "int", "len", "=", "bytes", ".", "length", ";", "int", "i...
Decode and return the specified URL-encoded byte array. @param bytes The url-encoded byte array @param enc The encoding to use; if null, the default encoding is used @return the decoded URL @throws IllegalArgumentException if a '%' character is not followed by a valid 2-digit hexadecimal number
[ "Decode", "and", "return", "the", "specified", "URL", "-", "encoded", "byte", "array", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/web/modeshape-webdav/src/main/java/org/modeshape/webdav/fromcatalina/RequestUtil.java#L363-L391
train
ModeShape/modeshape
web/modeshape-webdav/src/main/java/org/modeshape/webdav/fromcatalina/RequestUtil.java
RequestUtil.streamNotConsumed
public static boolean streamNotConsumed( HttpServletRequest request ) { try { ServletInputStream servletInputStream = request.getInputStream(); //in servlet >= 3.0, available will throw an exception (while previously it didn't) return request.getContentLength() != 0 && servle...
java
public static boolean streamNotConsumed( HttpServletRequest request ) { try { ServletInputStream servletInputStream = request.getInputStream(); //in servlet >= 3.0, available will throw an exception (while previously it didn't) return request.getContentLength() != 0 && servle...
[ "public", "static", "boolean", "streamNotConsumed", "(", "HttpServletRequest", "request", ")", "{", "try", "{", "ServletInputStream", "servletInputStream", "=", "request", ".", "getInputStream", "(", ")", ";", "//in servlet >= 3.0, available will throw an exception (while pre...
Checks if the input stream of the given request is nor isn't consumed. This method is backwards-compatible with Servlet 2.x, as in Servlet 3.x there is a "isFinished" method. @param request a {@code HttpServletRequest}, never {@code null} @return {@code true} if the request stream has been consumed, {@code false} othe...
[ "Checks", "if", "the", "input", "stream", "of", "the", "given", "request", "is", "nor", "isn", "t", "consumed", ".", "This", "method", "is", "backwards", "-", "compatible", "with", "Servlet", "2", ".", "x", "as", "in", "Servlet", "3", ".", "x", "there"...
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/web/modeshape-webdav/src/main/java/org/modeshape/webdav/fromcatalina/RequestUtil.java#L503-L511
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/security/acl/JcrAccessControlList.java
JcrAccessControlList.defaultAcl
public static JcrAccessControlList defaultAcl( AccessControlManagerImpl acm ) { JcrAccessControlList acl = new JcrAccessControlList("/"); try { acl.principals.put(SimplePrincipal.EVERYONE, new AccessControlEntryImpl(SimplePrincipal.EVERYONE, acm.privileges())); } catch (AccessControl...
java
public static JcrAccessControlList defaultAcl( AccessControlManagerImpl acm ) { JcrAccessControlList acl = new JcrAccessControlList("/"); try { acl.principals.put(SimplePrincipal.EVERYONE, new AccessControlEntryImpl(SimplePrincipal.EVERYONE, acm.privileges())); } catch (AccessControl...
[ "public", "static", "JcrAccessControlList", "defaultAcl", "(", "AccessControlManagerImpl", "acm", ")", "{", "JcrAccessControlList", "acl", "=", "new", "JcrAccessControlList", "(", "\"/\"", ")", ";", "try", "{", "acl", ".", "principals", ".", "put", "(", "SimplePri...
Creates default Access Control List. @param acm access control manager instance @return Access Control List with all permissions granted to everyone.
[ "Creates", "default", "Access", "Control", "List", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/security/acl/JcrAccessControlList.java#L60-L68
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/security/acl/JcrAccessControlList.java
JcrAccessControlList.hasPrivileges
public boolean hasPrivileges( SecurityContext sc, Privilege[] privileges ) { for (AccessControlEntryImpl ace : principals.values()) { // check access list for everyone if (ace.getPrincipal().getName().equals(SimplePrincipal.EVERYONE.getName())) { ...
java
public boolean hasPrivileges( SecurityContext sc, Privilege[] privileges ) { for (AccessControlEntryImpl ace : principals.values()) { // check access list for everyone if (ace.getPrincipal().getName().equals(SimplePrincipal.EVERYONE.getName())) { ...
[ "public", "boolean", "hasPrivileges", "(", "SecurityContext", "sc", ",", "Privilege", "[", "]", "privileges", ")", "{", "for", "(", "AccessControlEntryImpl", "ace", ":", "principals", ".", "values", "(", ")", ")", "{", "// check access list for everyone", "if", ...
Tests privileges relatively to the given security context. @param sc security context carrying information about principals @param privileges privileges for test @return true when access list grants all given privileges within given security context.
[ "Tests", "privileges", "relatively", "to", "the", "given", "security", "context", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/security/acl/JcrAccessControlList.java#L130-L155
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/security/acl/JcrAccessControlList.java
JcrAccessControlList.getPrivileges
public Privilege[] getPrivileges( SecurityContext context ) { ArrayList<Privilege> privs = new ArrayList<Privilege>(); for (AccessControlEntryImpl ace : principals.values()) { // add privileges granted for everyone if (ace.getPrincipal().equals(SimplePrincipal.EVERYONE)) { ...
java
public Privilege[] getPrivileges( SecurityContext context ) { ArrayList<Privilege> privs = new ArrayList<Privilege>(); for (AccessControlEntryImpl ace : principals.values()) { // add privileges granted for everyone if (ace.getPrincipal().equals(SimplePrincipal.EVERYONE)) { ...
[ "public", "Privilege", "[", "]", "getPrivileges", "(", "SecurityContext", "context", ")", "{", "ArrayList", "<", "Privilege", ">", "privs", "=", "new", "ArrayList", "<", "Privilege", ">", "(", ")", ";", "for", "(", "AccessControlEntryImpl", "ace", ":", "prin...
Lists all privileges defined by this access list for the given user. @param context the security context of the user; never null @return list of privilege objects.
[ "Lists", "all", "privileges", "defined", "by", "this", "access", "list", "for", "the", "given", "user", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/security/acl/JcrAccessControlList.java#L163-L186
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/security/acl/JcrAccessControlList.java
JcrAccessControlList.username
private String username( String username ) { return (username.startsWith("<") && username.endsWith(">")) ? username.substring(1, username.length() - 1) : username; }
java
private String username( String username ) { return (username.startsWith("<") && username.endsWith(">")) ? username.substring(1, username.length() - 1) : username; }
[ "private", "String", "username", "(", "String", "username", ")", "{", "return", "(", "username", ".", "startsWith", "(", "\"<\"", ")", "&&", "username", ".", "endsWith", "(", "\">\"", ")", ")", "?", "username", ".", "substring", "(", "1", ",", "username"...
Removes brackets enclosing given user name @param username the user name @return user name without brackets.
[ "Removes", "brackets", "enclosing", "given", "user", "name" ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/security/acl/JcrAccessControlList.java#L240-L242
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/query/QueryContext.java
QueryContext.getNodeCache
public NodeCache getNodeCache( String workspaceName ) throws WorkspaceNotFoundException { NodeCache cache = overriddenNodeCachesByWorkspaceName.get(workspaceName); if (cache == null) { cache = repositoryCache.getWorkspaceCache(workspaceName); } return cache; }
java
public NodeCache getNodeCache( String workspaceName ) throws WorkspaceNotFoundException { NodeCache cache = overriddenNodeCachesByWorkspaceName.get(workspaceName); if (cache == null) { cache = repositoryCache.getWorkspaceCache(workspaceName); } return cache; }
[ "public", "NodeCache", "getNodeCache", "(", "String", "workspaceName", ")", "throws", "WorkspaceNotFoundException", "{", "NodeCache", "cache", "=", "overriddenNodeCachesByWorkspaceName", ".", "get", "(", "workspaceName", ")", ";", "if", "(", "cache", "==", "null", "...
Get the NodeCache for the given workspace name. The result will either be the overridden value supplied in the constructor or the workspace cache from the referenced RepositoryCache. @param workspaceName the name of the workspace @return the node cache; never null @throws WorkspaceNotFoundException if there is no work...
[ "Get", "the", "NodeCache", "for", "the", "given", "workspace", "name", ".", "The", "result", "will", "either", "be", "the", "overridden", "value", "supplied", "in", "the", "constructor", "or", "the", "workspace", "cache", "from", "the", "referenced", "Reposito...
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/query/QueryContext.java#L255-L261
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/query/QueryContext.java
QueryContext.with
public QueryContext with( Schemata schemata ) { CheckArg.isNotNull(schemata, "schemata"); return new QueryContext(context, repositoryCache, workspaceNames, overriddenNodeCachesByWorkspaceName, schemata, indexDefns, nodeTypes, bufferManager, hints, problems, variables); ...
java
public QueryContext with( Schemata schemata ) { CheckArg.isNotNull(schemata, "schemata"); return new QueryContext(context, repositoryCache, workspaceNames, overriddenNodeCachesByWorkspaceName, schemata, indexDefns, nodeTypes, bufferManager, hints, problems, variables); ...
[ "public", "QueryContext", "with", "(", "Schemata", "schemata", ")", "{", "CheckArg", ".", "isNotNull", "(", "schemata", ",", "\"schemata\"", ")", ";", "return", "new", "QueryContext", "(", "context", ",", "repositoryCache", ",", "workspaceNames", ",", "overridde...
Obtain a copy of this context, except that the copy uses the supplied schemata. @param schemata the schemata that should be used in the new context @return the new context; never null @throws IllegalArgumentException if the schemata reference is null
[ "Obtain", "a", "copy", "of", "this", "context", "except", "that", "the", "copy", "uses", "the", "supplied", "schemata", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/query/QueryContext.java#L398-L402
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/query/QueryContext.java
QueryContext.with
public QueryContext with( Problems problems ) { return new QueryContext(context, repositoryCache, workspaceNames, overriddenNodeCachesByWorkspaceName, schemata, indexDefns, nodeTypes, bufferManager, hints, problems, variables); }
java
public QueryContext with( Problems problems ) { return new QueryContext(context, repositoryCache, workspaceNames, overriddenNodeCachesByWorkspaceName, schemata, indexDefns, nodeTypes, bufferManager, hints, problems, variables); }
[ "public", "QueryContext", "with", "(", "Problems", "problems", ")", "{", "return", "new", "QueryContext", "(", "context", ",", "repositoryCache", ",", "workspaceNames", ",", "overriddenNodeCachesByWorkspaceName", ",", "schemata", ",", "indexDefns", ",", "nodeTypes", ...
Obtain a copy of this context, except that the copy uses the supplied problem container. @param problems the problems that should be used in the new context; may be null if a new problem container should be used @return the new context; never null
[ "Obtain", "a", "copy", "of", "this", "context", "except", "that", "the", "copy", "uses", "the", "supplied", "problem", "container", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/query/QueryContext.java#L423-L426
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/query/QueryContext.java
QueryContext.with
public QueryContext with( Map<String, Object> variables ) { return new QueryContext(context, repositoryCache, workspaceNames, overriddenNodeCachesByWorkspaceName, schemata, indexDefns, nodeTypes, bufferManager, hints, problems, variables); }
java
public QueryContext with( Map<String, Object> variables ) { return new QueryContext(context, repositoryCache, workspaceNames, overriddenNodeCachesByWorkspaceName, schemata, indexDefns, nodeTypes, bufferManager, hints, problems, variables); }
[ "public", "QueryContext", "with", "(", "Map", "<", "String", ",", "Object", ">", "variables", ")", "{", "return", "new", "QueryContext", "(", "context", ",", "repositoryCache", ",", "workspaceNames", ",", "overriddenNodeCachesByWorkspaceName", ",", "schemata", ","...
Obtain a copy of this context, except that the copy uses the supplied variables. @param variables the variables that should be used in the new context; may be null if there are no such variables @return the new context; never null
[ "Obtain", "a", "copy", "of", "this", "context", "except", "that", "the", "copy", "uses", "the", "supplied", "variables", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/query/QueryContext.java#L434-L437
train
ModeShape/modeshape
sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/DdlParserScorer.java
DdlParserScorer.scoreText
public void scoreText( String text, int factor, String... keywords ) { if (text != null && keywords != null) { // Increment the score once for each keyword that is found within the text ... String lowercaseText = text.toLowerCase(); ...
java
public void scoreText( String text, int factor, String... keywords ) { if (text != null && keywords != null) { // Increment the score once for each keyword that is found within the text ... String lowercaseText = text.toLowerCase(); ...
[ "public", "void", "scoreText", "(", "String", "text", ",", "int", "factor", ",", "String", "...", "keywords", ")", "{", "if", "(", "text", "!=", "null", "&&", "keywords", "!=", "null", ")", "{", "// Increment the score once for each keyword that is found within th...
Increment the score if the given text contains any of the supply keywords. @param text the text to evaluate; may be null @param factor the factor to use for each increment @param keywords the keywords to be found in the text
[ "Increment", "the", "score", "if", "the", "given", "text", "contains", "any", "of", "the", "supply", "keywords", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/DdlParserScorer.java#L51-L69
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/sequencer/PathExpression.java
PathExpression.removeUnusedPredicates
protected String removeUnusedPredicates( String expression ) { assert expression != null; java.util.regex.Matcher matcher = UNUSABLE_PREDICATE_PATTERN.matcher(expression); // CHECKSTYLE IGNORE check FOR NEXT 1 LINES StringBuffer sb = new StringBuffer(); if (matcher.find()) { ...
java
protected String removeUnusedPredicates( String expression ) { assert expression != null; java.util.regex.Matcher matcher = UNUSABLE_PREDICATE_PATTERN.matcher(expression); // CHECKSTYLE IGNORE check FOR NEXT 1 LINES StringBuffer sb = new StringBuffer(); if (matcher.find()) { ...
[ "protected", "String", "removeUnusedPredicates", "(", "String", "expression", ")", "{", "assert", "expression", "!=", "null", ";", "java", ".", "util", ".", "regex", ".", "Matcher", "matcher", "=", "UNUSABLE_PREDICATE_PATTERN", ".", "matcher", "(", "expression", ...
Replace certain XPath patterns that are not used or understood. @param expression the input regular expressions string; may not be null @return the regular expression with all unused XPath patterns removed; never null
[ "Replace", "certain", "XPath", "patterns", "that", "are", "not", "used", "or", "understood", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/sequencer/PathExpression.java#L265-L284
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/sequencer/PathExpression.java
PathExpression.replaceXPathPatterns
protected String replaceXPathPatterns( String expression ) { assert expression != null; // replace 2 or more sequential '|' characters in an OR expression expression = expression.replaceAll("[\\|]{2,}", "|"); // if there is an empty expression in an OR expression, make the whole segment ...
java
protected String replaceXPathPatterns( String expression ) { assert expression != null; // replace 2 or more sequential '|' characters in an OR expression expression = expression.replaceAll("[\\|]{2,}", "|"); // if there is an empty expression in an OR expression, make the whole segment ...
[ "protected", "String", "replaceXPathPatterns", "(", "String", "expression", ")", "{", "assert", "expression", "!=", "null", ";", "// replace 2 or more sequential '|' characters in an OR expression", "expression", "=", "expression", ".", "replaceAll", "(", "\"[\\\\|]{2,}\"", ...
Replace certain XPath patterns, including some predicates, with substrings that are compatible with regular expressions. @param expression the input regular expressions string; may not be null @return the regular expression with XPath patterns replaced with regular expression fragments; never null
[ "Replace", "certain", "XPath", "patterns", "including", "some", "predicates", "with", "substrings", "that", "are", "compatible", "with", "regular", "expressions", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/sequencer/PathExpression.java#L319-L386
train
ModeShape/modeshape
index-providers/modeshape-elasticsearch-index-provider/src/main/java/org/modeshape/jcr/index/elasticsearch/client/EsResponse.java
EsResponse.get
public Object get(String name) { Object obj = document.get(name); return (obj instanceof BasicArray) ? ((BasicArray)obj).toArray() : obj; }
java
public Object get(String name) { Object obj = document.get(name); return (obj instanceof BasicArray) ? ((BasicArray)obj).toArray() : obj; }
[ "public", "Object", "get", "(", "String", "name", ")", "{", "Object", "obj", "=", "document", ".", "get", "(", "name", ")", ";", "return", "(", "obj", "instanceof", "BasicArray", ")", "?", "(", "(", "BasicArray", ")", "obj", ")", ".", "toArray", "(",...
Gets property value. @param name property name. @return property value.
[ "Gets", "property", "value", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/index-providers/modeshape-elasticsearch-index-provider/src/main/java/org/modeshape/jcr/index/elasticsearch/client/EsResponse.java#L51-L54
train
ModeShape/modeshape
index-providers/modeshape-elasticsearch-index-provider/src/main/java/org/modeshape/jcr/index/elasticsearch/client/EsResponse.java
EsResponse.readFromStream
private void readFromStream(InputStream in) throws IOException { document = DocumentFactory.newDocument(Json.read(in)); }
java
private void readFromStream(InputStream in) throws IOException { document = DocumentFactory.newDocument(Json.read(in)); }
[ "private", "void", "readFromStream", "(", "InputStream", "in", ")", "throws", "IOException", "{", "document", "=", "DocumentFactory", ".", "newDocument", "(", "Json", ".", "read", "(", "in", ")", ")", ";", "}" ]
Reads document content from the stream. @param in input stream. @throws IOException
[ "Reads", "document", "content", "from", "the", "stream", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/index-providers/modeshape-elasticsearch-index-provider/src/main/java/org/modeshape/jcr/index/elasticsearch/client/EsResponse.java#L62-L64
train
ModeShape/modeshape
modeshape-jcr-api/src/main/java/org/modeshape/jcr/api/sequencer/Sequencer.java
Sequencer.getPathExpressions
public final String[] getPathExpressions() { String pathExpression = this.pathExpression; Object[] pathExpressions = this.pathExpressions; if (pathExpression == null && (pathExpressions == null || pathExpressions.length == 0)) { // there's none ... return new String[] {};...
java
public final String[] getPathExpressions() { String pathExpression = this.pathExpression; Object[] pathExpressions = this.pathExpressions; if (pathExpression == null && (pathExpressions == null || pathExpressions.length == 0)) { // there's none ... return new String[] {};...
[ "public", "final", "String", "[", "]", "getPathExpressions", "(", ")", "{", "String", "pathExpression", "=", "this", ".", "pathExpression", ";", "Object", "[", "]", "pathExpressions", "=", "this", ".", "pathExpressions", ";", "if", "(", "pathExpression", "==",...
Obtain the path expressions as configured on the sequencer. This method always returns a copy to prevent modification of the values. @return the path expressions; never null but possibly empty
[ "Obtain", "the", "path", "expressions", "as", "configured", "on", "the", "sequencer", ".", "This", "method", "always", "returns", "a", "copy", "to", "prevent", "modification", "of", "the", "values", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr-api/src/main/java/org/modeshape/jcr/api/sequencer/Sequencer.java#L120-L137
train
ModeShape/modeshape
modeshape-jcr-api/src/main/java/org/modeshape/jcr/api/sequencer/Sequencer.java
Sequencer.isAccepted
public final boolean isAccepted( String mimeType ) { if (mimeType != null && hasAcceptedMimeTypes()) { return getAcceptedMimeTypes().contains(mimeType.trim()); } return true; // accept all mime types }
java
public final boolean isAccepted( String mimeType ) { if (mimeType != null && hasAcceptedMimeTypes()) { return getAcceptedMimeTypes().contains(mimeType.trim()); } return true; // accept all mime types }
[ "public", "final", "boolean", "isAccepted", "(", "String", "mimeType", ")", "{", "if", "(", "mimeType", "!=", "null", "&&", "hasAcceptedMimeTypes", "(", ")", ")", "{", "return", "getAcceptedMimeTypes", "(", ")", ".", "contains", "(", "mimeType", ".", "trim",...
Determine if this sequencer has been configured to accept and process content with the supplied MIME type. @param mimeType the MIME type @return true if content with the supplied the MIME type is to be processed (or when <code>mimeType</code> is null and therefore not known), or false otherwise @see #hasAcceptedMimeTy...
[ "Determine", "if", "this", "sequencer", "has", "been", "configured", "to", "accept", "and", "process", "content", "with", "the", "supplied", "MIME", "type", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr-api/src/main/java/org/modeshape/jcr/api/sequencer/Sequencer.java#L361-L366
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/cache/document/WritableSessionCache.java
WritableSessionCache.getChangedNodesAtOrBelowChildrenFirst
private List<SessionNode> getChangedNodesAtOrBelowChildrenFirst( Path nodePath ) { List<SessionNode> changedNodesChildrenFirst = new ArrayList<SessionNode>(); for (NodeKey key : changedNodes.keySet()) { SessionNode changedNode = changedNodes.get(key); boolean isAtOrBelow = false;...
java
private List<SessionNode> getChangedNodesAtOrBelowChildrenFirst( Path nodePath ) { List<SessionNode> changedNodesChildrenFirst = new ArrayList<SessionNode>(); for (NodeKey key : changedNodes.keySet()) { SessionNode changedNode = changedNodes.get(key); boolean isAtOrBelow = false;...
[ "private", "List", "<", "SessionNode", ">", "getChangedNodesAtOrBelowChildrenFirst", "(", "Path", "nodePath", ")", "{", "List", "<", "SessionNode", ">", "changedNodesChildrenFirst", "=", "new", "ArrayList", "<", "SessionNode", ">", "(", ")", ";", "for", "(", "No...
Returns the list of changed nodes at or below the given path, starting with the children. @param nodePath the path of the parent node @return the list of changed nodes
[ "Returns", "the", "list", "of", "changed", "nodes", "at", "or", "below", "the", "given", "path", "starting", "with", "the", "children", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/cache/document/WritableSessionCache.java#L278-L304
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/cache/document/WritableSessionCache.java
WritableSessionCache.completeTransaction
private void completeTransaction(final String txId, String wsName) { getWorkspace().clear(); // reset the ws cache to the shared (global one) setWorkspaceCache(sharedWorkspaceCache()); // and clear some tx specific data COMPLETE_FUNCTION_BY_TX_AND_WS.compute(txId, (transactionId,...
java
private void completeTransaction(final String txId, String wsName) { getWorkspace().clear(); // reset the ws cache to the shared (global one) setWorkspaceCache(sharedWorkspaceCache()); // and clear some tx specific data COMPLETE_FUNCTION_BY_TX_AND_WS.compute(txId, (transactionId,...
[ "private", "void", "completeTransaction", "(", "final", "String", "txId", ",", "String", "wsName", ")", "{", "getWorkspace", "(", ")", ".", "clear", "(", ")", ";", "// reset the ws cache to the shared (global one)", "setWorkspaceCache", "(", "sharedWorkspaceCache", "(...
Signal that the transaction that was active and in which this session participated has completed and that this session should no longer use a transaction-specific workspace cache.
[ "Signal", "that", "the", "transaction", "that", "was", "active", "and", "in", "which", "this", "session", "participated", "has", "completed", "and", "that", "this", "session", "should", "no", "longer", "use", "a", "transaction", "-", "specific", "workspace", "...
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/cache/document/WritableSessionCache.java#L440-L456
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/cache/document/WritableSessionCache.java
WritableSessionCache.rollback
private void rollback(Transaction txn, Exception cause) throws Exception { try { txn.rollback(); } catch (Exception e) { logger.debug(e, "Error while rolling back transaction " + txn); } finally { throw cause; } }
java
private void rollback(Transaction txn, Exception cause) throws Exception { try { txn.rollback(); } catch (Exception e) { logger.debug(e, "Error while rolling back transaction " + txn); } finally { throw cause; } }
[ "private", "void", "rollback", "(", "Transaction", "txn", ",", "Exception", "cause", ")", "throws", "Exception", "{", "try", "{", "txn", ".", "rollback", "(", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "logger", ".", "debug", "(", "e", ...
Rolling back given transaction caused by given cause. @param txn the transaction @param cause roll back cause @throws Exception roll back cause.
[ "Rolling", "back", "given", "transaction", "caused", "by", "given", "cause", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/cache/document/WritableSessionCache.java#L872-L880
train
ModeShape/modeshape
modeshape-jdbc-local/src/main/java/org/modeshape/jdbc/util/TimestampWithTimezone.java
TimestampWithTimezone.createDate
public static Date createDate( Calendar target ) { return new java.sql.Date(target.getTime().getTime()); }
java
public static Date createDate( Calendar target ) { return new java.sql.Date(target.getTime().getTime()); }
[ "public", "static", "Date", "createDate", "(", "Calendar", "target", ")", "{", "return", "new", "java", ".", "sql", ".", "Date", "(", "target", ".", "getTime", "(", ")", ".", "getTime", "(", ")", ")", ";", "}" ]
Creates normalized SQL Date Object based on the target Calendar @param target Calendar @return Date
[ "Creates", "normalized", "SQL", "Date", "Object", "based", "on", "the", "target", "Calendar" ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jdbc-local/src/main/java/org/modeshape/jdbc/util/TimestampWithTimezone.java#L126-L128
train
ModeShape/modeshape
sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/StandardDdlParser.java
StandardDdlParser.mergeNodes
public void mergeNodes( DdlTokenStream tokens, AstNode firstNode, AstNode secondNode ) { assert tokens != null; assert firstNode != null; assert secondNode != null; int firstStartIndex = (Integer)firstNode.getProperty(DDL_START_CHA...
java
public void mergeNodes( DdlTokenStream tokens, AstNode firstNode, AstNode secondNode ) { assert tokens != null; assert firstNode != null; assert secondNode != null; int firstStartIndex = (Integer)firstNode.getProperty(DDL_START_CHA...
[ "public", "void", "mergeNodes", "(", "DdlTokenStream", "tokens", ",", "AstNode", "firstNode", ",", "AstNode", "secondNode", ")", "{", "assert", "tokens", "!=", "null", ";", "assert", "firstNode", "!=", "null", ";", "assert", "secondNode", "!=", "null", ";", ...
Merges second node into first node by re-setting expression source and length. @param tokens the {@link DdlTokenStream} representing the tokenized DDL content; may not be null @param firstNode the node to merge into; may not be null @param secondNode the node to merge into first node; may not be null
[ "Merges", "second", "node", "into", "first", "node", "by", "re", "-", "setting", "expression", "source", "and", "length", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/StandardDdlParser.java#L500-L515
train
ModeShape/modeshape
sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/StandardDdlParser.java
StandardDdlParser.parseCreateStatement
protected AstNode parseCreateStatement( DdlTokenStream tokens, AstNode parentNode ) throws ParsingException { assert tokens != null; assert parentNode != null; AstNode stmtNode = null; // DEFAULT DOES NOTHING // Subclasses can impleme...
java
protected AstNode parseCreateStatement( DdlTokenStream tokens, AstNode parentNode ) throws ParsingException { assert tokens != null; assert parentNode != null; AstNode stmtNode = null; // DEFAULT DOES NOTHING // Subclasses can impleme...
[ "protected", "AstNode", "parseCreateStatement", "(", "DdlTokenStream", "tokens", ",", "AstNode", "parentNode", ")", "throws", "ParsingException", "{", "assert", "tokens", "!=", "null", ";", "assert", "parentNode", "!=", "null", ";", "AstNode", "stmtNode", "=", "nu...
Parses DDL CREATE statement based on SQL 92 specifications. @param tokens the {@link DdlTokenStream} representing the tokenized DDL content; may not be null @param parentNode the parent {@link AstNode} node; may not be null @return the parsed CREATE {@link AstNode} @throws ParsingException
[ "Parses", "DDL", "CREATE", "statement", "based", "on", "SQL", "92", "specifications", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/StandardDdlParser.java#L543-L595
train
ModeShape/modeshape
sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/StandardDdlParser.java
StandardDdlParser.parseAlterStatement
protected AstNode parseAlterStatement( DdlTokenStream tokens, AstNode parentNode ) throws ParsingException { assert tokens != null; assert parentNode != null; if (tokens.matches(ALTER, TABLE)) { return parseAlterTableStatement(tokens, paren...
java
protected AstNode parseAlterStatement( DdlTokenStream tokens, AstNode parentNode ) throws ParsingException { assert tokens != null; assert parentNode != null; if (tokens.matches(ALTER, TABLE)) { return parseAlterTableStatement(tokens, paren...
[ "protected", "AstNode", "parseAlterStatement", "(", "DdlTokenStream", "tokens", ",", "AstNode", "parentNode", ")", "throws", "ParsingException", "{", "assert", "tokens", "!=", "null", ";", "assert", "parentNode", "!=", "null", ";", "if", "(", "tokens", ".", "mat...
Parses DDL ALTER statement based on SQL 92 specifications. @param tokens the {@link DdlTokenStream} representing the tokenized DDL content; may not be null @param parentNode the parent {@link AstNode} node; may not be null @return the parsed ALTER {@link AstNode} @throws ParsingException
[ "Parses", "DDL", "ALTER", "statement", "based", "on", "SQL", "92", "specifications", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/StandardDdlParser.java#L605-L622
train
ModeShape/modeshape
sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/StandardDdlParser.java
StandardDdlParser.getTableElementsString
protected String getTableElementsString( DdlTokenStream tokens, boolean useTerminator ) throws ParsingException { assert tokens != null; StringBuilder sb = new StringBuilder(100); if (useTerminator) { while (!isTerminator(tokens)) { ...
java
protected String getTableElementsString( DdlTokenStream tokens, boolean useTerminator ) throws ParsingException { assert tokens != null; StringBuilder sb = new StringBuilder(100); if (useTerminator) { while (!isTerminator(tokens)) { ...
[ "protected", "String", "getTableElementsString", "(", "DdlTokenStream", "tokens", ",", "boolean", "useTerminator", ")", "throws", "ParsingException", "{", "assert", "tokens", "!=", "null", ";", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", "100", ")", "...
Method which extracts the table element string from a CREATE TABLE statement. @param tokens the {@link DdlTokenStream} representing the tokenized DDL content; may not be null @param useTerminator @return the parsed table elements String. @throws ParsingException
[ "Method", "which", "extracts", "the", "table", "element", "string", "from", "a", "CREATE", "TABLE", "statement", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/StandardDdlParser.java#L1472-L1508
train
ModeShape/modeshape
sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/StandardDdlParser.java
StandardDdlParser.parseConstraintAttributes
protected void parseConstraintAttributes( DdlTokenStream tokens, AstNode constraintNode ) throws ParsingException { assert tokens != null; assert constraintNode != null; // Now we need to check for constraint attributes: // <constraint attr...
java
protected void parseConstraintAttributes( DdlTokenStream tokens, AstNode constraintNode ) throws ParsingException { assert tokens != null; assert constraintNode != null; // Now we need to check for constraint attributes: // <constraint attr...
[ "protected", "void", "parseConstraintAttributes", "(", "DdlTokenStream", "tokens", ",", "AstNode", "constraintNode", ")", "throws", "ParsingException", "{", "assert", "tokens", "!=", "null", ";", "assert", "constraintNode", "!=", "null", ";", "// Now we need to check fo...
Parses the attributes associated with any in-line column constraint definition or a table constrain definition. @param tokens the {@link DdlTokenStream} representing the tokenized DDL content; may not be null @param constraintNode @throws ParsingException
[ "Parses", "the", "attributes", "associated", "with", "any", "in", "-", "line", "column", "constraint", "definition", "or", "a", "table", "constrain", "definition", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/StandardDdlParser.java#L1904-L1944
train
ModeShape/modeshape
sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/StandardDdlParser.java
StandardDdlParser.getDataTypeStartWords
protected List<String> getDataTypeStartWords() { if (allDataTypeStartWords == null) { allDataTypeStartWords = new ArrayList<String>(); allDataTypeStartWords.addAll(DataTypes.DATATYPE_START_WORDS); allDataTypeStartWords.addAll(getCustomDataTypeStartWords()); } ...
java
protected List<String> getDataTypeStartWords() { if (allDataTypeStartWords == null) { allDataTypeStartWords = new ArrayList<String>(); allDataTypeStartWords.addAll(DataTypes.DATATYPE_START_WORDS); allDataTypeStartWords.addAll(getCustomDataTypeStartWords()); } ...
[ "protected", "List", "<", "String", ">", "getDataTypeStartWords", "(", ")", "{", "if", "(", "allDataTypeStartWords", "==", "null", ")", "{", "allDataTypeStartWords", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "allDataTypeStartWords", ".", "add...
Returns a list of data type start words which can be used to help identify a column definition sub-statement. @return list of data type start words
[ "Returns", "a", "list", "of", "data", "type", "start", "words", "which", "can", "be", "used", "to", "help", "identify", "a", "column", "definition", "sub", "-", "statement", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/StandardDdlParser.java#L2403-L2410
train
ModeShape/modeshape
sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/StandardDdlParser.java
StandardDdlParser.consumeIdentifier
protected String consumeIdentifier( DdlTokenStream tokens ) throws ParsingException { String value = tokens.consume(); // This may surrounded by quotes, so remove them ... if (value.charAt(0) == '"') { int length = value.length(); // Check for the end quote ... ...
java
protected String consumeIdentifier( DdlTokenStream tokens ) throws ParsingException { String value = tokens.consume(); // This may surrounded by quotes, so remove them ... if (value.charAt(0) == '"') { int length = value.length(); // Check for the end quote ... ...
[ "protected", "String", "consumeIdentifier", "(", "DdlTokenStream", "tokens", ")", "throws", "ParsingException", "{", "String", "value", "=", "tokens", ".", "consume", "(", ")", ";", "// This may surrounded by quotes, so remove them ...", "if", "(", "value", ".", "char...
Consumes an token identifier which can be of the form of a simple string or a double-quoted string. @param tokens the {@link DdlTokenStream} representing the tokenized DDL content; may not be null @return the identifier @throws ParsingException
[ "Consumes", "an", "token", "identifier", "which", "can", "be", "of", "the", "form", "of", "a", "simple", "string", "or", "a", "double", "-", "quoted", "string", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/StandardDdlParser.java#L2474-L2491
train
ModeShape/modeshape
sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/StandardDdlParser.java
StandardDdlParser.parseColumnNameList
protected boolean parseColumnNameList( DdlTokenStream tokens, AstNode parentNode, String referenceType ) { boolean parsedColumns = false; // CONSUME COLUMNS List<String> columnNameList = new ArrayList<String>()...
java
protected boolean parseColumnNameList( DdlTokenStream tokens, AstNode parentNode, String referenceType ) { boolean parsedColumns = false; // CONSUME COLUMNS List<String> columnNameList = new ArrayList<String>()...
[ "protected", "boolean", "parseColumnNameList", "(", "DdlTokenStream", "tokens", ",", "AstNode", "parentNode", ",", "String", "referenceType", ")", "{", "boolean", "parsedColumns", "=", "false", ";", "// CONSUME COLUMNS", "List", "<", "String", ">", "columnNameList", ...
Adds column reference nodes to a parent node. Returns true if column references added, false if not. @param tokens the {@link DdlTokenStream} representing the tokenized DDL content; may not be null @param parentNode the parent node @param referenceType the type of the reference node to create @return true if the colum...
[ "Adds", "column", "reference", "nodes", "to", "a", "parent", "node", ".", "Returns", "true", "if", "column", "references", "added", "false", "if", "not", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/StandardDdlParser.java#L2515-L2537
train
ModeShape/modeshape
sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/StandardDdlParser.java
StandardDdlParser.parseNameList
protected List<String> parseNameList( DdlTokenStream tokens ) throws ParsingException { List<String> names = new LinkedList<String>(); while (true) { names.add(parseName(tokens)); if (!tokens.canConsume(COMMA)) { break; } } return na...
java
protected List<String> parseNameList( DdlTokenStream tokens ) throws ParsingException { List<String> names = new LinkedList<String>(); while (true) { names.add(parseName(tokens)); if (!tokens.canConsume(COMMA)) { break; } } return na...
[ "protected", "List", "<", "String", ">", "parseNameList", "(", "DdlTokenStream", "tokens", ")", "throws", "ParsingException", "{", "List", "<", "String", ">", "names", "=", "new", "LinkedList", "<", "String", ">", "(", ")", ";", "while", "(", "true", ")", ...
Parses a comma separated list of names. @param tokens the {@link DdlTokenStream} representing the tokenized DDL content; may not be null @return list of names (never <code>null</code>) @throws ParsingException
[ "Parses", "a", "comma", "separated", "list", "of", "names", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/StandardDdlParser.java#L2546-L2558
train
ModeShape/modeshape
sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/StandardDdlParser.java
StandardDdlParser.parseUntilTerminator
protected String parseUntilTerminator( DdlTokenStream tokens ) throws ParsingException { final StringBuilder sb = new StringBuilder(); boolean lastTokenWasPeriod = false; Position prevPosition = (tokens.hasNext() ? tokens.nextPosition() : Position.EMPTY_CONTENT_POSITION); String prevToke...
java
protected String parseUntilTerminator( DdlTokenStream tokens ) throws ParsingException { final StringBuilder sb = new StringBuilder(); boolean lastTokenWasPeriod = false; Position prevPosition = (tokens.hasNext() ? tokens.nextPosition() : Position.EMPTY_CONTENT_POSITION); String prevToke...
[ "protected", "String", "parseUntilTerminator", "(", "DdlTokenStream", "tokens", ")", "throws", "ParsingException", "{", "final", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "boolean", "lastTokenWasPeriod", "=", "false", ";", "Position", "prevP...
Utility method which parses tokens until a terminator is found, another statement is identified or there are no more tokens. @param tokens the {@link DdlTokenStream} representing the tokenized DDL content; may not be null @return the parsed string @throws ParsingException
[ "Utility", "method", "which", "parses", "tokens", "until", "a", "terminator", "is", "found", "another", "statement", "is", "identified", "or", "there", "are", "no", "more", "tokens", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/StandardDdlParser.java#L2568-L2600
train
ModeShape/modeshape
sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/StandardDdlParser.java
StandardDdlParser.parseUntilSemiColon
protected String parseUntilSemiColon( DdlTokenStream tokens ) throws ParsingException { StringBuilder sb = new StringBuilder(); boolean lastTokenWasPeriod = false; while (tokens.hasNext() && !tokens.matches(SEMICOLON)) { String thisToken = tokens.consume(); boolean thisT...
java
protected String parseUntilSemiColon( DdlTokenStream tokens ) throws ParsingException { StringBuilder sb = new StringBuilder(); boolean lastTokenWasPeriod = false; while (tokens.hasNext() && !tokens.matches(SEMICOLON)) { String thisToken = tokens.consume(); boolean thisT...
[ "protected", "String", "parseUntilSemiColon", "(", "DdlTokenStream", "tokens", ")", "throws", "ParsingException", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "boolean", "lastTokenWasPeriod", "=", "false", ";", "while", "(", "tokens", "....
Utility method which parses tokens until a semicolon is found or there are no more tokens. @param tokens the {@link DdlTokenStream} representing the tokenized DDL content; may not be null @return the parsed string @throws ParsingException
[ "Utility", "method", "which", "parses", "tokens", "until", "a", "semicolon", "is", "found", "or", "there", "are", "no", "more", "tokens", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/StandardDdlParser.java#L2651-L2672
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/RepositoryNodeTypeManager.java
RepositoryNodeTypeManager.registerListener
final boolean registerListener( NodeTypes.Listener listener ) { return listener != null ? this.listeners.addIfAbsent(listener) : false; }
java
final boolean registerListener( NodeTypes.Listener listener ) { return listener != null ? this.listeners.addIfAbsent(listener) : false; }
[ "final", "boolean", "registerListener", "(", "NodeTypes", ".", "Listener", "listener", ")", "{", "return", "listener", "!=", "null", "?", "this", ".", "listeners", ".", "addIfAbsent", "(", "listener", ")", ":", "false", ";", "}" ]
Add a listener that will be notified when the NodeTypes changes. Listeners will be called in a single thread, and should do almost no work. @param listener the new listener @return true if the listener was registered, or false if {@code listener} is null or if it is already registered
[ "Add", "a", "listener", "that", "will", "be", "notified", "when", "the", "NodeTypes", "changes", ".", "Listeners", "will", "be", "called", "in", "a", "single", "thread", "and", "should", "do", "almost", "no", "work", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/RepositoryNodeTypeManager.java#L152-L154
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/RepositoryNodeTypeManager.java
RepositoryNodeTypeManager.isNodeTypeInUse
boolean isNodeTypeInUse( Name nodeTypeName ) throws InvalidQueryException { String nodeTypeString = nodeTypeName.getString(context.getNamespaceRegistry()); String expression = "SELECT * from [" + nodeTypeString + "] LIMIT 1"; TypeSystem typeSystem = context.getValueFactories().getTypeSystem(); ...
java
boolean isNodeTypeInUse( Name nodeTypeName ) throws InvalidQueryException { String nodeTypeString = nodeTypeName.getString(context.getNamespaceRegistry()); String expression = "SELECT * from [" + nodeTypeString + "] LIMIT 1"; TypeSystem typeSystem = context.getValueFactories().getTypeSystem(); ...
[ "boolean", "isNodeTypeInUse", "(", "Name", "nodeTypeName", ")", "throws", "InvalidQueryException", "{", "String", "nodeTypeString", "=", "nodeTypeName", ".", "getString", "(", "context", ".", "getNamespaceRegistry", "(", ")", ")", ";", "String", "expression", "=", ...
Check if the named node type is in use in any workspace in the repository @param nodeTypeName the name of the node type to check @return true if at least one node is using that type; false otherwise @throws InvalidQueryException if there is an error searching for uses of the named node type
[ "Check", "if", "the", "named", "node", "type", "is", "in", "use", "in", "any", "workspace", "in", "the", "repository" ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/RepositoryNodeTypeManager.java#L305-L344
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/RepositoryIndexManager.java
RepositoryIndexManager.doInitialize
protected void doInitialize( IndexProvider provider ) throws RepositoryException { // Set the execution context instance ... Reflection.setValue(provider, "context", repository.context()); // Set the environment Reflection.setValue(provider, "environment", repository.environmen...
java
protected void doInitialize( IndexProvider provider ) throws RepositoryException { // Set the execution context instance ... Reflection.setValue(provider, "context", repository.context()); // Set the environment Reflection.setValue(provider, "environment", repository.environmen...
[ "protected", "void", "doInitialize", "(", "IndexProvider", "provider", ")", "throws", "RepositoryException", "{", "// Set the execution context instance ...", "Reflection", ".", "setValue", "(", "provider", ",", "\"context\"", ",", "repository", ".", "context", "(", ")"...
Initialize the supplied provider. @param provider the provider; may not be null @throws RepositoryException if there is a problem initializing the provider
[ "Initialize", "the", "supplied", "provider", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/RepositoryIndexManager.java#L234-L252
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/RepositoryIndexManager.java
RepositoryIndexManager.getIndexWriterForProviders
IndexWriter getIndexWriterForProviders( Set<String> providerNames ) { List<IndexProvider> reindexProviders = new LinkedList<>(); for (IndexProvider provider : providers.values()) { if (providerNames.contains(provider.getName())) { reindexProviders.add(provider); }...
java
IndexWriter getIndexWriterForProviders( Set<String> providerNames ) { List<IndexProvider> reindexProviders = new LinkedList<>(); for (IndexProvider provider : providers.values()) { if (providerNames.contains(provider.getName())) { reindexProviders.add(provider); }...
[ "IndexWriter", "getIndexWriterForProviders", "(", "Set", "<", "String", ">", "providerNames", ")", "{", "List", "<", "IndexProvider", ">", "reindexProviders", "=", "new", "LinkedList", "<>", "(", ")", ";", "for", "(", "IndexProvider", "provider", ":", "providers...
Get the query index writer that will delegate to only those registered providers with the given names. @param providerNames the names of the providers that require indexing @return a query index writer instance; never null
[ "Get", "the", "query", "index", "writer", "that", "will", "delegate", "to", "only", "those", "registered", "providers", "with", "the", "given", "names", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/RepositoryIndexManager.java#L280-L288
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jmx/RepositoryStatisticsBean.java
RepositoryStatisticsBean.start
public void start() { ObjectName beanName = null; try { MBeanServer server = ManagementFactory.getPlatformMBeanServer(); beanName = getObjectName(); server.registerMBean(this, beanName); } catch (InstanceAlreadyExistsException e) { LOGGER.warn(JcrI...
java
public void start() { ObjectName beanName = null; try { MBeanServer server = ManagementFactory.getPlatformMBeanServer(); beanName = getObjectName(); server.registerMBean(this, beanName); } catch (InstanceAlreadyExistsException e) { LOGGER.warn(JcrI...
[ "public", "void", "start", "(", ")", "{", "ObjectName", "beanName", "=", "null", ";", "try", "{", "MBeanServer", "server", "=", "ManagementFactory", ".", "getPlatformMBeanServer", "(", ")", ";", "beanName", "=", "getObjectName", "(", ")", ";", "server", ".",...
Initializes & registers this MBean with the local MBean server.
[ "Initializes", "&", "registers", "this", "MBean", "with", "the", "local", "MBean", "server", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jmx/RepositoryStatisticsBean.java#L65-L76
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jmx/RepositoryStatisticsBean.java
RepositoryStatisticsBean.stop
public void stop() { MBeanServer server = ManagementFactory.getPlatformMBeanServer(); ObjectName beanName = null; try { beanName = getObjectName(); server.unregisterMBean(beanName); } catch (InstanceNotFoundException e) { LOGGER.debug("JMX bean {0} not...
java
public void stop() { MBeanServer server = ManagementFactory.getPlatformMBeanServer(); ObjectName beanName = null; try { beanName = getObjectName(); server.unregisterMBean(beanName); } catch (InstanceNotFoundException e) { LOGGER.debug("JMX bean {0} not...
[ "public", "void", "stop", "(", ")", "{", "MBeanServer", "server", "=", "ManagementFactory", ".", "getPlatformMBeanServer", "(", ")", ";", "ObjectName", "beanName", "=", "null", ";", "try", "{", "beanName", "=", "getObjectName", "(", ")", ";", "server", ".", ...
Un-registers the bean from the JMX server.
[ "Un", "-", "registers", "the", "bean", "from", "the", "JMX", "server", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jmx/RepositoryStatisticsBean.java#L81-L92
train
ModeShape/modeshape
web/modeshape-web-explorer/src/main/java/org/modeshape/web/client/contents/Contents.java
Contents.show
public void show(String repository, final boolean changeHistory) { this.repository = repository; refreshWorkspacesAndReloadNode(null, ROOT_PATH, changeHistory); }
java
public void show(String repository, final boolean changeHistory) { this.repository = repository; refreshWorkspacesAndReloadNode(null, ROOT_PATH, changeHistory); }
[ "public", "void", "show", "(", "String", "repository", ",", "final", "boolean", "changeHistory", ")", "{", "this", ".", "repository", "=", "repository", ";", "refreshWorkspacesAndReloadNode", "(", "null", ",", "ROOT_PATH", ",", "changeHistory", ")", ";", "}" ]
Shows content of the root node of the first reachable workspace of the given repository. @param repository the name of the given repository. @param changeHistory if true then this action of navigation will be reflected in the browser URL and will don't touch URL in case of false value.
[ "Shows", "content", "of", "the", "root", "node", "of", "the", "first", "reachable", "workspace", "of", "the", "given", "repository", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/web/modeshape-web-explorer/src/main/java/org/modeshape/web/client/contents/Contents.java#L160-L163
train
ModeShape/modeshape
web/modeshape-web-explorer/src/main/java/org/modeshape/web/client/contents/Contents.java
Contents.show
public void show(final String repository, final String workspace, final String path, final boolean changeHistory) { this.repository = repository; this.refreshWorkspacesAndReloadNode(null, path, changeHistory); }
java
public void show(final String repository, final String workspace, final String path, final boolean changeHistory) { this.repository = repository; this.refreshWorkspacesAndReloadNode(null, path, changeHistory); }
[ "public", "void", "show", "(", "final", "String", "repository", ",", "final", "String", "workspace", ",", "final", "String", "path", ",", "final", "boolean", "changeHistory", ")", "{", "this", ".", "repository", "=", "repository", ";", "this", ".", "refreshW...
Shows nodes identified by repository, workspace and path to node. @param repository the name of the repository @param workspace the name of the workspace @param path the path to node @param changeHistory true if this action should be reflected in browser history.
[ "Shows", "nodes", "identified", "by", "repository", "workspace", "and", "path", "to", "node", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/web/modeshape-web-explorer/src/main/java/org/modeshape/web/client/contents/Contents.java#L174-L178
train
ModeShape/modeshape
web/modeshape-web-explorer/src/main/java/org/modeshape/web/client/contents/Contents.java
Contents.refreshWorkspacesAndReloadNode
private void refreshWorkspacesAndReloadNode(final String name, final String path, final boolean changeHistory) { showLoadIcon(); console.jcrService().getWorkspaces(repository, new AsyncCallback<String[]>() { @Override public void onFailure(Throwable caught) { ...
java
private void refreshWorkspacesAndReloadNode(final String name, final String path, final boolean changeHistory) { showLoadIcon(); console.jcrService().getWorkspaces(repository, new AsyncCallback<String[]>() { @Override public void onFailure(Throwable caught) { ...
[ "private", "void", "refreshWorkspacesAndReloadNode", "(", "final", "String", "name", ",", "final", "String", "path", ",", "final", "boolean", "changeHistory", ")", "{", "showLoadIcon", "(", ")", ";", "console", ".", "jcrService", "(", ")", ".", "getWorkspaces", ...
Reloads values of the combo box with workspace names. Gets values from server side, assigns to combo box and select given name. @param name the name to be selected. @param path the path @param changeHistory true if the history is to
[ "Reloads", "values", "of", "the", "combo", "box", "with", "workspace", "names", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/web/modeshape-web-explorer/src/main/java/org/modeshape/web/client/contents/Contents.java#L189-L210
train
ModeShape/modeshape
web/modeshape-web-explorer/src/main/java/org/modeshape/web/client/contents/Contents.java
Contents.getAndDisplayNode
public void getAndDisplayNode(final String path, final boolean changeHistory) { showLoadIcon(); console.jcrService().node(repository(), workspace(), path, new AsyncCallback<JcrNode>() { @Override public void onFailure(Throwable caught) { hideLoadIcon(); ...
java
public void getAndDisplayNode(final String path, final boolean changeHistory) { showLoadIcon(); console.jcrService().node(repository(), workspace(), path, new AsyncCallback<JcrNode>() { @Override public void onFailure(Throwable caught) { hideLoadIcon(); ...
[ "public", "void", "getAndDisplayNode", "(", "final", "String", "path", ",", "final", "boolean", "changeHistory", ")", "{", "showLoadIcon", "(", ")", ";", "console", ".", "jcrService", "(", ")", ".", "node", "(", "repository", "(", ")", ",", "workspace", "(...
Reads node with given path and selected repository and workspace. @param path the path to the node. @param changeHistory if true then path will be reflected in browser history.
[ "Reads", "node", "with", "given", "path", "and", "selected", "repository", "and", "workspace", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/web/modeshape-web-explorer/src/main/java/org/modeshape/web/client/contents/Contents.java#L219-L236
train
ModeShape/modeshape
web/modeshape-web-explorer/src/main/java/org/modeshape/web/client/contents/Contents.java
Contents.displayNode
private void displayNode(JcrNode node) { this.node = node; this.path = node.getPath(); pathLabel.display(node.getPath()); //display childs, properties and ACLs childrenEditor.show(node); propertiesEditor.show(node); permissionsEditor.show(node); display...
java
private void displayNode(JcrNode node) { this.node = node; this.path = node.getPath(); pathLabel.display(node.getPath()); //display childs, properties and ACLs childrenEditor.show(node); propertiesEditor.show(node); permissionsEditor.show(node); display...
[ "private", "void", "displayNode", "(", "JcrNode", "node", ")", "{", "this", ".", "node", "=", "node", ";", "this", ".", "path", "=", "node", ".", "getPath", "(", ")", ";", "pathLabel", ".", "display", "(", "node", ".", "getPath", "(", ")", ")", ";"...
Displays specified node. @param node the node being displayed.
[ "Displays", "specified", "node", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/web/modeshape-web-explorer/src/main/java/org/modeshape/web/client/contents/Contents.java#L243-L258
train
ModeShape/modeshape
web/modeshape-web-explorer/src/main/java/org/modeshape/web/client/contents/Contents.java
Contents.save
public void save() { SC.ask("Do you want to save changes", new BooleanCallback() { @Override public void execute(Boolean yesSelected) { if (yesSelected) { jcrService().save(repository(), workspace(), new BaseCallback<Object>() { ...
java
public void save() { SC.ask("Do you want to save changes", new BooleanCallback() { @Override public void execute(Boolean yesSelected) { if (yesSelected) { jcrService().save(repository(), workspace(), new BaseCallback<Object>() { ...
[ "public", "void", "save", "(", ")", "{", "SC", ".", "ask", "(", "\"Do you want to save changes\"", ",", "new", "BooleanCallback", "(", ")", "{", "@", "Override", "public", "void", "execute", "(", "Boolean", "yesSelected", ")", "{", "if", "(", "yesSelected", ...
Save session's changes.
[ "Save", "session", "s", "changes", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/web/modeshape-web-explorer/src/main/java/org/modeshape/web/client/contents/Contents.java#L274-L289
train
ModeShape/modeshape
web/modeshape-web-explorer/src/main/java/org/modeshape/web/client/contents/Contents.java
Contents.showAddNodeDialog
public void showAddNodeDialog() { jcrService().getPrimaryTypes(node.getRepository(), node.getWorkspace(), null, false, new AsyncCallback<String[]>() { @Override public void onFailure(Throwable caught) { SC.say(caught.getMess...
java
public void showAddNodeDialog() { jcrService().getPrimaryTypes(node.getRepository(), node.getWorkspace(), null, false, new AsyncCallback<String[]>() { @Override public void onFailure(Throwable caught) { SC.say(caught.getMess...
[ "public", "void", "showAddNodeDialog", "(", ")", "{", "jcrService", "(", ")", ".", "getPrimaryTypes", "(", "node", ".", "getRepository", "(", ")", ",", "node", ".", "getWorkspace", "(", ")", ",", "null", ",", "false", ",", "new", "AsyncCallback", "<", "S...
Prepares dialog for creating new node.
[ "Prepares", "dialog", "for", "creating", "new", "node", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/web/modeshape-web-explorer/src/main/java/org/modeshape/web/client/contents/Contents.java#L310-L326
train
ModeShape/modeshape
web/modeshape-web-explorer/src/main/java/org/modeshape/web/client/contents/Contents.java
Contents.exportXML
public void exportXML(String name, boolean skipBinary, boolean noRecurse) { console.jcrService().export(repository, workspace(), path(), name, true, true, new AsyncCallback<Object>() { @Override public void onFailure(Throwable caught) { SC.say(caught.getMessage()); ...
java
public void exportXML(String name, boolean skipBinary, boolean noRecurse) { console.jcrService().export(repository, workspace(), path(), name, true, true, new AsyncCallback<Object>() { @Override public void onFailure(Throwable caught) { SC.say(caught.getMessage()); ...
[ "public", "void", "exportXML", "(", "String", "name", ",", "boolean", "skipBinary", ",", "boolean", "noRecurse", ")", "{", "console", ".", "jcrService", "(", ")", ".", "export", "(", "repository", ",", "workspace", "(", ")", ",", "path", "(", ")", ",", ...
Exports contents to the given file. @param name the name of the file. @param skipBinary @param noRecurse
[ "Exports", "contents", "to", "the", "given", "file", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/web/modeshape-web-explorer/src/main/java/org/modeshape/web/client/contents/Contents.java#L349-L361
train
ModeShape/modeshape
web/modeshape-web-explorer/src/main/java/org/modeshape/web/client/contents/Contents.java
Contents.importXML
public void importXML(String name, int option) { console.jcrService().importXML(repository, workspace(), path(), name, option, new AsyncCallback<Object>() { @Override public void onFailure(Throwable caught) { SC.say(caught.getMessage()); } ...
java
public void importXML(String name, int option) { console.jcrService().importXML(repository, workspace(), path(), name, option, new AsyncCallback<Object>() { @Override public void onFailure(Throwable caught) { SC.say(caught.getMessage()); } ...
[ "public", "void", "importXML", "(", "String", "name", ",", "int", "option", ")", "{", "console", ".", "jcrService", "(", ")", ".", "importXML", "(", "repository", ",", "workspace", "(", ")", ",", "path", "(", ")", ",", "name", ",", "option", ",", "ne...
Imports contents from the given file. @param name @param option
[ "Imports", "contents", "from", "the", "given", "file", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/web/modeshape-web-explorer/src/main/java/org/modeshape/web/client/contents/Contents.java#L369-L382
train
ModeShape/modeshape
connectors/modeshape-connector-git/src/main/java/org/modeshape/connector/git/GitFunction.java
GitFunction.branchRefForName
protected String branchRefForName( String branchName ) { String remoteName = connector.remoteName(); return remoteName != null ? remoteBranchPrefix(remoteName) + branchName : LOCAL_BRANCH_PREFIX + branchName; }
java
protected String branchRefForName( String branchName ) { String remoteName = connector.remoteName(); return remoteName != null ? remoteBranchPrefix(remoteName) + branchName : LOCAL_BRANCH_PREFIX + branchName; }
[ "protected", "String", "branchRefForName", "(", "String", "branchName", ")", "{", "String", "remoteName", "=", "connector", ".", "remoteName", "(", ")", ";", "return", "remoteName", "!=", "null", "?", "remoteBranchPrefix", "(", "remoteName", ")", "+", "branchNam...
Obtain the name of the branch reference @param branchName @return the branch ref name
[ "Obtain", "the", "name", "of", "the", "branch", "reference" ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/connectors/modeshape-connector-git/src/main/java/org/modeshape/connector/git/GitFunction.java#L108-L111
train
ModeShape/modeshape
connectors/modeshape-connector-git/src/main/java/org/modeshape/connector/git/GitFunction.java
GitFunction.addBranchesAsChildren
protected void addBranchesAsChildren( Git git, CallSpecification spec, DocumentWriter writer ) throws GitAPIException { Set<String> remoteBranchPrefixes = remoteBranchPrefixes(); if (remoteBranchPrefixes.isEmpty()) { ...
java
protected void addBranchesAsChildren( Git git, CallSpecification spec, DocumentWriter writer ) throws GitAPIException { Set<String> remoteBranchPrefixes = remoteBranchPrefixes(); if (remoteBranchPrefixes.isEmpty()) { ...
[ "protected", "void", "addBranchesAsChildren", "(", "Git", "git", ",", "CallSpecification", "spec", ",", "DocumentWriter", "writer", ")", "throws", "GitAPIException", "{", "Set", "<", "String", ">", "remoteBranchPrefixes", "=", "remoteBranchPrefixes", "(", ")", ";", ...
Add the names of the branches as children of the current node. @param git the Git object; may not be null @param spec the call specification; may not be null @param writer the document writer for the current node; may not be null @throws GitAPIException if there is a problem accessing the Git repository
[ "Add", "the", "names", "of", "the", "branches", "as", "children", "of", "the", "current", "node", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/connectors/modeshape-connector-git/src/main/java/org/modeshape/connector/git/GitFunction.java#L155-L197
train
ModeShape/modeshape
connectors/modeshape-connector-git/src/main/java/org/modeshape/connector/git/GitFunction.java
GitFunction.addTagsAsChildren
protected void addTagsAsChildren( Git git, CallSpecification spec, DocumentWriter writer ) throws GitAPIException { // Generate the child references to the branches, which will be sorted by name (by the command). ListTagCommand ...
java
protected void addTagsAsChildren( Git git, CallSpecification spec, DocumentWriter writer ) throws GitAPIException { // Generate the child references to the branches, which will be sorted by name (by the command). ListTagCommand ...
[ "protected", "void", "addTagsAsChildren", "(", "Git", "git", ",", "CallSpecification", "spec", ",", "DocumentWriter", "writer", ")", "throws", "GitAPIException", "{", "// Generate the child references to the branches, which will be sorted by name (by the command).", "ListTagCommand...
Add the names of the tags as children of the current node. @param git the Git object; may not be null @param spec the call specification; may not be null @param writer the document writer for the current node; may not be null @throws GitAPIException if there is a problem accessing the Git repository
[ "Add", "the", "names", "of", "the", "tags", "as", "children", "of", "the", "current", "node", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/connectors/modeshape-connector-git/src/main/java/org/modeshape/connector/git/GitFunction.java#L207-L220
train
ModeShape/modeshape
connectors/modeshape-connector-git/src/main/java/org/modeshape/connector/git/GitFunction.java
GitFunction.addCommitsAsChildren
protected void addCommitsAsChildren( Git git, CallSpecification spec, DocumentWriter writer, int pageSize ) throws GitAPIException { // Add commits in the log ... LogCommand command...
java
protected void addCommitsAsChildren( Git git, CallSpecification spec, DocumentWriter writer, int pageSize ) throws GitAPIException { // Add commits in the log ... LogCommand command...
[ "protected", "void", "addCommitsAsChildren", "(", "Git", "git", ",", "CallSpecification", "spec", ",", "DocumentWriter", "writer", ",", "int", "pageSize", ")", "throws", "GitAPIException", "{", "// Add commits in the log ...", "LogCommand", "command", "=", "git", ".",...
Add the first page of commits in the history names of the tags as children of the current node. @param git the Git object; may not be null @param spec the call specification; may not be null @param writer the document writer for the current node; may not be null @param pageSize the number of commits to include, and th...
[ "Add", "the", "first", "page", "of", "commits", "in", "the", "history", "names", "of", "the", "tags", "as", "children", "of", "the", "current", "node", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/connectors/modeshape-connector-git/src/main/java/org/modeshape/connector/git/GitFunction.java#L232-L253
train
ModeShape/modeshape
connectors/modeshape-connector-git/src/main/java/org/modeshape/connector/git/GitFunction.java
GitFunction.addCommitsAsPageOfChildren
protected void addCommitsAsPageOfChildren( Git git, Repository repository, CallSpecification spec, PageWriter writer, PageKey pageKe...
java
protected void addCommitsAsPageOfChildren( Git git, Repository repository, CallSpecification spec, PageWriter writer, PageKey pageKe...
[ "protected", "void", "addCommitsAsPageOfChildren", "(", "Git", "git", ",", "Repository", "repository", ",", "CallSpecification", "spec", ",", "PageWriter", "writer", ",", "PageKey", "pageKey", ")", "throws", "GitAPIException", ",", "IOException", "{", "RevWalk", "wa...
Add an additional page of commits in the history names of the tags as children of the current node. @param git the Git object; may not be null @param repository the Repository object; may not be null @param spec the call specification; may not be null @param writer the page writer for the current node; may not be null...
[ "Add", "an", "additional", "page", "of", "commits", "in", "the", "history", "names", "of", "the", "tags", "as", "children", "of", "the", "current", "node", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/connectors/modeshape-connector-git/src/main/java/org/modeshape/connector/git/GitFunction.java#L266-L298
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/JcrPropertyDefinition.java
JcrPropertyDefinition.isAsOrMoreConstrainedThan
boolean isAsOrMoreConstrainedThan( PropertyDefinition other, ExecutionContext context ) { String[] otherConstraints = other.getValueConstraints(); if (otherConstraints == null || otherConstraints.length == 0) { // The ancestor's definition is less const...
java
boolean isAsOrMoreConstrainedThan( PropertyDefinition other, ExecutionContext context ) { String[] otherConstraints = other.getValueConstraints(); if (otherConstraints == null || otherConstraints.length == 0) { // The ancestor's definition is less const...
[ "boolean", "isAsOrMoreConstrainedThan", "(", "PropertyDefinition", "other", ",", "ExecutionContext", "context", ")", "{", "String", "[", "]", "otherConstraints", "=", "other", ".", "getValueConstraints", "(", ")", ";", "if", "(", "otherConstraints", "==", "null", ...
Determine if the constraints on this definition are as-constrained or more-constrained than those on the supplied definition. @param other the property definition to compare; may not be null @param context the execution context used to parse any values within the constraints @return true if this property definition is...
[ "Determine", "if", "the", "constraints", "on", "this", "definition", "are", "as", "-", "constrained", "or", "more", "-", "constrained", "than", "those", "on", "the", "supplied", "definition", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/JcrPropertyDefinition.java#L496-L526
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/value/binary/TransientBinaryStore.java
TransientBinaryStore.initializeStorage
@Override protected void initializeStorage( File directory ) throws BinaryStoreException { // make sure the directory doesn't exist FileUtil.delete(directory); if (!directory.exists()) { logger.debug("Creating temporary directory for transient binary store: {0}", directory.getAbs...
java
@Override protected void initializeStorage( File directory ) throws BinaryStoreException { // make sure the directory doesn't exist FileUtil.delete(directory); if (!directory.exists()) { logger.debug("Creating temporary directory for transient binary store: {0}", directory.getAbs...
[ "@", "Override", "protected", "void", "initializeStorage", "(", "File", "directory", ")", "throws", "BinaryStoreException", "{", "// make sure the directory doesn't exist", "FileUtil", ".", "delete", "(", "directory", ")", ";", "if", "(", "!", "directory", ".", "exi...
Ensures that the directory used by this binary store exists and can be both read and written to. @throws BinaryStoreException if the directory cannot be written to, read, or (if needed) created
[ "Ensures", "that", "the", "directory", "used", "by", "this", "binary", "store", "exists", "and", "can", "be", "both", "read", "and", "written", "to", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/value/binary/TransientBinaryStore.java#L88-L104
train
ModeShape/modeshape
web/modeshape-web-jcr-rest/src/main/java/org/modeshape/web/jcr/rest/model/RestWorkspaces.java
RestWorkspaces.addWorkspace
public Workspace addWorkspace( String name, String repositoryUrl ) { Workspace workspace = new Workspace(name, repositoryUrl); workspaces.add(workspace); return workspace; }
java
public Workspace addWorkspace( String name, String repositoryUrl ) { Workspace workspace = new Workspace(name, repositoryUrl); workspaces.add(workspace); return workspace; }
[ "public", "Workspace", "addWorkspace", "(", "String", "name", ",", "String", "repositoryUrl", ")", "{", "Workspace", "workspace", "=", "new", "Workspace", "(", "name", ",", "repositoryUrl", ")", ";", "workspaces", ".", "add", "(", "workspace", ")", ";", "ret...
Adds a new workspace to the list of workspaces. @param name a {@code non-null} string, the name of a workspace. @param repositoryUrl a {@code non-null} string, the absolute url to the repository to which the workspace belongs. @return a {@link Workspace} instance
[ "Adds", "a", "new", "workspace", "to", "the", "list", "of", "workspaces", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/web/modeshape-web-jcr-rest/src/main/java/org/modeshape/web/jcr/rest/model/RestWorkspaces.java#L49-L54
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/cache/change/ChangeSetAdapter.java
ChangeSetAdapter.modifyProperties
protected void modifyProperties( NodeKey key, Name primaryType, Set<Name> mixinTypes, Map<Name, AbstractPropertyChange> propChanges ) { }
java
protected void modifyProperties( NodeKey key, Name primaryType, Set<Name> mixinTypes, Map<Name, AbstractPropertyChange> propChanges ) { }
[ "protected", "void", "modifyProperties", "(", "NodeKey", "key", ",", "Name", "primaryType", ",", "Set", "<", "Name", ">", "mixinTypes", ",", "Map", "<", "Name", ",", "AbstractPropertyChange", ">", "propChanges", ")", "{", "}" ]
Handle the addition, change, and removal of one or more properties of a single node. This method is called once for each existing node whose properties are modified. @param key the unique key for the node; may not be null @param primaryType the primary type of the node for which the modifications occurred; never null ...
[ "Handle", "the", "addition", "change", "and", "removal", "of", "one", "or", "more", "properties", "of", "a", "single", "node", ".", "This", "method", "is", "called", "once", "for", "each", "existing", "node", "whose", "properties", "are", "modified", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/cache/change/ChangeSetAdapter.java#L248-L252
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/cache/change/ChangeSetAdapter.java
ChangeSetAdapter.addNode
protected void addNode( String workspaceName, NodeKey key, Path path, Name primaryType, Set<Name> mixinTypes, Properties properties ) { }
java
protected void addNode( String workspaceName, NodeKey key, Path path, Name primaryType, Set<Name> mixinTypes, Properties properties ) { }
[ "protected", "void", "addNode", "(", "String", "workspaceName", ",", "NodeKey", "key", ",", "Path", "path", ",", "Name", "primaryType", ",", "Set", "<", "Name", ">", "mixinTypes", ",", "Properties", "properties", ")", "{", "}" ]
Handle the addition of a node. @param workspaceName the workspace in which the node information should be available; may not be null @param key the unique key for the node; may not be null @param path the path of the node; may not be null @param primaryType the primary type of the node; may not be null @param mixinTyp...
[ "Handle", "the", "addition", "of", "a", "node", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/cache/change/ChangeSetAdapter.java#L289-L295
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/cache/change/ChangeSetAdapter.java
ChangeSetAdapter.removeNode
protected void removeNode( String workspaceName, NodeKey key, NodeKey parentKey, Path path, Name primaryType, Set<Name> mixinTypes ) { }
java
protected void removeNode( String workspaceName, NodeKey key, NodeKey parentKey, Path path, Name primaryType, Set<Name> mixinTypes ) { }
[ "protected", "void", "removeNode", "(", "String", "workspaceName", ",", "NodeKey", "key", ",", "NodeKey", "parentKey", ",", "Path", "path", ",", "Name", "primaryType", ",", "Set", "<", "Name", ">", "mixinTypes", ")", "{", "}" ]
Handle the removal of a node. @param workspaceName the workspace in which the node information should be available; may not be null @param key the unique key for the node; may not be null @param parentKey the unique key for the parent of the node; may not be null @param path the path of the node; may not be null @para...
[ "Handle", "the", "removal", "of", "a", "node", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/cache/change/ChangeSetAdapter.java#L327-L334
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/cache/change/ChangeSetAdapter.java
ChangeSetAdapter.changeNode
protected void changeNode( String workspaceName, NodeKey key, Path path, Name primaryType, Set<Name> mixinTypes ) { }
java
protected void changeNode( String workspaceName, NodeKey key, Path path, Name primaryType, Set<Name> mixinTypes ) { }
[ "protected", "void", "changeNode", "(", "String", "workspaceName", ",", "NodeKey", "key", ",", "Path", "path", ",", "Name", "primaryType", ",", "Set", "<", "Name", ">", "mixinTypes", ")", "{", "}" ]
Handle the change of a node. @param workspaceName the workspace in which the node information should be available; may not be null @param key the unique key for the node; may not be null @param path the path of the node; may not be null @param primaryType the primary type of the node; may not be null @param mixinTypes...
[ "Handle", "the", "change", "of", "a", "node", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/cache/change/ChangeSetAdapter.java#L345-L350
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/cache/change/ChangeSetAdapter.java
ChangeSetAdapter.moveNode
protected void moveNode( String workspaceName, NodeKey key, Name primaryType, Set<Name> mixinTypes, NodeKey oldParent, NodeKey newParent, Path new...
java
protected void moveNode( String workspaceName, NodeKey key, Name primaryType, Set<Name> mixinTypes, NodeKey oldParent, NodeKey newParent, Path new...
[ "protected", "void", "moveNode", "(", "String", "workspaceName", ",", "NodeKey", "key", ",", "Name", "primaryType", ",", "Set", "<", "Name", ">", "mixinTypes", ",", "NodeKey", "oldParent", ",", "NodeKey", "newParent", ",", "Path", "newPath", ",", "Path", "ol...
Handle the move of a node. @param workspaceName the workspace in which the node information should be available; may not be null @param key the unique key for the node; may not be null @param primaryType the primary type of the node; may not be null @param mixinTypes the mixin types for the node; may not be null but m...
[ "Handle", "the", "move", "of", "a", "node", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/cache/change/ChangeSetAdapter.java#L364-L373
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/cache/change/ChangeSetAdapter.java
ChangeSetAdapter.renameNode
protected void renameNode( String workspaceName, NodeKey key, Path newPath, Segment oldSegment, Name primaryType, Set<Name> mixinTypes ) { }
java
protected void renameNode( String workspaceName, NodeKey key, Path newPath, Segment oldSegment, Name primaryType, Set<Name> mixinTypes ) { }
[ "protected", "void", "renameNode", "(", "String", "workspaceName", ",", "NodeKey", "key", ",", "Path", "newPath", ",", "Segment", "oldSegment", ",", "Name", "primaryType", ",", "Set", "<", "Name", ">", "mixinTypes", ")", "{", "}" ]
Handle the renaming of a node. @param workspaceName the workspace in which the node information should be available; may not be null @param key the unique key for the node; may not be null @param newPath the new path of the node after it was moved; may not be null @param oldSegment the old segment of the node before i...
[ "Handle", "the", "renaming", "of", "a", "node", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/cache/change/ChangeSetAdapter.java#L385-L392
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/cache/change/ChangeSetAdapter.java
ChangeSetAdapter.reorderNode
protected void reorderNode( String workspaceName, NodeKey key, Name primaryType, Set<Name> mixinTypes, NodeKey parent, Path newPath, ...
java
protected void reorderNode( String workspaceName, NodeKey key, Name primaryType, Set<Name> mixinTypes, NodeKey parent, Path newPath, ...
[ "protected", "void", "reorderNode", "(", "String", "workspaceName", ",", "NodeKey", "key", ",", "Name", "primaryType", ",", "Set", "<", "Name", ">", "mixinTypes", ",", "NodeKey", "parent", ",", "Path", "newPath", ",", "Path", "oldPath", ",", "Path", "reorder...
Handle the reordering of a node. @param workspaceName the workspace in which the node information should be available; may not be null @param key the unique key for the node; may not be null @param primaryType the primary type of the node; may not be null @param mixinTypes the mixin types for the node; may not be null...
[ "Handle", "the", "reordering", "of", "a", "node", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/cache/change/ChangeSetAdapter.java#L407-L417
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/query/Tuples.java
Tuples.typeFactory
public static <T1, T2> TypeFactory<Tuple2<T1, T2>> typeFactory( TypeFactory<T1> type1, TypeFactory<T2> type2 ) { return new Tuple2TypeFactory<>(type1, type2); }
java
public static <T1, T2> TypeFactory<Tuple2<T1, T2>> typeFactory( TypeFactory<T1> type1, TypeFactory<T2> type2 ) { return new Tuple2TypeFactory<>(type1, type2); }
[ "public", "static", "<", "T1", ",", "T2", ">", "TypeFactory", "<", "Tuple2", "<", "T1", ",", "T2", ">", ">", "typeFactory", "(", "TypeFactory", "<", "T1", ">", "type1", ",", "TypeFactory", "<", "T2", ">", "type2", ")", "{", "return", "new", "Tuple2Ty...
Create a type factory for tuples of size 2. @param type1 the first type; may not be null @param type2 the second type; may not be null @return the type factory; never null
[ "Create", "a", "type", "factory", "for", "tuples", "of", "size", "2", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/query/Tuples.java#L103-L106
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/query/Tuples.java
Tuples.typeFactory
public static <T1, T2, T3> TypeFactory<Tuple3<T1, T2, T3>> typeFactory( TypeFactory<T1> type1, TypeFactory<T2> type2, TypeFactory<T3> type3 ) { return new Tuple...
java
public static <T1, T2, T3> TypeFactory<Tuple3<T1, T2, T3>> typeFactory( TypeFactory<T1> type1, TypeFactory<T2> type2, TypeFactory<T3> type3 ) { return new Tuple...
[ "public", "static", "<", "T1", ",", "T2", ",", "T3", ">", "TypeFactory", "<", "Tuple3", "<", "T1", ",", "T2", ",", "T3", ">", ">", "typeFactory", "(", "TypeFactory", "<", "T1", ">", "type1", ",", "TypeFactory", "<", "T2", ">", "type2", ",", "TypeFa...
Create a type factory for tuples of size 3. @param type1 the first type; may not be null @param type2 the second type; may not be null @param type3 the third type; may not be null @return the type factory; never null
[ "Create", "a", "type", "factory", "for", "tuples", "of", "size", "3", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/query/Tuples.java#L116-L120
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/query/Tuples.java
Tuples.typeFactory
public static <T1, T2, T3, T4> TypeFactory<Tuple4<T1, T2, T3, T4>> typeFactory( TypeFactory<T1> type1, TypeFactory<T2> type2, TypeFactory<T3> type3, ...
java
public static <T1, T2, T3, T4> TypeFactory<Tuple4<T1, T2, T3, T4>> typeFactory( TypeFactory<T1> type1, TypeFactory<T2> type2, TypeFactory<T3> type3, ...
[ "public", "static", "<", "T1", ",", "T2", ",", "T3", ",", "T4", ">", "TypeFactory", "<", "Tuple4", "<", "T1", ",", "T2", ",", "T3", ",", "T4", ">", ">", "typeFactory", "(", "TypeFactory", "<", "T1", ">", "type1", ",", "TypeFactory", "<", "T2", ">...
Create a type factory for tuples of size 4. @param type1 the first type; may not be null @param type2 the second type; may not be null @param type3 the third type; may not be null @param type4 the fourth type; may not be null @return the type factory; never null
[ "Create", "a", "type", "factory", "for", "tuples", "of", "size", "4", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/query/Tuples.java#L131-L136
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/query/Tuples.java
Tuples.typeFactory
public static TypeFactory<?> typeFactory( TypeFactory<?> type, int tupleSize ) { if (tupleSize <= 1) return type; if (tupleSize == 2) return typeFactory(type, type); if (tupleSize == 3) return typeFactory(type, type, type); if (tupleSize == 4...
java
public static TypeFactory<?> typeFactory( TypeFactory<?> type, int tupleSize ) { if (tupleSize <= 1) return type; if (tupleSize == 2) return typeFactory(type, type); if (tupleSize == 3) return typeFactory(type, type, type); if (tupleSize == 4...
[ "public", "static", "TypeFactory", "<", "?", ">", "typeFactory", "(", "TypeFactory", "<", "?", ">", "type", ",", "int", "tupleSize", ")", "{", "if", "(", "tupleSize", "<=", "1", ")", "return", "type", ";", "if", "(", "tupleSize", "==", "2", ")", "ret...
Create a type factory for uniform tuples. @param type the type of each/every slot in the tuples @param tupleSize the size of the tuples @return the type factory; never null
[ "Create", "a", "type", "factory", "for", "uniform", "tuples", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/query/Tuples.java#L155-L166
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/AccessControlManagerImpl.java
AccessControlManagerImpl.privileges
private Privilege[] privileges( Set<String> names ) throws ValueFormatException, AccessControlException, RepositoryException { Privilege[] privileges = new Privilege[names.size()]; int i = 0; for (String name : names) { privileges[i++] = privilegeFromName(name); } ret...
java
private Privilege[] privileges( Set<String> names ) throws ValueFormatException, AccessControlException, RepositoryException { Privilege[] privileges = new Privilege[names.size()]; int i = 0; for (String name : names) { privileges[i++] = privilegeFromName(name); } ret...
[ "private", "Privilege", "[", "]", "privileges", "(", "Set", "<", "String", ">", "names", ")", "throws", "ValueFormatException", ",", "AccessControlException", ",", "RepositoryException", "{", "Privilege", "[", "]", "privileges", "=", "new", "Privilege", "[", "na...
Constructs list of Privilege objects using privilege's name. @param names names of privileges @return Privilege objects. @throws ValueFormatException @throws AccessControlException @throws RepositoryException
[ "Constructs", "list", "of", "Privilege", "objects", "using", "privilege", "s", "name", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/AccessControlManagerImpl.java#L303-L310
train
ModeShape/modeshape
web/modeshape-webdav/src/main/java/org/modeshape/webdav/methods/DeterminableMethod.java
DeterminableMethod.determineMethodsAllowed
protected static String determineMethodsAllowed( StoredObject so ) { try { if (so != null) { if (so.isNullResource()) { return NULL_RESOURCE_METHODS_ALLOWED; } else if (so.isFolder()) { return RESOURCE_METHODS_ALLOWED + FOLDE...
java
protected static String determineMethodsAllowed( StoredObject so ) { try { if (so != null) { if (so.isNullResource()) { return NULL_RESOURCE_METHODS_ALLOWED; } else if (so.isFolder()) { return RESOURCE_METHODS_ALLOWED + FOLDE...
[ "protected", "static", "String", "determineMethodsAllowed", "(", "StoredObject", "so", ")", "{", "try", "{", "if", "(", "so", "!=", "null", ")", "{", "if", "(", "so", ".", "isNullResource", "(", ")", ")", "{", "return", "NULL_RESOURCE_METHODS_ALLOWED", ";", ...
Determines the methods normally allowed for the resource. @param so StoredObject representing the resource @return all allowed methods, separated by commas
[ "Determines", "the", "methods", "normally", "allowed", "for", "the", "resource", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/web/modeshape-webdav/src/main/java/org/modeshape/webdav/methods/DeterminableMethod.java#L37-L56
train
ModeShape/modeshape
sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/dialect/derby/DerbyDdlParser.java
DerbyDdlParser.parseCreateIndex
protected AstNode parseCreateIndex( DdlTokenStream tokens, AstNode parentNode ) throws ParsingException { assert tokens != null; assert parentNode != null; markStartOfStatement(tokens); // CREATE [UNIQUE] INDEX index-Name // ON table-Name ...
java
protected AstNode parseCreateIndex( DdlTokenStream tokens, AstNode parentNode ) throws ParsingException { assert tokens != null; assert parentNode != null; markStartOfStatement(tokens); // CREATE [UNIQUE] INDEX index-Name // ON table-Name ...
[ "protected", "AstNode", "parseCreateIndex", "(", "DdlTokenStream", "tokens", ",", "AstNode", "parentNode", ")", "throws", "ParsingException", "{", "assert", "tokens", "!=", "null", ";", "assert", "parentNode", "!=", "null", ";", "markStartOfStatement", "(", "tokens"...
Parses DDL CREATE INDEX @param tokens the tokenized {@link DdlTokenStream} of the DDL input content; may not be null @param parentNode the parent {@link AstNode} node; may not be null @return the parsed CREATE INDEX @throws ParsingException
[ "Parses", "DDL", "CREATE", "INDEX" ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/dialect/derby/DerbyDdlParser.java#L205-L234
train
ModeShape/modeshape
sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/dialect/derby/DerbyDdlParser.java
DerbyDdlParser.parseCreateRole
protected AstNode parseCreateRole( DdlTokenStream tokens, AstNode parentNode ) throws ParsingException { assert tokens != null; assert parentNode != null; markStartOfStatement(tokens); tokens.consume(CREATE, "ROLE"); String functionName =...
java
protected AstNode parseCreateRole( DdlTokenStream tokens, AstNode parentNode ) throws ParsingException { assert tokens != null; assert parentNode != null; markStartOfStatement(tokens); tokens.consume(CREATE, "ROLE"); String functionName =...
[ "protected", "AstNode", "parseCreateRole", "(", "DdlTokenStream", "tokens", ",", "AstNode", "parentNode", ")", "throws", "ParsingException", "{", "assert", "tokens", "!=", "null", ";", "assert", "parentNode", "!=", "null", ";", "markStartOfStatement", "(", "tokens",...
Parses DDL CREATE ROLE statement @param tokens the tokenized {@link DdlTokenStream} of the DDL input content; may not be null @param parentNode the parent {@link AstNode} node; may not be null @return the parsed CREATE ROLE statement node @throws ParsingException
[ "Parses", "DDL", "CREATE", "ROLE", "statement" ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/dialect/derby/DerbyDdlParser.java#L433-L449
train
ModeShape/modeshape
sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/dialect/derby/DerbyDdlParser.java
DerbyDdlParser.parseColumns
protected void parseColumns( DdlTokenStream tokens, AstNode tableNode, boolean isAlterTable ) throws ParsingException { String tableElementString = getTableElementsString(tokens, false); DdlTokenStream localTokens = new DdlTokenStream(ta...
java
protected void parseColumns( DdlTokenStream tokens, AstNode tableNode, boolean isAlterTable ) throws ParsingException { String tableElementString = getTableElementsString(tokens, false); DdlTokenStream localTokens = new DdlTokenStream(ta...
[ "protected", "void", "parseColumns", "(", "DdlTokenStream", "tokens", ",", "AstNode", "tableNode", ",", "boolean", "isAlterTable", ")", "throws", "ParsingException", "{", "String", "tableElementString", "=", "getTableElementsString", "(", "tokens", ",", "false", ")", ...
Utility method designed to parse columns within an ALTER TABLE ADD statement. @param tokens the tokenized {@link DdlTokenStream} of the DDL input content; may not be null @param tableNode @param isAlterTable @throws ParsingException
[ "Utility", "method", "designed", "to", "parse", "columns", "within", "an", "ALTER", "TABLE", "ADD", "statement", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/dialect/derby/DerbyDdlParser.java#L887-L914
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/query/optimize/CopyCriteria.java
CopyCriteria.getColumnsReferencedBy
public static Set<Column> getColumnsReferencedBy( Visitable visitable ) { if (visitable == null) return Collections.emptySet(); final Set<Column> symbols = new HashSet<Column>(); // Walk the entire structure, so only supply a StrategyVisitor (that does no navigation) ... Visitors.visitAl...
java
public static Set<Column> getColumnsReferencedBy( Visitable visitable ) { if (visitable == null) return Collections.emptySet(); final Set<Column> symbols = new HashSet<Column>(); // Walk the entire structure, so only supply a StrategyVisitor (that does no navigation) ... Visitors.visitAl...
[ "public", "static", "Set", "<", "Column", ">", "getColumnsReferencedBy", "(", "Visitable", "visitable", ")", "{", "if", "(", "visitable", "==", "null", ")", "return", "Collections", ".", "emptySet", "(", ")", ";", "final", "Set", "<", "Column", ">", "symbo...
Get the set of Column objects that represent those columns referenced by the visitable object. @param visitable the object to be visited @return the set of Column objects, with column names that always are the string-form of the {@link Column#getPropertyName() property name}; never null
[ "Get", "the", "set", "of", "Column", "objects", "that", "represent", "those", "columns", "referenced", "by", "the", "visitable", "object", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/query/optimize/CopyCriteria.java#L173-L213
train
ModeShape/modeshape
index-providers/modeshape-lucene-index-provider/src/main/java/org/modeshape/jcr/index/lucene/FieldUtil.java
FieldUtil.removeTralingZeros
protected static void removeTralingZeros( StringBuilder sb ) { int endIndex = sb.length(); if (endIndex > 0) { --endIndex; int index = endIndex; while (sb.charAt(index) == '0') { --index; } if (index < endIndex) sb.delete(index ...
java
protected static void removeTralingZeros( StringBuilder sb ) { int endIndex = sb.length(); if (endIndex > 0) { --endIndex; int index = endIndex; while (sb.charAt(index) == '0') { --index; } if (index < endIndex) sb.delete(index ...
[ "protected", "static", "void", "removeTralingZeros", "(", "StringBuilder", "sb", ")", "{", "int", "endIndex", "=", "sb", ".", "length", "(", ")", ";", "if", "(", "endIndex", ">", "0", ")", "{", "--", "endIndex", ";", "int", "index", "=", "endIndex", ";...
Utility to remove the trailing 0's. @param sb the input string builder; may not be null
[ "Utility", "to", "remove", "the", "trailing", "0", "s", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/index-providers/modeshape-lucene-index-provider/src/main/java/org/modeshape/jcr/index/lucene/FieldUtil.java#L310-L320
train
ModeShape/modeshape
modeshape-common/src/main/java/org/modeshape/common/util/IoUtil.java
IoUtil.write
public static void write( String content, File file ) throws IOException { CheckArg.isNotNull(file, "destination file"); if (content != null) { write(content, new FileOutputStream(file)); } }
java
public static void write( String content, File file ) throws IOException { CheckArg.isNotNull(file, "destination file"); if (content != null) { write(content, new FileOutputStream(file)); } }
[ "public", "static", "void", "write", "(", "String", "content", ",", "File", "file", ")", "throws", "IOException", "{", "CheckArg", ".", "isNotNull", "(", "file", ",", "\"destination file\"", ")", ";", "if", "(", "content", "!=", "null", ")", "{", "write", ...
Write the entire contents of the supplied string to the given file. @param content the content to write to the stream; may be null @param file the file to which the content is to be written @throws IOException @throws IllegalArgumentException if the stream is null
[ "Write", "the", "entire", "contents", "of", "the", "supplied", "string", "to", "the", "given", "file", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-common/src/main/java/org/modeshape/common/util/IoUtil.java#L211-L217
train
ModeShape/modeshape
modeshape-common/src/main/java/org/modeshape/common/util/IoUtil.java
IoUtil.closeQuietly
public static void closeQuietly( Closeable closeable ) { if (closeable == null) { return; } try { closeable.close(); } catch (Throwable t) { LOGGER.debug(t, "Ignored error at closing stream"); } }
java
public static void closeQuietly( Closeable closeable ) { if (closeable == null) { return; } try { closeable.close(); } catch (Throwable t) { LOGGER.debug(t, "Ignored error at closing stream"); } }
[ "public", "static", "void", "closeQuietly", "(", "Closeable", "closeable", ")", "{", "if", "(", "closeable", "==", "null", ")", "{", "return", ";", "}", "try", "{", "closeable", ".", "close", "(", ")", ";", "}", "catch", "(", "Throwable", "t", ")", "...
Closes the closable silently. Any exceptions are ignored. @param closeable the closeable instance; may be null
[ "Closes", "the", "closable", "silently", ".", "Any", "exceptions", "are", "ignored", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-common/src/main/java/org/modeshape/common/util/IoUtil.java#L521-L530
train
ModeShape/modeshape
web/modeshape-webdav/src/main/java/org/modeshape/webdav/StoredObject.java
StoredObject.setNullResource
public void setNullResource( boolean f ) { this.isNullRessource = f; this.isFolder = false; this.creationDate = null; this.lastModified = null; // this.content = null; this.contentLength = 0; this.mimeType = null; }
java
public void setNullResource( boolean f ) { this.isNullRessource = f; this.isFolder = false; this.creationDate = null; this.lastModified = null; // this.content = null; this.contentLength = 0; this.mimeType = null; }
[ "public", "void", "setNullResource", "(", "boolean", "f", ")", "{", "this", ".", "isNullRessource", "=", "f", ";", "this", ".", "isFolder", "=", "false", ";", "this", ".", "creationDate", "=", "null", ";", "this", ".", "lastModified", "=", "null", ";", ...
Sets a StoredObject as a lock-null resource @param f true to set the resource as lock-null resource
[ "Sets", "a", "StoredObject", "as", "a", "lock", "-", "null", "resource" ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/web/modeshape-webdav/src/main/java/org/modeshape/webdav/StoredObject.java#L126-L134
train
ModeShape/modeshape
sequencers/modeshape-sequencer-xml/src/main/java/org/modeshape/sequencer/xml/XmlSequencerHandler.java
XmlSequencerHandler.endContent
protected void endContent() throws RepositoryException { // Process the content of the element ... String content = StringUtil.normalize(contentBuilder.toString()); // Null-out builder to setup for subsequent content. // Must be done before call to startElement below to prevent infinite ...
java
protected void endContent() throws RepositoryException { // Process the content of the element ... String content = StringUtil.normalize(contentBuilder.toString()); // Null-out builder to setup for subsequent content. // Must be done before call to startElement below to prevent infinite ...
[ "protected", "void", "endContent", "(", ")", "throws", "RepositoryException", "{", "// Process the content of the element ...", "String", "content", "=", "StringUtil", ".", "normalize", "(", "contentBuilder", ".", "toString", "(", ")", ")", ";", "// Null-out builder to ...
See if there is any element content that needs to be completed. @throws RepositoryException if there is a problem writing the content to the repository session
[ "See", "if", "there", "is", "any", "element", "content", "that", "needs", "to", "be", "completed", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/sequencers/modeshape-sequencer-xml/src/main/java/org/modeshape/sequencer/xml/XmlSequencerHandler.java#L104-L117
train
ModeShape/modeshape
web/modeshape-web-explorer/src/main/java/org/modeshape/web/client/LoadingIcon.java
LoadingIcon.show
public void show(int x, int y) { disabledHLayout.setSize("100%", "100%"); disabledHLayout.setStyleName("disabledBackgroundStyle"); disabledHLayout.show(); loadingImg.setSize("100px", "100px"); loadingImg.setTop(y); //loading image height is 50px loadingImg.setLeft(x); //...
java
public void show(int x, int y) { disabledHLayout.setSize("100%", "100%"); disabledHLayout.setStyleName("disabledBackgroundStyle"); disabledHLayout.show(); loadingImg.setSize("100px", "100px"); loadingImg.setTop(y); //loading image height is 50px loadingImg.setLeft(x); //...
[ "public", "void", "show", "(", "int", "x", ",", "int", "y", ")", "{", "disabledHLayout", ".", "setSize", "(", "\"100%\"", ",", "\"100%\"", ")", ";", "disabledHLayout", ".", "setStyleName", "(", "\"disabledBackgroundStyle\"", ")", ";", "disabledHLayout", ".", ...
Shows loading indicator at the given place of screen. @param x horizontal coordinate (from left corner). @param y vertical coordinate (from right corner).
[ "Shows", "loading", "indicator", "at", "the", "given", "place", "of", "screen", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/web/modeshape-web-explorer/src/main/java/org/modeshape/web/client/LoadingIcon.java#L36-L46
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/JcrVersionManager.java
JcrVersionManager.checkout
void checkout( AbstractJcrNode node ) throws LockException, RepositoryException { checkVersionable(node); // Check this separately since it throws a different type of exception if (node.isLocked() && !node.holdsLock()) { throw new LockException(JcrI18n.lockTokenNotHeld.text(node.get...
java
void checkout( AbstractJcrNode node ) throws LockException, RepositoryException { checkVersionable(node); // Check this separately since it throws a different type of exception if (node.isLocked() && !node.holdsLock()) { throw new LockException(JcrI18n.lockTokenNotHeld.text(node.get...
[ "void", "checkout", "(", "AbstractJcrNode", "node", ")", "throws", "LockException", ",", "RepositoryException", "{", "checkVersionable", "(", "node", ")", ";", "// Check this separately since it throws a different type of exception", "if", "(", "node", ".", "isLocked", "(...
Checks out the given node, updating version-related properties on the node as needed. @param node the node to be checked out @throws LockException if a lock prevents the node from being checked out @throws RepositoryException if an error occurs during the checkout. See {@link javax.jcr.Node#checkout()} for a full desc...
[ "Checks", "out", "the", "given", "node", "updating", "version", "-", "related", "properties", "on", "the", "node", "as", "needed", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/JcrVersionManager.java#L535-L563
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/ExecutionContext.java
ExecutionContext.with
public ExecutionContext with( Map<String, String> data ) { Map<String, String> newData = data; if (newData == null) { if (this.data.isEmpty()) return this; } else { // Copy the data in the map ... newData = Collections.unmodifiableMap(new HashMap<String, Strin...
java
public ExecutionContext with( Map<String, String> data ) { Map<String, String> newData = data; if (newData == null) { if (this.data.isEmpty()) return this; } else { // Copy the data in the map ... newData = Collections.unmodifiableMap(new HashMap<String, Strin...
[ "public", "ExecutionContext", "with", "(", "Map", "<", "String", ",", "String", ">", "data", ")", "{", "Map", "<", "String", ",", "String", ">", "newData", "=", "data", ";", "if", "(", "newData", "==", "null", ")", "{", "if", "(", "this", ".", "dat...
Create a new execution context that mirrors this context but that contains the supplied data. Note that the supplied map is always copied to ensure that it is immutable. @param data the data that is to be affiliated with the resulting context or null if the resulting context should have no data @return the execution c...
[ "Create", "a", "new", "execution", "context", "that", "mirrors", "this", "context", "but", "that", "contains", "the", "supplied", "data", ".", "Note", "that", "the", "supplied", "map", "is", "always", "copied", "to", "ensure", "that", "it", "is", "immutable"...
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/ExecutionContext.java#L537-L549
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/ExecutionContext.java
ExecutionContext.with
public ExecutionContext with( String key, String value ) { Map<String, String> newData = data; if (value == null) { // Remove the value with the key ... if (this.data.isEmpty() || !this.data.containsKey(key)) { // nothing to remov...
java
public ExecutionContext with( String key, String value ) { Map<String, String> newData = data; if (value == null) { // Remove the value with the key ... if (this.data.isEmpty() || !this.data.containsKey(key)) { // nothing to remov...
[ "public", "ExecutionContext", "with", "(", "String", "key", ",", "String", "value", ")", "{", "Map", "<", "String", ",", "String", ">", "newData", "=", "data", ";", "if", "(", "value", "==", "null", ")", "{", "// Remove the value with the key ...", "if", "...
Create a new execution context that mirrors this context but that contains the supplied key-value pair in the new context's data. @param key the key for the new data that is to be affiliated with the resulting context @param value the data value to be affiliated with the supplied key in the resulting context, or null ...
[ "Create", "a", "new", "execution", "context", "that", "mirrors", "this", "context", "but", "that", "contains", "the", "supplied", "key", "-", "value", "pair", "in", "the", "new", "context", "s", "data", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/ExecutionContext.java#L578-L600
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/ExecutionContext.java
ExecutionContext.with
public ExecutionContext with(Locale locale) { return new ExecutionContext(securityContext, namespaceRegistry, propertyFactory, threadPools, binaryStore, data, processId, decoder, encoder, stringFactory, binaryFactory, booleanFactory, dateFactory, ...
java
public ExecutionContext with(Locale locale) { return new ExecutionContext(securityContext, namespaceRegistry, propertyFactory, threadPools, binaryStore, data, processId, decoder, encoder, stringFactory, binaryFactory, booleanFactory, dateFactory, ...
[ "public", "ExecutionContext", "with", "(", "Locale", "locale", ")", "{", "return", "new", "ExecutionContext", "(", "securityContext", ",", "namespaceRegistry", ",", "propertyFactory", ",", "threadPools", ",", "binaryStore", ",", "data", ",", "processId", ",", "dec...
Create a new execution context that mirrors this context but that contains the supplied locale. @param locale a {@code Locale} instance @return the execution context that is identical with this execution context, but which uses the supplied locale; never null @since 4.5
[ "Create", "a", "new", "execution", "context", "that", "mirrors", "this", "context", "but", "that", "contains", "the", "supplied", "locale", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/ExecutionContext.java#L624-L629
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/ExecutionContext.java
ExecutionContext.initializeDefaultNamespaces
protected void initializeDefaultNamespaces( NamespaceRegistry namespaceRegistry ) { if (namespaceRegistry == null) return; namespaceRegistry.register(JcrLexicon.Namespace.PREFIX, JcrLexicon.Namespace.URI); namespaceRegistry.register(JcrMixLexicon.Namespace.PREFIX, JcrMixLexicon.Namespace.URI); ...
java
protected void initializeDefaultNamespaces( NamespaceRegistry namespaceRegistry ) { if (namespaceRegistry == null) return; namespaceRegistry.register(JcrLexicon.Namespace.PREFIX, JcrLexicon.Namespace.URI); namespaceRegistry.register(JcrMixLexicon.Namespace.PREFIX, JcrMixLexicon.Namespace.URI); ...
[ "protected", "void", "initializeDefaultNamespaces", "(", "NamespaceRegistry", "namespaceRegistry", ")", "{", "if", "(", "namespaceRegistry", "==", "null", ")", "return", ";", "namespaceRegistry", ".", "register", "(", "JcrLexicon", ".", "Namespace", ".", "PREFIX", "...
Method that initializes the default namespaces for namespace registries. @param namespaceRegistry the namespace registry
[ "Method", "that", "initializes", "the", "default", "namespaces", "for", "namespace", "registries", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/ExecutionContext.java#L650-L656
train