Package org.entur.netex.index.api
Interface VersionedNetexEntityIndex<V extends org.rutebanken.netex.model.EntityStructure>
- Type Parameters:
V-
- All Known Implementing Classes:
VersionedNetexEntityIndexImpl
public interface VersionedNetexEntityIndex<V extends org.rutebanken.netex.model.EntityStructure>
An index of versioned NeTEx entities
-
Method Summary
Modifier and TypeMethodDescriptionMap<String,Collection<V>> Get all versions of all entitiesgetAllVersions(String id) Lookup all versions of element with the givenid.Return the element with the latest version with the givenid.Return the latest version of all entitiesgetVersion(String id, String version) Return the element with the givenidandversion.voidput(String id, Collection<V> entities) Put all versions of an entity into the index.voidputAll(Collection<V> entities) Put all entities into the collection If an entity already exists in the index, all versions will be replaced.voidRemove all versions of an entity from the index given its id
-
Method Details
-
getLatestVersion
Return the element with the latest version with the givenid. Returnsnullif no element is found. -
getVersion
Return the element with the givenidandversion. Returnsnullif no element is found- Parameters:
id-version-- Returns:
-
getLatestVersions
Collection<V> getLatestVersions()Return the latest version of all entities- Returns:
-
getAllVersions
Lookup all versions of element with the givenid.- Returns:
- an empty collection if no elements are found.
-
getAllVersions
Map<String,Collection<V>> getAllVersions()Get all versions of all entities- Returns:
-
put
Put all versions of an entity into the index. If the entity already exists in the index, all versions will be replaced.- Parameters:
id-entities-
-
putAll
Put all entities into the collection If an entity already exists in the index, all versions will be replaced.- Parameters:
entities-
-
remove
Remove all versions of an entity from the index given its id
-