id
int32
0
165k
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
56,200
ModeShape/modeshape
web/modeshape-web-jcr-rest/src/main/java/org/modeshape/web/jcr/rest/model/RestNode.java
RestNode.addCustomProperty
public RestNode addCustomProperty( String name, String value ) { customProperties.put(name, value); return this; }
java
public RestNode addCustomProperty( String name, String value ) { customProperties.put(name, value); return this; }
[ "public", "RestNode", "addCustomProperty", "(", "String", "name", ",", "String", "value", ")", "{", "customProperties", ".", "put", "(", "name", ",", "value", ")", ";", "return", "this", ";", "}" ]
Adds a custom property to this node, meaning a property which is not among the standard JCR properties @param name a {@code non-null} String, representing the name of the custom property @param value a {@code non-null} String, representing the value of the custom property @return this instance, with the custom propert...
[ "Adds", "a", "custom", "property", "to", "this", "node", "meaning", "a", "property", "which", "is", "not", "among", "the", "standard", "JCR", "properties" ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/web/modeshape-web-jcr-rest/src/main/java/org/modeshape/web/jcr/rest/model/RestNode.java#L98-L102
56,201
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/AbstractJcrProperty.java
AbstractJcrProperty.checkForCheckedOut
protected final void checkForCheckedOut() throws VersionException, RepositoryException { if (!node.isCheckedOut()) { // Node is not checked out, so changing property is only allowed if OPV of property is 'ignore' ... JcrPropertyDefinition defn = getDefinition(); if (defn.getO...
java
protected final void checkForCheckedOut() throws VersionException, RepositoryException { if (!node.isCheckedOut()) { // Node is not checked out, so changing property is only allowed if OPV of property is 'ignore' ... JcrPropertyDefinition defn = getDefinition(); if (defn.getO...
[ "protected", "final", "void", "checkForCheckedOut", "(", ")", "throws", "VersionException", ",", "RepositoryException", "{", "if", "(", "!", "node", ".", "isCheckedOut", "(", ")", ")", "{", "// Node is not checked out, so changing property is only allowed if OPV of property...
Verifies that this node is either not versionable or that it is versionable but checked out. @throws VersionException if the node is versionable but is checked in and cannot be modified @throws RepositoryException if there is an error accessing the repository
[ "Verifies", "that", "this", "node", "is", "either", "not", "versionable", "or", "that", "it", "is", "versionable", "but", "checked", "out", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/AbstractJcrProperty.java#L209-L219
56,202
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/AbstractJcrNode.java
AbstractJcrNode.node
protected final CachedNode node() throws ItemNotFoundException, InvalidItemStateException { CachedNode node = sessionCache().getNode(key); if (node == null) { if (sessionCache().isDestroyed(key)) { throw new InvalidItemStateException("The node with key " + key + " has been re...
java
protected final CachedNode node() throws ItemNotFoundException, InvalidItemStateException { CachedNode node = sessionCache().getNode(key); if (node == null) { if (sessionCache().isDestroyed(key)) { throw new InvalidItemStateException("The node with key " + key + " has been re...
[ "protected", "final", "CachedNode", "node", "(", ")", "throws", "ItemNotFoundException", ",", "InvalidItemStateException", "{", "CachedNode", "node", "=", "sessionCache", "(", ")", ".", "getNode", "(", "key", ")", ";", "if", "(", "node", "==", "null", ")", "...
Get the cached node. @return the cached node @throws InvalidItemStateException if the node has been removed in this session's transient state @throws ItemNotFoundException if the node does not exist
[ "Get", "the", "cached", "node", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/AbstractJcrNode.java#L202-L211
56,203
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/AbstractJcrNode.java
AbstractJcrNode.propertyDefinitionFor
final JcrPropertyDefinition propertyDefinitionFor( org.modeshape.jcr.value.Property property, Name primaryType, Set<Name> mixinTypes, NodeTypes nodeTypes )...
java
final JcrPropertyDefinition propertyDefinitionFor( org.modeshape.jcr.value.Property property, Name primaryType, Set<Name> mixinTypes, NodeTypes nodeTypes )...
[ "final", "JcrPropertyDefinition", "propertyDefinitionFor", "(", "org", ".", "modeshape", ".", "jcr", ".", "value", ".", "Property", "property", ",", "Name", "primaryType", ",", "Set", "<", "Name", ">", "mixinTypes", ",", "NodeTypes", "nodeTypes", ")", "throws", ...
Find the property definition for the property, given this node's primary type and mixin types. @param property the property owned by this node; may not be null @param primaryType the name of the node's primary type; may not be null @param mixinTypes the names of the node's mixin types; may be null or empty @param node...
[ "Find", "the", "property", "definition", "for", "the", "property", "given", "this", "node", "s", "primary", "type", "and", "mixin", "types", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/AbstractJcrNode.java#L452-L477
56,204
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/AbstractJcrNode.java
AbstractJcrNode.findBestPropertyDefinition
final JcrPropertyDefinition findBestPropertyDefinition( Name primaryTypeNameOfParent, Collection<Name> mixinTypeNamesOfParent, org.modeshape.jcr.value.Property property, ...
java
final JcrPropertyDefinition findBestPropertyDefinition( Name primaryTypeNameOfParent, Collection<Name> mixinTypeNamesOfParent, org.modeshape.jcr.value.Property property, ...
[ "final", "JcrPropertyDefinition", "findBestPropertyDefinition", "(", "Name", "primaryTypeNameOfParent", ",", "Collection", "<", "Name", ">", "mixinTypeNamesOfParent", ",", "org", ".", "modeshape", ".", "jcr", ".", "value", ".", "Property", "property", ",", "boolean", ...
Find the best property definition in this node's primary type and mixin types. @param primaryTypeNameOfParent the name of the primary type for the parent node; may not be null @param mixinTypeNamesOfParent the names of the mixin types for the parent node; may be null or empty if there are no mixins to include in the s...
[ "Find", "the", "best", "property", "definition", "in", "this", "node", "s", "primary", "type", "and", "mixin", "types", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/AbstractJcrNode.java#L495-L528
56,205
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/AbstractJcrNode.java
AbstractJcrNode.childNode
protected final AbstractJcrNode childNode( Name name, Type expectedType ) throws PathNotFoundException, ItemNotFoundException, InvalidItemStateException { ChildReference ref = node().getChildReferences(sessionCache()).getChild(name); if (ref == null...
java
protected final AbstractJcrNode childNode( Name name, Type expectedType ) throws PathNotFoundException, ItemNotFoundException, InvalidItemStateException { ChildReference ref = node().getChildReferences(sessionCache()).getChild(name); if (ref == null...
[ "protected", "final", "AbstractJcrNode", "childNode", "(", "Name", "name", ",", "Type", "expectedType", ")", "throws", "PathNotFoundException", ",", "ItemNotFoundException", ",", "InvalidItemStateException", "{", "ChildReference", "ref", "=", "node", "(", ")", ".", ...
Get the JCR node for the named child. @param name the child name; may not be null @param expectedType the expected implementation type for the node, or null if it is not known @return the JCR node; never null @throws PathNotFoundException if there is no child with the supplied name @throws ItemNotFoundException if thi...
[ "Get", "the", "JCR", "node", "for", "the", "named", "child", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/AbstractJcrNode.java#L684-L693
56,206
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/AbstractJcrNode.java
AbstractJcrNode.autoCreatePropertiesFor
protected LinkedList<Property> autoCreatePropertiesFor( Name nodeName, Name primaryType, PropertyFactory propertyFactory, NodeTypes capabili...
java
protected LinkedList<Property> autoCreatePropertiesFor( Name nodeName, Name primaryType, PropertyFactory propertyFactory, NodeTypes capabili...
[ "protected", "LinkedList", "<", "Property", ">", "autoCreatePropertiesFor", "(", "Name", "nodeName", ",", "Name", "primaryType", ",", "PropertyFactory", "propertyFactory", ",", "NodeTypes", "capabilities", ")", "{", "Collection", "<", "JcrPropertyDefinition", ">", "au...
If there are any auto-created properties, create them and return them in a list. @param nodeName the name of the node; may not be null @param primaryType the name of the primary type; may not be null @param propertyFactory the factory for properties; may not be null @param capabilities the node type capabilities cache...
[ "If", "there", "are", "any", "auto", "-", "created", "properties", "create", "them", "and", "return", "them", "in", "a", "list", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/AbstractJcrNode.java#L1299-L1324
56,207
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/AbstractJcrNode.java
AbstractJcrNode.autoCreateChildren
protected void autoCreateChildren( Name primaryType, NodeTypes capabilities ) throws ItemExistsException, PathNotFoundException, VersionException, ConstraintViolationException, LockException, RepositoryException { Collection<JcrNodeDefinition> autoChildDefn...
java
protected void autoCreateChildren( Name primaryType, NodeTypes capabilities ) throws ItemExistsException, PathNotFoundException, VersionException, ConstraintViolationException, LockException, RepositoryException { Collection<JcrNodeDefinition> autoChildDefn...
[ "protected", "void", "autoCreateChildren", "(", "Name", "primaryType", ",", "NodeTypes", "capabilities", ")", "throws", "ItemExistsException", ",", "PathNotFoundException", ",", "VersionException", ",", "ConstraintViolationException", ",", "LockException", ",", "RepositoryE...
Create in this node any auto-created child nodes. @param primaryType the desired primary type for the new node; null value indicates that the default primary type from the appropriate definition for this node should be used @param capabilities the node type capabilities cache; may not be null @throws ItemExistsExcepti...
[ "Create", "in", "this", "node", "any", "auto", "-", "created", "child", "nodes", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/AbstractJcrNode.java#L1339-L1363
56,208
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/AbstractJcrNode.java
AbstractJcrNode.removeExistingProperty
final AbstractJcrProperty removeExistingProperty( Name name ) throws VersionException, LockException, RepositoryException { AbstractJcrProperty existing = getProperty(name); if (existing != null) { existing.remove(); return existing; } // Return without throwing a...
java
final AbstractJcrProperty removeExistingProperty( Name name ) throws VersionException, LockException, RepositoryException { AbstractJcrProperty existing = getProperty(name); if (existing != null) { existing.remove(); return existing; } // Return without throwing a...
[ "final", "AbstractJcrProperty", "removeExistingProperty", "(", "Name", "name", ")", "throws", "VersionException", ",", "LockException", ",", "RepositoryException", "{", "AbstractJcrProperty", "existing", "=", "getProperty", "(", "name", ")", ";", "if", "(", "existing"...
Removes an existing property with the supplied name. Note that if a property with the given name does not exist, then this method returns null and does not throw an exception. @param name the name of the property; may not be null @return the property that was removed @throws VersionException if the node is checked out...
[ "Removes", "an", "existing", "property", "with", "the", "supplied", "name", ".", "Note", "that", "if", "a", "property", "with", "the", "given", "name", "does", "not", "exist", "then", "this", "method", "returns", "null", "and", "does", "not", "throw", "an"...
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/AbstractJcrNode.java#L1653-L1662
56,209
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/AbstractJcrNode.java
AbstractJcrNode.setProperty
final AbstractJcrProperty setProperty( Name name, Value[] values, int jcrPropertyType, boolean skipReferenceValidation ) throws VersionException, LockException, ConstraintViolationExc...
java
final AbstractJcrProperty setProperty( Name name, Value[] values, int jcrPropertyType, boolean skipReferenceValidation ) throws VersionException, LockException, ConstraintViolationExc...
[ "final", "AbstractJcrProperty", "setProperty", "(", "Name", "name", ",", "Value", "[", "]", "values", ",", "int", "jcrPropertyType", ",", "boolean", "skipReferenceValidation", ")", "throws", "VersionException", ",", "LockException", ",", "ConstraintViolationException", ...
Sets a multi valued property, skipping over protected ones. @param name the name of the property; may not be null @param values the values of the property; may not be null @param jcrPropertyType the expected property type; may be {@link PropertyType#UNDEFINED} if the values should not be converted @param skipReference...
[ "Sets", "a", "multi", "valued", "property", "skipping", "over", "protected", "ones", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/AbstractJcrNode.java#L1823-L1829
56,210
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/AbstractJcrNode.java
AbstractJcrNode.referringNodes
protected final NodeIterator referringNodes( ReferenceType referenceType ) throws RepositoryException { if (!this.isReferenceable()) { return JcrEmptyNodeIterator.INSTANCE; } // Get all of the nodes that are referring to this node ... Set<NodeKey> keys = node().getReferrers(...
java
protected final NodeIterator referringNodes( ReferenceType referenceType ) throws RepositoryException { if (!this.isReferenceable()) { return JcrEmptyNodeIterator.INSTANCE; } // Get all of the nodes that are referring to this node ... Set<NodeKey> keys = node().getReferrers(...
[ "protected", "final", "NodeIterator", "referringNodes", "(", "ReferenceType", "referenceType", ")", "throws", "RepositoryException", "{", "if", "(", "!", "this", ".", "isReferenceable", "(", ")", ")", "{", "return", "JcrEmptyNodeIterator", ".", "INSTANCE", ";", "}...
Obtain an iterator over the nodes that reference this node. @param referenceType specification of the type of references to include; may not be null @return the iterator over the referencing nodes; never null @throws RepositoryException if an error occurs while obtaining the information
[ "Obtain", "an", "iterator", "over", "the", "nodes", "that", "reference", "this", "node", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/AbstractJcrNode.java#L2233-L2242
56,211
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/AbstractJcrNode.java
AbstractJcrNode.containsChangesWithExternalDependencies
protected boolean containsChangesWithExternalDependencies( AtomicReference<Set<NodeKey>> affectedNodeKeys ) throws RepositoryException { Set<NodeKey> allChanges = sessionCache().getChangedNodeKeys(); Set<NodeKey> changesAtOrBelowThis = sessionCache().getChangedNodeKeysAtOrBelow(this.node()); ...
java
protected boolean containsChangesWithExternalDependencies( AtomicReference<Set<NodeKey>> affectedNodeKeys ) throws RepositoryException { Set<NodeKey> allChanges = sessionCache().getChangedNodeKeys(); Set<NodeKey> changesAtOrBelowThis = sessionCache().getChangedNodeKeysAtOrBelow(this.node()); ...
[ "protected", "boolean", "containsChangesWithExternalDependencies", "(", "AtomicReference", "<", "Set", "<", "NodeKey", ">", ">", "affectedNodeKeys", ")", "throws", "RepositoryException", "{", "Set", "<", "NodeKey", ">", "allChanges", "=", "sessionCache", "(", ")", "...
Determines whether this node, or any nodes below it, contain changes that depend on nodes that are outside of this node's hierarchy. @param affectedNodeKeys the reference that should be assigned to the set of node keys that are at or below this node; may be null if not needed @return true if this node's hierarchy has ...
[ "Determines", "whether", "this", "node", "or", "any", "nodes", "below", "it", "contain", "changes", "that", "depend", "on", "nodes", "that", "are", "outside", "of", "this", "node", "s", "hierarchy", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/AbstractJcrNode.java#L3560-L3568
56,212
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/AbstractJcrNode.java
AbstractJcrNode.removeReferrerChanges
private void removeReferrerChanges( Set<NodeKey> allChanges, Set<NodeKey> changesAtOrBelowThis ) throws RepositoryException { // check if there are any nodes in the overall list of changes (and outside the branch) due to reference changes for (Iterator<NodeKey> al...
java
private void removeReferrerChanges( Set<NodeKey> allChanges, Set<NodeKey> changesAtOrBelowThis ) throws RepositoryException { // check if there are any nodes in the overall list of changes (and outside the branch) due to reference changes for (Iterator<NodeKey> al...
[ "private", "void", "removeReferrerChanges", "(", "Set", "<", "NodeKey", ">", "allChanges", ",", "Set", "<", "NodeKey", ">", "changesAtOrBelowThis", ")", "throws", "RepositoryException", "{", "// check if there are any nodes in the overall list of changes (and outside the branch...
Removes all the keys from the first set which represent referrer node keys to any of the nodes in the second set. @param allChanges the set of keys to the referrer nodes @param changesAtOrBelowThis the set of referrers that were changed at or below this node @throws RepositoryException if there is a problem
[ "Removes", "all", "the", "keys", "from", "the", "first", "set", "which", "represent", "referrer", "node", "keys", "to", "any", "of", "the", "nodes", "in", "the", "second", "set", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/AbstractJcrNode.java#L3577-L3613
56,213
ModeShape/modeshape
modeshape-jdbc-local/src/main/java/org/modeshape/jdbc/delegate/ConnectionInfo.java
ConnectionInfo.getPassword
public char[] getPassword() { String result = properties.getProperty(LocalJcrDriver.PASSWORD_PROPERTY_NAME); return result != null ? result.toCharArray() : null; }
java
public char[] getPassword() { String result = properties.getProperty(LocalJcrDriver.PASSWORD_PROPERTY_NAME); return result != null ? result.toCharArray() : null; }
[ "public", "char", "[", "]", "getPassword", "(", ")", "{", "String", "result", "=", "properties", ".", "getProperty", "(", "LocalJcrDriver", ".", "PASSWORD_PROPERTY_NAME", ")", ";", "return", "result", "!=", "null", "?", "result", ".", "toCharArray", "(", ")"...
Get the JCR password. This is not required. @return the JCR password, or null if no password was specified
[ "Get", "the", "JCR", "password", ".", "This", "is", "not", "required", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jdbc-local/src/main/java/org/modeshape/jdbc/delegate/ConnectionInfo.java#L161-L164
56,214
ModeShape/modeshape
modeshape-jdbc-local/src/main/java/org/modeshape/jdbc/delegate/ConnectionInfo.java
ConnectionInfo.isTeiidSupport
public boolean isTeiidSupport() { String result = properties.getProperty(LocalJcrDriver.TEIID_SUPPORT_PROPERTY_NAME); if (result == null) { return false; } return result.equalsIgnoreCase(Boolean.TRUE.toString()); }
java
public boolean isTeiidSupport() { String result = properties.getProperty(LocalJcrDriver.TEIID_SUPPORT_PROPERTY_NAME); if (result == null) { return false; } return result.equalsIgnoreCase(Boolean.TRUE.toString()); }
[ "public", "boolean", "isTeiidSupport", "(", ")", "{", "String", "result", "=", "properties", ".", "getProperty", "(", "LocalJcrDriver", ".", "TEIID_SUPPORT_PROPERTY_NAME", ")", ";", "if", "(", "result", "==", "null", ")", "{", "return", "false", ";", "}", "r...
Return true of Teiid support is required for this connection. @return true if Teiid support is required.
[ "Return", "true", "of", "Teiid", "support", "is", "required", "for", "this", "connection", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jdbc-local/src/main/java/org/modeshape/jdbc/delegate/ConnectionInfo.java#L171-L177
56,215
ModeShape/modeshape
modeshape-jdbc-local/src/main/java/org/modeshape/jdbc/delegate/ConnectionInfo.java
ConnectionInfo.getCredentials
public Credentials getCredentials() { String username = getUsername(); char[] password = getPassword(); if (username != null) { return new SimpleCredentials(username, password); } return null; }
java
public Credentials getCredentials() { String username = getUsername(); char[] password = getPassword(); if (username != null) { return new SimpleCredentials(username, password); } return null; }
[ "public", "Credentials", "getCredentials", "(", ")", "{", "String", "username", "=", "getUsername", "(", ")", ";", "char", "[", "]", "password", "=", "getPassword", "(", ")", ";", "if", "(", "username", "!=", "null", ")", "{", "return", "new", "SimpleCre...
Return the credentials based on the user name and password. @return Credentials
[ "Return", "the", "credentials", "based", "on", "the", "user", "name", "and", "password", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jdbc-local/src/main/java/org/modeshape/jdbc/delegate/ConnectionInfo.java#L310-L317
56,216
ModeShape/modeshape
modeshape-common/src/main/java/org/modeshape/common/util/SecureHash.java
SecureHash.getHash
public static byte[] getHash( String digestName, InputStream stream ) throws NoSuchAlgorithmException, IOException { CheckArg.isNotNull(stream, "stream"); MessageDigest digest = MessageDigest.getInstance(digestName); assert digest != null; int bufSize = ...
java
public static byte[] getHash( String digestName, InputStream stream ) throws NoSuchAlgorithmException, IOException { CheckArg.isNotNull(stream, "stream"); MessageDigest digest = MessageDigest.getInstance(digestName); assert digest != null; int bufSize = ...
[ "public", "static", "byte", "[", "]", "getHash", "(", "String", "digestName", ",", "InputStream", "stream", ")", "throws", "NoSuchAlgorithmException", ",", "IOException", "{", "CheckArg", ".", "isNotNull", "(", "stream", ",", "\"stream\"", ")", ";", "MessageDige...
Get the hash of the supplied content, using the digest identified by the supplied name. Note that this method never closes the supplied stream. @param digestName the name of the hashing function (or {@link MessageDigest message digest}) that should be used @param stream the stream containing the content to be hashed; ...
[ "Get", "the", "hash", "of", "the", "supplied", "content", "using", "the", "digest", "identified", "by", "the", "supplied", "name", ".", "Note", "that", "this", "method", "never", "closes", "the", "supplied", "stream", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-common/src/main/java/org/modeshape/common/util/SecureHash.java#L240-L253
56,217
ModeShape/modeshape
modeshape-common/src/main/java/org/modeshape/common/util/SecureHash.java
SecureHash.sha1
public static String sha1( String string ) { try { byte[] sha1 = SecureHash.getHash(SecureHash.Algorithm.SHA_1, string.getBytes()); return SecureHash.asHexString(sha1); } catch (NoSuchAlgorithmException e) { throw new SystemFailureException(e); } }
java
public static String sha1( String string ) { try { byte[] sha1 = SecureHash.getHash(SecureHash.Algorithm.SHA_1, string.getBytes()); return SecureHash.asHexString(sha1); } catch (NoSuchAlgorithmException e) { throw new SystemFailureException(e); } }
[ "public", "static", "String", "sha1", "(", "String", "string", ")", "{", "try", "{", "byte", "[", "]", "sha1", "=", "SecureHash", ".", "getHash", "(", "SecureHash", ".", "Algorithm", ".", "SHA_1", ",", "string", ".", "getBytes", "(", ")", ")", ";", "...
Computes the sha1 value for the given string. @param string a non-null string @return the SHA1 value for the given string.
[ "Computes", "the", "sha1", "value", "for", "the", "given", "string", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-common/src/main/java/org/modeshape/common/util/SecureHash.java#L337-L344
56,218
ModeShape/modeshape
modeshape-jdbc-local/src/main/java/org/modeshape/jdbc/delegate/RepositoryDelegateFactory.java
RepositoryDelegateFactory.createRepositoryDelegate
public RepositoryDelegate createRepositoryDelegate( String url, Properties info, JcrContextFactory contextFactory ) throws SQLException { if (!acceptUrl(url)) { throw new SQLException(Jdbc...
java
public RepositoryDelegate createRepositoryDelegate( String url, Properties info, JcrContextFactory contextFactory ) throws SQLException { if (!acceptUrl(url)) { throw new SQLException(Jdbc...
[ "public", "RepositoryDelegate", "createRepositoryDelegate", "(", "String", "url", ",", "Properties", "info", ",", "JcrContextFactory", "contextFactory", ")", "throws", "SQLException", "{", "if", "(", "!", "acceptUrl", "(", "url", ")", ")", "{", "throw", "new", "...
Create a RepositoryDelegate instance, given the connection information. @param url the JDBC URL; may be null @param info the connection properties @param contextFactory the factory for a JCR context; may not be null @return the RepositoryDelegate for the supplied connection information @throws SQLException if the URL ...
[ "Create", "a", "RepositoryDelegate", "instance", "given", "the", "connection", "information", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jdbc-local/src/main/java/org/modeshape/jdbc/delegate/RepositoryDelegateFactory.java#L46-L53
56,219
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/query/model/SelectorName.java
SelectorName.nameSetFrom
public static Set<SelectorName> nameSetFrom( Set<SelectorName> firstSet, Set<SelectorName> secondSet ) { if ((firstSet == null || firstSet.isEmpty()) && (secondSet == null || secondSet.isEmpty())) { return Collections.emptySet(); } Set...
java
public static Set<SelectorName> nameSetFrom( Set<SelectorName> firstSet, Set<SelectorName> secondSet ) { if ((firstSet == null || firstSet.isEmpty()) && (secondSet == null || secondSet.isEmpty())) { return Collections.emptySet(); } Set...
[ "public", "static", "Set", "<", "SelectorName", ">", "nameSetFrom", "(", "Set", "<", "SelectorName", ">", "firstSet", ",", "Set", "<", "SelectorName", ">", "secondSet", ")", "{", "if", "(", "(", "firstSet", "==", "null", "||", "firstSet", ".", "isEmpty", ...
Create a set that contains the SelectName objects in the supplied sets. @param firstSet the first set of names; may be null or empty @param secondSet the second set of names; may be null or empty @return the set; never null
[ "Create", "a", "set", "that", "contains", "the", "SelectName", "objects", "in", "the", "supplied", "sets", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/query/model/SelectorName.java#L127-L136
56,220
ModeShape/modeshape
sequencers/modeshape-sequencer-text/src/main/java/org/modeshape/sequencer/text/DelimitedTextSequencer.java
DelimitedTextSequencer.setSplitPattern
public void setSplitPattern( String regularExpression ) throws PatternSyntaxException { CheckArg.isNotNull(regularExpression, "regularExpression"); Pattern.compile(splitPattern); splitPattern = regularExpression; }
java
public void setSplitPattern( String regularExpression ) throws PatternSyntaxException { CheckArg.isNotNull(regularExpression, "regularExpression"); Pattern.compile(splitPattern); splitPattern = regularExpression; }
[ "public", "void", "setSplitPattern", "(", "String", "regularExpression", ")", "throws", "PatternSyntaxException", "{", "CheckArg", ".", "isNotNull", "(", "regularExpression", ",", "\"regularExpression\"", ")", ";", "Pattern", ".", "compile", "(", "splitPattern", ")", ...
Sets the regular expression to use to split incoming rows. @param regularExpression the regular expression to use to split incoming rows; may not be null. @throws java.util.regex.PatternSyntaxException if {@code regularExpression} does not represent a valid regular expression that can be {@link java.util.regex.Pattern...
[ "Sets", "the", "regular", "expression", "to", "use", "to", "split", "incoming", "rows", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/sequencers/modeshape-sequencer-text/src/main/java/org/modeshape/sequencer/text/DelimitedTextSequencer.java#L40-L44
56,221
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/BackupDocumentReader.java
BackupDocumentReader.read
public Document read() { try { do { if (stream == null) { // Open the stream to the next file ... stream = openNextFile(); if (stream == null) { // No more files to read ... re...
java
public Document read() { try { do { if (stream == null) { // Open the stream to the next file ... stream = openNextFile(); if (stream == null) { // No more files to read ... re...
[ "public", "Document", "read", "(", ")", "{", "try", "{", "do", "{", "if", "(", "stream", "==", "null", ")", "{", "// Open the stream to the next file ...", "stream", "=", "openNextFile", "(", ")", ";", "if", "(", "stream", "==", "null", ")", "{", "// No ...
Read the next document from the files. @return the document, or null if there are no more documents
[ "Read", "the", "next", "document", "from", "the", "files", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/BackupDocumentReader.java#L64-L90
56,222
ModeShape/modeshape
modeshape-common/src/main/java/org/modeshape/common/math/Duration.java
Duration.add
public Duration add( long duration, TimeUnit unit ) { long durationInNanos = TimeUnit.NANOSECONDS.convert(duration, unit); return new Duration(this.durationInNanos + durationInNanos); }
java
public Duration add( long duration, TimeUnit unit ) { long durationInNanos = TimeUnit.NANOSECONDS.convert(duration, unit); return new Duration(this.durationInNanos + durationInNanos); }
[ "public", "Duration", "add", "(", "long", "duration", ",", "TimeUnit", "unit", ")", "{", "long", "durationInNanos", "=", "TimeUnit", ".", "NANOSECONDS", ".", "convert", "(", "duration", ",", "unit", ")", ";", "return", "new", "Duration", "(", "this", ".", ...
Add the supplied duration to this duration, and return the result. @param duration the duration to add to this object @param unit the unit of the duration being added; may not be null @return the total duration
[ "Add", "the", "supplied", "duration", "to", "this", "duration", "and", "return", "the", "result", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-common/src/main/java/org/modeshape/common/math/Duration.java#L86-L90
56,223
ModeShape/modeshape
modeshape-common/src/main/java/org/modeshape/common/math/Duration.java
Duration.subtract
public Duration subtract( long duration, TimeUnit unit ) { long durationInNanos = TimeUnit.NANOSECONDS.convert(duration, unit); return new Duration(this.durationInNanos - durationInNanos); }
java
public Duration subtract( long duration, TimeUnit unit ) { long durationInNanos = TimeUnit.NANOSECONDS.convert(duration, unit); return new Duration(this.durationInNanos - durationInNanos); }
[ "public", "Duration", "subtract", "(", "long", "duration", ",", "TimeUnit", "unit", ")", "{", "long", "durationInNanos", "=", "TimeUnit", ".", "NANOSECONDS", ".", "convert", "(", "duration", ",", "unit", ")", ";", "return", "new", "Duration", "(", "this", ...
Subtract the supplied duration from this duration, and return the result. @param duration the duration to subtract from this object @param unit the unit of the duration being subtracted; may not be null @return the total duration
[ "Subtract", "the", "supplied", "duration", "from", "this", "duration", "and", "return", "the", "result", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-common/src/main/java/org/modeshape/common/math/Duration.java#L99-L103
56,224
ModeShape/modeshape
modeshape-common/src/main/java/org/modeshape/common/math/Duration.java
Duration.add
public Duration add( Duration duration ) { return new Duration(this.durationInNanos + (duration == null ? 0l : duration.longValue())); }
java
public Duration add( Duration duration ) { return new Duration(this.durationInNanos + (duration == null ? 0l : duration.longValue())); }
[ "public", "Duration", "add", "(", "Duration", "duration", ")", "{", "return", "new", "Duration", "(", "this", ".", "durationInNanos", "+", "(", "duration", "==", "null", "?", "0l", ":", "duration", ".", "longValue", "(", ")", ")", ")", ";", "}" ]
Add the supplied duration to this duration, and return the result. A null value is treated as a duration of 0 nanoseconds. @param duration the duration to add to this object @return the total duration
[ "Add", "the", "supplied", "duration", "to", "this", "duration", "and", "return", "the", "result", ".", "A", "null", "value", "is", "treated", "as", "a", "duration", "of", "0", "nanoseconds", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-common/src/main/java/org/modeshape/common/math/Duration.java#L111-L113
56,225
ModeShape/modeshape
modeshape-common/src/main/java/org/modeshape/common/math/Duration.java
Duration.subtract
public Duration subtract( Duration duration ) { return new Duration(this.durationInNanos - (duration == null ? 0l : duration.longValue())); }
java
public Duration subtract( Duration duration ) { return new Duration(this.durationInNanos - (duration == null ? 0l : duration.longValue())); }
[ "public", "Duration", "subtract", "(", "Duration", "duration", ")", "{", "return", "new", "Duration", "(", "this", ".", "durationInNanos", "-", "(", "duration", "==", "null", "?", "0l", ":", "duration", ".", "longValue", "(", ")", ")", ")", ";", "}" ]
Subtract the supplied duration from this duration, and return the result. A null value is treated as a duration of 0 nanoseconds. @param duration the duration to subtract from this object @return the resulting duration
[ "Subtract", "the", "supplied", "duration", "from", "this", "duration", "and", "return", "the", "result", ".", "A", "null", "value", "is", "treated", "as", "a", "duration", "of", "0", "nanoseconds", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-common/src/main/java/org/modeshape/common/math/Duration.java#L122-L124
56,226
ModeShape/modeshape
modeshape-common/src/main/java/org/modeshape/common/math/Duration.java
Duration.getComponents
public Components getComponents() { if (this.components == null) { // This is idempotent, so no need to synchronize ... // Calculate how many seconds, and don't lose any information ... BigDecimal bigSeconds = new BigDecimal(this.durationInNanos).divide(new BigDecimal(100000...
java
public Components getComponents() { if (this.components == null) { // This is idempotent, so no need to synchronize ... // Calculate how many seconds, and don't lose any information ... BigDecimal bigSeconds = new BigDecimal(this.durationInNanos).divide(new BigDecimal(100000...
[ "public", "Components", "getComponents", "(", ")", "{", "if", "(", "this", ".", "components", "==", "null", ")", "{", "// This is idempotent, so no need to synchronize ...", "// Calculate how many seconds, and don't lose any information ...", "BigDecimal", "bigSeconds", "=", ...
Return the duration components. @return the individual time components of this duration
[ "Return", "the", "duration", "components", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-common/src/main/java/org/modeshape/common/math/Duration.java#L203-L220
56,227
ModeShape/modeshape
modeshape-common/src/main/java/org/modeshape/common/math/Duration.java
Duration.getDuration
public long getDuration( TimeUnit unit ) { if (unit == null) throw new IllegalArgumentException(); return unit.convert(durationInNanos, TimeUnit.NANOSECONDS); }
java
public long getDuration( TimeUnit unit ) { if (unit == null) throw new IllegalArgumentException(); return unit.convert(durationInNanos, TimeUnit.NANOSECONDS); }
[ "public", "long", "getDuration", "(", "TimeUnit", "unit", ")", "{", "if", "(", "unit", "==", "null", ")", "throw", "new", "IllegalArgumentException", "(", ")", ";", "return", "unit", ".", "convert", "(", "durationInNanos", ",", "TimeUnit", ".", "NANOSECONDS"...
Get the duration value in the supplied unit of time. @param unit the unit of time for the returned value; may not be null @return the value of this duration in the supplied unit of time
[ "Get", "the", "duration", "value", "in", "the", "supplied", "unit", "of", "time", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-common/src/main/java/org/modeshape/common/math/Duration.java#L228-L231
56,228
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/cache/document/WorkspaceCache.java
WorkspaceCache.changed
public void changed( ChangeSet changes ) { checkNotClosed(); if (LOGGER.isTraceEnabled()) { LOGGER.trace("Cache for workspace '{0}' received {1} changes from local sessions: {2}", workspaceName, changes.size(), changes); } // Clear this workspace's ca...
java
public void changed( ChangeSet changes ) { checkNotClosed(); if (LOGGER.isTraceEnabled()) { LOGGER.trace("Cache for workspace '{0}' received {1} changes from local sessions: {2}", workspaceName, changes.size(), changes); } // Clear this workspace's ca...
[ "public", "void", "changed", "(", "ChangeSet", "changes", ")", "{", "checkNotClosed", "(", ")", ";", "if", "(", "LOGGER", ".", "isTraceEnabled", "(", ")", ")", "{", "LOGGER", ".", "trace", "(", "\"Cache for workspace '{0}' received {1} changes from local sessions: {...
Signal that changes have been made to the persisted data. Related information in the cache is cleared, and this workspace's listener is notified of the changes. @param changes the changes to be made; may not be null
[ "Signal", "that", "changes", "have", "been", "made", "to", "the", "persisted", "data", ".", "Related", "information", "in", "the", "cache", "is", "cleared", "and", "this", "workspace", "s", "listener", "is", "notified", "of", "the", "changes", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/cache/document/WorkspaceCache.java#L307-L321
56,229
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/JndiRepositoryFactory.java
JndiRepositoryFactory.getRepository
private static synchronized JcrRepository getRepository( String configFileName, String repositoryName, final Context nameCtx, final Name ...
java
private static synchronized JcrRepository getRepository( String configFileName, String repositoryName, final Context nameCtx, final Name ...
[ "private", "static", "synchronized", "JcrRepository", "getRepository", "(", "String", "configFileName", ",", "String", "repositoryName", ",", "final", "Context", "nameCtx", ",", "final", "Name", "jndiName", ")", "throws", "IOException", ",", "RepositoryException", ","...
Get or initialize the JCR Repository instance as described by the supplied configuration file and repository name. @param configFileName the name of the file containing the configuration information for the {@code ModeShapeEngine}; may not be null. This method will first attempt to load this file as a resource from th...
[ "Get", "or", "initialize", "the", "JCR", "Repository", "instance", "as", "described", "by", "the", "supplied", "configuration", "file", "and", "repository", "name", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/JndiRepositoryFactory.java#L110-L165
56,230
ModeShape/modeshape
modeshape-common/src/main/java/org/modeshape/common/util/TimeBasedKeys.java
TimeBasedKeys.create
public static TimeBasedKeys create( int bitsUsedInCounter ) { CheckArg.isPositive(bitsUsedInCounter, "bitsUsedInCounter"); int maxAvailableBitsToShift = Long.numberOfLeadingZeros(System.currentTimeMillis()); CheckArg.isLessThan(bitsUsedInCounter, maxAvailableBitsToShift, "bitsUsedInCounter"); ...
java
public static TimeBasedKeys create( int bitsUsedInCounter ) { CheckArg.isPositive(bitsUsedInCounter, "bitsUsedInCounter"); int maxAvailableBitsToShift = Long.numberOfLeadingZeros(System.currentTimeMillis()); CheckArg.isLessThan(bitsUsedInCounter, maxAvailableBitsToShift, "bitsUsedInCounter"); ...
[ "public", "static", "TimeBasedKeys", "create", "(", "int", "bitsUsedInCounter", ")", "{", "CheckArg", ".", "isPositive", "(", "bitsUsedInCounter", ",", "\"bitsUsedInCounter\"", ")", ";", "int", "maxAvailableBitsToShift", "=", "Long", ".", "numberOfLeadingZeros", "(", ...
Create a new generator that uses the specified number of bits for the counter portion of the keys. @param bitsUsedInCounter the number of bits in the counter portion of the keys; must be a positive number for which theere is enough space to left shift without overflowing. @return the generator instance; never null
[ "Create", "a", "new", "generator", "that", "uses", "the", "specified", "number", "of", "bits", "for", "the", "counter", "portion", "of", "the", "keys", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-common/src/main/java/org/modeshape/common/util/TimeBasedKeys.java#L99-L104
56,231
ModeShape/modeshape
modeshape-common/src/main/java/org/modeshape/common/util/TimeBasedKeys.java
TimeBasedKeys.nextKey
public long nextKey() { // Note that per Oracle the currentTimeMillis is the current number of seconds past the epoch // in UTC (not in local time). Therefore, processes with exactly synchronized clocks will // always get the same value regardless of their timezone ... final long timesta...
java
public long nextKey() { // Note that per Oracle the currentTimeMillis is the current number of seconds past the epoch // in UTC (not in local time). Therefore, processes with exactly synchronized clocks will // always get the same value regardless of their timezone ... final long timesta...
[ "public", "long", "nextKey", "(", ")", "{", "// Note that per Oracle the currentTimeMillis is the current number of seconds past the epoch", "// in UTC (not in local time). Therefore, processes with exactly synchronized clocks will", "// always get the same value regardless of their timezone ...", ...
Get the next key for the current time in UTC. @return a long that is determined by the current time in UTC and a unique counter value for the current time.
[ "Get", "the", "next", "key", "for", "the", "current", "time", "in", "UTC", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-common/src/main/java/org/modeshape/common/util/TimeBasedKeys.java#L145-L156
56,232
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/query/optimize/RewriteAsRangeCriteria.java
RewriteAsRangeCriteria.nullReference
protected void nullReference( List<Comparison> comparisons, Comparison comparisonToNull ) { if (comparisonToNull != null) { for (int i = 0; i != comparisons.size(); ++i) { if (comparisons.get(i) == comparisonToNull) comparisons.set(i, null); ...
java
protected void nullReference( List<Comparison> comparisons, Comparison comparisonToNull ) { if (comparisonToNull != null) { for (int i = 0; i != comparisons.size(); ++i) { if (comparisons.get(i) == comparisonToNull) comparisons.set(i, null); ...
[ "protected", "void", "nullReference", "(", "List", "<", "Comparison", ">", "comparisons", ",", "Comparison", "comparisonToNull", ")", "{", "if", "(", "comparisonToNull", "!=", "null", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "!=", "comparisons...
Find all occurrences of the comparison object in the supplied list and null the list's reference to it. @param comparisons the collection in which null references are to be placed @param comparisonToNull the comparison that is to be found and nulled in the collection
[ "Find", "all", "occurrences", "of", "the", "comparison", "object", "in", "the", "supplied", "list", "and", "null", "the", "list", "s", "reference", "to", "it", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/query/optimize/RewriteAsRangeCriteria.java#L252-L259
56,233
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/query/optimize/RewriteAsRangeCriteria.java
RewriteAsRangeCriteria.nullReference
protected void nullReference( List<Comparison> comparisons, Iterable<Comparison> comparisonsToNull ) { for (Comparison comparisonToNull : comparisonsToNull) { nullReference(comparisons, comparisonToNull); } }
java
protected void nullReference( List<Comparison> comparisons, Iterable<Comparison> comparisonsToNull ) { for (Comparison comparisonToNull : comparisonsToNull) { nullReference(comparisons, comparisonToNull); } }
[ "protected", "void", "nullReference", "(", "List", "<", "Comparison", ">", "comparisons", ",", "Iterable", "<", "Comparison", ">", "comparisonsToNull", ")", "{", "for", "(", "Comparison", "comparisonToNull", ":", "comparisonsToNull", ")", "{", "nullReference", "("...
Find all references in the supplied list that match those supplied and set them to null. @param comparisons the collection in which null references are to be placed @param comparisonsToNull the comparisons that are to be found and nulled in the collection
[ "Find", "all", "references", "in", "the", "supplied", "list", "that", "match", "those", "supplied", "and", "set", "them", "to", "null", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/query/optimize/RewriteAsRangeCriteria.java#L267-L272
56,234
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/query/optimize/RewriteAsRangeCriteria.java
RewriteAsRangeCriteria.compareStaticOperands
protected int compareStaticOperands( QueryContext context, Comparison comparison1, Comparison comparison2 ) { Object value1 = getValue(context, comparison1.getOperand2()); Object value2 = getValue(context, comparison2.getO...
java
protected int compareStaticOperands( QueryContext context, Comparison comparison1, Comparison comparison2 ) { Object value1 = getValue(context, comparison1.getOperand2()); Object value2 = getValue(context, comparison2.getO...
[ "protected", "int", "compareStaticOperands", "(", "QueryContext", "context", ",", "Comparison", "comparison1", ",", "Comparison", "comparison2", ")", "{", "Object", "value1", "=", "getValue", "(", "context", ",", "comparison1", ".", "getOperand2", "(", ")", ")", ...
Compare the values used in the two comparisons @param context the query context; may not be null @param comparison1 the first comparison object; may not be null @param comparison2 the second comparison object; may not be null @return 0 if the values are the same, less than 0 if the first comparison's value is less tha...
[ "Compare", "the", "values", "used", "in", "the", "two", "comparisons" ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/query/optimize/RewriteAsRangeCriteria.java#L283-L289
56,235
ModeShape/modeshape
web/modeshape-web-explorer/src/main/java/org/modeshape/web/BinaryContentUploadServlet.java
BinaryContentUploadServlet.getContentType
private String getContentType(List<FileItem> items) { for (FileItem i : items) { if (!i.isFormField() && i.getFieldName().equals(CONTENT_PARAMETER)) { return i.getContentType(); } } return null; }
java
private String getContentType(List<FileItem> items) { for (FileItem i : items) { if (!i.isFormField() && i.getFieldName().equals(CONTENT_PARAMETER)) { return i.getContentType(); } } return null; }
[ "private", "String", "getContentType", "(", "List", "<", "FileItem", ">", "items", ")", "{", "for", "(", "FileItem", "i", ":", "items", ")", "{", "if", "(", "!", "i", ".", "isFormField", "(", ")", "&&", "i", ".", "getFieldName", "(", ")", ".", "equ...
Determines content-type of the uploaded file. @param items @return the content type
[ "Determines", "content", "-", "type", "of", "the", "uploaded", "file", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/web/modeshape-web-explorer/src/main/java/org/modeshape/web/BinaryContentUploadServlet.java#L148-L155
56,236
ModeShape/modeshape
modeshape-common/src/main/java/org/modeshape/common/collection/ring/SingleProducerCursor.java
SingleProducerCursor.claimUpTo
protected long claimUpTo( int number ) { assert number > 0; long nextPosition = this.nextPosition; long maxPosition = nextPosition + number; long wrapPoint = maxPosition - bufferSize; long cachedSlowestConsumerPosition = this.slowestConsumerPosition; if (wrapPoint > cach...
java
protected long claimUpTo( int number ) { assert number > 0; long nextPosition = this.nextPosition; long maxPosition = nextPosition + number; long wrapPoint = maxPosition - bufferSize; long cachedSlowestConsumerPosition = this.slowestConsumerPosition; if (wrapPoint > cach...
[ "protected", "long", "claimUpTo", "(", "int", "number", ")", "{", "assert", "number", ">", "0", ";", "long", "nextPosition", "=", "this", ".", "nextPosition", ";", "long", "maxPosition", "=", "nextPosition", "+", "number", ";", "long", "wrapPoint", "=", "m...
Claim up to the supplied number of positions. @param number the maximum number of positions to claim for writing; must be positive @return the highest position that were claimed
[ "Claim", "up", "to", "the", "supplied", "number", "of", "positions", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-common/src/main/java/org/modeshape/common/collection/ring/SingleProducerCursor.java#L81-L101
56,237
ModeShape/modeshape
sequencers/modeshape-sequencer-epub/src/main/java/org/modeshape/sequencer/epub/EpubMetadata.java
EpubMetadata.getRootfiles
private List<String> getRootfiles( ZipInputStream zipStream ) throws Exception { List<String> rootfiles = new ArrayList<>(); ZipEntry entry = null; while ((entry = zipStream.getNextEntry()) != null) { String entryName = entry.getName(); if (entryName.endsWith("META-INF/co...
java
private List<String> getRootfiles( ZipInputStream zipStream ) throws Exception { List<String> rootfiles = new ArrayList<>(); ZipEntry entry = null; while ((entry = zipStream.getNextEntry()) != null) { String entryName = entry.getName(); if (entryName.endsWith("META-INF/co...
[ "private", "List", "<", "String", ">", "getRootfiles", "(", "ZipInputStream", "zipStream", ")", "throws", "Exception", "{", "List", "<", "String", ">", "rootfiles", "=", "new", "ArrayList", "<>", "(", ")", ";", "ZipEntry", "entry", "=", "null", ";", "while...
Parse the container file to get the list of all rootfile packages.
[ "Parse", "the", "container", "file", "to", "get", "the", "list", "of", "all", "rootfile", "packages", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/sequencers/modeshape-sequencer-epub/src/main/java/org/modeshape/sequencer/epub/EpubMetadata.java#L233-L258
56,238
ModeShape/modeshape
sequencers/modeshape-sequencer-epub/src/main/java/org/modeshape/sequencer/epub/EpubMetadata.java
EpubMetadata.getZipEntryContent
private ByteArrayOutputStream getZipEntryContent( ZipInputStream zipStream, ZipEntry entry ) throws IOException { try (ByteArrayOutputStream content = new ByteArrayOutputStream()) { byte[] bytes = new byte[(int) entry.getSize()]; int read; ...
java
private ByteArrayOutputStream getZipEntryContent( ZipInputStream zipStream, ZipEntry entry ) throws IOException { try (ByteArrayOutputStream content = new ByteArrayOutputStream()) { byte[] bytes = new byte[(int) entry.getSize()]; int read; ...
[ "private", "ByteArrayOutputStream", "getZipEntryContent", "(", "ZipInputStream", "zipStream", ",", "ZipEntry", "entry", ")", "throws", "IOException", "{", "try", "(", "ByteArrayOutputStream", "content", "=", "new", "ByteArrayOutputStream", "(", ")", ")", "{", "byte", ...
Read the content of the ZipEntry without closing the stream.
[ "Read", "the", "content", "of", "the", "ZipEntry", "without", "closing", "the", "stream", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/sequencers/modeshape-sequencer-epub/src/main/java/org/modeshape/sequencer/epub/EpubMetadata.java#L263-L275
56,239
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/cache/document/DocumentTranslator.java
DocumentTranslator.incrementBinaryReferenceCount
protected void incrementBinaryReferenceCount( BinaryKey binaryKey, Set<BinaryKey> unusedBinaryKeys, Set<BinaryKey> usedBinaryKeys ) { // Find the document metadata and increment the usage count ... String...
java
protected void incrementBinaryReferenceCount( BinaryKey binaryKey, Set<BinaryKey> unusedBinaryKeys, Set<BinaryKey> usedBinaryKeys ) { // Find the document metadata and increment the usage count ... String...
[ "protected", "void", "incrementBinaryReferenceCount", "(", "BinaryKey", "binaryKey", ",", "Set", "<", "BinaryKey", ">", "unusedBinaryKeys", ",", "Set", "<", "BinaryKey", ">", "usedBinaryKeys", ")", "{", "// Find the document metadata and increment the usage count ...", "Str...
Increment the reference count for the stored binary value with the supplied SHA-1 hash. @param binaryKey the key for the binary value; never null @param unusedBinaryKeys the set of binary keys that are considered unused; may be null @param usedBinaryKeys the set of binary keys that are considered used; may be null
[ "Increment", "the", "reference", "count", "for", "the", "stored", "binary", "value", "with", "the", "supplied", "SHA", "-", "1", "hash", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/cache/document/DocumentTranslator.java#L1242-L1265
56,240
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/cache/document/DocumentTranslator.java
DocumentTranslator.decrementBinaryReferenceCount
protected void decrementBinaryReferenceCount( Object fieldValue, Set<BinaryKey> unusedBinaryKeys, Set<BinaryKey> usedBinaryKeys) { if (fieldValue instanceof List<?>) { for (Object value : (List<?>)fie...
java
protected void decrementBinaryReferenceCount( Object fieldValue, Set<BinaryKey> unusedBinaryKeys, Set<BinaryKey> usedBinaryKeys) { if (fieldValue instanceof List<?>) { for (Object value : (List<?>)fie...
[ "protected", "void", "decrementBinaryReferenceCount", "(", "Object", "fieldValue", ",", "Set", "<", "BinaryKey", ">", "unusedBinaryKeys", ",", "Set", "<", "BinaryKey", ">", "usedBinaryKeys", ")", "{", "if", "(", "fieldValue", "instanceof", "List", "<", "?", ">",...
Decrement the reference count for the binary value. @param fieldValue the value in the document that may contain a binary value reference; may be null @param unusedBinaryKeys the set of binary keys that are considered unused; may be null @param usedBinaryKeys the set of binary keys that are considered used; may be nul...
[ "Decrement", "the", "reference", "count", "for", "the", "binary", "value", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/cache/document/DocumentTranslator.java#L1274-L1329
56,241
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/cache/document/DocumentTranslator.java
DocumentTranslator.isLocked
protected boolean isLocked( EditableDocument doc ) { return hasProperty(doc, JcrLexicon.LOCK_OWNER) || hasProperty(doc, JcrLexicon.LOCK_IS_DEEP); }
java
protected boolean isLocked( EditableDocument doc ) { return hasProperty(doc, JcrLexicon.LOCK_OWNER) || hasProperty(doc, JcrLexicon.LOCK_IS_DEEP); }
[ "protected", "boolean", "isLocked", "(", "EditableDocument", "doc", ")", "{", "return", "hasProperty", "(", "doc", ",", "JcrLexicon", ".", "LOCK_OWNER", ")", "||", "hasProperty", "(", "doc", ",", "JcrLexicon", ".", "LOCK_IS_DEEP", ")", ";", "}" ]
Checks if the given document is already locked @param doc the document @return true if the change was made successfully, or false otherwise
[ "Checks", "if", "the", "given", "document", "is", "already", "locked" ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/cache/document/DocumentTranslator.java#L1449-L1451
56,242
ModeShape/modeshape
modeshape-common/src/main/java/org/modeshape/common/util/ResourceLookup.java
ResourceLookup.read
public static InputStream read( String path, ClassLoader classLoader, boolean useTLCL ) { if (useTLCL) { InputStream stream = Thread.currentThread().getContextClassLoader().getResourceAsStream(path); if (stream != null) { return stream; } } ret...
java
public static InputStream read( String path, ClassLoader classLoader, boolean useTLCL ) { if (useTLCL) { InputStream stream = Thread.currentThread().getContextClassLoader().getResourceAsStream(path); if (stream != null) { return stream; } } ret...
[ "public", "static", "InputStream", "read", "(", "String", "path", ",", "ClassLoader", "classLoader", ",", "boolean", "useTLCL", ")", "{", "if", "(", "useTLCL", ")", "{", "InputStream", "stream", "=", "Thread", ".", "currentThread", "(", ")", ".", "getContext...
Returns the stream of a resource at a given path, using some optional class loaders. @param path the path to search @param classLoader a {@link java.lang.ClassLoader} instance to use when searching; may be null. @param useTLCL {@code true} if the thread local class loader should be used as well, in addition to {@code ...
[ "Returns", "the", "stream", "of", "a", "resource", "at", "a", "given", "path", "using", "some", "optional", "class", "loaders", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-common/src/main/java/org/modeshape/common/util/ResourceLookup.java#L38-L46
56,243
ModeShape/modeshape
modeshape-common/src/main/java/org/modeshape/common/util/ResourceLookup.java
ResourceLookup.read
public static InputStream read( String path, Class<?> clazz, boolean useTLCL ) { return read(path, clazz.getClassLoader(), useTLCL); }
java
public static InputStream read( String path, Class<?> clazz, boolean useTLCL ) { return read(path, clazz.getClassLoader(), useTLCL); }
[ "public", "static", "InputStream", "read", "(", "String", "path", ",", "Class", "<", "?", ">", "clazz", ",", "boolean", "useTLCL", ")", "{", "return", "read", "(", "path", ",", "clazz", ".", "getClassLoader", "(", ")", ",", "useTLCL", ")", ";", "}" ]
Returns the stream of a resource at a given path, using the CL of a class. @param path the path to search @param clazz a {@link java.lang.Class} instance which class loader should be used when doing the lookup. @param useTLCL {@code true} if the thread local class loader should be used as well, in addition to {@code c...
[ "Returns", "the", "stream", "of", "a", "resource", "at", "a", "given", "path", "using", "the", "CL", "of", "a", "class", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-common/src/main/java/org/modeshape/common/util/ResourceLookup.java#L57-L59
56,244
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/value/binary/S3BinaryStore.java
S3BinaryStore.setS3ObjectTag
private void setS3ObjectTag(String objectKey, String tagKey, String tagValue) throws BinaryStoreException { try { GetObjectTaggingRequest getTaggingRequest = new GetObjectTaggingRequest(bucketName, objectKey); GetObjectTaggingResult getTaggingResult = s3Client.getObjectTagging(getTagging...
java
private void setS3ObjectTag(String objectKey, String tagKey, String tagValue) throws BinaryStoreException { try { GetObjectTaggingRequest getTaggingRequest = new GetObjectTaggingRequest(bucketName, objectKey); GetObjectTaggingResult getTaggingResult = s3Client.getObjectTagging(getTagging...
[ "private", "void", "setS3ObjectTag", "(", "String", "objectKey", ",", "String", "tagKey", ",", "String", "tagValue", ")", "throws", "BinaryStoreException", "{", "try", "{", "GetObjectTaggingRequest", "getTaggingRequest", "=", "new", "GetObjectTaggingRequest", "(", "bu...
Sets a tag on a S3 object, potentially overwriting the existing value. @param objectKey @param tagKey @param tagValue @throws BinaryStoreException
[ "Sets", "a", "tag", "on", "a", "S3", "object", "potentially", "overwriting", "the", "existing", "value", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/value/binary/S3BinaryStore.java#L338-L357
56,245
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/value/binary/S3BinaryStore.java
S3BinaryStore.mergeS3TagSet
private List<Tag> mergeS3TagSet(List<Tag> initialTags, Tag changeTag) { Map<String, String> mergedTags = initialTags.stream().collect(Collectors.toMap(Tag::getKey, Tag::getValue)); mergedTags.put(changeTag.getKey(), changeTag.getValue()); return mergedTags.entrySet().stream().map( ...
java
private List<Tag> mergeS3TagSet(List<Tag> initialTags, Tag changeTag) { Map<String, String> mergedTags = initialTags.stream().collect(Collectors.toMap(Tag::getKey, Tag::getValue)); mergedTags.put(changeTag.getKey(), changeTag.getValue()); return mergedTags.entrySet().stream().map( ...
[ "private", "List", "<", "Tag", ">", "mergeS3TagSet", "(", "List", "<", "Tag", ">", "initialTags", ",", "Tag", "changeTag", ")", "{", "Map", "<", "String", ",", "String", ">", "mergedTags", "=", "initialTags", ".", "stream", "(", ")", ".", "collect", "(...
Merges a new tag into an existing list of tags. It will be either appended to the list or overwrite the value of an existing tag with the same key. @param initialTags @param changeTag @return {@link List} of merged {@link Tag}s
[ "Merges", "a", "new", "tag", "into", "an", "existing", "list", "of", "tags", ".", "It", "will", "be", "either", "appended", "to", "the", "list", "or", "overwrite", "the", "value", "of", "an", "existing", "tag", "with", "the", "same", "key", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/value/binary/S3BinaryStore.java#L366-L371
56,246
ModeShape/modeshape
sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/datatype/DataTypeParser.java
DataTypeParser.parseLong
protected long parseLong( DdlTokenStream tokens, DataType dataType ) { String value = consume(tokens, dataType, false); return parseLong(value); }
java
protected long parseLong( DdlTokenStream tokens, DataType dataType ) { String value = consume(tokens, dataType, false); return parseLong(value); }
[ "protected", "long", "parseLong", "(", "DdlTokenStream", "tokens", ",", "DataType", "dataType", ")", "{", "String", "value", "=", "consume", "(", "tokens", ",", "dataType", ",", "false", ")", ";", "return", "parseLong", "(", "value", ")", ";", "}" ]
Returns a long value from the input token stream assuming the long is not bracketed with parenthesis. @param tokens @param dataType @return the long value
[ "Returns", "a", "long", "value", "from", "the", "input", "token", "stream", "assuming", "the", "long", "is", "not", "bracketed", "with", "parenthesis", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/datatype/DataTypeParser.java#L690-L694
56,247
ModeShape/modeshape
sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/datatype/DataTypeParser.java
DataTypeParser.parseBracketedLong
protected long parseBracketedLong( DdlTokenStream tokens, DataType dataType ) { consume(tokens, dataType, false, L_PAREN); String value = consume(tokens, dataType, false); consume(tokens, dataType, false, R_PAREN); return parseLong(value); }
java
protected long parseBracketedLong( DdlTokenStream tokens, DataType dataType ) { consume(tokens, dataType, false, L_PAREN); String value = consume(tokens, dataType, false); consume(tokens, dataType, false, R_PAREN); return parseLong(value); }
[ "protected", "long", "parseBracketedLong", "(", "DdlTokenStream", "tokens", ",", "DataType", "dataType", ")", "{", "consume", "(", "tokens", ",", "dataType", ",", "false", ",", "L_PAREN", ")", ";", "String", "value", "=", "consume", "(", "tokens", ",", "data...
Returns a long value from the input token stream assuming the long is bracketed with parenthesis. @param tokens @param dataType @return the long value
[ "Returns", "a", "long", "value", "from", "the", "input", "token", "stream", "assuming", "the", "long", "is", "bracketed", "with", "parenthesis", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/datatype/DataTypeParser.java#L703-L709
56,248
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/sequencer/SequencerPathExpression.java
SequencerPathExpression.compile
public static final SequencerPathExpression compile( String expression ) throws InvalidSequencerPathExpression { CheckArg.isNotNull(expression, "sequencer path expression"); expression = expression.trim(); if (expression.length() == 0) { throw new InvalidSequencerPathExpression(Repos...
java
public static final SequencerPathExpression compile( String expression ) throws InvalidSequencerPathExpression { CheckArg.isNotNull(expression, "sequencer path expression"); expression = expression.trim(); if (expression.length() == 0) { throw new InvalidSequencerPathExpression(Repos...
[ "public", "static", "final", "SequencerPathExpression", "compile", "(", "String", "expression", ")", "throws", "InvalidSequencerPathExpression", "{", "CheckArg", ".", "isNotNull", "(", "expression", ",", "\"sequencer path expression\"", ")", ";", "expression", "=", "exp...
Compile the supplied expression and return the resulting SequencerPathExpression instance. @param expression the expression @return the path expression; never null @throws IllegalArgumentException if the expression is null @throws InvalidSequencerPathExpression if the expression is blank or is not a valid expression
[ "Compile", "the", "supplied", "expression", "and", "return", "the", "resulting", "SequencerPathExpression", "instance", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/sequencer/SequencerPathExpression.java#L74-L87
56,249
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/sequencer/SequencerPathExpression.java
SequencerPathExpression.matcher
public Matcher matcher( String absolutePath ) { PathExpression.Matcher inputMatcher = selectExpression.matcher(absolutePath); String outputPath = null; WorkspacePath wsPath = null; if (inputMatcher.matches()) { // Grab the named groups ... Map<Integer, String> rep...
java
public Matcher matcher( String absolutePath ) { PathExpression.Matcher inputMatcher = selectExpression.matcher(absolutePath); String outputPath = null; WorkspacePath wsPath = null; if (inputMatcher.matches()) { // Grab the named groups ... Map<Integer, String> rep...
[ "public", "Matcher", "matcher", "(", "String", "absolutePath", ")", "{", "PathExpression", ".", "Matcher", "inputMatcher", "=", "selectExpression", ".", "matcher", "(", "absolutePath", ")", ";", "String", "outputPath", "=", "null", ";", "WorkspacePath", "wsPath", ...
Obtain a Matcher that can be used to convert the supplied workspace key and absolute path into an output workspace name and and output path. @param absolutePath the path in the workspace; may not be null @return the matcher; never null
[ "Obtain", "a", "Matcher", "that", "can", "be", "used", "to", "convert", "the", "supplied", "workspace", "key", "and", "absolute", "path", "into", "an", "output", "workspace", "name", "and", "and", "output", "path", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/sequencer/SequencerPathExpression.java#L154-L224
56,250
ModeShape/modeshape
modeshape-schematic/src/main/java/org/modeshape/schematic/DocumentFactory.java
DocumentFactory.newDocument
public static EditableDocument newDocument( Document original ) { BasicDocument newDoc = new BasicDocument(); newDoc.putAll(original); return new DocumentEditor(newDoc, DEFAULT_FACTORY); }
java
public static EditableDocument newDocument( Document original ) { BasicDocument newDoc = new BasicDocument(); newDoc.putAll(original); return new DocumentEditor(newDoc, DEFAULT_FACTORY); }
[ "public", "static", "EditableDocument", "newDocument", "(", "Document", "original", ")", "{", "BasicDocument", "newDoc", "=", "new", "BasicDocument", "(", ")", ";", "newDoc", ".", "putAll", "(", "original", ")", ";", "return", "new", "DocumentEditor", "(", "ne...
Create a new editable document that is a copy of the supplied document. @param original the original document @return the editable document; never null
[ "Create", "a", "new", "editable", "document", "that", "is", "a", "copy", "of", "the", "supplied", "document", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-schematic/src/main/java/org/modeshape/schematic/DocumentFactory.java#L44-L48
56,251
ModeShape/modeshape
modeshape-schematic/src/main/java/org/modeshape/schematic/DocumentFactory.java
DocumentFactory.newDocument
public static EditableDocument newDocument( String name, Object value ) { return new DocumentEditor(new BasicDocument(name, value), DEFAULT_FACTORY); }
java
public static EditableDocument newDocument( String name, Object value ) { return new DocumentEditor(new BasicDocument(name, value), DEFAULT_FACTORY); }
[ "public", "static", "EditableDocument", "newDocument", "(", "String", "name", ",", "Object", "value", ")", "{", "return", "new", "DocumentEditor", "(", "new", "BasicDocument", "(", "name", ",", "value", ")", ",", "DEFAULT_FACTORY", ")", ";", "}" ]
Create a new editable document, initialized with a single field, that can be used as a new document entry in a SchematicDb or as nested documents for other documents. @param name the name of the initial field in the resulting document; if null, the field will not be added to the returned document @param value the valu...
[ "Create", "a", "new", "editable", "document", "initialized", "with", "a", "single", "field", "that", "can", "be", "used", "as", "a", "new", "document", "entry", "in", "a", "SchematicDb", "or", "as", "nested", "documents", "for", "other", "documents", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-schematic/src/main/java/org/modeshape/schematic/DocumentFactory.java#L69-L72
56,252
ModeShape/modeshape
modeshape-schematic/src/main/java/org/modeshape/schematic/DocumentFactory.java
DocumentFactory.newDocument
public static EditableDocument newDocument( String name1, Object value1, String name2, Object value2 ) { return new DocumentEditor(new BasicDocument(name1, value1, name...
java
public static EditableDocument newDocument( String name1, Object value1, String name2, Object value2 ) { return new DocumentEditor(new BasicDocument(name1, value1, name...
[ "public", "static", "EditableDocument", "newDocument", "(", "String", "name1", ",", "Object", "value1", ",", "String", "name2", ",", "Object", "value2", ")", "{", "return", "new", "DocumentEditor", "(", "new", "BasicDocument", "(", "name1", ",", "value1", ",",...
Create a new editable document, initialized with two fields, that can be used as a new document entry in a SchematicDb or as nested documents for other documents. @param name1 the name of the first field in the resulting document; if null, the field will not be added to the returned document @param value1 the value of...
[ "Create", "a", "new", "editable", "document", "initialized", "with", "two", "fields", "that", "can", "be", "used", "as", "a", "new", "document", "entry", "in", "a", "SchematicDb", "or", "as", "nested", "documents", "for", "other", "documents", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-schematic/src/main/java/org/modeshape/schematic/DocumentFactory.java#L86-L91
56,253
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
56,254
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
56,255
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
56,256
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
56,257
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
56,258
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
56,259
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
56,260
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
56,261
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
56,262
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
56,263
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
56,264
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
56,265
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
56,266
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
56,267
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
56,268
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
56,269
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
56,270
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
56,271
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
56,272
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
56,273
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
56,274
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
56,275
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
56,276
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
56,277
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
56,278
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
56,279
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
56,280
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
56,281
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
56,282
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
56,283
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
56,284
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
56,285
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
56,286
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
56,287
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
56,288
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
56,289
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
56,290
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
56,291
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
56,292
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
56,293
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
56,294
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
56,295
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
56,296
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
56,297
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
56,298
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
56,299
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