diff --git a/vitrivr-engine-base/src/main/kotlin/org/vitrivr/engine/base/database/cottontail/retrievable/RetrievableReader.kt b/vitrivr-engine-base/src/main/kotlin/org/vitrivr/engine/base/database/cottontail/retrievable/RetrievableReader.kt index 9275f8ac..2b80ae17 100644 --- a/vitrivr-engine-base/src/main/kotlin/org/vitrivr/engine/base/database/cottontail/retrievable/RetrievableReader.kt +++ b/vitrivr-engine-base/src/main/kotlin/org/vitrivr/engine/base/database/cottontail/retrievable/RetrievableReader.kt @@ -36,11 +36,11 @@ private val logger: KLogger = KotlinLogging.logger {} internal class RetrievableReader(private val connection: CottontailConnection) : RetrievableReader { /** The [Name.EntityName] for this [RetrievableInitializer]. */ private val entityName: Name.EntityName = - Name.EntityName(this.connection.schemaName, CottontailConnection.RETRIEVABLE_ENTITY_NAME) + Name.EntityName.create(this.connection.schemaName, CottontailConnection.RETRIEVABLE_ENTITY_NAME) /** The [Name.EntityName] of the relationship entity. */ private val relationshipEntityName: Name.EntityName = - Name.EntityName(this.connection.schemaName, CottontailConnection.RELATIONSHIP_ENTITY_NAME) + Name.EntityName.create(this.connection.schemaName, CottontailConnection.RELATIONSHIP_ENTITY_NAME) /** * Returns the [Retrievable]s that matches the provided [RetrievableId] diff --git a/vitrivr-engine-base/src/main/kotlin/org/vitrivr/engine/base/database/cottontail/retrievable/RetrievableWriter.kt b/vitrivr-engine-base/src/main/kotlin/org/vitrivr/engine/base/database/cottontail/retrievable/RetrievableWriter.kt index a959b9b0..0868b022 100644 --- a/vitrivr-engine-base/src/main/kotlin/org/vitrivr/engine/base/database/cottontail/retrievable/RetrievableWriter.kt +++ b/vitrivr-engine-base/src/main/kotlin/org/vitrivr/engine/base/database/cottontail/retrievable/RetrievableWriter.kt @@ -35,10 +35,10 @@ private val logger: KLogger = KotlinLogging.logger {} internal class RetrievableWriter(private val connection: CottontailConnection) : RetrievableWriter { /** The [Name.EntityName] of the retrievable entity. */ - private val entityName: Name.EntityName = Name.EntityName(this.connection.schemaName, CottontailConnection.RETRIEVABLE_ENTITY_NAME) + private val entityName: Name.EntityName = Name.EntityName.create(this.connection.schemaName, CottontailConnection.RETRIEVABLE_ENTITY_NAME) /** The [Name.EntityName] of the relationship entity. */ - private val relationshipEntityName: Name.EntityName = Name.EntityName(this.connection.schemaName, CottontailConnection.RELATIONSHIP_ENTITY_NAME) + private val relationshipEntityName: Name.EntityName = Name.EntityName.create(this.connection.schemaName, CottontailConnection.RELATIONSHIP_ENTITY_NAME) /** * Adds a new [Retrievable] to the database using this [RetrievableWriter] instance. diff --git a/vitrivr-engine-core/src/main/kotlin/org/vitrivr/engine/core/model/retrievable/Retrieved.kt b/vitrivr-engine-core/src/main/kotlin/org/vitrivr/engine/core/model/retrievable/Retrieved.kt index 202774d6..b7aaa06c 100644 --- a/vitrivr-engine-core/src/main/kotlin/org/vitrivr/engine/core/model/retrievable/Retrieved.kt +++ b/vitrivr-engine-core/src/main/kotlin/org/vitrivr/engine/core/model/retrievable/Retrieved.kt @@ -110,6 +110,8 @@ interface Retrieved : Retrievable { fun PlusProperties(retrieved: Retrieved, properties: Map = mutableMapOf()) = when(retrieved) { is RetrievedWithProperties -> retrieved + is ScorePlusRelationship -> ScorePlusRelationshipPlusProperties(retrieved, properties) + //TODO other combinations @@ -132,11 +134,16 @@ interface Retrieved : Retrievable { override val relationships: Set = mutableSetOf() ) : Retrieved by retrieved, RetrievedWithRelationship - class ScorePlusRelationship( + open class ScorePlusRelationship( retrieved: RetrievedWithScore, override val relationships: Set = mutableSetOf() ) : RetrievedWithScore by retrieved, RetrievedWithRelationship + class ScorePlusRelationshipPlusProperties( + retrieved: ScorePlusRelationship, + override val properties: Map = mutableMapOf() + ) : ScorePlusRelationship(retrieved, retrieved.relationships), RetrievedWithProperties + class RetrievedPlusProperties( retrieved: Retrieved, override val properties: Map = mutableMapOf()