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 classOsmDataManager.InstanceHolder
-
Constructor Summary
Constructors Modifier Constructor Description privateOsmDataManager()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsDataSet(DataSet ds)Determines if the list of data sets managed by JOSM containsds.DataSetgetActiveDataSet()Gets the active data set (can be read-only).DataSetgetEditDataSet()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 OsmDataManagergetInstance()Returns the unique instance.voidsetActiveDataSet(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:IOsmDataManagerReplies 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:
getInProgressSelectionin 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:IOsmDataManagerReplies 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:
getInProgressISelectionin interfaceIOsmDataManager- Returns:
- The current selected primitives, from a end-user point of view. Can be
null.
-
getEditDataSet
public DataSet getEditDataSet()
Description copied from interface:IOsmDataManagerGets the active edit data set (not read-only).- Specified by:
getEditDataSetin interfaceIOsmDataManager- Returns:
- That data set,
null. - See Also:
IOsmDataManager.getActiveDataSet()
-
getActiveDataSet
public DataSet getActiveDataSet()
Description copied from interface:IOsmDataManagerGets the active data set (can be read-only).- Specified by:
getActiveDataSetin interfaceIOsmDataManager- Returns:
- That data set,
null. - See Also:
IOsmDataManager.getEditDataSet()
-
setActiveDataSet
public void setActiveDataSet(DataSet ds)
Description copied from interface:IOsmDataManagerSets the active data set (and also edit data set if not read-only).- Specified by:
setActiveDataSetin interfaceIOsmDataManager- Parameters:
ds- New data set, ornull
-
containsDataSet
public boolean containsDataSet(DataSet ds)
Description copied from interface:IOsmDataManagerDetermines if the list of data sets managed by JOSM containsds.- Specified by:
containsDataSetin interfaceIOsmDataManager- Parameters:
ds- the data set to look for- Returns:
trueif the list of data sets managed by JOSM containsds
-
-