Skip to content

Commit aa5ebec

Browse files
committed
chore: rename IWeaviateObject -> WeaviateObject
1 parent 57b5914 commit aa5ebec

5 files changed

Lines changed: 16 additions & 14 deletions

File tree

src/main/java/io/weaviate/client6/v1/api/collections/IWeaviateObject.java renamed to src/main/java/io/weaviate/client6/v1/api/collections/WeaviateObject.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package io.weaviate.client6.v1.api.collections;
22

3-
public interface IWeaviateObject {
3+
public interface WeaviateObject {
44
String uuid();
5+
6+
String collection();
57
}

src/main/java/io/weaviate/client6/v1/api/collections/data/BatchReference.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,20 @@
77
import com.google.gson.stream.JsonReader;
88
import com.google.gson.stream.JsonWriter;
99

10-
import io.weaviate.client6.v1.api.collections.IWeaviateObject;
10+
import io.weaviate.client6.v1.api.collections.WeaviateObject;
1111

1212
public record BatchReference(String fromCollection, String fromProperty, String fromUuid, Reference reference) {
1313

14-
public static BatchReference[] objects(IWeaviateObject fromObject, String fromProperty,
15-
IWeaviateObject... toObjects) {
14+
public static BatchReference[] objects(WeaviateObject fromObject, String fromProperty,
15+
WeaviateObject... toObjects) {
1616
return Arrays.stream(toObjects)
1717
.map(to -> new BatchReference(
1818
fromObject.collection(), fromProperty, fromObject.uuid(),
1919
Reference.object(to)))
2020
.toArray(BatchReference[]::new);
2121
}
2222

23-
public static BatchReference[] uuids(IWeaviateObject fromObject, String fromProperty,
23+
public static BatchReference[] uuids(WeaviateObject fromObject, String fromProperty,
2424
String... toUuids) {
2525
return Arrays.stream(toUuids)
2626
.map(to -> new BatchReference(

src/main/java/io/weaviate/client6/v1/api/collections/data/Reference.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import com.google.gson.stream.JsonReader;
99
import com.google.gson.stream.JsonWriter;
1010

11-
import io.weaviate.client6.v1.api.collections.IWeaviateObject;
11+
import io.weaviate.client6.v1.api.collections.WeaviateObject;
1212

1313
public record Reference(String collection, List<String> uuids) {
1414

@@ -27,13 +27,13 @@ public static Reference uuids(String... uuids) {
2727
return new Reference(null, Arrays.asList(uuids));
2828
}
2929

30-
/** Create references to single {@link IWeaviateObject}. */
31-
public static Reference object(IWeaviateObject object) {
30+
/** Create references to single {@link WeaviateObject}. */
31+
public static Reference object(WeaviateObject object) {
3232
return new Reference(object.collection(), object.uuid());
3333
}
3434

35-
/** Create references to multiple {@link IWeaviateObject}. */
36-
public static Reference[] objects(IWeaviateObject... objects) {
35+
/** Create references to multiple {@link WeaviateObject}. */
36+
public static Reference[] objects(WeaviateObject... objects) {
3737
return Arrays.stream(objects)
3838
.map(o -> new Reference(o.collection(), o.uuid()))
3939
.toArray(Reference[]::new);

src/main/java/io/weaviate/client6/v1/api/collections/data/WriteWeaviateObject.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import com.google.gson.stream.JsonReader;
2020
import com.google.gson.stream.JsonWriter;
2121

22-
import io.weaviate.client6.v1.api.collections.IWeaviateObject;
22+
import io.weaviate.client6.v1.api.collections.WeaviateObject;
2323
import io.weaviate.client6.v1.api.collections.Vectors;
2424
import io.weaviate.client6.v1.internal.ObjectBuilder;
2525

@@ -32,7 +32,7 @@ public record WriteWeaviateObject<PropertiesT>(
3232
@SerializedName("creationTimeUnix") Long createdAt,
3333
@SerializedName("lastUpdateTimeUnix") Long lastUpdatedAt,
3434

35-
Map<String, List<Reference>> references) implements IWeaviateObject {
35+
Map<String, List<Reference>> references) implements WeaviateObject {
3636

3737
public static <PropertiesT> WriteWeaviateObject<PropertiesT> of(
3838
Function<Builder<PropertiesT>, ObjectBuilder<WriteWeaviateObject<PropertiesT>>> fn) {

src/main/java/io/weaviate/client6/v1/api/collections/query/QueryWeaviateObject.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
import java.util.List;
44
import java.util.Map;
55

6-
import io.weaviate.client6.v1.api.collections.IWeaviateObject;
6+
import io.weaviate.client6.v1.api.collections.WeaviateObject;
77
import io.weaviate.client6.v1.api.collections.Vectors;
88

99
public record QueryWeaviateObject<PropertiesT>(
1010
String collection,
1111
PropertiesT properties,
1212
Map<String, List<QueryWeaviateObject<Object>>> references,
13-
QueryMetadata metadata) implements IWeaviateObject {
13+
QueryMetadata metadata) implements WeaviateObject {
1414

1515
/** Shorthand for accesing objects's UUID from metadata. */
1616
@Override

0 commit comments

Comments
 (0)