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

org.entur.netex.index.api.NetexEntityIndex Maven / Gradle / Ivy

There is a newer version: 3.1.29
Show newest version
package org.entur.netex.index.api;

import org.rutebanken.netex.model.EntityStructure;

import java.util.Collection;

/**
 * A simple index of NeTEx entities of a specific type
 * @param 
 */
public interface NetexEntityIndex {
    /**
     * Get an entity by its id
     *
     * @param id
     * @return The entity
     */
    V get(String id);

    /**
     * Get all entities in the index
     *
     * @return A collection of the entity type
     */
    Collection getAll();

    /**
     * Put an entity into the collection
     * If the entity already exists in the index, all versions
     * will be replaced.
     * @param entity
     */
    void put(String id, V entity);

    /**
     * Put all entities into the collection
     * If an entity already exists in the index, all versions
     * will be replaced.
     * @param entities
     */
    void putAll(Collection entities);

    /**
     * Remove an entity from the index given its id
     * @param id
     */
    void remove(String id);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy