All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.tinkerpop.gremlin.ogm.reflection.GraphDescription.kt Maven / Gradle / Ivy

There is a newer version: 0.21.0
Show newest version
package org.apache.tinkerpop.gremlin.ogm.reflection

import org.apache.tinkerpop.gremlin.ogm.elements.Edge
import org.apache.tinkerpop.gremlin.ogm.elements.Vertex
import org.apache.tinkerpop.gremlin.ogm.mappers.PropertyBiMapper
import org.apache.tinkerpop.gremlin.ogm.mappers.SerializedProperty
import org.apache.tinkerpop.gremlin.ogm.mappers.scalar.InstantPropertyMapper
import org.apache.tinkerpop.gremlin.ogm.mappers.scalar.UUIDPropertyMapper
import org.apache.tinkerpop.gremlin.ogm.mappers.scalar.identity.*
import org.apache.tinkerpop.gremlin.ogm.paths.relationships.Relationship
import java.time.Instant
import java.util.*
import kotlin.reflect.KClass

/**
 * An interface that describes a graph's vertices, edges, object properties, scalar properties and is
 * used by a GraphMapper to serialize/deserialize these instances to/from the graph, respectively.
 */
interface GraphDescription {

    /**
     *  Vertices
     */

    val vertexClasses: Set>

    fun  getVertexDescription(vertexClass: KClass): VertexDescription

    val vertexLabels: Set

    fun  getVertexDescription(vertexLabel: String): VertexDescription

    /**
     * Edges
     */

    val edgeClasses: Set>>

    fun > getEdgeDescription(edgeClass: KClass): EdgeDescription

    val edgeLabels: Set

    fun  getEdgeRelationship(edgeLabel: String): Relationship

    fun > getEdgeDescription(edgeLabel: String): EdgeDescription?

    /**
     * Nested Objects
     */

    val objectPropertyClasses: Set>

    fun  getObjectPropertyDescription(objectPropertyClass: KClass): ObjectDescription

    /**
     * Scalars
     */

    val scalarPropertyClasses: Set>

    fun  getScalarPropertyMapper(scalarClass: KClass): PropertyBiMapper
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy