[GRASS-SVN] r60213 - in grass/trunk: lib/python/temporal temporal/t.support temporal/t.unregister
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon May 12 16:07:03 PDT 2014
Author: huhabla
Date: 2014-05-12 16:07:02 -0700 (Mon, 12 May 2014)
New Revision: 60213
Modified:
grass/trunk/lib/python/temporal/abstract_map_dataset.py
grass/trunk/lib/python/temporal/abstract_space_time_dataset.py
grass/trunk/lib/python/temporal/register.py
grass/trunk/lib/python/temporal/space_time_datasets.py
grass/trunk/lib/python/temporal/temporal_extent.py
grass/trunk/temporal/t.support/t.support.py
grass/trunk/temporal/t.unregister/t.unregister.py
Log:
API fixes for consistent method naming
Modified: grass/trunk/lib/python/temporal/abstract_map_dataset.py
===================================================================
--- grass/trunk/lib/python/temporal/abstract_map_dataset.py 2014-05-12 15:16:51 UTC (rev 60212)
+++ grass/trunk/lib/python/temporal/abstract_map_dataset.py 2014-05-12 23:07:02 UTC (rev 60213)
@@ -214,7 +214,7 @@
self.print_topology_info()
self.spatial_extent.print_info()
self.metadata.print_info()
- datasets = self.get_registered_datasets()
+ datasets = self.get_registered_stds()
count = 0
string = ""
if datasets is not None:
@@ -236,7 +236,7 @@
self.temporal_extent.print_shell_info()
self.spatial_extent.print_shell_info()
self.metadata.print_shell_info()
- datasets = self.get_registered_datasets()
+ datasets = self.get_registered_stds()
count = 0
string = ""
if datasets is not None:
@@ -875,7 +875,7 @@
dbif, connected = init_dbif(dbif)
# Get all datasets in which this map is registered
- datasets = self.get_registered_datasets(dbif)
+ datasets = self.get_registered_stds(dbif)
# For each stds in which the map is registered
if datasets is not None:
@@ -899,7 +899,7 @@
return statement
- def get_registered_datasets(self, dbif=None):
+ def get_registered_stds(self, dbif=None):
"""!Return all space time dataset ids in which this map is registered
as as a list of strings, or None if this map is not
registered in any space time dataset.
@@ -923,7 +923,7 @@
return datasets
- def add_dataset_to_register(self, stds_id, dbif=None, execute=True):
+ def add_stds_to_register(self, stds_id, dbif=None, execute=True):
"""!Add a new space time dataset to the register
@param stds_id The id of the space time dataset to be registered
@@ -937,7 +937,7 @@
"""
dbif, connected = init_dbif(dbif=dbif)
- datasets = self.get_registered_datasets(dbif=dbif)
+ datasets = self.get_registered_stds(dbif=dbif)
if stds_id is None or stds_id == "":
return ""
@@ -969,7 +969,7 @@
return statement
- def remove_dataset_from_register(self, stds_id, dbif=None, execute=True):
+ def remove_stds_from_register(self, stds_id, dbif=None, execute=True):
"""!Remove a space time dataset from the register
@param stds_id The id of the space time dataset to removed from the registered
@@ -983,7 +983,7 @@
"""
dbif, connected = init_dbif(dbif)
- datasets = self.get_registered_datasets(dbif=dbif)
+ datasets = self.get_registered_stds(dbif=dbif)
# Check if no datasets are present
if datasets is None:
Modified: grass/trunk/lib/python/temporal/abstract_space_time_dataset.py
===================================================================
--- grass/trunk/lib/python/temporal/abstract_space_time_dataset.py 2014-05-12 15:16:51 UTC (rev 60212)
+++ grass/trunk/lib/python/temporal/abstract_space_time_dataset.py 2014-05-12 23:07:02 UTC (rev 60213)
@@ -1810,7 +1810,7 @@
dbif=dbif)
# Save the datasets that must be updated
- datasets = map.get_registered_datasets(dbif)
+ datasets = map.get_registered_stds(dbif)
if datasets:
for dataset in datasets:
datatsets_to_modify[dataset] = dataset
@@ -1882,8 +1882,8 @@
# We need to rename the space time dataset in the maps register table
if maps:
for map in maps:
- map.remove_dataset_from_register(stds_id=old_ident, dbif=dbif)
- map.add_dataset_to_register(stds_id=ident, dbif=dbif)
+ map.remove_stds_from_register(stds_id=old_ident, dbif=dbif)
+ map.add_stds_to_register(stds_id=ident, dbif=dbif)
# Execute the accumulated statements
dbif.execute_transaction(statement)
@@ -2111,7 +2111,7 @@
return False
# Register the stds in the map stds register table column
- statement += map.add_dataset_to_register(stds_id=self.base.get_id(),
+ statement += map.add_stds_to_register(stds_id=self.base.get_id(),
dbif=dbif, execute=False)
# Now put the raster name in the stds map register table
@@ -2179,7 +2179,7 @@
# Remove the space time dataset from the dataset register
# We need to execute the statement here, otherwise the space time dataset will not be
# removed correctly
- map.remove_dataset_from_register(self.base.get_id(),
+ map.remove_stds_from_register(self.base.get_id(),
dbif=dbif, execute=True)
# Remove the map from the space time dataset register
Modified: grass/trunk/lib/python/temporal/register.py
===================================================================
--- grass/trunk/lib/python/temporal/register.py 2014-05-12 15:16:51 UTC (rev 60212)
+++ grass/trunk/lib/python/temporal/register.py 2014-05-12 23:07:02 UTC (rev 60213)
@@ -243,7 +243,7 @@
map.select(dbif)
# Save the datasets that must be updated
- datasets = map.get_registered_datasets(dbif)
+ datasets = map.get_registered_stds(dbif)
if datasets is not None:
for dataset in datasets:
if dataset != "":
Modified: grass/trunk/lib/python/temporal/space_time_datasets.py
===================================================================
--- grass/trunk/lib/python/temporal/space_time_datasets.py 2014-05-12 15:16:51 UTC (rev 60212)
+++ grass/trunk/lib/python/temporal/space_time_datasets.py 2014-05-12 23:07:02 UTC (rev 60213)
@@ -51,6 +51,7 @@
>>> rmap.get_temporal_extent_as_tuple()
(datetime.datetime(1999, 1, 15, 0, 0), None)
>>> rmap.load()
+ True
>>> rmap.spatial_extent.print_info()
+-------------------- Spatial extent ----------------------------------------+
| North:...................... 80.0
@@ -366,6 +367,7 @@
>>> r3map.get_temporal_extent_as_tuple()
(datetime.datetime(1999, 1, 15, 0, 0), None)
>>> r3map.load()
+ True
>>> r3map.spatial_extent.print_info()
+-------------------- Spatial extent ----------------------------------------+
| North:...................... 80.0
@@ -694,6 +696,7 @@
>>> vmap.get_temporal_extent_as_tuple()
(datetime.datetime(1999, 1, 15, 0, 0), None)
>>> vmap.load()
+ True
>>> vmap.absolute_time.print_info()
+-------------------- Absolute time -----------------------------------------+
| Start time:................. 1999-01-15 00:00:00
Modified: grass/trunk/lib/python/temporal/temporal_extent.py
===================================================================
--- grass/trunk/lib/python/temporal/temporal_extent.py 2014-05-12 15:16:51 UTC (rev 60212)
+++ grass/trunk/lib/python/temporal/temporal_extent.py 2014-05-12 23:07:02 UTC (rev 60213)
@@ -27,7 +27,7 @@
###############################################################################
-class AbstractTemporalExtent(SQLDatabaseInterface):
+class TemporalExtent(SQLDatabaseInterface):
"""!This is the abstract time base class for relative and absolute time objects
It abstract class implements the interface to absolute and relative time.
@@ -42,7 +42,7 @@
@code
>>> init()
- >>> A = AbstractTemporalExtent(table="raster_absolute_time",
+ >>> A = TemporalExtent(table="raster_absolute_time",
... ident="soil at PERMANENT", start_time=datetime(2001, 01, 01),
... end_time=datetime(2005,01,01) )
>>> A.id
@@ -58,7 +58,7 @@
start_time=2001-01-01 00:00:00
end_time=2005-01-01 00:00:00
>>> # relative time
- >>> A = AbstractTemporalExtent(table="raster_absolute_time",
+ >>> A = TemporalExtent(table="raster_absolute_time",
... ident="soil at PERMANENT", start_time=0, end_time=1 )
>>> A.id
'soil at PERMANENT'
@@ -95,14 +95,14 @@
@code
- >>> A = AbstractTemporalExtent(start_time=5, end_time=6 )
+ >>> A = TemporalExtent(start_time=5, end_time=6 )
>>> inter = A.intersect(A)
>>> inter.print_info()
| Start time:................. 5
| End time:................... 6
- >>> A = AbstractTemporalExtent(start_time=5, end_time=6 )
- >>> B = AbstractTemporalExtent(start_time=5, end_time=7 )
+ >>> A = TemporalExtent(start_time=5, end_time=6 )
+ >>> B = TemporalExtent(start_time=5, end_time=7 )
>>> inter = A.intersect(B)
>>> inter.print_info()
| Start time:................. 5
@@ -112,8 +112,8 @@
| Start time:................. 5
| End time:................... 6
- >>> A = AbstractTemporalExtent(start_time=3, end_time=6 )
- >>> B = AbstractTemporalExtent(start_time=5, end_time=7 )
+ >>> A = TemporalExtent(start_time=3, end_time=6 )
+ >>> B = TemporalExtent(start_time=5, end_time=7 )
>>> inter = A.intersect(B)
>>> inter.print_info()
| Start time:................. 5
@@ -123,8 +123,8 @@
| Start time:................. 5
| End time:................... 6
- >>> A = AbstractTemporalExtent(start_time=3, end_time=8 )
- >>> B = AbstractTemporalExtent(start_time=5, end_time=6 )
+ >>> A = TemporalExtent(start_time=3, end_time=8 )
+ >>> B = TemporalExtent(start_time=5, end_time=6 )
>>> inter = A.intersect(B)
>>> inter.print_info()
| Start time:................. 5
@@ -134,8 +134,8 @@
| Start time:................. 5
| End time:................... 6
- >>> A = AbstractTemporalExtent(start_time=5, end_time=8 )
- >>> B = AbstractTemporalExtent(start_time=3, end_time=6 )
+ >>> A = TemporalExtent(start_time=5, end_time=8 )
+ >>> B = TemporalExtent(start_time=3, end_time=6 )
>>> inter = A.intersect(B)
>>> inter.print_info()
| Start time:................. 5
@@ -145,8 +145,8 @@
| Start time:................. 5
| End time:................... 6
- >>> A = AbstractTemporalExtent(start_time=5, end_time=None )
- >>> B = AbstractTemporalExtent(start_time=3, end_time=6 )
+ >>> A = TemporalExtent(start_time=5, end_time=None )
+ >>> B = TemporalExtent(start_time=3, end_time=6 )
>>> inter = A.intersect(B)
>>> inter.print_info()
| Start time:................. 5
@@ -156,14 +156,14 @@
| Start time:................. 5
| End time:................... None
- >>> A = AbstractTemporalExtent(start_time=5, end_time=8 )
- >>> B = AbstractTemporalExtent(start_time=3, end_time=4 )
+ >>> A = TemporalExtent(start_time=5, end_time=8 )
+ >>> B = TemporalExtent(start_time=3, end_time=4 )
>>> inter = A.intersect(B)
>>> print inter
None
- >>> A = AbstractTemporalExtent(start_time=5, end_time=8 )
- >>> B = AbstractTemporalExtent(start_time=3, end_time=None )
+ >>> A = TemporalExtent(start_time=5, end_time=8 )
+ >>> B = TemporalExtent(start_time=3, end_time=None )
>>> inter = A.intersect(B)
>>> print inter
None
@@ -176,10 +176,10 @@
return None
if self.D["end_time"] is None:
- return AbstractTemporalExtent(start_time=self.D["start_time"])
+ return TemporalExtent(start_time=self.D["start_time"])
if extent.D["end_time"] is None:
- return AbstractTemporalExtent(start_time=extent.D["start_time"])
+ return TemporalExtent(start_time=extent.D["start_time"])
start = None
end = None
@@ -199,8 +199,8 @@
unit=self.get_unit())
elif issubclass(type(self), AbsoluteTemporalExtent):
return AbsoluteTemporalExtent(start_time=start, end_time=end)
- elif issubclass(type(self), AbstractTemporalExtent):
- return AbstractTemporalExtent(start_time=start, end_time=end)
+ elif issubclass(type(self), TemporalExtent):
+ return TemporalExtent(start_time=start, end_time=end)
def disjoint_union(self, extent):
"""!Creates a disjoint union with this temporal extent and the provided one.
@@ -213,14 +213,14 @@
@code
- >>> A = AbstractTemporalExtent(start_time=5, end_time=6 )
+ >>> A = TemporalExtent(start_time=5, end_time=6 )
>>> inter = A.intersect(A)
>>> inter.print_info()
| Start time:................. 5
| End time:................... 6
- >>> A = AbstractTemporalExtent(start_time=5, end_time=6 )
- >>> B = AbstractTemporalExtent(start_time=5, end_time=7 )
+ >>> A = TemporalExtent(start_time=5, end_time=6 )
+ >>> B = TemporalExtent(start_time=5, end_time=7 )
>>> inter = A.disjoint_union(B)
>>> inter.print_info()
| Start time:................. 5
@@ -230,8 +230,8 @@
| Start time:................. 5
| End time:................... 7
- >>> A = AbstractTemporalExtent(start_time=3, end_time=6 )
- >>> B = AbstractTemporalExtent(start_time=5, end_time=7 )
+ >>> A = TemporalExtent(start_time=3, end_time=6 )
+ >>> B = TemporalExtent(start_time=5, end_time=7 )
>>> inter = A.disjoint_union(B)
>>> inter.print_info()
| Start time:................. 3
@@ -241,8 +241,8 @@
| Start time:................. 3
| End time:................... 7
- >>> A = AbstractTemporalExtent(start_time=3, end_time=8 )
- >>> B = AbstractTemporalExtent(start_time=5, end_time=6 )
+ >>> A = TemporalExtent(start_time=3, end_time=8 )
+ >>> B = TemporalExtent(start_time=5, end_time=6 )
>>> inter = A.disjoint_union(B)
>>> inter.print_info()
| Start time:................. 3
@@ -252,8 +252,8 @@
| Start time:................. 3
| End time:................... 8
- >>> A = AbstractTemporalExtent(start_time=5, end_time=8 )
- >>> B = AbstractTemporalExtent(start_time=3, end_time=6 )
+ >>> A = TemporalExtent(start_time=5, end_time=8 )
+ >>> B = TemporalExtent(start_time=3, end_time=6 )
>>> inter = A.disjoint_union(B)
>>> inter.print_info()
| Start time:................. 3
@@ -263,8 +263,8 @@
| Start time:................. 3
| End time:................... 8
- >>> A = AbstractTemporalExtent(start_time=5, end_time=None )
- >>> B = AbstractTemporalExtent(start_time=3, end_time=6 )
+ >>> A = TemporalExtent(start_time=5, end_time=None )
+ >>> B = TemporalExtent(start_time=3, end_time=6 )
>>> inter = A.disjoint_union(B)
>>> inter.print_info()
| Start time:................. 3
@@ -274,8 +274,8 @@
| Start time:................. 3
| End time:................... 6
- >>> A = AbstractTemporalExtent(start_time=5, end_time=8 )
- >>> B = AbstractTemporalExtent(start_time=3, end_time=4 )
+ >>> A = TemporalExtent(start_time=5, end_time=8 )
+ >>> B = TemporalExtent(start_time=3, end_time=4 )
>>> inter = A.disjoint_union(B)
>>> inter.print_info()
| Start time:................. 3
@@ -284,8 +284,8 @@
>>> inter.print_info()
| Start time:................. 3
| End time:................... 8
- >>> A = AbstractTemporalExtent(start_time=5, end_time=8 )
- >>> B = AbstractTemporalExtent(start_time=3, end_time=None )
+ >>> A = TemporalExtent(start_time=5, end_time=8 )
+ >>> B = TemporalExtent(start_time=3, end_time=None )
>>> inter = A.disjoint_union(B)
>>> inter.print_info()
| Start time:................. 3
@@ -294,8 +294,8 @@
>>> inter.print_info()
| Start time:................. 3
| End time:................... 8
- >>> A = AbstractTemporalExtent(start_time=5, end_time=None )
- >>> B = AbstractTemporalExtent(start_time=3, end_time=8 )
+ >>> A = TemporalExtent(start_time=5, end_time=None )
+ >>> B = TemporalExtent(start_time=3, end_time=8 )
>>> inter = A.disjoint_union(B)
>>> inter.print_info()
| Start time:................. 3
@@ -304,8 +304,8 @@
>>> inter.print_info()
| Start time:................. 3
| End time:................... 8
- >>> A = AbstractTemporalExtent(start_time=5, end_time=None )
- >>> B = AbstractTemporalExtent(start_time=3, end_time=None )
+ >>> A = TemporalExtent(start_time=5, end_time=None )
+ >>> B = TemporalExtent(start_time=3, end_time=None )
>>> inter = A.disjoint_union(B)
>>> inter.print_info()
| Start time:................. 3
@@ -384,8 +384,8 @@
unit=self.get_unit())
elif issubclass(type(self), AbsoluteTemporalExtent):
return AbsoluteTemporalExtent(start_time=start, end_time=end)
- elif issubclass(type(self), AbstractTemporalExtent):
- return AbstractTemporalExtent(start_time=start, end_time=end)
+ elif issubclass(type(self), TemporalExtent):
+ return TemporalExtent(start_time=start, end_time=end)
def union(self, extent):
"""!Creates a union with this temporal extent and the provided one.
@@ -397,14 +397,14 @@
@code
- >>> A = AbstractTemporalExtent(start_time=5, end_time=8 )
- >>> B = AbstractTemporalExtent(start_time=3, end_time=4 )
+ >>> A = TemporalExtent(start_time=5, end_time=8 )
+ >>> B = TemporalExtent(start_time=3, end_time=4 )
>>> inter = A.intersect(B)
>>> print inter
None
- >>> A = AbstractTemporalExtent(start_time=5, end_time=8 )
- >>> B = AbstractTemporalExtent(start_time=3, end_time=None )
+ >>> A = TemporalExtent(start_time=5, end_time=8 )
+ >>> B = TemporalExtent(start_time=3, end_time=None )
>>> inter = A.intersect(B)
>>> print inter
None
@@ -433,8 +433,8 @@
@code
- >>> A = AbstractTemporalExtent(start_time=5, end_time=6 )
- >>> B = AbstractTemporalExtent(start_time=5, end_time=7 )
+ >>> A = TemporalExtent(start_time=5, end_time=6 )
+ >>> B = TemporalExtent(start_time=5, end_time=7 )
>>> A.starts(B)
True
>>> B.starts(A)
@@ -465,8 +465,8 @@
@code
- >>> A = AbstractTemporalExtent(start_time=5, end_time=7 )
- >>> B = AbstractTemporalExtent(start_time=5, end_time=6 )
+ >>> A = TemporalExtent(start_time=5, end_time=7 )
+ >>> B = TemporalExtent(start_time=5, end_time=6 )
>>> A.started(B)
True
>>> B.started(A)
@@ -497,8 +497,8 @@
@code
- >>> A = AbstractTemporalExtent(start_time=6, end_time=7 )
- >>> B = AbstractTemporalExtent(start_time=5, end_time=7 )
+ >>> A = TemporalExtent(start_time=6, end_time=7 )
+ >>> B = TemporalExtent(start_time=5, end_time=7 )
>>> A.finishes(B)
True
>>> B.finishes(A)
@@ -529,8 +529,8 @@
@code
- >>> A = AbstractTemporalExtent(start_time=5, end_time=7 )
- >>> B = AbstractTemporalExtent(start_time=6, end_time=7 )
+ >>> A = TemporalExtent(start_time=5, end_time=7 )
+ >>> B = TemporalExtent(start_time=6, end_time=7 )
>>> A.finished(B)
True
>>> B.finished(A)
@@ -561,8 +561,8 @@
@code
- >>> A = AbstractTemporalExtent(start_time=8, end_time=9 )
- >>> B = AbstractTemporalExtent(start_time=6, end_time=7 )
+ >>> A = TemporalExtent(start_time=8, end_time=9 )
+ >>> B = TemporalExtent(start_time=6, end_time=7 )
>>> A.after(B)
True
>>> B.after(A)
@@ -595,8 +595,8 @@
@code
- >>> A = AbstractTemporalExtent(start_time=6, end_time=7 )
- >>> B = AbstractTemporalExtent(start_time=8, end_time=9 )
+ >>> A = TemporalExtent(start_time=6, end_time=7 )
+ >>> B = TemporalExtent(start_time=8, end_time=9 )
>>> A.before(B)
True
>>> B.before(A)
@@ -632,14 +632,14 @@
@code
- >>> A = AbstractTemporalExtent(start_time=5, end_time=7 )
- >>> B = AbstractTemporalExtent(start_time=7, end_time=9 )
+ >>> A = TemporalExtent(start_time=5, end_time=7 )
+ >>> B = TemporalExtent(start_time=7, end_time=9 )
>>> A.adjacent(B)
True
>>> B.adjacent(A)
True
- >>> A = AbstractTemporalExtent(start_time=5, end_time=7 )
- >>> B = AbstractTemporalExtent(start_time=3, end_time=5 )
+ >>> A = TemporalExtent(start_time=5, end_time=7 )
+ >>> B = TemporalExtent(start_time=3, end_time=5 )
>>> A.adjacent(B)
True
>>> B.adjacent(A)
@@ -671,8 +671,8 @@
@code
- >>> A = AbstractTemporalExtent(start_time=5, end_time=7 )
- >>> B = AbstractTemporalExtent(start_time=3, end_time=5 )
+ >>> A = TemporalExtent(start_time=5, end_time=7 )
+ >>> B = TemporalExtent(start_time=3, end_time=5 )
>>> A.follows(B)
True
>>> B.follows(A)
@@ -703,8 +703,8 @@
@code
- >>> A = AbstractTemporalExtent(start_time=5, end_time=7 )
- >>> B = AbstractTemporalExtent(start_time=7, end_time=9 )
+ >>> A = TemporalExtent(start_time=5, end_time=7 )
+ >>> B = TemporalExtent(start_time=7, end_time=9 )
>>> A.precedes(B)
True
>>> B.precedes(A)
@@ -734,8 +734,8 @@
@code
- >>> A = AbstractTemporalExtent(start_time=5, end_time=7 )
- >>> B = AbstractTemporalExtent(start_time=4, end_time=9 )
+ >>> A = TemporalExtent(start_time=5, end_time=7 )
+ >>> B = TemporalExtent(start_time=4, end_time=9 )
>>> A.during(B)
True
>>> B.during(A)
@@ -776,8 +776,8 @@
@code
- >>> A = AbstractTemporalExtent(start_time=4, end_time=9 )
- >>> B = AbstractTemporalExtent(start_time=5, end_time=8 )
+ >>> A = TemporalExtent(start_time=4, end_time=9 )
+ >>> B = TemporalExtent(start_time=5, end_time=8 )
>>> A.contains(B)
True
>>> B.contains(A)
@@ -818,8 +818,8 @@
@code
- >>> A = AbstractTemporalExtent(start_time=5, end_time=6 )
- >>> B = AbstractTemporalExtent(start_time=5, end_time=6 )
+ >>> A = TemporalExtent(start_time=5, end_time=6 )
+ >>> B = TemporalExtent(start_time=5, end_time=6 )
>>> A.equal(B)
True
>>> B.equal(A)
@@ -856,15 +856,15 @@
@code
- >>> A = AbstractTemporalExtent(start_time=5, end_time=7 )
- >>> B = AbstractTemporalExtent(start_time=6, end_time=8 )
+ >>> A = TemporalExtent(start_time=5, end_time=7 )
+ >>> B = TemporalExtent(start_time=6, end_time=8 )
>>> A.overlaps(B)
True
>>> B.overlaps(A)
False
- >>> A = AbstractTemporalExtent(start_time=5, end_time=6 )
- >>> B = AbstractTemporalExtent(start_time=6, end_time=8 )
+ >>> A = TemporalExtent(start_time=5, end_time=6 )
+ >>> B = TemporalExtent(start_time=6, end_time=8 )
>>> A.overlaps(B)
False
>>> B.overlaps(A)
@@ -897,15 +897,15 @@
@code
- >>> A = AbstractTemporalExtent(start_time=6, end_time=8 )
- >>> B = AbstractTemporalExtent(start_time=5, end_time=7 )
+ >>> A = TemporalExtent(start_time=6, end_time=8 )
+ >>> B = TemporalExtent(start_time=5, end_time=7 )
>>> A.overlapped(B)
True
>>> B.overlapped(A)
False
- >>> A = AbstractTemporalExtent(start_time=6, end_time=8 )
- >>> B = AbstractTemporalExtent(start_time=5, end_time=6 )
+ >>> A = TemporalExtent(start_time=6, end_time=8 )
+ >>> B = TemporalExtent(start_time=5, end_time=6 )
>>> A.overlapped(B)
False
>>> B.overlapped(A)
@@ -1046,25 +1046,25 @@
###############################################################################
-class AbsoluteTemporalExtent(AbstractTemporalExtent):
+class AbsoluteTemporalExtent(TemporalExtent):
"""!This is the absolute time class for all maps and spacetime datasets
start_time and end_time must be of type datetime
"""
def __init__(self, table=None, ident=None, start_time=None, end_time=None):
- AbstractTemporalExtent.__init__(
+ TemporalExtent.__init__(
self, table, ident, start_time, end_time)
def print_info(self):
"""!Print information about this class in human readable style"""
# 0123456789012345678901234567890
print " +-------------------- Absolute time -----------------------------------------+"
- AbstractTemporalExtent.print_info(self)
+ TemporalExtent.print_info(self)
def print_shell_info(self):
"""!Print information about this class in shell style"""
- AbstractTemporalExtent.print_shell_info(self)
+ TemporalExtent.print_shell_info(self)
###############################################################################
@@ -1212,7 +1212,7 @@
###############################################################################
-class RelativeTemporalExtent(AbstractTemporalExtent):
+class RelativeTemporalExtent(TemporalExtent):
"""!This is the relative time class for all maps and space time datasets
start_time and end_time must be of type integer
@@ -1247,7 +1247,7 @@
def __init__(self, table=None, ident=None, start_time=None, end_time=None,
unit=None):
- AbstractTemporalExtent.__init__(
+ TemporalExtent.__init__(
self, table, ident, start_time, end_time)
self.set_unit(unit)
@@ -1287,7 +1287,7 @@
if self.D["unit"] != map.D["unit"]:
return None
- return AbstractTemporalExtent.temporal_relation(self, map)
+ return TemporalExtent.temporal_relation(self, map)
# Properties
unit = property(fget=get_unit, fset=set_unit)
@@ -1296,12 +1296,12 @@
"""!Print information about this class in human readable style"""
# 0123456789012345678901234567890
print " +-------------------- Relative time -----------------------------------------+"
- AbstractTemporalExtent.print_info(self)
+ TemporalExtent.print_info(self)
print " | Relative time unit:......... " + str(self.get_unit())
def print_shell_info(self):
"""!Print information about this class in shell style"""
- AbstractTemporalExtent.print_shell_info(self)
+ TemporalExtent.print_shell_info(self)
print "unit=" + str(self.get_unit())
###############################################################################
Modified: grass/trunk/temporal/t.support/t.support.py
===================================================================
--- grass/trunk/temporal/t.support/t.support.py 2014-05-12 15:16:51 UTC (rev 60212)
+++ grass/trunk/temporal/t.support/t.support.py 2014-05-12 23:07:02 UTC (rev 60213)
@@ -130,7 +130,7 @@
else:
# Delete the map from the temporal database
# We need to update all effected space time datasets
- datasets = map.get_registered_datasets(dbif)
+ datasets = map.get_registered_stds(dbif)
if datasets:
for dataset in datasets:
dataset_dict[dataset] = dataset
Modified: grass/trunk/temporal/t.unregister/t.unregister.py
===================================================================
--- grass/trunk/temporal/t.unregister/t.unregister.py 2014-05-12 15:16:51 UTC (rev 60212)
+++ grass/trunk/temporal/t.unregister/t.unregister.py 2014-05-12 23:07:02 UTC (rev 60213)
@@ -131,7 +131,7 @@
else:
# We need to update all datasets after the removement of maps
map.metadata.select(dbif)
- datasets = map.get_registered_datasets(dbif)
+ datasets = map.get_registered_stds(dbif)
# Store all unique dataset ids in a dictionary
if datasets:
for dataset in datasets:
More information about the grass-commit
mailing list