Class DataStore<O extends IPrimitive,N extends INode,W extends IWay<N>,R extends IRelation<?>>
- java.lang.Object
-
- org.openstreetmap.josm.data.vector.DataStore<O,N,W,R>
-
- Type Parameters:
O
- Type of OSM primitiveN
- Type of nodeW
- Type of wayR
- Type of relation
- Direct Known Subclasses:
VectorDataStore
class DataStore<O extends IPrimitive,N extends INode,W extends IWay<N>,R extends IRelation<?>> extends java.lang.Object
A class that stores data (essentially a simpleDataSet
)- Since:
- 17862
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
DataStore.LocalQuadBucketPrimitiveStore<N extends INode,W extends IWay<N>,R extends IRelation<?>>
This literally only exists to makeQuadBucketPrimitiveStore.removePrimitive(org.openstreetmap.josm.data.osm.IPrimitive)
public
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Set<org.openstreetmap.gui.jmapviewer.Tile>
addedTiles
protected Storage<O>
allPrimitives
protected java.util.Collection<DataSource>
dataSources
protected java.util.Map<PrimitiveId,O>
primitivesMap
private java.util.concurrent.locks.ReentrantReadWriteLock
readWriteLock
protected DataStore.LocalQuadBucketPrimitiveStore<N,W,R>
store
-
Constructor Summary
Constructors Constructor Description DataStore()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDataSource(DataSource dataSource)
Add a datasource to this data setprotected void
addPrimitive(O primitive)
Add a primitive to this datasetStorage<O>
getAllPrimitives()
java.util.Collection<DataSource>
getDataSources()
java.util.Map<PrimitiveId,O>
getPrimitivesMap()
Get the primitives map.protected java.util.concurrent.locks.ReentrantReadWriteLock
getReadWriteLock()
Get the read/write lock for this datasetQuadBucketPrimitiveStore<N,W,R>
getStore()
protected void
removePrimitive(O primitive)
Add a primitive to this dataset
-
-
-
Field Detail
-
store
protected final DataStore.LocalQuadBucketPrimitiveStore<N extends INode,W extends IWay<N>,R extends IRelation<?>> store
-
allPrimitives
protected final Storage<O extends IPrimitive> allPrimitives
-
addedTiles
protected final java.util.Set<org.openstreetmap.gui.jmapviewer.Tile> addedTiles
-
primitivesMap
protected final java.util.Map<PrimitiveId,O extends IPrimitive> primitivesMap
-
dataSources
protected final java.util.Collection<DataSource> dataSources
-
readWriteLock
private final java.util.concurrent.locks.ReentrantReadWriteLock readWriteLock
-
-
Constructor Detail
-
DataStore
DataStore()
-
-
Method Detail
-
getStore
public QuadBucketPrimitiveStore<N,W,R> getStore()
-
getAllPrimitives
public Storage<O> getAllPrimitives()
-
getPrimitivesMap
public java.util.Map<PrimitiveId,O> getPrimitivesMap()
Get the primitives map. The returned map is aCollections.synchronizedMap(java.util.Map<K, V>)
. Please synchronize on it.- Returns:
- The Primitives map.
-
getDataSources
public java.util.Collection<DataSource> getDataSources()
-
addDataSource
public void addDataSource(DataSource dataSource)
Add a datasource to this data set- Parameters:
dataSource
- The datasource to add
-
removePrimitive
protected void removePrimitive(O primitive)
Add a primitive to this dataset- Parameters:
primitive
- The primitive to remove
-
addPrimitive
protected void addPrimitive(O primitive)
Add a primitive to this dataset- Parameters:
primitive
- The primitive to add
-
getReadWriteLock
protected java.util.concurrent.locks.ReentrantReadWriteLock getReadWriteLock()
Get the read/write lock for this dataset- Returns:
- The read/write lock
-
-