<commit_before>/*
 *  Copyright (c) 2017 <NAME> and others
 *   All rights reserved. This program and the accompanying materials
 *   are made available under the terms of the Eclipse Public License v1.0
 *   and Apache License v2.0 which accompanies this distribution.
 *   The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
 *   and the Apache License v2.0 is available at http://www.opensource.org/licenses/apache2.0.php.
 *
 *   You may elect to redistribute this code under either of these licenses.
 *
 *   Contributors:
 *
 *   <NAME>
 */
package org.jnosql.artemis.graph;

import org.jnosql.diana.api.Value;

import java.util.List;
import java.util.Optional;

/**
 * The representation of {@link org.apache.tinkerpop.gremlin.structure.Edge} that links two Entity.
 * Along with its Property objects, an Edge has both a Direction and a label.
 *
 * @param <IN>  the in Entity
 * @param <OUT> the out entity
 *              <pre>outVertex ---label---> inVertex.</pre>
 */
public interface EdgeEntity<IN, OUT> {

    /**
     * Returns the id
     *
     * @return the id otherwise {@link Optional#empty()}
     */
    Optional<Value> getId();

    /**
     * Returns the label of the vertex
     *
     * @return the label
     */
    String getLabel();

    /**
     * Gets the IN entity
     *
     * @return the IN entity
     */
    IN getIn();

    /**
     * Gets the Out entity
     *
     * @return the Out entity
     */
    OUT getOut();

    /**
     * Returns the properties of this vertex
     *
     * @return the properties
     */
    List<ArtemisElement> getProperties();


    /**
     * Add a new element in the Vertex
     *
     * @param key   the key
     * @param value the information
     * @throws NullPointerException when either key or value are null<commit_msg>Improves documentation<commit_after>/*
 *  Copyright (c) 2017 <NAME> and others
 *   All rights reserved. This program and the accompanying materials
 *   are made available under the terms of the Eclipse Public License v1.0
 *   and Apache License v2.0 which accompanies this distribution.
 *   The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
 *   and the Apache License v2.0 is available at http://www.opensource.org/licenses/apache2.0.php.
 *
 *   You may elect to redistribute this code under either of these licenses.
 *
 *   Contributors:
 *
 *   <NAME>
 */
package org.jnosql.artemis.graph;

import org.jnosql.diana.api.Value;

import java.util.List;
import java.util.Optional;

/**
 * The representation of {@link org.apache.tinkerpop.gremlin.structure.Edge} that links two Entity.
 * Along with its Property objects, an Edge has both a Direction and a label.
 *
 * @param <IN>  the inbound Entity
 * @param <OUT> the outbound entity
 *              <pre>outVertex ---label---> inVertex.</pre>
 */
public interface EdgeEntity<IN, OUT> {

    /**
     * Returns the id
     *
     * @return the id otherwise {@link Optional#empty()}
     */
    Optional<Value> getId();

    /**
     * Returns the label of the vertex
     *
     * @return the label
     */
    String getLabel();

    /**
     * Gets the inbound entity
     *
     * @return the inbound entity
     */
    IN getInbound();

    /**
     * Gets the outbound entity
     *
     * @return the outbound entity
     */
    OUT getOutbound();

    /**
     * Returns the properties of this vertex
     *
     * @return the properties
     */
    List<ArtemisElement> getProperties();


    /**
     * Add a new element in the Vertex
     *
     * @param key   the key
     * @param value the information
     * @throws NullPointerException when either key or value are null
{'fraction_non_alphanumeric': 0.10353194931248315, 'fraction_numerical': 0.007549204637368563, 'mean_word_length': 2.4288354898336415, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2277812', 'n_tokens_mistral': 1100, 'n_tokens_neox': 1063, 'n_words': 384}