repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
partition
stringclasses
1 value
ModeShape/modeshape
sequencers/modeshape-sequencer-xml/src/main/java/org/modeshape/sequencer/xml/XmlSequencer.java
XmlSequencer.setFeature
void setFeature( XMLReader reader, String featureName, boolean value ) { try { if (reader.getFeature(featureName) != value) { reader.setFeature(featureName, value); } } catch (SAXException e) { getLogger().warn...
java
void setFeature( XMLReader reader, String featureName, boolean value ) { try { if (reader.getFeature(featureName) != value) { reader.setFeature(featureName, value); } } catch (SAXException e) { getLogger().warn...
[ "void", "setFeature", "(", "XMLReader", "reader", ",", "String", "featureName", ",", "boolean", "value", ")", "{", "try", "{", "if", "(", "reader", ".", "getFeature", "(", "featureName", ")", "!=", "value", ")", "{", "reader", ".", "setFeature", "(", "fe...
Sets the reader's named feature to the supplied value, only if the feature is not already set to that value. This method does nothing if the feature is not known to the reader. @param reader the reader; may not be null @param featureName the name of the feature; may not be null @param value the value for the feature
[ "Sets", "the", "reader", "s", "named", "feature", "to", "the", "supplied", "value", "only", "if", "the", "feature", "is", "not", "already", "set", "to", "that", "value", ".", "This", "method", "does", "nothing", "if", "the", "feature", "is", "not", "know...
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/sequencers/modeshape-sequencer-xml/src/main/java/org/modeshape/sequencer/xml/XmlSequencer.java#L137-L147
train
ModeShape/modeshape
modeshape-common/src/main/java/org/modeshape/common/text/TokenStream.java
TokenStream.consumeLong
public long consumeLong() throws ParsingException, IllegalStateException { if (completed) throwNoMoreContent(); // Get the value from the current token ... String value = currentToken().value(); try { long result = Long.parseLong(value); moveToNextToken(); ...
java
public long consumeLong() throws ParsingException, IllegalStateException { if (completed) throwNoMoreContent(); // Get the value from the current token ... String value = currentToken().value(); try { long result = Long.parseLong(value); moveToNextToken(); ...
[ "public", "long", "consumeLong", "(", ")", "throws", "ParsingException", ",", "IllegalStateException", "{", "if", "(", "completed", ")", "throwNoMoreContent", "(", ")", ";", "// Get the value from the current token ...", "String", "value", "=", "currentToken", "(", ")...
Convert the value of this token to a long, return it, and move to the next token. @return the current token's value, converted to an integer @throws ParsingException if there is no such token to consume, or if the token cannot be converted to a long @throws IllegalStateException if this method was called before the st...
[ "Convert", "the", "value", "of", "this", "token", "to", "a", "long", "return", "it", "and", "move", "to", "the", "next", "token", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-common/src/main/java/org/modeshape/common/text/TokenStream.java#L502-L515
train
ModeShape/modeshape
modeshape-common/src/main/java/org/modeshape/common/text/TokenStream.java
TokenStream.consume
public String consume() throws ParsingException, IllegalStateException { if (completed) throwNoMoreContent(); // Get the value from the current token ... String result = currentToken().value(); moveToNextToken(); return result; }
java
public String consume() throws ParsingException, IllegalStateException { if (completed) throwNoMoreContent(); // Get the value from the current token ... String result = currentToken().value(); moveToNextToken(); return result; }
[ "public", "String", "consume", "(", ")", "throws", "ParsingException", ",", "IllegalStateException", "{", "if", "(", "completed", ")", "throwNoMoreContent", "(", ")", ";", "// Get the value from the current token ...", "String", "result", "=", "currentToken", "(", ")"...
Return the value of this token and move to the next token. @return the value of the current token @throws ParsingException if there is no such token to consume @throws IllegalStateException if this method was called before the stream was {@link #start() started}
[ "Return", "the", "value", "of", "this", "token", "and", "move", "to", "the", "next", "token", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-common/src/main/java/org/modeshape/common/text/TokenStream.java#L546-L552
train
ModeShape/modeshape
modeshape-common/src/main/java/org/modeshape/common/text/TokenStream.java
TokenStream.currentToken
final Token currentToken() throws IllegalStateException, NoSuchElementException { if (currentToken == null) { if (completed) { throw new NoSuchElementException(CommonI18n.noMoreContent.text()); } throw new IllegalStateException(CommonI18n.startMethodMustBeCall...
java
final Token currentToken() throws IllegalStateException, NoSuchElementException { if (currentToken == null) { if (completed) { throw new NoSuchElementException(CommonI18n.noMoreContent.text()); } throw new IllegalStateException(CommonI18n.startMethodMustBeCall...
[ "final", "Token", "currentToken", "(", ")", "throws", "IllegalStateException", ",", "NoSuchElementException", "{", "if", "(", "currentToken", "==", "null", ")", "{", "if", "(", "completed", ")", "{", "throw", "new", "NoSuchElementException", "(", "CommonI18n", "...
Get the current token. @return the current token; never null @throws IllegalStateException if this method was called before the stream was {@link #start() started} @throws NoSuchElementException if there are no more tokens
[ "Get", "the", "current", "token", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-common/src/main/java/org/modeshape/common/text/TokenStream.java#L1255-L1264
train
ModeShape/modeshape
modeshape-common/src/main/java/org/modeshape/common/text/TokenStream.java
TokenStream.previousToken
final Token previousToken() throws IllegalStateException, NoSuchElementException { if (currentToken == null) { if (completed) { if (tokens.isEmpty()) { throw new NoSuchElementException(CommonI18n.noMoreContent.text()); } return toke...
java
final Token previousToken() throws IllegalStateException, NoSuchElementException { if (currentToken == null) { if (completed) { if (tokens.isEmpty()) { throw new NoSuchElementException(CommonI18n.noMoreContent.text()); } return toke...
[ "final", "Token", "previousToken", "(", ")", "throws", "IllegalStateException", ",", "NoSuchElementException", "{", "if", "(", "currentToken", "==", "null", ")", "{", "if", "(", "completed", ")", "{", "if", "(", "tokens", ".", "isEmpty", "(", ")", ")", "{"...
Get the previous token. This does not modify the state. @return the previous token; never null @throws IllegalStateException if this method was called before the stream was {@link #start() started} @throws NoSuchElementException if there is no previous token
[ "Get", "the", "previous", "token", ".", "This", "does", "not", "modify", "the", "state", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-common/src/main/java/org/modeshape/common/text/TokenStream.java#L1297-L1311
train
ModeShape/modeshape
modeshape-common/src/main/java/org/modeshape/common/text/TokenStream.java
TokenStream.generateFragment
static String generateFragment( String content, int indexOfProblem, int charactersToIncludeBeforeAndAfter, String highlightText ) { assert content != null; assert indexOfProblem < content.length()...
java
static String generateFragment( String content, int indexOfProblem, int charactersToIncludeBeforeAndAfter, String highlightText ) { assert content != null; assert indexOfProblem < content.length()...
[ "static", "String", "generateFragment", "(", "String", "content", ",", "int", "indexOfProblem", ",", "int", "charactersToIncludeBeforeAndAfter", ",", "String", "highlightText", ")", "{", "assert", "content", "!=", "null", ";", "assert", "indexOfProblem", "<", "conte...
Utility method to generate a highlighted fragment of a particular point in the stream. @param content the content from which the fragment should be taken; may not be null @param indexOfProblem the index of the problem point that should be highlighted; must be a valid index in the content @param charactersToIncludeBefo...
[ "Utility", "method", "to", "generate", "a", "highlighted", "fragment", "of", "a", "particular", "point", "in", "the", "stream", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-common/src/main/java/org/modeshape/common/text/TokenStream.java#L1331-L1346
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/query/plan/CanonicalPlanner.java
CanonicalPlanner.createCanonicalPlan
protected PlanNode createCanonicalPlan( QueryContext context, Query query ) { PlanNode plan = null; // Process the source of the query ... Map<SelectorName, Table> usedSources = new HashMap<SelectorName, Table>(); plan = createPlanNode(context...
java
protected PlanNode createCanonicalPlan( QueryContext context, Query query ) { PlanNode plan = null; // Process the source of the query ... Map<SelectorName, Table> usedSources = new HashMap<SelectorName, Table>(); plan = createPlanNode(context...
[ "protected", "PlanNode", "createCanonicalPlan", "(", "QueryContext", "context", ",", "Query", "query", ")", "{", "PlanNode", "plan", "=", "null", ";", "// Process the source of the query ...", "Map", "<", "SelectorName", ",", "Table", ">", "usedSources", "=", "new",...
Create a canonical query plan for the given query. @param context the context in which the query is being planned @param query the query to be planned @return the root node of the plan tree representing the canonical plan
[ "Create", "a", "canonical", "query", "plan", "for", "the", "given", "query", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/query/plan/CanonicalPlanner.java#L114-L159
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/query/plan/CanonicalPlanner.java
CanonicalPlanner.validate
protected void validate( QueryContext context, QueryCommand query, Map<SelectorName, Table> usedSelectors ) { // // Resolve everything ... // Visitors.visitAll(query, new Validator(context, usedSelectors)); // Resolve everything (except s...
java
protected void validate( QueryContext context, QueryCommand query, Map<SelectorName, Table> usedSelectors ) { // // Resolve everything ... // Visitors.visitAll(query, new Validator(context, usedSelectors)); // Resolve everything (except s...
[ "protected", "void", "validate", "(", "QueryContext", "context", ",", "QueryCommand", "query", ",", "Map", "<", "SelectorName", ",", "Table", ">", "usedSelectors", ")", "{", "// // Resolve everything ...", "// Visitors.visitAll(query, new Validator(context, usedSelectors));",...
Validate the supplied query. @param context the context in which the query is being planned @param query the set query to be planned @param usedSelectors the map of {@link SelectorName}s (aliases or names) used in the query.
[ "Validate", "the", "supplied", "query", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/query/plan/CanonicalPlanner.java#L168-L182
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/query/plan/CanonicalPlanner.java
CanonicalPlanner.createCanonicalPlan
protected PlanNode createCanonicalPlan( QueryContext context, SetQuery query ) { // Process the left and right parts of the query ... PlanNode left = createPlan(context, query.getLeft()); PlanNode right = createPlan(context, query.getRight()); ...
java
protected PlanNode createCanonicalPlan( QueryContext context, SetQuery query ) { // Process the left and right parts of the query ... PlanNode left = createPlan(context, query.getLeft()); PlanNode right = createPlan(context, query.getRight()); ...
[ "protected", "PlanNode", "createCanonicalPlan", "(", "QueryContext", "context", ",", "SetQuery", "query", ")", "{", "// Process the left and right parts of the query ...", "PlanNode", "left", "=", "createPlan", "(", "context", ",", "query", ".", "getLeft", "(", ")", "...
Create a canonical query plan for the given set query. @param context the context in which the query is being planned @param query the set query to be planned @return the root node of the plan tree representing the canonical plan
[ "Create", "a", "canonical", "query", "plan", "for", "the", "given", "set", "query", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/query/plan/CanonicalPlanner.java#L191-L212
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/query/plan/CanonicalPlanner.java
CanonicalPlanner.createPlanNode
protected PlanNode createPlanNode( QueryContext context, Source source, Map<SelectorName, Table> usedSelectors ) { if (source instanceof Selector) { // No join required ... assert source instanceof AllNodes || ...
java
protected PlanNode createPlanNode( QueryContext context, Source source, Map<SelectorName, Table> usedSelectors ) { if (source instanceof Selector) { // No join required ... assert source instanceof AllNodes || ...
[ "protected", "PlanNode", "createPlanNode", "(", "QueryContext", "context", ",", "Source", "source", ",", "Map", "<", "SelectorName", ",", "Table", ">", "usedSelectors", ")", "{", "if", "(", "source", "instanceof", "Selector", ")", "{", "// No join required ...", ...
Create a JOIN or SOURCE node that contain the source information. @param context the execution context @param source the source to be processed; may not be null @param usedSelectors the map of {@link SelectorName}s (aliases or names) used in the query. @return the new plan; never null
[ "Create", "a", "JOIN", "or", "SOURCE", "node", "that", "contain", "the", "source", "information", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/query/plan/CanonicalPlanner.java#L222-L285
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/query/plan/CanonicalPlanner.java
CanonicalPlanner.attachCriteria
protected PlanNode attachCriteria( final QueryContext context, PlanNode plan, Constraint constraint, List<? extends Column> columns, Map<String, Subquery> subquerie...
java
protected PlanNode attachCriteria( final QueryContext context, PlanNode plan, Constraint constraint, List<? extends Column> columns, Map<String, Subquery> subquerie...
[ "protected", "PlanNode", "attachCriteria", "(", "final", "QueryContext", "context", ",", "PlanNode", "plan", ",", "Constraint", "constraint", ",", "List", "<", "?", "extends", "Column", ">", "columns", ",", "Map", "<", "String", ",", "Subquery", ">", "subqueri...
Attach all criteria above the join nodes. The optimizer will push these criteria down to the appropriate source. @param context the context in which the query is being planned @param plan the existing plan, which joins all source groups @param constraint the criteria or constraint from the query @param columns the col...
[ "Attach", "all", "criteria", "above", "the", "join", "nodes", ".", "The", "optimizer", "will", "push", "these", "criteria", "down", "to", "the", "appropriate", "source", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/query/plan/CanonicalPlanner.java#L297-L353
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/query/plan/CanonicalPlanner.java
CanonicalPlanner.attachLimits
protected PlanNode attachLimits( QueryContext context, PlanNode plan, Limit limit ) { if (limit.isUnlimited()) return plan; context.getHints().hasLimit = true; PlanNode limitNode = new PlanNode(Type.LIMIT); boolea...
java
protected PlanNode attachLimits( QueryContext context, PlanNode plan, Limit limit ) { if (limit.isUnlimited()) return plan; context.getHints().hasLimit = true; PlanNode limitNode = new PlanNode(Type.LIMIT); boolea...
[ "protected", "PlanNode", "attachLimits", "(", "QueryContext", "context", ",", "PlanNode", "plan", ",", "Limit", "limit", ")", "{", "if", "(", "limit", ".", "isUnlimited", "(", ")", ")", "return", "plan", ";", "context", ".", "getHints", "(", ")", ".", "h...
Attach a LIMIT node at the top of the plan tree. @param context the context in which the query is being planned @param plan the existing plan @param limit the limit definition; may be null @return the updated plan, or the existing plan if there were no limits
[ "Attach", "a", "LIMIT", "node", "at", "the", "top", "of", "the", "plan", "tree", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/query/plan/CanonicalPlanner.java#L410-L431
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/query/plan/CanonicalPlanner.java
CanonicalPlanner.attachProject
protected PlanNode attachProject( QueryContext context, PlanNode plan, List<? extends Column> columns, Map<SelectorName, Table> selectors ) { PlanNode projectNode = new PlanNode(Type.PROJECT); ...
java
protected PlanNode attachProject( QueryContext context, PlanNode plan, List<? extends Column> columns, Map<SelectorName, Table> selectors ) { PlanNode projectNode = new PlanNode(Type.PROJECT); ...
[ "protected", "PlanNode", "attachProject", "(", "QueryContext", "context", ",", "PlanNode", "plan", ",", "List", "<", "?", "extends", "Column", ">", "columns", ",", "Map", "<", "SelectorName", ",", "Table", ">", "selectors", ")", "{", "PlanNode", "projectNode",...
Attach a PROJECT node at the top of the plan tree. @param context the context in which the query is being planned @param plan the existing plan @param columns the columns being projected; may be null @param selectors the selectors keyed by their alias or name @return the updated plan
[ "Attach", "a", "PROJECT", "node", "at", "the", "top", "of", "the", "plan", "tree", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/query/plan/CanonicalPlanner.java#L442-L507
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/query/plan/CanonicalPlanner.java
CanonicalPlanner.attachSubqueries
protected PlanNode attachSubqueries( QueryContext context, PlanNode plan, Map<String, Subquery> subqueriesByVariableName ) { // Order the variable names in reverse order ... List<String> varNames = new ArrayList<String>(su...
java
protected PlanNode attachSubqueries( QueryContext context, PlanNode plan, Map<String, Subquery> subqueriesByVariableName ) { // Order the variable names in reverse order ... List<String> varNames = new ArrayList<String>(su...
[ "protected", "PlanNode", "attachSubqueries", "(", "QueryContext", "context", ",", "PlanNode", "plan", ",", "Map", "<", "String", ",", "Subquery", ">", "subqueriesByVariableName", ")", "{", "// Order the variable names in reverse order ...", "List", "<", "String", ">", ...
Attach plan nodes for each subquery, resulting with the first subquery at the top of the plan tree. @param context the context in which the query is being planned @param plan the existing plan @param subqueriesByVariableName the queries by the variable name used in substitution @return the updated plan, or the existin...
[ "Attach", "plan", "nodes", "for", "each", "subquery", "resulting", "with", "the", "first", "subquery", "at", "the", "top", "of", "the", "plan", "tree", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/query/plan/CanonicalPlanner.java#L552-L574
train
ModeShape/modeshape
modeshape-jca/src/main/java/org/modeshape/jca/JcrManagedConnectionFactory.java
JcrManagedConnectionFactory.getRepository
public synchronized Repository getRepository() throws ResourceException { if (this.repository == null) { LOGGER.debug("Deploying repository URL [{0}]", repositoryURL); this.repository = deployRepository(repositoryURL); } return this.repository; }
java
public synchronized Repository getRepository() throws ResourceException { if (this.repository == null) { LOGGER.debug("Deploying repository URL [{0}]", repositoryURL); this.repository = deployRepository(repositoryURL); } return this.repository; }
[ "public", "synchronized", "Repository", "getRepository", "(", ")", "throws", "ResourceException", "{", "if", "(", "this", ".", "repository", "==", "null", ")", "{", "LOGGER", ".", "debug", "(", "\"Deploying repository URL [{0}]\"", ",", "repositoryURL", ")", ";", ...
Provides access to the configured repository. @return repository specified by resource adapter configuration. @throws ResourceException if there is an error getting the repository
[ "Provides", "access", "to", "the", "configured", "repository", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jca/src/main/java/org/modeshape/jca/JcrManagedConnectionFactory.java#L138-L144
train
ModeShape/modeshape
modeshape-jca/src/main/java/org/modeshape/jca/JcrManagedConnectionFactory.java
JcrManagedConnectionFactory.createConnectionFactory
@Override public Object createConnectionFactory( ConnectionManager cxManager ) throws ResourceException { JcrRepositoryHandle handle = new JcrRepositoryHandle(this, cxManager); return handle; }
java
@Override public Object createConnectionFactory( ConnectionManager cxManager ) throws ResourceException { JcrRepositoryHandle handle = new JcrRepositoryHandle(this, cxManager); return handle; }
[ "@", "Override", "public", "Object", "createConnectionFactory", "(", "ConnectionManager", "cxManager", ")", "throws", "ResourceException", "{", "JcrRepositoryHandle", "handle", "=", "new", "JcrRepositoryHandle", "(", "this", ",", "cxManager", ")", ";", "return", "hand...
Creates a Connection Factory instance. @param cxManager ConnectionManager to be associated with created EIS connection factory instance @return EIS-specific Connection Factory instance or javax.resource.cci.ConnectionFactory instance @throws ResourceException Generic exception
[ "Creates", "a", "Connection", "Factory", "instance", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jca/src/main/java/org/modeshape/jca/JcrManagedConnectionFactory.java#L153-L157
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/index/local/LocalIndexBuilder.java
LocalIndexBuilder.validate
protected static void validate( IndexDefinition defn, Problems problems ) { if (!defn.hasSingleColumn()) { problems.addError(JcrI18n.localIndexProviderDoesNotSupportMultiColumnIndexes, defn.getName(), defn.getProviderName()); } switch (defn.getKind()) { case TEXT: ...
java
protected static void validate( IndexDefinition defn, Problems problems ) { if (!defn.hasSingleColumn()) { problems.addError(JcrI18n.localIndexProviderDoesNotSupportMultiColumnIndexes, defn.getName(), defn.getProviderName()); } switch (defn.getKind()) { case TEXT: ...
[ "protected", "static", "void", "validate", "(", "IndexDefinition", "defn", ",", "Problems", "problems", ")", "{", "if", "(", "!", "defn", ".", "hasSingleColumn", "(", ")", ")", "{", "problems", ".", "addError", "(", "JcrI18n", ".", "localIndexProviderDoesNotSu...
Validate whether the index definition is acceptable for this provider. @param defn the definition to validate; may not be {@code null} @param problems the component to record any problems, errors, or warnings; may not be null
[ "Validate", "whether", "the", "index", "definition", "is", "acceptable", "for", "this", "provider", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/index/local/LocalIndexBuilder.java#L91-L100
train
ModeShape/modeshape
modeshape-common/src/main/java/org/modeshape/common/collection/ring/RingBuffer.java
RingBuffer.add
public boolean add( T entry ) { assert entry != null; if (!addEntries.get()) return false; try { producerLock.lock(); long position = cursor.claim(); // blocks; if this fails, we will not have successfully claimed and nothing to do ... int index = (int)(positi...
java
public boolean add( T entry ) { assert entry != null; if (!addEntries.get()) return false; try { producerLock.lock(); long position = cursor.claim(); // blocks; if this fails, we will not have successfully claimed and nothing to do ... int index = (int)(positi...
[ "public", "boolean", "add", "(", "T", "entry", ")", "{", "assert", "entry", "!=", "null", ";", "if", "(", "!", "addEntries", ".", "get", "(", ")", ")", "return", "false", ";", "try", "{", "producerLock", ".", "lock", "(", ")", ";", "long", "positio...
Add to this buffer a single entry. This method blocks if there is no room in the ring buffer, providing back pressure on the caller in such cases. Note that if this method blocks for any length of time, that means at least one consumer has yet to process all of the entries that are currently in the ring buffer. In such...
[ "Add", "to", "this", "buffer", "a", "single", "entry", ".", "This", "method", "blocks", "if", "there", "is", "no", "room", "in", "the", "ring", "buffer", "providing", "back", "pressure", "on", "the", "caller", "in", "such", "cases", ".", "Note", "that", ...
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-common/src/main/java/org/modeshape/common/collection/ring/RingBuffer.java#L149-L161
train
ModeShape/modeshape
modeshape-common/src/main/java/org/modeshape/common/collection/ring/RingBuffer.java
RingBuffer.add
public boolean add( T[] entries ) { assert entries != null; if (entries.length == 0 || !addEntries.get()) return false; try { producerLock.lock(); long position = cursor.claim(entries.length); // blocks for (int i = 0; i != entries.length; ++i) { ...
java
public boolean add( T[] entries ) { assert entries != null; if (entries.length == 0 || !addEntries.get()) return false; try { producerLock.lock(); long position = cursor.claim(entries.length); // blocks for (int i = 0; i != entries.length; ++i) { ...
[ "public", "boolean", "add", "(", "T", "[", "]", "entries", ")", "{", "assert", "entries", "!=", "null", ";", "if", "(", "entries", ".", "length", "==", "0", "||", "!", "addEntries", ".", "get", "(", ")", ")", "return", "false", ";", "try", "{", "...
Add to this buffer multiple entries. This method blocks until it is added. @param entries the entries that are to be added; may not be null @return true if all of the entries were added, or false if the buffer has been {@link #shutdown()} and none of the entries were added
[ "Add", "to", "this", "buffer", "multiple", "entries", ".", "This", "method", "blocks", "until", "it", "is", "added", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-common/src/main/java/org/modeshape/common/collection/ring/RingBuffer.java#L170-L184
train
ModeShape/modeshape
modeshape-common/src/main/java/org/modeshape/common/collection/ring/RingBuffer.java
RingBuffer.remove
public boolean remove( C consumer ) { if (consumer != null) { // Iterate through the map to find the runner that owns this consumer ... ConsumerRunner match = null; for (ConsumerRunner runner : consumers) { if (runner.getConsumer().equals(consumer)) { ...
java
public boolean remove( C consumer ) { if (consumer != null) { // Iterate through the map to find the runner that owns this consumer ... ConsumerRunner match = null; for (ConsumerRunner runner : consumers) { if (runner.getConsumer().equals(consumer)) { ...
[ "public", "boolean", "remove", "(", "C", "consumer", ")", "{", "if", "(", "consumer", "!=", "null", ")", "{", "// Iterate through the map to find the runner that owns this consumer ...", "ConsumerRunner", "match", "=", "null", ";", "for", "(", "ConsumerRunner", "runne...
Remove the supplied consumer, and block until it stops running and is closed and removed from this buffer. The consumer is removed at the earliest conevenient point, and will stop seeing entries as soon as it is removed. @param consumer the consumer component to be removed entry; retries will not be attempted if the v...
[ "Remove", "the", "supplied", "consumer", "and", "block", "until", "it", "stops", "running", "and", "is", "closed", "and", "removed", "from", "this", "buffer", ".", "The", "consumer", "is", "removed", "at", "the", "earliest", "conevenient", "point", "and", "w...
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-common/src/main/java/org/modeshape/common/collection/ring/RingBuffer.java#L261-L280
train
ModeShape/modeshape
modeshape-common/src/main/java/org/modeshape/common/collection/ring/RingBuffer.java
RingBuffer.shutdown
public void shutdown() { // Prevent new entries from being added ... this.addEntries.set(false); // Mark the cursor as being finished; this will stop all consumers from waiting for a batch ... this.cursor.complete(); // Each of the consumer threads will complete the batch they'...
java
public void shutdown() { // Prevent new entries from being added ... this.addEntries.set(false); // Mark the cursor as being finished; this will stop all consumers from waiting for a batch ... this.cursor.complete(); // Each of the consumer threads will complete the batch they'...
[ "public", "void", "shutdown", "(", ")", "{", "// Prevent new entries from being added ...", "this", ".", "addEntries", ".", "set", "(", "false", ")", ";", "// Mark the cursor as being finished; this will stop all consumers from waiting for a batch ...", "this", ".", "cursor", ...
Shutdown this ring buffer by preventing any further entries, but allowing all existing entries to be processed by all consumers.
[ "Shutdown", "this", "ring", "buffer", "by", "preventing", "any", "further", "entries", "but", "allowing", "all", "existing", "entries", "to", "be", "processed", "by", "all", "consumers", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-common/src/main/java/org/modeshape/common/collection/ring/RingBuffer.java#L310-L327
train
ModeShape/modeshape
index-providers/modeshape-elasticsearch-index-provider/src/main/java/org/modeshape/jcr/index/elasticsearch/client/EsRequest.java
EsRequest.put
public void put(String name, Object value) { if (value instanceof EsRequest) { document.setDocument(name, ((EsRequest)value).document); } else { document.set(name, value); } }
java
public void put(String name, Object value) { if (value instanceof EsRequest) { document.setDocument(name, ((EsRequest)value).document); } else { document.set(name, value); } }
[ "public", "void", "put", "(", "String", "name", ",", "Object", "value", ")", "{", "if", "(", "value", "instanceof", "EsRequest", ")", "{", "document", ".", "setDocument", "(", "name", ",", "(", "(", "EsRequest", ")", "value", ")", ".", "document", ")",...
Adds single property value. @param name property name. @param value property value.
[ "Adds", "single", "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/EsRequest.java#L56-L62
train
ModeShape/modeshape
index-providers/modeshape-elasticsearch-index-provider/src/main/java/org/modeshape/jcr/index/elasticsearch/client/EsRequest.java
EsRequest.put
public void put(String name, Object[] values) { if (values instanceof EsRequest[]) { Object[] docs = new Object[values.length]; for (int i = 0; i < docs.length; i++) { docs[i] = ((EsRequest)values[i]).document; } document.setArray(name, docs); ...
java
public void put(String name, Object[] values) { if (values instanceof EsRequest[]) { Object[] docs = new Object[values.length]; for (int i = 0; i < docs.length; i++) { docs[i] = ((EsRequest)values[i]).document; } document.setArray(name, docs); ...
[ "public", "void", "put", "(", "String", "name", ",", "Object", "[", "]", "values", ")", "{", "if", "(", "values", "instanceof", "EsRequest", "[", "]", ")", "{", "Object", "[", "]", "docs", "=", "new", "Object", "[", "values", ".", "length", "]", ";...
Adds multivalued property value. @param name property name. @param value property values.
[ "Adds", "multivalued", "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/EsRequest.java#L70-L80
train
ModeShape/modeshape
modeshape-common/src/main/java/org/modeshape/common/xml/XmlCharacters.java
XmlCharacters.isValidName
public static boolean isValidName( String name ) { if (name == null || name.length() == 0) return false; CharacterIterator iter = new StringCharacterIterator(name); char c = iter.first(); if (!isValidNameStart(c)) return false; while (c != CharacterIterator.DONE) { if...
java
public static boolean isValidName( String name ) { if (name == null || name.length() == 0) return false; CharacterIterator iter = new StringCharacterIterator(name); char c = iter.first(); if (!isValidNameStart(c)) return false; while (c != CharacterIterator.DONE) { if...
[ "public", "static", "boolean", "isValidName", "(", "String", "name", ")", "{", "if", "(", "name", "==", "null", "||", "name", ".", "length", "(", ")", "==", "0", ")", "return", "false", ";", "CharacterIterator", "iter", "=", "new", "StringCharacterIterator...
Determine if the supplied name is a valid XML Name. @param name the string being checked @return true if the supplied name is indeed a valid XML Name, or false otherwise
[ "Determine", "if", "the", "supplied", "name", "is", "a", "valid", "XML", "Name", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-common/src/main/java/org/modeshape/common/xml/XmlCharacters.java#L278-L288
train
ModeShape/modeshape
modeshape-common/src/main/java/org/modeshape/common/xml/XmlCharacters.java
XmlCharacters.isValidNcName
public static boolean isValidNcName( String name ) { if (name == null || name.length() == 0) return false; CharacterIterator iter = new StringCharacterIterator(name); char c = iter.first(); if (!isValidNcNameStart(c)) return false; while (c != CharacterIterator.DONE) { ...
java
public static boolean isValidNcName( String name ) { if (name == null || name.length() == 0) return false; CharacterIterator iter = new StringCharacterIterator(name); char c = iter.first(); if (!isValidNcNameStart(c)) return false; while (c != CharacterIterator.DONE) { ...
[ "public", "static", "boolean", "isValidNcName", "(", "String", "name", ")", "{", "if", "(", "name", "==", "null", "||", "name", ".", "length", "(", ")", "==", "0", ")", "return", "false", ";", "CharacterIterator", "iter", "=", "new", "StringCharacterIterat...
Determine if the supplied name is a valid XML NCName. @param name the string being checked @return true if the supplied name is indeed a valid XML NCName, or false otherwise
[ "Determine", "if", "the", "supplied", "name", "is", "a", "valid", "XML", "NCName", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-common/src/main/java/org/modeshape/common/xml/XmlCharacters.java#L296-L306
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/RepositoryQueryManager.java
RepositoryQueryManager.queryEngine
protected final QueryEngine queryEngine() { if (queryEngine == null) { try { engineInitLock.lock(); if (queryEngine == null) { QueryEngineBuilder builder = null; if (!repoConfig.getIndexProviders().isEmpty()) { ...
java
protected final QueryEngine queryEngine() { if (queryEngine == null) { try { engineInitLock.lock(); if (queryEngine == null) { QueryEngineBuilder builder = null; if (!repoConfig.getIndexProviders().isEmpty()) { ...
[ "protected", "final", "QueryEngine", "queryEngine", "(", ")", "{", "if", "(", "queryEngine", "==", "null", ")", "{", "try", "{", "engineInitLock", ".", "lock", "(", ")", ";", "if", "(", "queryEngine", "==", "null", ")", "{", "QueryEngineBuilder", "builder"...
Obtain the query engine, which is created lazily and in a thread-safe manner. @return the query engine; never null
[ "Obtain", "the", "query", "engine", "which", "is", "created", "lazily", "and", "in", "a", "thread", "-", "safe", "manner", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/RepositoryQueryManager.java#L238-L262
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/RepositoryQueryManager.java
RepositoryQueryManager.reindexIfNeeded
protected void reindexIfNeeded( boolean async, final boolean includeSystemContent ) { final ScanningRequest request = toBeScanned.drain(); if (!request.isEmpty()) { final RepositoryCache repoCache = runningState.repositoryCache(); scan(async, () -> { // Scan each ...
java
protected void reindexIfNeeded( boolean async, final boolean includeSystemContent ) { final ScanningRequest request = toBeScanned.drain(); if (!request.isEmpty()) { final RepositoryCache repoCache = runningState.repositoryCache(); scan(async, () -> { // Scan each ...
[ "protected", "void", "reindexIfNeeded", "(", "boolean", "async", ",", "final", "boolean", "includeSystemContent", ")", "{", "final", "ScanningRequest", "request", "=", "toBeScanned", ".", "drain", "(", ")", ";", "if", "(", "!", "request", ".", "isEmpty", "(", ...
Reindex the repository only if there is at least one provider that required scanning and reindexing. @param async whether the reindexing should be performed asynchronously or not @param includeSystemContent whether the /jcr:system area should be indexed or not
[ "Reindex", "the", "repository", "only", "if", "there", "is", "at", "least", "one", "provider", "that", "required", "scanning", "and", "reindexing", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/RepositoryQueryManager.java#L343-L390
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/RepositoryQueryManager.java
RepositoryQueryManager.cleanAndReindex
protected void cleanAndReindex( boolean async ) { final IndexWriter writer = getIndexWriter(); scan(async, getIndexWriter(), new Callable<Void>() { @SuppressWarnings( "synthetic-access" ) @Override public Void call() throws Exception { writer.clearAllI...
java
protected void cleanAndReindex( boolean async ) { final IndexWriter writer = getIndexWriter(); scan(async, getIndexWriter(), new Callable<Void>() { @SuppressWarnings( "synthetic-access" ) @Override public Void call() throws Exception { writer.clearAllI...
[ "protected", "void", "cleanAndReindex", "(", "boolean", "async", ")", "{", "final", "IndexWriter", "writer", "=", "getIndexWriter", "(", ")", ";", "scan", "(", "async", ",", "getIndexWriter", "(", ")", ",", "new", "Callable", "<", "Void", ">", "(", ")", ...
Clean all indexes and reindex all content. @param async true if the reindexing should be done in the background, or false if it should be done using this thread
[ "Clean", "all", "indexes", "and", "reindex", "all", "content", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/RepositoryQueryManager.java#L397-L408
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/RepositoryQueryManager.java
RepositoryQueryManager.reindexContent
private void reindexContent( boolean includeSystemContent, IndexWriter indexes ) { if (indexes.canBeSkipped()) return; // The node type schemata changes every time a node type is (un)registered, so get the snapshot that we'll use throughout RepositoryCache repoCa...
java
private void reindexContent( boolean includeSystemContent, IndexWriter indexes ) { if (indexes.canBeSkipped()) return; // The node type schemata changes every time a node type is (un)registered, so get the snapshot that we'll use throughout RepositoryCache repoCa...
[ "private", "void", "reindexContent", "(", "boolean", "includeSystemContent", ",", "IndexWriter", "indexes", ")", "{", "if", "(", "indexes", ".", "canBeSkipped", "(", ")", ")", "return", ";", "// The node type schemata changes every time a node type is (un)registered, so get...
Crawl and index all of the repository content. @param includeSystemContent true if the system content should also be indexed @param indexes the index writer that should be use; may not be null
[ "Crawl", "and", "index", "all", "of", "the", "repository", "content", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/RepositoryQueryManager.java#L449-L484
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/RepositoryQueryManager.java
RepositoryQueryManager.reindexContent
public void reindexContent( JcrWorkspace workspace, Path path, int depth ) { if (getIndexWriter().canBeSkipped()) { // There's no indexes that require updating ... return; } CheckArg.isPositive(depth, "depth"...
java
public void reindexContent( JcrWorkspace workspace, Path path, int depth ) { if (getIndexWriter().canBeSkipped()) { // There's no indexes that require updating ... return; } CheckArg.isPositive(depth, "depth"...
[ "public", "void", "reindexContent", "(", "JcrWorkspace", "workspace", ",", "Path", "path", ",", "int", "depth", ")", "{", "if", "(", "getIndexWriter", "(", ")", ".", "canBeSkipped", "(", ")", ")", "{", "// There's no indexes that require updating ...", "return", ...
Crawl and index the content starting at the supplied path in the named workspace, to the designated depth. @param workspace the workspace @param path the path of the content to be indexed @param depth the depth of the content to be indexed @throws IllegalArgumentException if the workspace or path are null, or if the d...
[ "Crawl", "and", "index", "the", "content", "starting", "at", "the", "supplied", "path", "in", "the", "named", "workspace", "to", "the", "designated", "depth", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/RepositoryQueryManager.java#L504-L540
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/RepositoryQueryManager.java
RepositoryQueryManager.reindexContentAsync
public Future<Boolean> reindexContentAsync( final JcrWorkspace workspace ) { return indexingExecutorService.submit(() -> { reindexContent(workspace); return Boolean.TRUE; }); }
java
public Future<Boolean> reindexContentAsync( final JcrWorkspace workspace ) { return indexingExecutorService.submit(() -> { reindexContent(workspace); return Boolean.TRUE; }); }
[ "public", "Future", "<", "Boolean", ">", "reindexContentAsync", "(", "final", "JcrWorkspace", "workspace", ")", "{", "return", "indexingExecutorService", ".", "submit", "(", "(", ")", "->", "{", "reindexContent", "(", "workspace", ")", ";", "return", "Boolean", ...
Asynchronously crawl and index the content in the named workspace. @param workspace the workspace @return the future for the asynchronous operation; never null @throws IllegalArgumentException if the workspace is null
[ "Asynchronously", "crawl", "and", "index", "the", "content", "in", "the", "named", "workspace", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/RepositoryQueryManager.java#L750-L755
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/RepositoryQueryManager.java
RepositoryQueryManager.reindexContentAsync
public Future<Boolean> reindexContentAsync( final JcrWorkspace workspace, final Path path, final int depth ) { return indexingExecutorService.submit(() -> { reindexContent(workspace, path, depth); ...
java
public Future<Boolean> reindexContentAsync( final JcrWorkspace workspace, final Path path, final int depth ) { return indexingExecutorService.submit(() -> { reindexContent(workspace, path, depth); ...
[ "public", "Future", "<", "Boolean", ">", "reindexContentAsync", "(", "final", "JcrWorkspace", "workspace", ",", "final", "Path", "path", ",", "final", "int", "depth", ")", "{", "return", "indexingExecutorService", ".", "submit", "(", "(", ")", "->", "{", "re...
Asynchronously crawl and index the content starting at the supplied path in the named workspace, to the designated depth. @param workspace the workspace @param path the path of the content to be indexed @param depth the depth of the content to be indexed @return the future for the asynchronous operation; never null @t...
[ "Asynchronously", "crawl", "and", "index", "the", "content", "starting", "at", "the", "supplied", "path", "in", "the", "named", "workspace", "to", "the", "designated", "depth", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/RepositoryQueryManager.java#L766-L773
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/SystemNamespaceRegistry.java
SystemNamespaceRegistry.register
public void register( Map<String, String> namespaceUrisByPrefix ) { if (namespaceUrisByPrefix == null || namespaceUrisByPrefix.isEmpty()) return; final Lock lock = this.namespacesLock.writeLock(); try { lock.lock(); SystemContent systemContent = systemContent(false); ...
java
public void register( Map<String, String> namespaceUrisByPrefix ) { if (namespaceUrisByPrefix == null || namespaceUrisByPrefix.isEmpty()) return; final Lock lock = this.namespacesLock.writeLock(); try { lock.lock(); SystemContent systemContent = systemContent(false); ...
[ "public", "void", "register", "(", "Map", "<", "String", ",", "String", ">", "namespaceUrisByPrefix", ")", "{", "if", "(", "namespaceUrisByPrefix", "==", "null", "||", "namespaceUrisByPrefix", ".", "isEmpty", "(", ")", ")", "return", ";", "final", "Lock", "l...
Register a set of namespaces. @param namespaceUrisByPrefix the map of new namespace URIs by their prefix
[ "Register", "a", "set", "of", "namespaces", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/SystemNamespaceRegistry.java#L164-L181
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/cache/ReferrerCounts.java
ReferrerCounts.create
public static ReferrerCounts create( Map<NodeKey, Integer> strongCountsByReferrerKey, Map<NodeKey, Integer> weakCountsByReferrerKey ) { if (strongCountsByReferrerKey == null) strongCountsByReferrerKey = EMPTY_COUNTS; if (weakCountsByReferrerKey == null) weakCount...
java
public static ReferrerCounts create( Map<NodeKey, Integer> strongCountsByReferrerKey, Map<NodeKey, Integer> weakCountsByReferrerKey ) { if (strongCountsByReferrerKey == null) strongCountsByReferrerKey = EMPTY_COUNTS; if (weakCountsByReferrerKey == null) weakCount...
[ "public", "static", "ReferrerCounts", "create", "(", "Map", "<", "NodeKey", ",", "Integer", ">", "strongCountsByReferrerKey", ",", "Map", "<", "NodeKey", ",", "Integer", ">", "weakCountsByReferrerKey", ")", "{", "if", "(", "strongCountsByReferrerKey", "==", "null"...
Create a new instance of the snapshot. @param strongCountsByReferrerKey the map of weak reference counts keyed by referrer's node keys; may be null or empty @param weakCountsByReferrerKey the map of weak reference counts keyed by referrer's node keys; may be null or empty @return the counts snapshot; null if there are...
[ "Create", "a", "new", "instance", "of", "the", "snapshot", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/cache/ReferrerCounts.java#L42-L48
train
ModeShape/modeshape
sequencers/modeshape-sequencer-xsd/src/main/java/org/modeshape/sequencer/xsd/XsdReader.java
XsdReader.process
protected void process( XSDSchema schema, String encoding, long contentSize, Node rootNode ) throws Exception { assert schema != null; logger.debug("Target namespace: '{0}'", schema.getTargetNamespace()); rootNo...
java
protected void process( XSDSchema schema, String encoding, long contentSize, Node rootNode ) throws Exception { assert schema != null; logger.debug("Target namespace: '{0}'", schema.getTargetNamespace()); rootNo...
[ "protected", "void", "process", "(", "XSDSchema", "schema", ",", "String", "encoding", ",", "long", "contentSize", ",", "Node", "rootNode", ")", "throws", "Exception", "{", "assert", "schema", "!=", "null", ";", "logger", ".", "debug", "(", "\"Target namespace...
Read an XSDSchema instance and create the node hierarchy under the given root node. @param schema the schema object; may not be null @param encoding the encoding for the XSD; may be null if the encoding is not specified @param contentSize the size of the XML Schema Document content; may not be negative @param rootNode...
[ "Read", "an", "XSDSchema", "instance", "and", "create", "the", "node", "hierarchy", "under", "the", "given", "root", "node", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/sequencers/modeshape-sequencer-xsd/src/main/java/org/modeshape/sequencer/xsd/XsdReader.java#L180-L224
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/Connectors.java
Connectors.externalNodeRemoved
public void externalNodeRemoved( String externalNodeKey ) { if (this.snapshot.get().containsProjectionForExternalNode(externalNodeKey)) { // the external node was the root of a projection, so we need to remove that projection synchronized (this) { Snapshot current = this....
java
public void externalNodeRemoved( String externalNodeKey ) { if (this.snapshot.get().containsProjectionForExternalNode(externalNodeKey)) { // the external node was the root of a projection, so we need to remove that projection synchronized (this) { Snapshot current = this....
[ "public", "void", "externalNodeRemoved", "(", "String", "externalNodeKey", ")", "{", "if", "(", "this", ".", "snapshot", ".", "get", "(", ")", ".", "containsProjectionForExternalNode", "(", "externalNodeKey", ")", ")", "{", "// the external node was the root of a proj...
Signals that an external node with the given key has been removed. @param externalNodeKey a {@code non-null} String
[ "Signals", "that", "an", "external", "node", "with", "the", "given", "key", "has", "been", "removed", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/Connectors.java#L395-L406
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/Connectors.java
Connectors.internalNodeRemoved
public void internalNodeRemoved( String internalNodeKey ) { if (this.snapshot.get().containsProjectionForInternalNode(internalNodeKey)) { // identify all the projections which from this internal (aka. federated node) and remove them synchronized (this) { Snapshot current ...
java
public void internalNodeRemoved( String internalNodeKey ) { if (this.snapshot.get().containsProjectionForInternalNode(internalNodeKey)) { // identify all the projections which from this internal (aka. federated node) and remove them synchronized (this) { Snapshot current ...
[ "public", "void", "internalNodeRemoved", "(", "String", "internalNodeKey", ")", "{", "if", "(", "this", ".", "snapshot", ".", "get", "(", ")", ".", "containsProjectionForInternalNode", "(", "internalNodeKey", ")", ")", "{", "// identify all the projections which from ...
Signals that an internal node with the given key has been removed. @param internalNodeKey a {@code non-null} String
[ "Signals", "that", "an", "internal", "node", "with", "the", "given", "key", "has", "been", "removed", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/Connectors.java#L413-L431
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/Connectors.java
Connectors.getConnectorForSourceName
public Connector getConnectorForSourceName( String sourceName ) { assert sourceName != null; return this.snapshot.get().getConnectorWithSourceKey(NodeKey.keyForSourceName(sourceName)); }
java
public Connector getConnectorForSourceName( String sourceName ) { assert sourceName != null; return this.snapshot.get().getConnectorWithSourceKey(NodeKey.keyForSourceName(sourceName)); }
[ "public", "Connector", "getConnectorForSourceName", "(", "String", "sourceName", ")", "{", "assert", "sourceName", "!=", "null", ";", "return", "this", ".", "snapshot", ".", "get", "(", ")", ".", "getConnectorWithSourceKey", "(", "NodeKey", ".", "keyForSourceName"...
Returns a connector which was registered for the given source name. @param sourceName a {@code non-null} String; the name of a source @return either a {@link Connector} instance or {@code null}
[ "Returns", "a", "connector", "which", "was", "registered", "for", "the", "given", "source", "name", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/Connectors.java#L613-L616
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/Connectors.java
Connectors.getDocumentTranslator
public DocumentTranslator getDocumentTranslator() { if (translator == null) { // We don't want the connectors to use a translator that converts large strings to binary values that are // managed within ModeShape's binary store. Instead, all of the connector-created string property values...
java
public DocumentTranslator getDocumentTranslator() { if (translator == null) { // We don't want the connectors to use a translator that converts large strings to binary values that are // managed within ModeShape's binary store. Instead, all of the connector-created string property values...
[ "public", "DocumentTranslator", "getDocumentTranslator", "(", ")", "{", "if", "(", "translator", "==", "null", ")", "{", "// We don't want the connectors to use a translator that converts large strings to binary values that are", "// managed within ModeShape's binary store. Instead, all ...
Returns the repository's document translator. @return a {@link DocumentTranslator} instance.
[ "Returns", "the", "repository", "s", "document", "translator", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/Connectors.java#L632-L640
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/RepositoryStatistics.java
RepositoryStatistics.start
void start( ScheduledExecutorService service ) { if (rollupFuture.get() != null) { // already started ... return; } // Pre-populate the metrics (overwriting any existing history object) ... durations.put(DurationMetric.QUERY_EXECUTION_TIME, new DurationHistory(Ti...
java
void start( ScheduledExecutorService service ) { if (rollupFuture.get() != null) { // already started ... return; } // Pre-populate the metrics (overwriting any existing history object) ... durations.put(DurationMetric.QUERY_EXECUTION_TIME, new DurationHistory(Ti...
[ "void", "start", "(", "ScheduledExecutorService", "service", ")", "{", "if", "(", "rollupFuture", ".", "get", "(", ")", "!=", "null", ")", "{", "// already started ...", "return", ";", "}", "// Pre-populate the metrics (overwriting any existing history object) ...", "du...
Start recording statistics. @param service the executor service that should be used to capture the statistics; may not be null
[ "Start", "recording", "statistics", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/RepositoryStatistics.java#L155-L191
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/RepositoryStatistics.java
RepositoryStatistics.stop
void stop() { ScheduledFuture<?> future = this.rollupFuture.getAndSet(null); if (future != null && !future.isDone() && !future.isCancelled()) { // Stop running the scheduled job, letting any currently running rollup finish ... future.cancel(false); } }
java
void stop() { ScheduledFuture<?> future = this.rollupFuture.getAndSet(null); if (future != null && !future.isDone() && !future.isCancelled()) { // Stop running the scheduled job, letting any currently running rollup finish ... future.cancel(false); } }
[ "void", "stop", "(", ")", "{", "ScheduledFuture", "<", "?", ">", "future", "=", "this", ".", "rollupFuture", ".", "getAndSet", "(", "null", ")", ";", "if", "(", "future", "!=", "null", "&&", "!", "future", ".", "isDone", "(", ")", "&&", "!", "futur...
Stop recording statistics.
[ "Stop", "recording", "statistics", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/RepositoryStatistics.java#L196-L202
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/RepositoryStatistics.java
RepositoryStatistics.rollup
@SuppressWarnings( "fallthrough" ) private void rollup() { DateTime now = timeFactory.create(); Window largest = null; for (DurationHistory history : durations.values()) { largest = history.rollup(); } for (ValueHistory history : values.values()) { lar...
java
@SuppressWarnings( "fallthrough" ) private void rollup() { DateTime now = timeFactory.create(); Window largest = null; for (DurationHistory history : durations.values()) { largest = history.rollup(); } for (ValueHistory history : values.values()) { lar...
[ "@", "SuppressWarnings", "(", "\"fallthrough\"", ")", "private", "void", "rollup", "(", ")", "{", "DateTime", "now", "=", "timeFactory", ".", "create", "(", ")", ";", "Window", "largest", "=", "null", ";", "for", "(", "DurationHistory", "history", ":", "du...
Method called once every second by the scheduled job. @see #start(ScheduledExecutorService)
[ "Method", "called", "once", "every", "second", "by", "the", "scheduled", "job", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/RepositoryStatistics.java#L209-L238
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/RepositoryStatistics.java
RepositoryStatistics.increment
public void increment( ValueMetric metric, long incrementalValue ) { assert metric != null; ValueHistory history = values.get(metric); if (history != null) history.recordIncrement(incrementalValue); }
java
public void increment( ValueMetric metric, long incrementalValue ) { assert metric != null; ValueHistory history = values.get(metric); if (history != null) history.recordIncrement(incrementalValue); }
[ "public", "void", "increment", "(", "ValueMetric", "metric", ",", "long", "incrementalValue", ")", "{", "assert", "metric", "!=", "null", ";", "ValueHistory", "history", "=", "values", ".", "get", "(", "metric", ")", ";", "if", "(", "history", "!=", "null"...
Record an incremental change to a value, called by the code that knows when and how the metric changes. @param metric the metric; may not be null @param incrementalValue the positive or negative increment @see #increment(ValueMetric) @see #decrement(ValueMetric) @see #recordDuration(DurationMetric, long, TimeUnit, Map...
[ "Record", "an", "incremental", "change", "to", "a", "value", "called", "by", "the", "code", "that", "knows", "when", "and", "how", "the", "metric", "changes", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/RepositoryStatistics.java#L307-L312
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/RepositoryStatistics.java
RepositoryStatistics.set
public void set( ValueMetric metric, long value ) { assert metric != null; ValueHistory history = values.get(metric); if (history != null) history.recordNewValue(value); }
java
public void set( ValueMetric metric, long value ) { assert metric != null; ValueHistory history = values.get(metric); if (history != null) history.recordNewValue(value); }
[ "public", "void", "set", "(", "ValueMetric", "metric", ",", "long", "value", ")", "{", "assert", "metric", "!=", "null", ";", "ValueHistory", "history", "=", "values", ".", "get", "(", "metric", ")", ";", "if", "(", "history", "!=", "null", ")", "histo...
Record a specific value for a metric, called by the code that knows when and how the metric changes. @param metric the metric; may not be null @param value the value for the metric @see #increment(ValueMetric, long) @see #decrement(ValueMetric) @see #recordDuration(DurationMetric, long, TimeUnit, Map)
[ "Record", "a", "specific", "value", "for", "a", "metric", "called", "by", "the", "code", "that", "knows", "when", "and", "how", "the", "metric", "changes", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/RepositoryStatistics.java#L337-L342
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/RepositoryStatistics.java
RepositoryStatistics.recordDuration
void recordDuration( DurationMetric metric, long duration, TimeUnit timeUnit, Map<String, String> payload ) { assert metric != null; DurationHistory history = durations.get(metric); if (history != null) history.recordDura...
java
void recordDuration( DurationMetric metric, long duration, TimeUnit timeUnit, Map<String, String> payload ) { assert metric != null; DurationHistory history = durations.get(metric); if (history != null) history.recordDura...
[ "void", "recordDuration", "(", "DurationMetric", "metric", ",", "long", "duration", ",", "TimeUnit", "timeUnit", ",", "Map", "<", "String", ",", "String", ">", "payload", ")", "{", "assert", "metric", "!=", "null", ";", "DurationHistory", "history", "=", "du...
Record a new duration for the given metric, called by the code that knows about the duration. @param metric the metric; may not be null @param duration the duration @param timeUnit the time unit of the duration @param payload the payload; may be null or a lightweight representation of the activity described by the dur...
[ "Record", "a", "new", "duration", "for", "the", "given", "metric", "called", "by", "the", "code", "that", "knows", "about", "the", "duration", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/RepositoryStatistics.java#L369-L376
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/RepositoryStatistics.java
RepositoryStatistics.statisticsFor
public static Statistics statisticsFor( long[] values ) { int length = values.length; if (length == 0) return EMPTY_STATISTICS; if (length == 1) return statisticsFor(values[0]); long total = 0L; long max = Long.MIN_VALUE; long min = Long.MAX_VALUE; for (long value...
java
public static Statistics statisticsFor( long[] values ) { int length = values.length; if (length == 0) return EMPTY_STATISTICS; if (length == 1) return statisticsFor(values[0]); long total = 0L; long max = Long.MIN_VALUE; long min = Long.MAX_VALUE; for (long value...
[ "public", "static", "Statistics", "statisticsFor", "(", "long", "[", "]", "values", ")", "{", "int", "length", "=", "values", ".", "length", ";", "if", "(", "length", "==", "0", ")", "return", "EMPTY_STATISTICS", ";", "if", "(", "length", "==", "1", ")...
Utility method to construct the statistics for a series of values. @param values the values; the array reference may not be null but the array may be empty @return the core statistics; never null
[ "Utility", "method", "to", "construct", "the", "statistics", "for", "a", "series", "of", "values", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/RepositoryStatistics.java#L693-L713
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/RepositoryStatistics.java
RepositoryStatistics.statisticsFor
public static Statistics statisticsFor( Statistics[] statistics ) { int length = statistics.length; if (length == 0) return EMPTY_STATISTICS; if (length == 1) return statistics[0] != null ? statistics[0] : EMPTY_STATISTICS; int count = 0; long max = Long.MIN_VALUE; long m...
java
public static Statistics statisticsFor( Statistics[] statistics ) { int length = statistics.length; if (length == 0) return EMPTY_STATISTICS; if (length == 1) return statistics[0] != null ? statistics[0] : EMPTY_STATISTICS; int count = 0; long max = Long.MIN_VALUE; long m...
[ "public", "static", "Statistics", "statisticsFor", "(", "Statistics", "[", "]", "statistics", ")", "{", "int", "length", "=", "statistics", ".", "length", ";", "if", "(", "length", "==", "0", ")", "return", "EMPTY_STATISTICS", ";", "if", "(", "length", "==...
Utility method to construct the composite statistics for a series of sampled statistics. @param statistics the sample statistics that are to be combined; the array reference may not be null but the array may be empty @return the composite statistics; never null
[ "Utility", "method", "to", "construct", "the", "composite", "statistics", "for", "a", "series", "of", "sampled", "statistics", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/RepositoryStatistics.java#L722-L749
train
ModeShape/modeshape
web/modeshape-web-explorer/src/main/java/org/modeshape/web/client/grid/Pager.java
Pager.setRecordsAmount
public void setRecordsAmount(int amount) { int ipp = Integer.parseInt(itemsPerPageEditor.getValueAsString()); pageTotal = amount % ipp == 0? amount / ipp : amount / ipp + 1; draw(0); }
java
public void setRecordsAmount(int amount) { int ipp = Integer.parseInt(itemsPerPageEditor.getValueAsString()); pageTotal = amount % ipp == 0? amount / ipp : amount / ipp + 1; draw(0); }
[ "public", "void", "setRecordsAmount", "(", "int", "amount", ")", "{", "int", "ipp", "=", "Integer", ".", "parseInt", "(", "itemsPerPageEditor", ".", "getValueAsString", "(", ")", ")", ";", "pageTotal", "=", "amount", "%", "ipp", "==", "0", "?", "amount", ...
Assigns total number of records. @param amount
[ "Assigns", "total", "number", "of", "records", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/web/modeshape-web-explorer/src/main/java/org/modeshape/web/client/grid/Pager.java#L90-L94
train
ModeShape/modeshape
sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/DdlParsers.java
DdlParsers.parseUsing
public List<ParsingResult> parseUsing( final String ddl, final String firstParserId, final String secondParserId, final String... additionalParserIds ) throws ParsingException { Check...
java
public List<ParsingResult> parseUsing( final String ddl, final String firstParserId, final String secondParserId, final String... additionalParserIds ) throws ParsingException { Check...
[ "public", "List", "<", "ParsingResult", ">", "parseUsing", "(", "final", "String", "ddl", ",", "final", "String", "firstParserId", ",", "final", "String", "secondParserId", ",", "final", "String", "...", "additionalParserIds", ")", "throws", "ParsingException", "{...
Parse the supplied DDL using multiple parsers, returning the result of each parser with its score in the order of highest scoring to lowest scoring. @param ddl the DDL being parsed (cannot be <code>null</code> or empty) @param firstParserId the identifier of the first parser to use (cannot be <code>null</code> or empt...
[ "Parse", "the", "supplied", "DDL", "using", "multiple", "parsers", "returning", "the", "result", "of", "each", "parser", "with", "its", "score", "in", "the", "order", "of", "highest", "scoring", "to", "lowest", "scoring", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/DdlParsers.java#L183-L231
train
ModeShape/modeshape
web/modeshape-web-jcr-webdav/src/main/java/org/modeshape/web/jcr/webdav/ResolvedRequest.java
ResolvedRequest.withPath
public ResolvedRequest withPath( String path ) { assert repositoryName != null; assert workspaceName != null; return new ResolvedRequest(request, repositoryName, workspaceName, path); }
java
public ResolvedRequest withPath( String path ) { assert repositoryName != null; assert workspaceName != null; return new ResolvedRequest(request, repositoryName, workspaceName, path); }
[ "public", "ResolvedRequest", "withPath", "(", "String", "path", ")", "{", "assert", "repositoryName", "!=", "null", ";", "assert", "workspaceName", "!=", "null", ";", "return", "new", "ResolvedRequest", "(", "request", ",", "repositoryName", ",", "workspaceName", ...
Create a new request that is similar to this request except with the supplied path. This can only be done if the repository name and workspace name are non-null @param path the new path @return the new request; never null
[ "Create", "a", "new", "request", "that", "is", "similar", "to", "this", "request", "except", "with", "the", "supplied", "path", ".", "This", "can", "only", "be", "done", "if", "the", "repository", "name", "and", "workspace", "name", "are", "non", "-", "n...
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/web/modeshape-web-jcr-webdav/src/main/java/org/modeshape/web/jcr/webdav/ResolvedRequest.java#L84-L88
train
ModeShape/modeshape
connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/Properties.java
Properties.findJcrName
public String findJcrName( String cmisName ) { for (int i = 0; i < list.size(); i++) { if (list.get(i).cmisName != null && list.get(i).cmisName.equals(cmisName)) { return list.get(i).jcrName; } } return cmisName; }
java
public String findJcrName( String cmisName ) { for (int i = 0; i < list.size(); i++) { if (list.get(i).cmisName != null && list.get(i).cmisName.equals(cmisName)) { return list.get(i).jcrName; } } return cmisName; }
[ "public", "String", "findJcrName", "(", "String", "cmisName", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "list", ".", "size", "(", ")", ";", "i", "++", ")", "{", "if", "(", "list", ".", "get", "(", "i", ")", ".", "cmisName", "...
Determines the name of the given property from cmis domain in jcr domain. @param cmisName the name of property in cmis domain. @return the name of the same property in jcr domain.
[ "Determines", "the", "name", "of", "the", "given", "property", "from", "cmis", "domain", "in", "jcr", "domain", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/Properties.java#L82-L89
train
ModeShape/modeshape
connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/Properties.java
Properties.findCmisName
public String findCmisName( String jcrName ) { for (int i = 0; i < list.size(); i++) { if (list.get(i).jcrName != null && list.get(i).jcrName.equals(jcrName)) { return list.get(i).cmisName; } } return jcrName; }
java
public String findCmisName( String jcrName ) { for (int i = 0; i < list.size(); i++) { if (list.get(i).jcrName != null && list.get(i).jcrName.equals(jcrName)) { return list.get(i).cmisName; } } return jcrName; }
[ "public", "String", "findCmisName", "(", "String", "jcrName", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "list", ".", "size", "(", ")", ";", "i", "++", ")", "{", "if", "(", "list", ".", "get", "(", "i", ")", ".", "jcrName", "!...
Determines the name of the given property from jcr domain in cmis domain. @param jcrName the name of property in jcr domain. @return the name of the same property in cmis domain.
[ "Determines", "the", "name", "of", "the", "given", "property", "from", "jcr", "domain", "in", "cmis", "domain", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/Properties.java#L97-L104
train
ModeShape/modeshape
connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/Properties.java
Properties.getJcrType
public int getJcrType( PropertyType propertyType ) { switch (propertyType) { case BOOLEAN: return javax.jcr.PropertyType.BOOLEAN; case DATETIME: return javax.jcr.PropertyType.DATE; case DECIMAL: return javax.jcr.PropertyType.DEC...
java
public int getJcrType( PropertyType propertyType ) { switch (propertyType) { case BOOLEAN: return javax.jcr.PropertyType.BOOLEAN; case DATETIME: return javax.jcr.PropertyType.DATE; case DECIMAL: return javax.jcr.PropertyType.DEC...
[ "public", "int", "getJcrType", "(", "PropertyType", "propertyType", ")", "{", "switch", "(", "propertyType", ")", "{", "case", "BOOLEAN", ":", "return", "javax", ".", "jcr", ".", "PropertyType", ".", "BOOLEAN", ";", "case", "DATETIME", ":", "return", "javax"...
Converts type of property. @param propertyType the type of the property in cmis domain. @return the type of the property in jcr domain.
[ "Converts", "type", "of", "property", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/Properties.java#L112-L131
train
ModeShape/modeshape
connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/Properties.java
Properties.jcrValues
public Object[] jcrValues( Property<?> property ) { @SuppressWarnings( "unchecked" ) List<Object> values = (List<Object>)property.getValues(); // convert CMIS values to JCR values switch (property.getType()) { case STRING: return asStrings(values); ...
java
public Object[] jcrValues( Property<?> property ) { @SuppressWarnings( "unchecked" ) List<Object> values = (List<Object>)property.getValues(); // convert CMIS values to JCR values switch (property.getType()) { case STRING: return asStrings(values); ...
[ "public", "Object", "[", "]", "jcrValues", "(", "Property", "<", "?", ">", "property", ")", "{", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "List", "<", "Object", ">", "values", "=", "(", "List", "<", "Object", ">", ")", "property", ".", "getV...
Converts value of the property for the jcr domain. @param property property in cmis domain @return value of the given property in jcr domain.
[ "Converts", "value", "of", "the", "property", "for", "the", "jcr", "domain", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/Properties.java#L213-L238
train
ModeShape/modeshape
connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/Properties.java
Properties.asBooleans
private Boolean[] asBooleans( List<Object> values ) { ValueFactory<Boolean> factory = valueFactories.getBooleanFactory(); Boolean[] res = new Boolean[values.size()]; for (int i = 0; i < res.length; i++) { res[i] = factory.create(values.get(i)); } return res; }
java
private Boolean[] asBooleans( List<Object> values ) { ValueFactory<Boolean> factory = valueFactories.getBooleanFactory(); Boolean[] res = new Boolean[values.size()]; for (int i = 0; i < res.length; i++) { res[i] = factory.create(values.get(i)); } return res; }
[ "private", "Boolean", "[", "]", "asBooleans", "(", "List", "<", "Object", ">", "values", ")", "{", "ValueFactory", "<", "Boolean", ">", "factory", "=", "valueFactories", ".", "getBooleanFactory", "(", ")", ";", "Boolean", "[", "]", "res", "=", "new", "Bo...
Converts CMIS value of boolean type into JCR value of boolean type. @param values CMIS values of boolean type @return JCR values of boolean type
[ "Converts", "CMIS", "value", "of", "boolean", "type", "into", "JCR", "value", "of", "boolean", "type", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/Properties.java#L246-L253
train
ModeShape/modeshape
connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/Properties.java
Properties.asIntegers
private Long[] asIntegers( List<Object> values ) { ValueFactory<Long> factory = valueFactories.getLongFactory(); Long[] res = new Long[values.size()]; for (int i = 0; i < res.length; i++) { res[i] = factory.create(values.get(i)); } return res; }
java
private Long[] asIntegers( List<Object> values ) { ValueFactory<Long> factory = valueFactories.getLongFactory(); Long[] res = new Long[values.size()]; for (int i = 0; i < res.length; i++) { res[i] = factory.create(values.get(i)); } return res; }
[ "private", "Long", "[", "]", "asIntegers", "(", "List", "<", "Object", ">", "values", ")", "{", "ValueFactory", "<", "Long", ">", "factory", "=", "valueFactories", ".", "getLongFactory", "(", ")", ";", "Long", "[", "]", "res", "=", "new", "Long", "[", ...
Converts CMIS value of integer type into JCR value of boolean type. @param values CMIS values of integer type @return JCR values of integer type
[ "Converts", "CMIS", "value", "of", "integer", "type", "into", "JCR", "value", "of", "boolean", "type", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/Properties.java#L276-L283
train
ModeShape/modeshape
connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/Properties.java
Properties.asDecimals
private BigDecimal[] asDecimals( List<Object> values ) { ValueFactory<BigDecimal> factory = valueFactories.getDecimalFactory(); BigDecimal[] res = new BigDecimal[values.size()]; for (int i = 0; i < res.length; i++) { res[i] = factory.create(values.get(i)); } return re...
java
private BigDecimal[] asDecimals( List<Object> values ) { ValueFactory<BigDecimal> factory = valueFactories.getDecimalFactory(); BigDecimal[] res = new BigDecimal[values.size()]; for (int i = 0; i < res.length; i++) { res[i] = factory.create(values.get(i)); } return re...
[ "private", "BigDecimal", "[", "]", "asDecimals", "(", "List", "<", "Object", ">", "values", ")", "{", "ValueFactory", "<", "BigDecimal", ">", "factory", "=", "valueFactories", ".", "getDecimalFactory", "(", ")", ";", "BigDecimal", "[", "]", "res", "=", "ne...
Converts CMIS value of decimal type into JCR value of boolean type. @param values CMIS values of decimal type @return JCR values of decimal type
[ "Converts", "CMIS", "value", "of", "decimal", "type", "into", "JCR", "value", "of", "boolean", "type", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/Properties.java#L291-L298
train
ModeShape/modeshape
connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/Properties.java
Properties.asURI
private URI[] asURI( List<Object> values ) { ValueFactory<URI> factory = valueFactories.getUriFactory(); URI[] res = new URI[values.size()]; for (int i = 0; i < res.length; i++) { res[i] = factory.create(((GregorianCalendar)values.get(i)).getTime()); } return res; ...
java
private URI[] asURI( List<Object> values ) { ValueFactory<URI> factory = valueFactories.getUriFactory(); URI[] res = new URI[values.size()]; for (int i = 0; i < res.length; i++) { res[i] = factory.create(((GregorianCalendar)values.get(i)).getTime()); } return res; ...
[ "private", "URI", "[", "]", "asURI", "(", "List", "<", "Object", ">", "values", ")", "{", "ValueFactory", "<", "URI", ">", "factory", "=", "valueFactories", ".", "getUriFactory", "(", ")", ";", "URI", "[", "]", "res", "=", "new", "URI", "[", "values"...
Converts CMIS value of URI type into JCR value of URI type. @param values CMIS values of URI type @return JCR values of URI type
[ "Converts", "CMIS", "value", "of", "URI", "type", "into", "JCR", "value", "of", "URI", "type", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/Properties.java#L321-L328
train
ModeShape/modeshape
connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/Properties.java
Properties.asIDs
private String[] asIDs( List<Object> values ) { ValueFactory<String> factory = valueFactories.getStringFactory(); String[] res = new String[values.size()]; for (int i = 0; i < res.length; i++) { res[i] = factory.create(values.get(i)); } return res; }
java
private String[] asIDs( List<Object> values ) { ValueFactory<String> factory = valueFactories.getStringFactory(); String[] res = new String[values.size()]; for (int i = 0; i < res.length; i++) { res[i] = factory.create(values.get(i)); } return res; }
[ "private", "String", "[", "]", "asIDs", "(", "List", "<", "Object", ">", "values", ")", "{", "ValueFactory", "<", "String", ">", "factory", "=", "valueFactories", ".", "getStringFactory", "(", ")", ";", "String", "[", "]", "res", "=", "new", "String", ...
Converts CMIS value of ID type into JCR value of String type. @param values CMIS values of Id type @return JCR values of String type
[ "Converts", "CMIS", "value", "of", "ID", "type", "into", "JCR", "value", "of", "String", "type", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/Properties.java#L336-L343
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/Sequencers.java
Sequencers.workspaceAdded
protected void workspaceAdded( String workspaceName ) { String workspaceKey = NodeKey.keyForWorkspaceName(workspaceName); if (systemWorkspaceKey.equals(workspaceKey)) { // No sequencers for the system workspace! return; } Collection<SequencingConfiguration> config...
java
protected void workspaceAdded( String workspaceName ) { String workspaceKey = NodeKey.keyForWorkspaceName(workspaceName); if (systemWorkspaceKey.equals(workspaceKey)) { // No sequencers for the system workspace! return; } Collection<SequencingConfiguration> config...
[ "protected", "void", "workspaceAdded", "(", "String", "workspaceName", ")", "{", "String", "workspaceKey", "=", "NodeKey", ".", "keyForWorkspaceName", "(", "workspaceName", ")", ";", "if", "(", "systemWorkspaceKey", ".", "equals", "(", "workspaceKey", ")", ")", ...
Signal that a new workspace was added. @param workspaceName the workspace name; may not be null
[ "Signal", "that", "a", "new", "workspace", "was", "added", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/Sequencers.java#L272-L307
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/Sequencers.java
Sequencers.workspaceRemoved
protected void workspaceRemoved( String workspaceName ) { // Otherwise, update the configs by workspace key ... try { configChangeLock.lock(); // Make a copy of the existing map ... Map<String, Collection<SequencingConfiguration>> configByWorkspaceName = new HashMap<S...
java
protected void workspaceRemoved( String workspaceName ) { // Otherwise, update the configs by workspace key ... try { configChangeLock.lock(); // Make a copy of the existing map ... Map<String, Collection<SequencingConfiguration>> configByWorkspaceName = new HashMap<S...
[ "protected", "void", "workspaceRemoved", "(", "String", "workspaceName", ")", "{", "// Otherwise, update the configs by workspace key ...", "try", "{", "configChangeLock", ".", "lock", "(", ")", ";", "// Make a copy of the existing map ...", "Map", "<", "String", ",", "Co...
Signal that a new workspace was removed. @param workspaceName the workspace name; may not be null
[ "Signal", "that", "a", "new", "workspace", "was", "removed", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/Sequencers.java#L314-L329
train
ModeShape/modeshape
modeshape-common/src/main/java/org/modeshape/common/naming/SingletonInitialContext.java
SingletonInitialContext.register
public static void register( String name, Object obj ) { register(name, obj, null, null, null, null); }
java
public static void register( String name, Object obj ) { register(name, obj, null, null, null, null); }
[ "public", "static", "void", "register", "(", "String", "name", ",", "Object", "obj", ")", "{", "register", "(", "name", ",", "obj", ",", "null", ",", "null", ",", "null", ",", "null", ")", ";", "}" ]
A convenience method that registers the supplied object with the supplied name. @param name the JNDI name @param obj the object to be registered
[ "A", "convenience", "method", "that", "registers", "the", "supplied", "object", "with", "the", "supplied", "name", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-common/src/main/java/org/modeshape/common/naming/SingletonInitialContext.java#L68-L71
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/cache/change/AbstractNodeChange.java
AbstractNodeChange.getMixinTypes
public Set<Name> getMixinTypes() { if (types.length == 1) { return Collections.emptySet(); } return new HashSet<Name>(Arrays.asList(Arrays.copyOfRange(types, 1, types.length))); }
java
public Set<Name> getMixinTypes() { if (types.length == 1) { return Collections.emptySet(); } return new HashSet<Name>(Arrays.asList(Arrays.copyOfRange(types, 1, types.length))); }
[ "public", "Set", "<", "Name", ">", "getMixinTypes", "(", ")", "{", "if", "(", "types", ".", "length", "==", "1", ")", "{", "return", "Collections", ".", "emptySet", "(", ")", ";", "}", "return", "new", "HashSet", "<", "Name", ">", "(", "Arrays", "....
Returns the mixins for this node. @return a {@link Set}; never {@code null} but possibly empty.
[ "Returns", "the", "mixins", "for", "this", "node", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/cache/change/AbstractNodeChange.java#L91-L96
train
ModeShape/modeshape
sequencers/modeshape-sequencer-java/src/main/java/org/modeshape/sequencer/javafile/metadata/AbstractMetadata.java
AbstractMetadata.hasModifierNamed
private boolean hasModifierNamed( String modifierName ) { for (ModifierMetadata modifier : modifiers) { if (modifierName.equalsIgnoreCase(modifier.getName())) { return true; } } return false; }
java
private boolean hasModifierNamed( String modifierName ) { for (ModifierMetadata modifier : modifiers) { if (modifierName.equalsIgnoreCase(modifier.getName())) { return true; } } return false; }
[ "private", "boolean", "hasModifierNamed", "(", "String", "modifierName", ")", "{", "for", "(", "ModifierMetadata", "modifier", ":", "modifiers", ")", "{", "if", "(", "modifierName", ".", "equalsIgnoreCase", "(", "modifier", ".", "getName", "(", ")", ")", ")", ...
Checks if a modifier with the given name is found among this method's identifiers. @param modifierName the name of the modifier to check for @return true if the type has a modifier of that name, otherwise false
[ "Checks", "if", "a", "modifier", "with", "the", "given", "name", "is", "found", "among", "this", "method", "s", "identifiers", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/sequencers/modeshape-sequencer-java/src/main/java/org/modeshape/sequencer/javafile/metadata/AbstractMetadata.java#L113-L122
train
ModeShape/modeshape
modeshape-common/src/main/java/org/modeshape/common/statistic/DetailedStatistics.java
DetailedStatistics.getMedianValue
public double getMedianValue() { Lock lock = this.getLock().writeLock(); try { lock.lock(); int count = this.values.size(); if (count == 0) { return 0.0d; } if (this.medianValue == null) { // Sort the values in n...
java
public double getMedianValue() { Lock lock = this.getLock().writeLock(); try { lock.lock(); int count = this.values.size(); if (count == 0) { return 0.0d; } if (this.medianValue == null) { // Sort the values in n...
[ "public", "double", "getMedianValue", "(", ")", "{", "Lock", "lock", "=", "this", ".", "getLock", "(", ")", ".", "writeLock", "(", ")", ";", "try", "{", "lock", ".", "lock", "(", ")", ";", "int", "count", "=", "this", ".", "values", ".", "size", ...
Return the median value. @return the median value, or 0.0 if the {@link #getCount() count} is 0 @see #getMedian()
[ "Return", "the", "median", "value", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-common/src/main/java/org/modeshape/common/statistic/DetailedStatistics.java#L129-L165
train
ModeShape/modeshape
modeshape-common/src/main/java/org/modeshape/common/statistic/DetailedStatistics.java
DetailedStatistics.getStandardDeviation
public double getStandardDeviation() { Lock lock = this.getLock().readLock(); lock.lock(); try { return this.sigma; } finally { lock.unlock(); } }
java
public double getStandardDeviation() { Lock lock = this.getLock().readLock(); lock.lock(); try { return this.sigma; } finally { lock.unlock(); } }
[ "public", "double", "getStandardDeviation", "(", ")", "{", "Lock", "lock", "=", "this", ".", "getLock", "(", ")", ".", "readLock", "(", ")", ";", "lock", ".", "lock", "(", ")", ";", "try", "{", "return", "this", ".", "sigma", ";", "}", "finally", "...
Return the standard deviation. The standard deviation is a measure of the variation in a series of values. Values with a lower standard deviation has less variance in the values than a series of values with a higher standard deviation. @return the standard deviation, or 0.0 if the {@link #getCount() count} is 0 or if a...
[ "Return", "the", "standard", "deviation", ".", "The", "standard", "deviation", "is", "a", "measure", "of", "the", "variation", "in", "a", "series", "of", "values", ".", "Values", "with", "a", "lower", "standard", "deviation", "has", "less", "variance", "in",...
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-common/src/main/java/org/modeshape/common/statistic/DetailedStatistics.java#L172-L180
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/BackupService.java
BackupService.backupRepository
public org.modeshape.jcr.api.Problems backupRepository( File backupDirectory, BackupOptions options ) throws RepositoryException { // Create the activity ... final BackupActivity backupActivity = createBackupActivity(backupDirectory, options); //suspend any existing transactions try { ...
java
public org.modeshape.jcr.api.Problems backupRepository( File backupDirectory, BackupOptions options ) throws RepositoryException { // Create the activity ... final BackupActivity backupActivity = createBackupActivity(backupDirectory, options); //suspend any existing transactions try { ...
[ "public", "org", ".", "modeshape", ".", "jcr", ".", "api", ".", "Problems", "backupRepository", "(", "File", "backupDirectory", ",", "BackupOptions", "options", ")", "throws", "RepositoryException", "{", "// Create the activity ...", "final", "BackupActivity", "backup...
Start backing up the repository. @param backupDirectory the directory on the file system into which the backup should be placed; this directory should typically not exist @param options a {@link org.modeshape.jcr.api.BackupOptions} instance controlling the behavior of the backup; may not be {@code null} @return the pr...
[ "Start", "backing", "up", "the", "repository", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/BackupService.java#L118-L136
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/BackupService.java
BackupService.restoreRepository
public org.modeshape.jcr.api.Problems restoreRepository( final JcrRepository repository, final File backupDirectory, final RestoreOptions options) throws RepositoryException { final String b...
java
public org.modeshape.jcr.api.Problems restoreRepository( final JcrRepository repository, final File backupDirectory, final RestoreOptions options) throws RepositoryException { final String b...
[ "public", "org", ".", "modeshape", ".", "jcr", ".", "api", ".", "Problems", "restoreRepository", "(", "final", "JcrRepository", "repository", ",", "final", "File", "backupDirectory", ",", "final", "RestoreOptions", "options", ")", "throws", "RepositoryException", ...
Start asynchronously backing up the repository. @param repository the JCR repository to be backed up; may not be null @param backupDirectory the directory on the file system that contains the backup; this directory obviously must exist @param options a {@link org.modeshape.jcr.api.RestoreOptions} instance which contro...
[ "Start", "asynchronously", "backing", "up", "the", "repository", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/BackupService.java#L147-L182
train
ModeShape/modeshape
extractors/modeshape-extractor-tika/src/main/java/org/modeshape/extractor/tika/TikaTextExtractor.java
TikaTextExtractor.prepareMetadata
protected final Metadata prepareMetadata( final Binary binary, final Context context ) throws IOException, RepositoryException { Metadata metadata = new Metadata(); String mimeType = binary.getMimeType(); if (StringUtil.isBlank(mimeType)) { ...
java
protected final Metadata prepareMetadata( final Binary binary, final Context context ) throws IOException, RepositoryException { Metadata metadata = new Metadata(); String mimeType = binary.getMimeType(); if (StringUtil.isBlank(mimeType)) { ...
[ "protected", "final", "Metadata", "prepareMetadata", "(", "final", "Binary", "binary", ",", "final", "Context", "context", ")", "throws", "IOException", ",", "RepositoryException", "{", "Metadata", "metadata", "=", "new", "Metadata", "(", ")", ";", "String", "mi...
Creates a new tika metadata object used by the parser. This will contain the mime-type of the content being parsed, if this is available to the underlying context. If not, Tika's autodetection mechanism is used to try and get the mime-type. @param binary a <code>org.modeshape.jcr.api.Binary</code> instance of the cont...
[ "Creates", "a", "new", "tika", "metadata", "object", "used", "by", "the", "parser", ".", "This", "will", "contain", "the", "mime", "-", "type", "of", "the", "content", "being", "parsed", "if", "this", "is", "available", "to", "the", "underlying", "context"...
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/extractors/modeshape-extractor-tika/src/main/java/org/modeshape/extractor/tika/TikaTextExtractor.java#L170-L183
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/value/binary/MongodbBinaryStore.java
MongodbBinaryStore.convertToServerAddresses
private List<ServerAddress> convertToServerAddresses(Set<String> addresses) { return addresses.stream() .map(this::stringToServerAddress) .filter(Objects::nonNull) .collect(Collectors.toList()); }
java
private List<ServerAddress> convertToServerAddresses(Set<String> addresses) { return addresses.stream() .map(this::stringToServerAddress) .filter(Objects::nonNull) .collect(Collectors.toList()); }
[ "private", "List", "<", "ServerAddress", ">", "convertToServerAddresses", "(", "Set", "<", "String", ">", "addresses", ")", "{", "return", "addresses", ".", "stream", "(", ")", ".", "map", "(", "this", "::", "stringToServerAddress", ")", ".", "filter", "(", ...
Converts list of addresses specified in text format to mongodb specific address. @param addresses list of addresses in text format @return list of mongodb addresses @throws IllegalArgumentException if address has bad format or is not valid
[ "Converts", "list", "of", "addresses", "specified", "in", "text", "format", "to", "mongodb", "specific", "address", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/value/binary/MongodbBinaryStore.java#L132-L137
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/value/binary/MongodbBinaryStore.java
MongodbBinaryStore.setAttribute
private void setAttribute( DBCollection content, String fieldName, Object value ) { DBObject header = content.findOne(HEADER_QUERY); BasicDBObject newHeader = new BasicDBObject(); // clone header newHeader.put(FIELD_CHUNK_TYP...
java
private void setAttribute( DBCollection content, String fieldName, Object value ) { DBObject header = content.findOne(HEADER_QUERY); BasicDBObject newHeader = new BasicDBObject(); // clone header newHeader.put(FIELD_CHUNK_TYP...
[ "private", "void", "setAttribute", "(", "DBCollection", "content", ",", "String", "fieldName", ",", "Object", "value", ")", "{", "DBObject", "header", "=", "content", ".", "findOne", "(", "HEADER_QUERY", ")", ";", "BasicDBObject", "newHeader", "=", "new", "Bas...
Modifies content header. @param content stored content @param fieldName attribute name @param value new value for the attribute
[ "Modifies", "content", "header", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/value/binary/MongodbBinaryStore.java#L361-L377
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/value/binary/MongodbBinaryStore.java
MongodbBinaryStore.getAttribute
private Object getAttribute( DBCollection content, String fieldName ) { return content.findOne(HEADER_QUERY).get(fieldName); }
java
private Object getAttribute( DBCollection content, String fieldName ) { return content.findOne(HEADER_QUERY).get(fieldName); }
[ "private", "Object", "getAttribute", "(", "DBCollection", "content", ",", "String", "fieldName", ")", "{", "return", "content", ".", "findOne", "(", "HEADER_QUERY", ")", ".", "get", "(", "fieldName", ")", ";", "}" ]
Gets attribute's value. @param content stored content @param fieldName attribute name @return attributes value
[ "Gets", "attribute", "s", "value", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/value/binary/MongodbBinaryStore.java#L386-L389
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/value/binary/MongodbBinaryStore.java
MongodbBinaryStore.isExpired
private boolean isExpired( DBCollection content, long deadline ) { Long unusedSince = (Long)getAttribute(content, FIELD_UNUSED_SINCE); return unusedSince != null && unusedSince < deadline; }
java
private boolean isExpired( DBCollection content, long deadline ) { Long unusedSince = (Long)getAttribute(content, FIELD_UNUSED_SINCE); return unusedSince != null && unusedSince < deadline; }
[ "private", "boolean", "isExpired", "(", "DBCollection", "content", ",", "long", "deadline", ")", "{", "Long", "unusedSince", "=", "(", "Long", ")", "getAttribute", "(", "content", ",", "FIELD_UNUSED_SINCE", ")", ";", "return", "unusedSince", "!=", "null", "&&"...
Checks status of unused content. @param content content to check status @param deadline moment of time in past @return true if content is marked as unused before the deadline
[ "Checks", "status", "of", "unused", "content", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/value/binary/MongodbBinaryStore.java#L398-L402
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/query/optimize/PushSelectCriteria.java
PushSelectCriteria.pushDownJoinCriteria
protected boolean pushDownJoinCriteria( PlanNode criteriaNode, PlanNode joinNode ) { JoinType joinType = (JoinType)joinNode.getProperty(Property.JOIN_TYPE); switch (joinType) { case CROSS: joinNode.setProperty(Property.JOIN_TYPE, J...
java
protected boolean pushDownJoinCriteria( PlanNode criteriaNode, PlanNode joinNode ) { JoinType joinType = (JoinType)joinNode.getProperty(Property.JOIN_TYPE); switch (joinType) { case CROSS: joinNode.setProperty(Property.JOIN_TYPE, J...
[ "protected", "boolean", "pushDownJoinCriteria", "(", "PlanNode", "criteriaNode", ",", "PlanNode", "joinNode", ")", "{", "JoinType", "joinType", "=", "(", "JoinType", ")", "joinNode", ".", "getProperty", "(", "Property", ".", "JOIN_TYPE", ")", ";", "switch", "(",...
Attempt to push down criteria that applies to the JOIN as additional constraints on the JOIN itself. @param criteriaNode the SELECT node; may not be null @param joinNode the JOIN node; may not be null @return true if the criteria was pushed down, or false otherwise
[ "Attempt", "to", "push", "down", "criteria", "that", "applies", "to", "the", "JOIN", "as", "additional", "constraints", "on", "the", "JOIN", "itself", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/query/optimize/PushSelectCriteria.java#L223-L244
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/query/optimize/PushSelectCriteria.java
PushSelectCriteria.moveCriteriaIntoOnClause
private void moveCriteriaIntoOnClause( PlanNode criteriaNode, PlanNode joinNode ) { List<Constraint> constraints = joinNode.getPropertyAsList(Property.JOIN_CONSTRAINTS, Constraint.class); Constraint criteria = criteriaNode.getProperty(Property.SELECT_CRITERIA, ...
java
private void moveCriteriaIntoOnClause( PlanNode criteriaNode, PlanNode joinNode ) { List<Constraint> constraints = joinNode.getPropertyAsList(Property.JOIN_CONSTRAINTS, Constraint.class); Constraint criteria = criteriaNode.getProperty(Property.SELECT_CRITERIA, ...
[ "private", "void", "moveCriteriaIntoOnClause", "(", "PlanNode", "criteriaNode", ",", "PlanNode", "joinNode", ")", "{", "List", "<", "Constraint", ">", "constraints", "=", "joinNode", ".", "getPropertyAsList", "(", "Property", ".", "JOIN_CONSTRAINTS", ",", "Constrain...
Move the criteria that applies to the join to be included in the actual join criteria. @param criteriaNode the SELECT node; may not be null @param joinNode the JOIN node; may not be null
[ "Move", "the", "criteria", "that", "applies", "to", "the", "join", "to", "be", "included", "in", "the", "actual", "join", "criteria", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/query/optimize/PushSelectCriteria.java#L252-L270
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/spi/federation/Connector.java
Connector.moveExtraProperties
protected void moveExtraProperties( String oldNodeId, String newNodeId ) { ExtraPropertiesStore extraPropertiesStore = extraPropertiesStore(); if (extraPropertiesStore == null || !extraPropertiesStore.contains(oldNodeId)) { return; } Ma...
java
protected void moveExtraProperties( String oldNodeId, String newNodeId ) { ExtraPropertiesStore extraPropertiesStore = extraPropertiesStore(); if (extraPropertiesStore == null || !extraPropertiesStore.contains(oldNodeId)) { return; } Ma...
[ "protected", "void", "moveExtraProperties", "(", "String", "oldNodeId", ",", "String", "newNodeId", ")", "{", "ExtraPropertiesStore", "extraPropertiesStore", "=", "extraPropertiesStore", "(", ")", ";", "if", "(", "extraPropertiesStore", "==", "null", "||", "!", "ext...
Moves a set of extra properties from an old to a new node after their IDs have changed. @param oldNodeId the old identifier for the node; may not be null @param newNodeId the new identifier for the node; may not be null
[ "Moves", "a", "set", "of", "extra", "properties", "from", "an", "old", "to", "a", "new", "node", "after", "their", "IDs", "have", "changed", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/spi/federation/Connector.java#L298-L307
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/spi/federation/Connector.java
Connector.checkFieldNotNull
protected void checkFieldNotNull( Object fieldValue, String fieldName ) throws RepositoryException { if (fieldValue == null) { throw new RepositoryException(JcrI18n.requiredFieldNotSetInConnector.text(getSourceName(), getClass(), fieldName)); } }
java
protected void checkFieldNotNull( Object fieldValue, String fieldName ) throws RepositoryException { if (fieldValue == null) { throw new RepositoryException(JcrI18n.requiredFieldNotSetInConnector.text(getSourceName(), getClass(), fieldName)); } }
[ "protected", "void", "checkFieldNotNull", "(", "Object", "fieldValue", ",", "String", "fieldName", ")", "throws", "RepositoryException", "{", "if", "(", "fieldValue", "==", "null", ")", "{", "throw", "new", "RepositoryException", "(", "JcrI18n", ".", "requiredFiel...
Utility method that checks whether the field with the supplied name is set. @param fieldValue the value of the field @param fieldName the name of the field @throws RepositoryException if the field value is null
[ "Utility", "method", "that", "checks", "whether", "the", "field", "with", "the", "supplied", "name", "is", "set", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/spi/federation/Connector.java#L515-L520
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/query/optimize/RuleBasedOptimizer.java
RuleBasedOptimizer.populateRuleStack
protected void populateRuleStack( LinkedList<OptimizerRule> ruleStack, PlanHints hints ) { ruleStack.addFirst(ReorderSortAndRemoveDuplicates.INSTANCE); ruleStack.addFirst(RewritePathAndNameCriteria.INSTANCE); if (hints.hasSubqueries) { ruleStack....
java
protected void populateRuleStack( LinkedList<OptimizerRule> ruleStack, PlanHints hints ) { ruleStack.addFirst(ReorderSortAndRemoveDuplicates.INSTANCE); ruleStack.addFirst(RewritePathAndNameCriteria.INSTANCE); if (hints.hasSubqueries) { ruleStack....
[ "protected", "void", "populateRuleStack", "(", "LinkedList", "<", "OptimizerRule", ">", "ruleStack", ",", "PlanHints", "hints", ")", "{", "ruleStack", ".", "addFirst", "(", "ReorderSortAndRemoveDuplicates", ".", "INSTANCE", ")", ";", "ruleStack", ".", "addFirst", ...
Method that is used to create the initial rule stack. This method can be overridden by subclasses @param ruleStack the stack where the rules should be placed; never null @param hints the plan hints
[ "Method", "that", "is", "used", "to", "create", "the", "initial", "rule", "stack", ".", "This", "method", "can", "be", "overridden", "by", "subclasses" ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/query/optimize/RuleBasedOptimizer.java#L59-L86
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/NodeTypeSchemata.java
NodeTypeSchemata.getSchemataForSession
public Schemata getSchemataForSession( JcrSession session ) { assert session != null; // If the session does not override any namespace mappings used in this schemata ... if (!overridesNamespaceMappings(session)) { // Then we can just use this schemata instance ... return...
java
public Schemata getSchemataForSession( JcrSession session ) { assert session != null; // If the session does not override any namespace mappings used in this schemata ... if (!overridesNamespaceMappings(session)) { // Then we can just use this schemata instance ... return...
[ "public", "Schemata", "getSchemataForSession", "(", "JcrSession", "session", ")", "{", "assert", "session", "!=", "null", ";", "// If the session does not override any namespace mappings used in this schemata ...", "if", "(", "!", "overridesNamespaceMappings", "(", "session", ...
Get a schemata instance that works with the supplied session and that uses the session-specific namespace mappings. Note that the resulting instance does not change as the session's namespace mappings are changed, so when that happens the JcrSession must call this method again to obtain a new schemata. @param session ...
[ "Get", "a", "schemata", "instance", "that", "works", "with", "the", "supplied", "session", "and", "that", "uses", "the", "session", "-", "specific", "namespace", "mappings", ".", "Note", "that", "the", "resulting", "instance", "does", "not", "change", "as", ...
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/NodeTypeSchemata.java#L372-L382
train
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/NodeTypeSchemata.java
NodeTypeSchemata.overridesNamespaceMappings
private boolean overridesNamespaceMappings( JcrSession session ) { NamespaceRegistry registry = session.context().getNamespaceRegistry(); if (registry instanceof LocalNamespaceRegistry) { Set<Namespace> localNamespaces = ((LocalNamespaceRegistry)registry).getLocalNamespaces(); if...
java
private boolean overridesNamespaceMappings( JcrSession session ) { NamespaceRegistry registry = session.context().getNamespaceRegistry(); if (registry instanceof LocalNamespaceRegistry) { Set<Namespace> localNamespaces = ((LocalNamespaceRegistry)registry).getLocalNamespaces(); if...
[ "private", "boolean", "overridesNamespaceMappings", "(", "JcrSession", "session", ")", "{", "NamespaceRegistry", "registry", "=", "session", ".", "context", "(", ")", ".", "getNamespaceRegistry", "(", ")", ";", "if", "(", "registry", "instanceof", "LocalNamespaceReg...
Determine if the session overrides any namespace mappings used by this schemata. @param session the session; may not be null @return true if the session overrides one or more namespace mappings used in this schemata, or false otherwise
[ "Determine", "if", "the", "session", "overrides", "any", "namespace", "mappings", "used", "by", "this", "schemata", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/NodeTypeSchemata.java#L390-L414
train
ModeShape/modeshape
modeshape-schematic/src/main/java/org/modeshape/schematic/internal/document/BasicArray.java
BasicArray.removeValues
private List<Entry> removeValues( Collection<?> values, boolean ifMatch ) { LinkedList<Entry> results = null; // Record the list of entries that are removed, but start at the end of the values (so the indexes are correct) ListIterator<?> iter = this.values....
java
private List<Entry> removeValues( Collection<?> values, boolean ifMatch ) { LinkedList<Entry> results = null; // Record the list of entries that are removed, but start at the end of the values (so the indexes are correct) ListIterator<?> iter = this.values....
[ "private", "List", "<", "Entry", ">", "removeValues", "(", "Collection", "<", "?", ">", "values", ",", "boolean", "ifMatch", ")", "{", "LinkedList", "<", "Entry", ">", "results", "=", "null", ";", "// Record the list of entries that are removed, but start at the end...
Remove some of the values in this array. @param values the values to be compared to this array's values @param ifMatch true if this method should retain all values that match the supplied values, or false if this method should remove all values that match the supplied values @return the entries that were removed; neve...
[ "Remove", "some", "of", "the", "values", "in", "this", "array", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-schematic/src/main/java/org/modeshape/schematic/internal/document/BasicArray.java#L721-L740
train
ModeShape/modeshape
connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/CmisConnector.java
CmisConnector.isExistCmisObject
private boolean isExistCmisObject(String path) { try { session.getObjectByPath(path); return true; } catch (CmisObjectNotFoundException e) { return false; } }
java
private boolean isExistCmisObject(String path) { try { session.getObjectByPath(path); return true; } catch (CmisObjectNotFoundException e) { return false; } }
[ "private", "boolean", "isExistCmisObject", "(", "String", "path", ")", "{", "try", "{", "session", ".", "getObjectByPath", "(", "path", ")", ";", "return", "true", ";", "}", "catch", "(", "CmisObjectNotFoundException", "e", ")", "{", "return", "false", ";", ...
Utility method for checking if CMIS object exists at defined path @param path path for object @return <code>true</code> if exists, <code>false</code> otherwise
[ "Utility", "method", "for", "checking", "if", "CMIS", "object", "exists", "at", "defined", "path" ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/CmisConnector.java#L629-L637
train
ModeShape/modeshape
connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/CmisConnector.java
CmisConnector.rename
private void rename(CmisObject object, String name){ Map<String, Object> newName = new HashMap<String, Object>(); newName.put("cmis:name", name); object.updateProperties(newName); }
java
private void rename(CmisObject object, String name){ Map<String, Object> newName = new HashMap<String, Object>(); newName.put("cmis:name", name); object.updateProperties(newName); }
[ "private", "void", "rename", "(", "CmisObject", "object", ",", "String", "name", ")", "{", "Map", "<", "String", ",", "Object", ">", "newName", "=", "new", "HashMap", "<", "String", ",", "Object", ">", "(", ")", ";", "newName", ".", "put", "(", "\"cm...
Utility method for renaming CMIS object @param object CMIS object to rename @param name new name
[ "Utility", "method", "for", "renaming", "CMIS", "object" ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/CmisConnector.java#L644-L649
train
ModeShape/modeshape
connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/CmisConnector.java
CmisConnector.cmisObject
private Document cmisObject( String id ) { CmisObject cmisObject; try { cmisObject = session.getObject(id); } catch (CmisObjectNotFoundException e) { return null; } // object does not exist? return null if (cmisObject == null) { ret...
java
private Document cmisObject( String id ) { CmisObject cmisObject; try { cmisObject = session.getObject(id); } catch (CmisObjectNotFoundException e) { return null; } // object does not exist? return null if (cmisObject == null) { ret...
[ "private", "Document", "cmisObject", "(", "String", "id", ")", "{", "CmisObject", "cmisObject", ";", "try", "{", "cmisObject", "=", "session", ".", "getObject", "(", "id", ")", ";", "}", "catch", "(", "CmisObjectNotFoundException", "e", ")", "{", "return", ...
Converts CMIS object to JCR node. @param id the identifier of the CMIS object @return JCR node document.
[ "Converts", "CMIS", "object", "to", "JCR", "node", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/CmisConnector.java#L711-L738
train
ModeShape/modeshape
connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/CmisConnector.java
CmisConnector.cmisFolder
private Document cmisFolder( CmisObject cmisObject ) { Folder folder = (Folder)cmisObject; DocumentWriter writer = newDocument(ObjectId.toString(ObjectId.Type.OBJECT, folder.getId())); ObjectType objectType = cmisObject.getType(); if (objectType.isBaseType()) { writer.setPri...
java
private Document cmisFolder( CmisObject cmisObject ) { Folder folder = (Folder)cmisObject; DocumentWriter writer = newDocument(ObjectId.toString(ObjectId.Type.OBJECT, folder.getId())); ObjectType objectType = cmisObject.getType(); if (objectType.isBaseType()) { writer.setPri...
[ "private", "Document", "cmisFolder", "(", "CmisObject", "cmisObject", ")", "{", "Folder", "folder", "=", "(", "Folder", ")", "cmisObject", ";", "DocumentWriter", "writer", "=", "newDocument", "(", "ObjectId", ".", "toString", "(", "ObjectId", ".", "Type", ".",...
Translates CMIS folder object to JCR node @param cmisObject CMIS folder object @return JCR node document.
[ "Translates", "CMIS", "folder", "object", "to", "JCR", "node" ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/CmisConnector.java#L746-L772
train
ModeShape/modeshape
connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/CmisConnector.java
CmisConnector.cmisDocument
public Document cmisDocument( CmisObject cmisObject ) { org.apache.chemistry.opencmis.client.api.Document doc = (org.apache.chemistry.opencmis.client.api.Document)cmisObject; DocumentWriter writer = newDocument(ObjectId.toString(ObjectId.Type.OBJECT, doc.getId())); ObjectType objectType = cmisO...
java
public Document cmisDocument( CmisObject cmisObject ) { org.apache.chemistry.opencmis.client.api.Document doc = (org.apache.chemistry.opencmis.client.api.Document)cmisObject; DocumentWriter writer = newDocument(ObjectId.toString(ObjectId.Type.OBJECT, doc.getId())); ObjectType objectType = cmisO...
[ "public", "Document", "cmisDocument", "(", "CmisObject", "cmisObject", ")", "{", "org", ".", "apache", ".", "chemistry", ".", "opencmis", ".", "client", ".", "api", ".", "Document", "doc", "=", "(", "org", ".", "apache", ".", "chemistry", ".", "opencmis", ...
Translates cmis document object to JCR node. @param cmisObject cmis document node @return JCR node document.
[ "Translates", "cmis", "document", "object", "to", "JCR", "node", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/CmisConnector.java#L780-L809
train
ModeShape/modeshape
connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/CmisConnector.java
CmisConnector.cmisContent
private Document cmisContent( String id ) { DocumentWriter writer = newDocument(ObjectId.toString(ObjectId.Type.CONTENT, id)); org.apache.chemistry.opencmis.client.api.Document doc = (org.apache.chemistry.opencmis.client.api.Document)session.getObject(id); writer.setPrimaryType(NodeType.NT_RESO...
java
private Document cmisContent( String id ) { DocumentWriter writer = newDocument(ObjectId.toString(ObjectId.Type.CONTENT, id)); org.apache.chemistry.opencmis.client.api.Document doc = (org.apache.chemistry.opencmis.client.api.Document)session.getObject(id); writer.setPrimaryType(NodeType.NT_RESO...
[ "private", "Document", "cmisContent", "(", "String", "id", ")", "{", "DocumentWriter", "writer", "=", "newDocument", "(", "ObjectId", ".", "toString", "(", "ObjectId", ".", "Type", ".", "CONTENT", ",", "id", ")", ")", ";", "org", ".", "apache", ".", "che...
Converts binary content into JCR node. @param id the id of the CMIS document. @return JCR node representation.
[ "Converts", "binary", "content", "into", "JCR", "node", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/CmisConnector.java#L817-L838
train
ModeShape/modeshape
connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/CmisConnector.java
CmisConnector.cmisProperties
private void cmisProperties( CmisObject object, DocumentWriter writer ) { // convert properties List<Property<?>> list = object.getProperties(); for (Property<?> property : list) { String pname = properties.findJcrName(property.getId()); i...
java
private void cmisProperties( CmisObject object, DocumentWriter writer ) { // convert properties List<Property<?>> list = object.getProperties(); for (Property<?> property : list) { String pname = properties.findJcrName(property.getId()); i...
[ "private", "void", "cmisProperties", "(", "CmisObject", "object", ",", "DocumentWriter", "writer", ")", "{", "// convert properties", "List", "<", "Property", "<", "?", ">", ">", "list", "=", "object", ".", "getProperties", "(", ")", ";", "for", "(", "Proper...
Converts CMIS object's properties to JCR node properties. @param object CMIS object @param writer JCR node representation.
[ "Converts", "CMIS", "object", "s", "properties", "to", "JCR", "node", "properties", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/CmisConnector.java#L859-L869
train
ModeShape/modeshape
connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/CmisConnector.java
CmisConnector.cmisChildren
private void cmisChildren( Folder folder, DocumentWriter writer ) { ItemIterable<CmisObject> it = folder.getChildren(); for (CmisObject obj : it) { writer.addChild(obj.getId(), obj.getName()); } }
java
private void cmisChildren( Folder folder, DocumentWriter writer ) { ItemIterable<CmisObject> it = folder.getChildren(); for (CmisObject obj : it) { writer.addChild(obj.getId(), obj.getName()); } }
[ "private", "void", "cmisChildren", "(", "Folder", "folder", ",", "DocumentWriter", "writer", ")", "{", "ItemIterable", "<", "CmisObject", ">", "it", "=", "folder", ".", "getChildren", "(", ")", ";", "for", "(", "CmisObject", "obj", ":", "it", ")", "{", "...
Converts CMIS folder children to JCR node children @param folder CMIS folder @param writer JCR node representation
[ "Converts", "CMIS", "folder", "children", "to", "JCR", "node", "children" ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/CmisConnector.java#L877-L883
train
ModeShape/modeshape
connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/CmisConnector.java
CmisConnector.cmisRepository
private Document cmisRepository() { RepositoryInfo info = session.getRepositoryInfo(); DocumentWriter writer = newDocument(ObjectId.toString(ObjectId.Type.REPOSITORY_INFO, "")); writer.setPrimaryType(CmisLexicon.REPOSITORY); writer.setId(REPOSITORY_INFO_ID); // product name/ven...
java
private Document cmisRepository() { RepositoryInfo info = session.getRepositoryInfo(); DocumentWriter writer = newDocument(ObjectId.toString(ObjectId.Type.REPOSITORY_INFO, "")); writer.setPrimaryType(CmisLexicon.REPOSITORY); writer.setId(REPOSITORY_INFO_ID); // product name/ven...
[ "private", "Document", "cmisRepository", "(", ")", "{", "RepositoryInfo", "info", "=", "session", ".", "getRepositoryInfo", "(", ")", ";", "DocumentWriter", "writer", "=", "newDocument", "(", "ObjectId", ".", "toString", "(", "ObjectId", ".", "Type", ".", "REP...
Translates CMIS repository information into Node. @return node document.
[ "Translates", "CMIS", "repository", "information", "into", "Node", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/CmisConnector.java#L890-L903
train
ModeShape/modeshape
connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/CmisConnector.java
CmisConnector.jcrBinaryContent
private ContentStream jcrBinaryContent( Document document ) { // pickup node properties Document props = document.getDocument("properties").getDocument(JcrLexicon.Namespace.URI); // extract binary value and content Binary value = props.getBinary("data"); if (value == null) { ...
java
private ContentStream jcrBinaryContent( Document document ) { // pickup node properties Document props = document.getDocument("properties").getDocument(JcrLexicon.Namespace.URI); // extract binary value and content Binary value = props.getBinary("data"); if (value == null) { ...
[ "private", "ContentStream", "jcrBinaryContent", "(", "Document", "document", ")", "{", "// pickup node properties", "Document", "props", "=", "document", ".", "getDocument", "(", "\"properties\"", ")", ".", "getDocument", "(", "JcrLexicon", ".", "Namespace", ".", "U...
Creates content stream using JCR node. @param document JCR node representation @return CMIS content stream object
[ "Creates", "content", "stream", "using", "JCR", "node", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/CmisConnector.java#L952-L973
train
ModeShape/modeshape
connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/CmisConnector.java
CmisConnector.importTypes
private void importTypes( List<Tree<ObjectType>> types, NodeTypeManager typeManager, NamespaceRegistry registry ) throws RepositoryException { for (Tree<ObjectType> tree : types) { importType(tree.getItem(), typeManager, registry); ...
java
private void importTypes( List<Tree<ObjectType>> types, NodeTypeManager typeManager, NamespaceRegistry registry ) throws RepositoryException { for (Tree<ObjectType> tree : types) { importType(tree.getItem(), typeManager, registry); ...
[ "private", "void", "importTypes", "(", "List", "<", "Tree", "<", "ObjectType", ">", ">", "types", ",", "NodeTypeManager", "typeManager", ",", "NamespaceRegistry", "registry", ")", "throws", "RepositoryException", "{", "for", "(", "Tree", "<", "ObjectType", ">", ...
Import CMIS types to JCR repository. @param types CMIS types @param typeManager JCR type manager @param registry @throws RepositoryException if there is a problem importing the types
[ "Import", "CMIS", "types", "to", "JCR", "repository", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/CmisConnector.java#L983-L990
train
ModeShape/modeshape
connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/CmisConnector.java
CmisConnector.importType
@SuppressWarnings( "unchecked" ) public void importType( ObjectType cmisType, NodeTypeManager typeManager, NamespaceRegistry registry ) throws RepositoryException { // TODO: get namespace information and register // registry.registerNamespace(c...
java
@SuppressWarnings( "unchecked" ) public void importType( ObjectType cmisType, NodeTypeManager typeManager, NamespaceRegistry registry ) throws RepositoryException { // TODO: get namespace information and register // registry.registerNamespace(c...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "void", "importType", "(", "ObjectType", "cmisType", ",", "NodeTypeManager", "typeManager", ",", "NamespaceRegistry", "registry", ")", "throws", "RepositoryException", "{", "// TODO: get namespace information and...
Import given CMIS type to the JCR repository. @param cmisType cmis object type @param typeManager JCR type manager/ @param registry @throws RepositoryException if there is a problem importing the types
[ "Import", "given", "CMIS", "type", "to", "the", "JCR", "repository", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/CmisConnector.java#L1000-L1037
train
ModeShape/modeshape
connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/CmisConnector.java
CmisConnector.superTypes
private String[] superTypes( ObjectType cmisType ) { if (cmisType.getBaseTypeId() == BaseTypeId.CMIS_FOLDER) { return new String[] {JcrConstants.NT_FOLDER}; } if (cmisType.getBaseTypeId() == BaseTypeId.CMIS_DOCUMENT) { return new String[] {JcrConstants.NT_FILE}; ...
java
private String[] superTypes( ObjectType cmisType ) { if (cmisType.getBaseTypeId() == BaseTypeId.CMIS_FOLDER) { return new String[] {JcrConstants.NT_FOLDER}; } if (cmisType.getBaseTypeId() == BaseTypeId.CMIS_DOCUMENT) { return new String[] {JcrConstants.NT_FILE}; ...
[ "private", "String", "[", "]", "superTypes", "(", "ObjectType", "cmisType", ")", "{", "if", "(", "cmisType", ".", "getBaseTypeId", "(", ")", "==", "BaseTypeId", ".", "CMIS_FOLDER", ")", "{", "return", "new", "String", "[", "]", "{", "JcrConstants", ".", ...
Determines supertypes for the given CMIS type in terms of JCR. @param cmisType given CMIS type @return supertypes in JCR lexicon.
[ "Determines", "supertypes", "for", "the", "given", "CMIS", "type", "in", "terms", "of", "JCR", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/CmisConnector.java#L1045-L1055
train
ModeShape/modeshape
connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/CmisConnector.java
CmisConnector.registerRepositoryInfoType
@SuppressWarnings( "unchecked" ) private void registerRepositoryInfoType( NodeTypeManager typeManager ) throws RepositoryException { // create node type template NodeTypeTemplate type = typeManager.createNodeTypeTemplate(); // convert CMIS type's attributes to node type template we have jus...
java
@SuppressWarnings( "unchecked" ) private void registerRepositoryInfoType( NodeTypeManager typeManager ) throws RepositoryException { // create node type template NodeTypeTemplate type = typeManager.createNodeTypeTemplate(); // convert CMIS type's attributes to node type template we have jus...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "void", "registerRepositoryInfoType", "(", "NodeTypeManager", "typeManager", ")", "throws", "RepositoryException", "{", "// create node type template", "NodeTypeTemplate", "type", "=", "typeManager", ".", "creat...
Defines node type for the repository info. @param typeManager JCR node type manager. @throws RepositoryException
[ "Defines", "node", "type", "for", "the", "repository", "info", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/CmisConnector.java#L1063-L1100
train
ModeShape/modeshape
modeshape-jdbc-local/src/main/java/org/modeshape/jdbc/delegate/LocalRepositoryDelegate.java
LocalRepositoryDelegate.execute
@Override public QueryResult execute( String query, String language ) throws RepositoryException { logger.trace("Executing query: {0}", query); // Create the query ... final Query jcrQuery = getLocalSession().getSession().getWorkspace().getQueryManager().cre...
java
@Override public QueryResult execute( String query, String language ) throws RepositoryException { logger.trace("Executing query: {0}", query); // Create the query ... final Query jcrQuery = getLocalSession().getSession().getWorkspace().getQueryManager().cre...
[ "@", "Override", "public", "QueryResult", "execute", "(", "String", "query", ",", "String", "language", ")", "throws", "RepositoryException", "{", "logger", ".", "trace", "(", "\"Executing query: {0}\"", ",", "query", ")", ";", "// Create the query ...", "final", ...
This execute method is used for redirection so that the JNDI implementation can control calling execute. @see java.sql.Statement#execute(java.lang.String)
[ "This", "execute", "method", "is", "used", "for", "redirection", "so", "that", "the", "JNDI", "implementation", "can", "control", "calling", "execute", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jdbc-local/src/main/java/org/modeshape/jdbc/delegate/LocalRepositoryDelegate.java#L120-L129
train
ModeShape/modeshape
modeshape-jdbc/src/main/java/org/modeshape/jdbc/rest/ModeShapeRestClient.java
ModeShapeRestClient.getRepositories
public Repositories getRepositories() { JSONRestClient.Response response = jsonRestClient.doGet(); if (!response.isOK()) { throw new RuntimeException(JdbcI18n.invalidServerResponse.text(jsonRestClient.url(), response.asString())); } return new Repositories(response.json()); ...
java
public Repositories getRepositories() { JSONRestClient.Response response = jsonRestClient.doGet(); if (!response.isOK()) { throw new RuntimeException(JdbcI18n.invalidServerResponse.text(jsonRestClient.url(), response.asString())); } return new Repositories(response.json()); ...
[ "public", "Repositories", "getRepositories", "(", ")", "{", "JSONRestClient", ".", "Response", "response", "=", "jsonRestClient", ".", "doGet", "(", ")", ";", "if", "(", "!", "response", ".", "isOK", "(", ")", ")", "{", "throw", "new", "RuntimeException", ...
Returns a list with all the available repositories. @return a {@link Repositories} instance, never {@code null}
[ "Returns", "a", "list", "with", "all", "the", "available", "repositories", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jdbc/src/main/java/org/modeshape/jdbc/rest/ModeShapeRestClient.java#L68-L74
train
ModeShape/modeshape
modeshape-jdbc/src/main/java/org/modeshape/jdbc/rest/ModeShapeRestClient.java
ModeShapeRestClient.getWorkspaces
public Workspaces getWorkspaces( String repositoryName ) { String url = jsonRestClient.appendToBaseURL(repositoryName); JSONRestClient.Response response = jsonRestClient.doGet(url); if (!response.isOK()) { throw new RuntimeException(JdbcI18n.invalidServerResponse.text(url, response.a...
java
public Workspaces getWorkspaces( String repositoryName ) { String url = jsonRestClient.appendToBaseURL(repositoryName); JSONRestClient.Response response = jsonRestClient.doGet(url); if (!response.isOK()) { throw new RuntimeException(JdbcI18n.invalidServerResponse.text(url, response.a...
[ "public", "Workspaces", "getWorkspaces", "(", "String", "repositoryName", ")", "{", "String", "url", "=", "jsonRestClient", ".", "appendToBaseURL", "(", "repositoryName", ")", ";", "JSONRestClient", ".", "Response", "response", "=", "jsonRestClient", ".", "doGet", ...
Returns all the workspaces for the named repository. @param repositoryName a {@code String} the name of a repository; may not be {@code null} @return a {@link Workspaces} instance; never {@code null}
[ "Returns", "all", "the", "workspaces", "for", "the", "named", "repository", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jdbc/src/main/java/org/modeshape/jdbc/rest/ModeShapeRestClient.java#L96-L103
train
ModeShape/modeshape
modeshape-jdbc/src/main/java/org/modeshape/jdbc/rest/ModeShapeRestClient.java
ModeShapeRestClient.queryPlan
public String queryPlan( String query, String queryLanguage ) { String url = jsonRestClient.appendToURL(QUERY_PLAN_METHOD); String contentType = contentTypeForQueryLanguage(queryLanguage); JSONRestClient.Response response = jsonRestClient.postStreamTextPlain(new Byte...
java
public String queryPlan( String query, String queryLanguage ) { String url = jsonRestClient.appendToURL(QUERY_PLAN_METHOD); String contentType = contentTypeForQueryLanguage(queryLanguage); JSONRestClient.Response response = jsonRestClient.postStreamTextPlain(new Byte...
[ "public", "String", "queryPlan", "(", "String", "query", ",", "String", "queryLanguage", ")", "{", "String", "url", "=", "jsonRestClient", ".", "appendToURL", "(", "QUERY_PLAN_METHOD", ")", ";", "String", "contentType", "=", "contentTypeForQueryLanguage", "(", "qu...
Returns a string representation of a query plan in a given language. @param query a {@code String}, never {@code null} @param queryLanguage the language of the query, never {@code null} @return a {@code String} description of the plan, never {@code null}
[ "Returns", "a", "string", "representation", "of", "a", "query", "plan", "in", "a", "given", "language", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jdbc/src/main/java/org/modeshape/jdbc/rest/ModeShapeRestClient.java#L145-L155
train
ModeShape/modeshape
index-providers/modeshape-elasticsearch-index-provider/src/main/java/org/modeshape/jcr/index/elasticsearch/SearchResults.java
SearchResults.getCardinality
public long getCardinality() { if (pos > 0) { return totalHits; } try { EsResponse res = client.search(index, type, query); Document hits = (Document) res.get("hits"); totalHits = hits.getInteger("total"); return totalHits; } ca...
java
public long getCardinality() { if (pos > 0) { return totalHits; } try { EsResponse res = client.search(index, type, query); Document hits = (Document) res.get("hits"); totalHits = hits.getInteger("total"); return totalHits; } ca...
[ "public", "long", "getCardinality", "(", ")", "{", "if", "(", "pos", ">", "0", ")", "{", "return", "totalHits", ";", "}", "try", "{", "EsResponse", "res", "=", "client", ".", "search", "(", "index", ",", "type", ",", "query", ")", ";", "Document", ...
Gets cardinality for this search request. @return total hits matching search request.
[ "Gets", "cardinality", "for", "this", "search", "request", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/index-providers/modeshape-elasticsearch-index-provider/src/main/java/org/modeshape/jcr/index/elasticsearch/SearchResults.java#L108-L120
train