Skip to content

Commit 87ef0d8

Browse files
Fix for part of #4 (Javadoc errors), minor README update
1 parent 57fae9d commit 87ef0d8

File tree

5 files changed

+22
-22
lines changed

5 files changed

+22
-22
lines changed

README.MD

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ This client library provides a simplified way to interact with Data API for Astr
2121
- [`astra-db-ts`](https://github.com/datastax/astra-db-ts) is the equivalent for typescript
2222
- [`astrapy`](https://github.com/datastax/astrapy) is the equivalent in python
2323

24-
This library is under development and not yet available in Maven Central. You can build it locally and install it in your local repository.
25-
24+
This library is under development and is available in Maven Central.
25+
You can build it locally and install it in your local repository.
2626

2727
## 1. Local Installation
2828

2929
### 1.1 Prerequisites
3030

31-
#### 📦 Java Development Kit (JDK) 8
31+
#### 📦 Java Development Kit (JDK) 11
3232
- Use the [reference documentation](https://docs.oracle.com/javase/8/docs/technotes/guides/install/install_overview.html) to install a **Java Development Kit**
3333
- Validate your installation with
3434

@@ -64,7 +64,7 @@ git clone [email protected]:datastax/astra-db-java.git
6464
> - A running Data API locally with docker (see the `docker-compose.yml` in the root of the project)
6565
6666
```console
67-
mvn clean install -DskipTests=true
67+
mvn clean install -Dtest.skipped=true
6868
```
6969

7070
### 1.3 Installation
@@ -76,7 +76,7 @@ Add the following dependency to your `pom.xml` file:
7676
<dependency>
7777
<groupId>com.datastax.astra</groupId>
7878
<artifactId>astra-db-java</artifactId>
79-
<version>1.0.0-SNAPSHOT</version>
79+
<version>1.0.0</version>
8080
</dependency>
8181
```
8282

astra-db-java/src/main/java/com/datastax/astra/client/Collection.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -415,19 +415,19 @@ public final InsertOneResult insertOne(T document) {
415415

416416
/**
417417
* Asynchronously inserts a single document into the collection. This method provides the same functionality as
418-
* {@link #insertOne(T document)}, but it operates asynchronously, returning a {@link CompletableFuture} that
418+
* {@link #insertOne(Object)}, but it operates asynchronously, returning a {@link CompletableFuture} that
419419
* will be completed with the insertion result. Utilizing this method is beneficial for non-blocking operations,
420420
* allowing other tasks to proceed while the document insertion is being processed.
421421
*
422422
* <p>The asynchronous operation ensures that your application can remain responsive, making this method ideal for
423423
* applications requiring high throughput or for operations that do not need immediate completion confirmation.</p>
424424
*
425425
* <p>For details on the behavior, parameters, and return type, refer to the documentation of the synchronous
426-
* {@link #insertOne(T document)} method. This method inherits all the properties and behaviors of its synchronous
426+
* {@link #insertOne(Object)} method. This method inherits all the properties and behaviors of its synchronous
427427
* counterpart, including error handling and the generation or requirement of the {@code _id} field.</p>
428428
*
429429
* @param document The document to be inserted into the collection. The specifications regarding the document
430-
* structure and the {@code _id} field are the same as described in {@link #insertOne(T document)}.
430+
* structure and the {@code _id} field are the same as described in {@link #insertOne(Object)}.
431431
* @return A {@link CompletableFuture} that, upon completion, contains the result of the insert operation as an
432432
* {@link InsertOneResult}. The completion may occur with a result in case of success or with an exception
433433
* in case of failure.
@@ -448,7 +448,7 @@ public final CompletableFuture<InsertOneResult> insertOneAsync(T document) {
448448
}
449449

450450
/**
451-
* Inserts a single document into the collection in an atomic operation, similar to the {@link #insertOne(T document)}
451+
* Inserts a single document into the collection in an atomic operation, similar to the {@link #insertOne(Object)}
452452
* method, but with the additional capability to include vector embeddings. These embeddings are typically used for
453453
* advanced querying capabilities, such as similarity search or machine learning models. This method ensures atomicity
454454
* of the insertion, maintaining the integrity and consistency of the collection.
@@ -489,7 +489,7 @@ public final InsertOneResult insertOne(T document, float[] embeddings) {
489489

490490
/**
491491
* Asynchronously inserts a single document into the collection with vector embeddings. This method mirrors the
492-
* functionality of {@link #insertOne(T document, float[] embeddings)}, operating asynchronously to return a
492+
* functionality of {@link #insertOne(Object,float[])}, operating asynchronously to return a
493493
* {@link CompletableFuture} that completes with the insertion result. It is designed for use cases where
494494
* non-blocking operations are essential, enabling other processes to continue while the document insertion
495495
* is executed in the background.
@@ -500,7 +500,7 @@ public final InsertOneResult insertOne(T document, float[] embeddings) {
500500
* critical.</p>
501501
*
502502
* <p>For a comprehensive understanding of the behavior, parameters, including the purpose and use of vector
503-
* embeddings, refer to the synchronous {@link #insertOne(T document, float[] embeddings)} method. This
503+
* embeddings, refer to the synchronous {@link #insertOne(Object,float[] embeddings)} method. This
504504
* asynchronous variant adopts all the behaviors and properties of its synchronous counterpart.</p>
505505
*
506506
* @param document The document to be inserted, potentially without an {@code _id} field which, if omitted,
@@ -529,7 +529,7 @@ public final CompletableFuture<InsertOneResult> insertOneAsync(T document, float
529529

530530
/**
531531
* Inserts a single document into the collection in an atomic operation, extending the base functionality of
532-
* the {@link #insertOne(T document)} method by adding the capability to compute and include a vector of embeddings
532+
* the {@link #insertOne(Object)} method by adding the capability to compute and include a vector of embeddings
533533
* directly within the document. This is achieved through a specified expression, which the service translates
534534
* into vector embeddings. These embeddings can then be utilized for advanced database operations that leverage
535535
* vector similarity.
@@ -572,7 +572,7 @@ public final InsertOneResult insertOne(T document, String vectorize) {
572572

573573
/**
574574
* Asynchronously inserts a single document into the collection with a vectorization expression. This method
575-
* provides an asynchronous counterpart to {@link #insertOne(T document, String vectorize)}, allowing for
575+
* provides an asynchronous counterpart to {@link #insertOne(Object,String)}, allowing for
576576
* non-blocking operations while a document, along with its vectorization based on the provided string, is
577577
* inserted into the collection.
578578
* <p><i style='color: orange;'><b>Note</b> : This feature is under current development.</i></p>
@@ -584,7 +584,7 @@ public final InsertOneResult insertOne(T document, String vectorize) {
584584
*
585585
* <p>For detailed information on the behavior and parameters, especially the purpose and processing of the
586586
* {@code vectorize} string, refer to the documentation of the synchronous
587-
* {@link #insertOne(T document, String vectorize)} method. This asynchronous method inherits all functionalities
587+
* {@link #insertOne(Object,String)} method. This asynchronous method inherits all functionalities
588588
* and behaviors from its synchronous counterpart, ensuring consistency across the API.</p>
589589
*
590590
* @param document The document to be inserted into the collection. The requirements and options regarding the
@@ -987,7 +987,7 @@ private Callable<InsertManyResult> getInsertManyResultCallable(List<? extends T>
987987
*
988988
* @param filter The {@link Filter} instance encapsulating the search criteria used to pinpoint the desired document.
989989
* This object specifies the exact conditions that must be met for a document to be selected as a match.
990-
* @return An {@link java.util.Optional< T >} encapsulating the found document, if any, that meets the filter criteria.
990+
* @return An {@link java.util.Optional} encapsulating the found document, if any, that meets the filter criteria.
991991
* If no document matches the specified conditions, an empty {@link java.util.Optional} is returned, ensuring
992992
* that retrieval operations can be performed safely without the concern of {@link java.util.NoSuchElementException}.
993993
*/
@@ -1024,7 +1024,7 @@ public Optional<T> findOne(Filter filter) {
10241024
* @param filter The {@link Filter} instance containing the criteria used to identify the desired document.
10251025
* It specifies the conditions that a document must meet to be considered a match.
10261026
* @param options The {@link FindOneOptions} instance containing additional options for the find operation,
1027-
* @return An {@link Optional< T >} that contains the found document if one exists that matches
1027+
* @return An {@link Optional} that contains the found document if one exists that matches
10281028
* the filter criteria. Returns an empty {@link Optional} if no matching document is found,
10291029
* enabling safe retrieval operations without the risk of {@link java.util.NoSuchElementException}.
10301030
*/
@@ -1085,7 +1085,7 @@ public CompletableFuture<Optional<T>> findOneASync(Filter filter) {
10851085
* It defines the conditions that a document must meet to be considered a match.
10861086
* @param options The {@link FindOneOptions} providing additional query configurations such as projection
10871087
* and sort criteria to tailor the search operation.
1088-
* @return A {@link CompletableFuture<Optional< T >>} that, upon completion, contains an {@link Optional< T >}
1088+
* @return A {@link CompletableFuture} that, upon completion, contains an {@link Optional}
10891089
* with the found document if one exists matching the filter criteria. If no matching document is found,
10901090
* a completed future with an empty {@link Optional} is returned, facilitating safe asynchronous retrieval.
10911091
*
@@ -1136,7 +1136,7 @@ public Optional<T> findById(Object id) {
11361136
*
11371137
* @param id The unique identifier of the document to retrieve. This can be of any type that the database
11381138
* recognizes as a valid identifier format (e.g., String, Integer).
1139-
* @return A {@link CompletableFuture<Optional< T >>} that, upon completion, contains an {@link Optional< T >}
1139+
* @return A {@link CompletableFuture} that, upon completion, contains an {@link Optional}
11401140
* with the document if found. If no document matches the specified identifier, a completed future
11411141
* with an empty {@link Optional} is returned.
11421142
*

astra-db-java/src/main/java/com/datastax/astra/client/admin/DatabaseAdmin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public interface DatabaseAdmin {
7676
* }
7777
* </pre>
7878
*
79-
* @return A {@link Stream<String>} containing the names of all namespaces within the current database. The stream
79+
* @return A {@link Set} containing the names of all namespaces within the current database. The stream
8080
* provides a flexible and efficient means to process the namespace names according to the application's needs.
8181
*/
8282
Set<String> listNamespaceNames();

astra-db-java/src/main/java/com/datastax/astra/client/package-info.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
* <p><b>Usage Logic In a nutshell</b></p>
55
* <div style="background: #f8f8f8; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .2em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #408080; font-style: italic">// Initialize client</span>
66
*DataAPIClient client <span style="color: #666666">=</span> <span style="color: #008000; font-weight: bold">new</span> DataAPIClient<span style="color: #666666">(</span><span style="color: #BA2121">&quot;token&quot;</span><span style="color: #666666">);;</span>
7-
*<br/><span style="color: #408080; font-style: italic">// Database (crud for collections) work with an assigned namespace</span>
7+
*<br><span style="color: #408080; font-style: italic">// Database (crud for collections) work with an assigned namespace</span>
88
*Database db <span style="color: #666666">=</span> client<span style="color: #666666">.</span><span style="color: #7D9029">getDatabase</span><span style="color: #666666">(</span><span style="color: #BA2121">&quot;api_endpoint&quot;</span><span style="color: #666666">,</span> <span style="color: #BA2121">&quot;default_keyspace&quot;</span><span style="color: #666666">);</span>
99
*db<span style="color: #666666">.</span><span style="color: #7D9029">createCollection</span><span style="color: #666666">(</span><span style="color: #BA2121">&quot;my_collection&quot;</span><span style="color: #666666">,</span> <span style="color: #666666">4,</span> SimilarityMetric<span style="color: #666666">.</span><span style="color: #7D9029">cosine</span><span style="color: #666666">);</span>
10-
*<br/><span style="color: #408080; font-style: italic">// Access to the data (crud for documents)</span>
10+
*<br><span style="color: #408080; font-style: italic">// Access to the data (crud for documents)</span>
1111
*Collection<span style="color: #666666">&lt;</span>Document<span style="color: #666666">&gt;</span> collection <span style="color: #666666">=</span> db<span style="color: #666666">.</span><span style="color: #7D9029">getCollection</span><span style="color: #666666">(</span><span style="color: #BA2121">&quot;my_collection&quot;</span><span style="color: #666666">);</span>
1212
*collection<span style="color: #666666">.</span><span style="color: #7D9029">insertOne</span><span style="color: #666666">(</span>Document<span style="color: #666666">.</span><span style="color: #7D9029">create</span><span style="color: #666666">(1).</span><span style="color: #7D9029">append</span><span style="color: #666666">(</span><span style="color: #BA2121">&quot;hello&quot;</span><span style="color: #666666">,</span> <span style="color: #BA2121">&quot;world&quot;</span><span style="color: #666666">));</span>
1313
*collection<span style="color: #666666">.</span><span style="color: #7D9029">insertOne</span><span style="color: #666666">(</span>Document<span style="color: #666666">.</span><span style="color: #7D9029">create</span><span style="color: #666666">(2).</span><span style="color: #7D9029">append</span><span style="color: #666666">(</span><span style="color: #BA2121">&quot;hello&quot;</span><span style="color: #666666">,</span> <span style="color: #BA2121">&quot;world&quot;</span><span style="color: #666666">),</span> <span style="color: #008000; font-weight: bold">new</span> <span style="color: #B00040">float</span><span style="color: #666666">[]</span> <span style="color: #666666">{.1</span>f<span style="color: #666666">,</span> <span style="color: #666666">.1</span>f<span style="color: #666666">,</span> <span style="color: #666666">.2</span>f<span style="color: #666666">,</span> <span style="color: #666666">.3</span>f<span style="color: #666666">});</span>

astra-db-java/src/main/java/overview.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ <h1>Overview</h1>
3333
<li>In <b><a href="https://docs.datastax.com/en/astra/astra-db-vector/clients/usage.html">Datastax Astra Client documentation page</a></b></li>
3434
<li>In the <b> <a href="https://github.com/datastax/astra-db-java">github repository</a></b> with an {@code examples} section. </li>
3535
</ul>
36-
<p><img src="https://datastaxdevs.github.io/astra-db-java/overview.png" alt="logicial overview" height="400px"/></p>
36+
<p><img src="https://datastaxdevs.github.io/astra-db-java/overview.png" alt="logicial overview" height="400px"></p>
3737
<h2>Installation</h2>
3838

3939
<p>For Maven, add the following dependency to your <code>pom.xml</code>:</p>

0 commit comments

Comments
 (0)