Skip to content

[Feature] Add xquery recursive collection creation with just one path expression #5062

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 25 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
7ee7a8d
Added create collection from a path, and the one parameter signature.
enima007 Sep 17, 2023
206772a
Added create collection with path signature.
enima007 Sep 17, 2023
66a060e
Added test file for create-collection with path.
enima007 Sep 17, 2023
f907b10
Removed wildcard imports.
enima007 Sep 26, 2023
5135da7
Changed new-collection-uri to collection-uri.
enima007 Sep 26, 2023
78bf82e
Fixed order to public final static as per the JLS.
enima007 Sep 26, 2023
e898899
Fixed catch blocs and thrown exception.
enima007 Sep 26, 2023
31abe51
Fixed current test-case collection names.
enima007 Sep 26, 2023
ff155b8
Merge branch 'eXist-db:develop' into feature/add-xquery-collection-cr…
enima007 Sep 26, 2023
e7118ed
Added cleanCollectionUri function.
enima007 Sep 26, 2023
ac5f200
Remove unused parameter collectionURI.
enima007 Sep 26, 2023
7cbd6dd
Fixed duplicating root collection.
enima007 Sep 26, 2023
43f331f
Fixed indentation.
enima007 Sep 26, 2023
cf1a8de
Fixed function doc.
enima007 Sep 26, 2023
1915cfa
Fixed log level and removed unecessary logs.
enima007 Sep 26, 2023
3ed9193
Removed sequenced constructor and added a new test case.
enima007 Sep 26, 2023
213d9bd
Merge branch 'feature/add-xquery-collection-create-with-just-the-path…
enima007 Sep 26, 2023
11b270b
Use ROOT_COLLECTION constant instead of /db string
enima007 Sep 27, 2023
138b435
Merge branch 'eXist-db:develop' into feature/add-xquery-collection-cr…
enima007 Oct 5, 2023
fa16fd4
Merge branch 'eXist-db:develop' into feature/add-xquery-collection-cr…
enima007 Oct 9, 2023
61faaae
Merge branch 'eXist-db:develop' into feature/add-xquery-collection-cr…
enima007 Oct 11, 2023
72bc0ee
[feature] used Automatic Resource Management to close collection.
enima007 Oct 12, 2023
bd4d1d2
[feature] Add final keyword to automatic resource management try catc…
enima007 Oct 16, 2023
b963c00
[feature] Fix creating a collection with a path not starting by /db.
enima007 Oct 16, 2023
4f71bdc
[feature] Fixed test case and added a new assert error test.
enima007 Oct 16, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed log level and removed unecessary logs.
  • Loading branch information
enima007 committed Sep 26, 2023
commit 1915cfae17e724b7fded08b975ed19091c3278af
Original file line number Diff line number Diff line change
Expand Up @@ -136,20 +136,14 @@ public Sequence eval(final Sequence[] args, final Sequence contextSequence)
final Item item = args[paramNumber].itemAt(0);
if (Type.subTypeOf(item.getType(), Type.NODE)) {
final NodeValue node = (NodeValue) item;
if (logger.isDebugEnabled()) {
logger.debug("Found node");
}
if (node.getImplementationType() == NodeValue.PERSISTENT_NODE) {
final org.exist.collections.Collection internalCol = ((NodeProxy) node).getOwnerDocument().getCollection();
if (logger.isDebugEnabled()) {
logger.debug("Found node");
}
try {
//TODO: use xmldbURI
collection = getLocalCollection(this, context, internalCol.getURI().toString());
return new StringValue(this, collection.getName());
} catch (final XMLDBException e) {
if (logger.isDebugEnabled()) {
if (logger.isTraceEnabled()) {
logger.debug("Couldn't find parent collection, creating a new one.");
}
}
Expand All @@ -164,7 +158,7 @@ public Sequence eval(final Sequence[] args, final Sequence contextSequence)
collection = getCollection(this, context, collectionURI, Optional.empty(), Optional.empty());
return new StringValue(this, collection.getName());
} catch (final XMLDBException xe) {
if (logger.isDebugEnabled()) {
if (logger.isTraceEnabled()) {
logger.debug("Couldn't find parent collection, creating a new one.");
}
}
Expand Down