Skip to content

Commit 8cc5a64

Browse files
committed
Merge branch 'develop'
2 parents 265ddc2 + 61c440c commit 8cc5a64

File tree

1,036 files changed

+5116
-23309
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,036 files changed

+5116
-23309
lines changed

Diff for: NOTICE.txt

+12-14
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
MarkLogic® Java Client API
22

3-
Copyright © 2022 MarkLogic Corporation. MarkLogic and the MarkLogic logo are trademarks or registered trademarks of MarkLogic Corporation in the United States and other countries. All other trademarks are the property of their respective owners.
3+
Copyright © 2024 MarkLogic Corporation. All Rights Reserved.
44

5-
This project is licensed under the Apache License, Version 2.0 (the "License"); you may not use this project except in compliance with the License. You may obtain a copy of the License at
6-
7-
http://www.apache.org/licenses/LICENSE-2.0
8-
9-
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
10-
11-
To the extent required by the applicable open source license, a complete machine-readable copy of the source code corresponding to such code is available upon request. This offer is valid to anyone in receipt of this information and shall expire three years following the date of the final distribution of this product version by MarkLogic. To obtain such source code, send an email to [email protected]. Please specify the product and version for which you are requesting source code.
12-
13-
The following software may be included in this project (last updated November 18, 2022):
5+
To the extent required by the applicable open-source license, a complete machine-readable copy of the source code
6+
corresponding to such code is available upon request. This offer is valid to anyone in receipt of this information and
7+
shall expire three years following the date of the final distribution of this product version by
8+
Progress Software Corporation. To obtain such source code, send an email to [email protected].
9+
Please specify the product and version for which you are requesting source code.
1410

11+
-------------------------------------------------------------------------
12+
Third Party Components
1513

1614
Apache Commons BeanUtils™ 1.9.4
1715
Attribution Statements
@@ -76,7 +74,7 @@ Made available under the Apache License 2.0. See Appendix for full text.
7674

7775
Source materials are available for download at: https://github.com/apache/commons-lang
7876

79-
Jackson Annotations 2.15.3
77+
Jackson Annotations 2.17.2
8078
Attribution Statements
8179
http://wiki.fasterxml.com/JacksonHome
8280

@@ -86,7 +84,7 @@ Copyright ©2009 FasterXML, LLC
8684
License Text (http://spdx.org/licenses/Apache-2.0)
8785
Made available under the Apache License 2.0. See Appendix for full text.
8886

89-
Jackson Core 2.15.3
87+
Jackson Core 2.17.2
9088
Attribution Statements
9189
http://wiki.fasterxml.com/JacksonHome
9290

@@ -98,7 +96,7 @@ Made available under the Apache License 2.0. See Appendix for full text.
9896

9997
Source materials are available for download at: https://github.com/FasterXML/jackson-core
10098

101-
Jackson Databind 2.15.3
99+
Jackson Databind 2.17.2
102100
Attribution Statements
103101
http://wiki.fasterxml.com/JacksonHome
104102

@@ -116,7 +114,7 @@ License Text (http://www.apache.org/licenses/LICENSE-2.0.txt)
116114
Made available under the Apache License 2.0. See Appendix for full text.
117115

118116
Source materials are available for download at: https://github.com/FasterXML/jackson-databind
119-
Jackson Dataformat CSV 2.15.3
117+
Jackson Dataformat CSV 2.17.2
120118
Attribution Statements
121119
https://github.com/FasterXML/jackson-dataformat-csv
122120

Diff for: README.md

-58
Original file line numberDiff line numberDiff line change
@@ -49,64 +49,6 @@ Full documentation is available at:
4949
* [Java Application Developer's Guide](http://docs.marklogic.com/guide/java)
5050
* [JavaDoc](http://docs.marklogic.com/javadoc/client/index.html)
5151

52-
## Including JAXB support
53-
54-
If you are using Java 11 or higher (including Java 17) and you wish to use [JAXB](https://docs.oracle.com/javase/tutorial/jaxb/intro/)
55-
with the client, you'll need to include JAXB API and implementation dependencies as those are no
56-
longer included in Java 11 and higher.
57-
58-
For Maven, include the following in your pom.xml file:
59-
60-
<dependency>
61-
<groupId>javax.xml.bind</groupId>
62-
<artifactId>jaxb-api</artifactId>
63-
<version>2.3.1</version>
64-
</dependency>
65-
<dependency>
66-
<groupId>org.glassfish.jaxb</groupId>
67-
<artifactId>jaxb-runtime</artifactId>
68-
<version>2.3.2</version>
69-
</dependency>
70-
<dependency>
71-
<groupId>org.glassfish.jaxb</groupId>
72-
<artifactId>jaxb-core</artifactId>
73-
<version>2.3.0.1</version>
74-
</dependency>
75-
76-
For Gradle, include the following in your build.gradle file (this can be included in the same `dependencies` block
77-
as the one that includes the marklogic-client-api dependency):
78-
79-
dependencies {
80-
implementation "javax.xml.bind:jaxb-api:2.3.1"
81-
implementation "org.glassfish.jaxb:jaxb-runtime:2.3.2"
82-
implementation "org.glassfish.jaxb:jaxb-core:2.3.0.1"
83-
}
84-
85-
You are free to use any implementation of JAXB that you wish, but you need to ensure that you're using a JAXB
86-
implementation that corresponds to the `javax.xml.bind` interfaces. JAXB 3.0 and 4.0 interfaces are packaged under
87-
`jakarta.xml.bind`, and the Java API does not yet depend on those interfaces.
88-
89-
Thus, you are free to include an implementation of JAXB 3.0 or 4.0 in your project for your own use; it will not
90-
affect the Java API. A caveat though is if you are trying to use different major versions of the same JAXB
91-
implementation library - such as `org.glassfish.jaxb:jaxb-runtime` - then you will run into an expected dependency
92-
conflict between the two versions of the library. This can be worked around by using a different implementation of
93-
JAXB 3.0 or JAXB 4.0 - for example:
94-
95-
dependencies {
96-
// JAXB 2 dependencies required by Java Client
97-
implementation "javax.xml.bind:jaxb-api:2.3.1"
98-
implementation "org.glassfish.jaxb:jaxb-runtime:2.3.2"
99-
implementation "org.glassfish.jaxb:jaxb-core:2.3.0.1"
100-
101-
// JAXB 4 dependencies required by other application code
102-
implementation "jakarta.xml.bind:jakarta.xml.bind-api:4.0.0"
103-
implementation "com.sun.xml.bind:jaxb-impl:4.0.1"
104-
}
105-
106-
The client will soon be updated to use the newer `jakarta.xml.bind` interfaces. Until then, the above approach
107-
or one similar to it will allow for both the old and new JAXB interfaces and implementations to exist together in the
108-
same classpath.
109-
11052
## Support
11153

11254
The MarkLogic Java Client is maintained by [MarkLogic](https://www.marklogic.com/) Engineering and is made available under

Diff for: build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2022 MarkLogic Corporation
1+
// Copyright © 2024 MarkLogic Corporation. All Rights Reserved.
22

33
// We need the properties plugin to work on both marklogic-client-api and test-app. The 'plugins' Gradle syntax can't be
44
// used for that. So we have to add the properties plugin to the buildscript classpath and then apply the properties

Diff for: examples/build.gradle

+2-8
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
1-
// Copyright (c) 2022 MarkLogic Corporation
1+
// Copyright © 2024 MarkLogic Corporation. All Rights Reserved.
22

33
plugins {
44
id "java-library"
55
}
66

77
dependencies {
8-
if (JavaVersion.current().isJava9Compatible()) {
9-
implementation 'javax.xml.bind:jaxb-api:2.3.1'
10-
implementation 'org.glassfish.jaxb:jaxb-runtime:2.3.2'
11-
implementation 'org.glassfish.jaxb:jaxb-core:2.3.0.1'
12-
}
138
implementation project(':marklogic-client-api')
149

1510
// Forcing usage of 3.4.0 instead of 3.2.0 to address vulnerability - https://security.snyk.io/vuln/SNYK-JAVA-COMSQUAREUPOKIO-5820002
@@ -21,7 +16,7 @@ dependencies {
2116
api 'com.squareup.okhttp3:okhttp:4.11.0'
2217
api 'io.github.rburgst:okhttp-digest:2.7'
2318
api 'org.slf4j:slf4j-api:1.7.36'
24-
api 'com.fasterxml.jackson.core:jackson-databind:2.15.2'
19+
api "com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}"
2520

2621
// hsqldb < 2.7 has a High CVE - https://nvd.nist.gov/vuln/detail/CVE-2022-41853 .
2722
// And hsqldb 2.6+ requires Java 11+. So this is ignored, along with the associated test,
@@ -35,5 +30,4 @@ dependencies {
3530
api 'com.opencsv:opencsv:4.6'
3631
api 'org.springframework:spring-jdbc:5.3.29'
3732
api 'org.apache.commons:commons-lang3:3.12.0'
38-
api 'org.apache.httpcomponents:httpclient:4.5.14'
3933
}

Diff for: examples/src/main/java/com/marklogic/client/example/cookbook/AllCookbookExamples.java

+2-14
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,11 @@
11
/*
2-
* Copyright (c) 2022 MarkLogic Corporation
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
2+
* Copyright © 2024 MarkLogic Corporation. All Rights Reserved.
153
*/
164
package com.marklogic.client.example.cookbook;
175

186
import java.io.IOException;
197

20-
import javax.xml.bind.JAXBException;
8+
import jakarta.xml.bind.JAXBException;
219
import javax.xml.xpath.XPathExpressionException;
2210

2311
import com.marklogic.client.FailedRequestException;

Diff for: examples/src/main/java/com/marklogic/client/example/cookbook/ClientCreator.java

+2-17
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
11
/*
2-
* Copyright (c) 2022 MarkLogic Corporation
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
2+
* Copyright © 2024 MarkLogic Corporation. All Rights Reserved.
153
*/
164
package com.marklogic.client.example.cookbook;
175

@@ -34,10 +22,7 @@ public static void main(String[] args) throws IOException {
3422
public static void run(ExampleProperties props) {
3523
System.out.println("example: "+ClientCreator.class.getName());
3624

37-
// create the client
38-
DatabaseClient client = DatabaseClientFactory.newClient(
39-
props.host, props.port, props.writerUser, props.writerPassword,
40-
props.authType);
25+
DatabaseClient client = Util.newClient(props);
4126

4227
// make use of the client connection
4328
TextDocumentManager docMgr = client.newTextDocumentManager();

Diff for: examples/src/main/java/com/marklogic/client/example/cookbook/DocumentDelete.java

+2-17
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
11
/*
2-
* Copyright (c) 2022 MarkLogic Corporation
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
2+
* Copyright © 2024 MarkLogic Corporation. All Rights Reserved.
153
*/
164
package com.marklogic.client.example.cookbook;
175

@@ -38,10 +26,7 @@ public static void run(ExampleProperties props) throws IOException {
3826

3927
String filename = "flipper.xml";
4028

41-
// create the client
42-
DatabaseClient client = DatabaseClientFactory.newClient(
43-
props.host, props.port, props.writerUser, props.writerPassword,
44-
props.authType);
29+
DatabaseClient client = Util.newClient(props);
4530

4631
// create a manager for XML documents
4732
XMLDocumentManager docMgr = client.newXMLDocumentManager();

Diff for: examples/src/main/java/com/marklogic/client/example/cookbook/DocumentFormats.java

+6-22
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,18 @@
11
/*
2-
* Copyright (c) 2022 MarkLogic Corporation
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
2+
* Copyright © 2024 MarkLogic Corporation. All Rights Reserved.
153
*/
164
package com.marklogic.client.example.cookbook;
175

18-
import java.io.File;
19-
import java.io.IOException;
20-
import java.io.InputStream;
21-
226
import com.marklogic.client.DatabaseClient;
23-
import com.marklogic.client.DatabaseClientFactory;
247
import com.marklogic.client.document.GenericDocumentManager;
258
import com.marklogic.client.example.cookbook.Util.ExampleProperties;
269
import com.marklogic.client.io.BytesHandle;
2710
import com.marklogic.client.io.InputStreamHandle;
2811

12+
import java.io.File;
13+
import java.io.IOException;
14+
import java.io.InputStream;
15+
2916
/**
3017
* DocumentFormats illustrates working with documents in multiple or unknown formats.
3118
*/
@@ -45,10 +32,7 @@ public static void run(ExampleProperties props) throws IOException {
4532
{"flipper.xml", "XML"}
4633
};
4734

48-
// create the client
49-
DatabaseClient client = DatabaseClientFactory.newClient(
50-
props.host, props.port, props.writerUser, props.writerPassword,
51-
props.authType);
35+
DatabaseClient client = Util.newClient(props);
5236

5337
// iterate over the files
5438
for (String[] fileEntry: fileEntries) {

Diff for: examples/src/main/java/com/marklogic/client/example/cookbook/DocumentMetadataRead.java

+7-24
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,9 @@
11
/*
2-
* Copyright (c) 2022 MarkLogic Corporation
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
2+
* Copyright © 2024 MarkLogic Corporation. All Rights Reserved.
153
*/
164
package com.marklogic.client.example.cookbook;
175

18-
import java.io.File;
19-
import java.io.IOException;
20-
import java.io.InputStream;
21-
22-
import org.w3c.dom.Document;
23-
246
import com.marklogic.client.DatabaseClient;
25-
import com.marklogic.client.DatabaseClientFactory;
267
import com.marklogic.client.document.XMLDocumentManager;
278
import com.marklogic.client.example.cookbook.Util.ExampleProperties;
289
import com.marklogic.client.io.DOMHandle;
@@ -31,6 +12,11 @@
3112
import com.marklogic.client.io.DocumentMetadataHandle.DocumentCollections;
3213
import com.marklogic.client.io.DocumentMetadataHandle.DocumentMetadataValues;
3314
import com.marklogic.client.io.InputStreamHandle;
15+
import org.w3c.dom.Document;
16+
17+
import java.io.File;
18+
import java.io.IOException;
19+
import java.io.InputStream;
3420

3521
/**
3622
* DocumentMetadataReader illustrates how to read the metadata and content of a database document
@@ -46,10 +32,7 @@ public static void run(ExampleProperties props) throws IOException {
4632

4733
String filename = "flipper.xml";
4834

49-
// create the client
50-
DatabaseClient client = DatabaseClientFactory.newClient(
51-
props.host, props.port, props.writerUser, props.writerPassword,
52-
props.authType);
35+
DatabaseClient client = Util.newClient(props);
5336

5437
// create a manager for XML documents
5538
XMLDocumentManager docMgr = client.newXMLDocumentManager();

0 commit comments

Comments
 (0)