Package org.openstreetmap.josm.data.osm
Class OsmDataManager
- java.lang.Object
-
- org.openstreetmap.josm.data.osm.OsmDataManager
-
- All Implemented Interfaces:
IOsmDataManager
public final class OsmDataManager extends java.lang.Object implements IOsmDataManager
Global OSM dataset registry.- Since:
- 14143
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
OsmDataManager.InstanceHolder
-
Constructor Summary
Constructors Modifier Constructor Description private
OsmDataManager()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsDataSet(DataSet ds)
Determines if the list of data sets managed by JOSM containsds
.DataSet
getActiveDataSet()
Gets the active data set (can be read-only).DataSet
getEditDataSet()
Gets the active edit data set (not read-only).java.util.Collection<? extends IPrimitive>
getInProgressISelection()
Replies the current selected primitives, from a end-user point of view.java.util.Collection<OsmPrimitive>
getInProgressSelection()
Replies the current selected OSM primitives, from a end-user point of view.static OsmDataManager
getInstance()
Returns the unique instance.void
setActiveDataSet(DataSet ds)
Sets the active data set (and also edit data set if not read-only).
-
-
-
Constructor Detail
-
OsmDataManager
private OsmDataManager()
-
-
Method Detail
-
getInstance
public static OsmDataManager getInstance()
Returns the unique instance.- Returns:
- the unique instance
-
getInProgressSelection
public java.util.Collection<OsmPrimitive> getInProgressSelection()
Description copied from interface:IOsmDataManager
Replies the current selected OSM primitives, from a end-user point of view. It is not always technically the same collection of primitives thanOsmData.getSelected()
.- Specified by:
getInProgressSelection
in interfaceIOsmDataManager
- Returns:
- The current selected OSM primitives, from a end-user point of view. Can be
null
.
-
getInProgressISelection
public java.util.Collection<? extends IPrimitive> getInProgressISelection()
Description copied from interface:IOsmDataManager
Replies the current selected primitives, from a end-user point of view. It is not always technically the same collection of primitives thanOsmData.getSelected()
.- Specified by:
getInProgressISelection
in interfaceIOsmDataManager
- Returns:
- The current selected primitives, from a end-user point of view. Can be
null
.
-
getEditDataSet
public DataSet getEditDataSet()
Description copied from interface:IOsmDataManager
Gets the active edit data set (not read-only).- Specified by:
getEditDataSet
in interfaceIOsmDataManager
- Returns:
- That data set,
null
. - See Also:
IOsmDataManager.getActiveDataSet()
-
getActiveDataSet
public DataSet getActiveDataSet()
Description copied from interface:IOsmDataManager
Gets the active data set (can be read-only).- Specified by:
getActiveDataSet
in interfaceIOsmDataManager
- Returns:
- That data set,
null
. - See Also:
IOsmDataManager.getEditDataSet()
-
setActiveDataSet
public void setActiveDataSet(DataSet ds)
Description copied from interface:IOsmDataManager
Sets the active data set (and also edit data set if not read-only).- Specified by:
setActiveDataSet
in interfaceIOsmDataManager
- Parameters:
ds
- New data set, ornull
-
containsDataSet
public boolean containsDataSet(DataSet ds)
Description copied from interface:IOsmDataManager
Determines if the list of data sets managed by JOSM containsds
.- Specified by:
containsDataSet
in interfaceIOsmDataManager
- Parameters:
ds
- the data set to look for- Returns:
true
if the list of data sets managed by JOSM containsds
-
-