-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/dev' into dev
- Loading branch information
Showing
81 changed files
with
1,677 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
vitrivr-engine-core/src/main/kotlin/org/vitrivr/engine/core/model/descriptor/Descriptor.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
...ne-core/src/main/kotlin/org/vitrivr/engine/core/model/descriptor/scalar/TextDescriptor.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package org.vitrivr.engine.core.model.descriptor.scalar | ||
|
||
import org.vitrivr.engine.core.model.descriptor.Attribute | ||
import org.vitrivr.engine.core.model.descriptor.DescriptorId | ||
import org.vitrivr.engine.core.model.descriptor.scalar.ScalarDescriptor.Companion.VALUE_ATTRIBUTE_NAME | ||
import org.vitrivr.engine.core.model.metamodel.Schema | ||
import org.vitrivr.engine.core.model.retrievable.RetrievableId | ||
import org.vitrivr.engine.core.model.types.Type | ||
import org.vitrivr.engine.core.model.types.Value | ||
|
||
/** | ||
* A [ScalarDescriptor] using a [String] value. | ||
* | ||
* Compared to [StringDescriptor]s, [TextDescriptor]s are typically longer and can be used to store larger | ||
* amounts of text. Certain databases use different storage mechanisms for [StringDescriptor]s and [TextDescriptor]s. | ||
* | ||
* @author Ralph Gasser | ||
* @version 1.0.0 | ||
*/ | ||
data class TextDescriptor( | ||
override var id: DescriptorId, | ||
override var retrievableId: RetrievableId?, | ||
override val value: Value.Text, | ||
override val field: Schema.Field<*, TextDescriptor>? = null | ||
) : ScalarDescriptor<Value.Text> { | ||
companion object { | ||
private val SCHEMA = listOf(Attribute(VALUE_ATTRIBUTE_NAME, Type.Text)) | ||
} | ||
|
||
/** | ||
* Returns the [Attribute] [List ]of this [StringDescriptor]. | ||
* | ||
* @return [List] of [Attribute] | ||
*/ | ||
override fun layout(): List<Attribute> = SCHEMA | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
vitrivr-engine-core/src/main/kotlin/org/vitrivr/engine/core/model/retrievable/Retrievable.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
...vr-engine-core/src/main/kotlin/org/vitrivr/engine/core/model/serializer/DateSerializer.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package org.vitrivr.engine.core.model.serializer | ||
|
||
import kotlinx.serialization.KSerializer | ||
import kotlinx.serialization.descriptors.PrimitiveKind | ||
import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor | ||
import kotlinx.serialization.encoding.Decoder | ||
import kotlinx.serialization.encoding.Encoder | ||
import java.util.* | ||
|
||
object DateSerializer: KSerializer<Date> { | ||
override val descriptor = PrimitiveSerialDescriptor("Date", PrimitiveKind.LONG) | ||
override fun serialize(encoder: Encoder, value: Date) = encoder.encodeLong(value.time) | ||
override fun deserialize(decoder: Decoder): Date = Date(decoder.decodeLong()) | ||
} |
15 changes: 15 additions & 0 deletions
15
...ngine-core/src/main/kotlin/org/vitrivr/engine/core/model/serializer/DateTimeSerializer.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package org.vitrivr.engine.core.model.serializer | ||
|
||
import kotlinx.serialization.KSerializer | ||
import kotlinx.serialization.descriptors.PrimitiveKind | ||
import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor | ||
import kotlinx.serialization.encoding.Decoder | ||
import kotlinx.serialization.encoding.Encoder | ||
import org.vitrivr.engine.core.model.types.Value | ||
import java.util.* | ||
|
||
object DateTimeSerializer: KSerializer<Value.DateTime> { | ||
override val descriptor = PrimitiveSerialDescriptor("DateTime", PrimitiveKind.LONG) | ||
override fun serialize(encoder: Encoder, value: Value.DateTime) = encoder.encodeLong(value.value.time) | ||
override fun deserialize(decoder: Decoder): Value.DateTime = Value.DateTime(Date(decoder.decodeLong())) | ||
} |
Oops, something went wrong.