[cig-commits] r6156 - in
cs/spatialdata-0.1/trunk/spatialdata/spatialdb: . generator
brad at geodynamics.org
brad at geodynamics.org
Thu Mar 1 20:55:59 PST 2007
Author: brad
Date: 2007-03-01 20:55:59 -0800 (Thu, 01 Mar 2007)
New Revision: 6156
Added:
cs/spatialdata-0.1/trunk/spatialdata/spatialdb/generator/Shaper.py
cs/spatialdata-0.1/trunk/spatialdata/spatialdb/generator/Shapers.py
Removed:
cs/spatialdata-0.1/trunk/spatialdata/spatialdb/Makefile.am
cs/spatialdata-0.1/trunk/spatialdata/spatialdb/generator/Filter.py
cs/spatialdata-0.1/trunk/spatialdata/spatialdb/generator/Filters.py
Modified:
cs/spatialdata-0.1/trunk/spatialdata/spatialdb/SimpleDB.py
cs/spatialdata-0.1/trunk/spatialdata/spatialdb/SimpleIO.py
cs/spatialdata-0.1/trunk/spatialdata/spatialdb/SimpleIOAscii.py
cs/spatialdata-0.1/trunk/spatialdata/spatialdb/SpatialDB.py
cs/spatialdata-0.1/trunk/spatialdata/spatialdb/__init__.py
cs/spatialdata-0.1/trunk/spatialdata/spatialdb/generator/GenSimpleDBApp.py
cs/spatialdata-0.1/trunk/spatialdata/spatialdb/generator/Geometry.py
cs/spatialdata-0.1/trunk/spatialdata/spatialdb/generator/Value.py
cs/spatialdata-0.1/trunk/spatialdata/spatialdb/generator/Values.py
cs/spatialdata-0.1/trunk/spatialdata/spatialdb/generator/__init__.py
Log:
Added factory functions to components. Did some source code cleanup as well.
Deleted: cs/spatialdata-0.1/trunk/spatialdata/spatialdb/Makefile.am
===================================================================
--- cs/spatialdata-0.1/trunk/spatialdata/spatialdb/Makefile.am 2007-03-02 04:38:18 UTC (rev 6155)
+++ cs/spatialdata-0.1/trunk/spatialdata/spatialdb/Makefile.am 2007-03-02 04:55:59 UTC (rev 6156)
@@ -1,28 +0,0 @@
-# -*- Makefile -*-
-#
-# ----------------------------------------------------------------------
-#
-# Brad T. Aagaard
-# U.S. Geological Survey
-#
-# <LicenseText>
-#
-# ----------------------------------------------------------------------
-#
-
-subpackage = spatialdb
-include $(top_srcdir)/subpackage.am
-
-SUBDIRS = generator
-
-subpkgpyexec_PYTHON = \
- SpatialDB.py \
- SimpleDB.py \
- SimpleIO.py \
- SimpleIOAscii.py \
- __init__.py
-
-# version
-# $Id$
-
-# End of file
Modified: cs/spatialdata-0.1/trunk/spatialdata/spatialdb/SimpleDB.py
===================================================================
--- cs/spatialdata-0.1/trunk/spatialdata/spatialdb/SimpleDB.py 2007-03-02 04:38:18 UTC (rev 6155)
+++ cs/spatialdata-0.1/trunk/spatialdata/spatialdb/SimpleDB.py 2007-03-02 04:55:59 UTC (rev 6156)
@@ -11,18 +11,27 @@
#
## @file spatialdata/spatialdb/SimpleDB.py
+##
## @brief Python manager for simple spatial database.
+##
+## Factory: spatial_database
from SpatialDB import SpatialDB
# SimpleDB class
class SimpleDB(SpatialDB):
- """Python manager for simple spatial database."""
+ """
+ Python manager for simple spatial database.
+ Factory: spatial_database
+ """
+
# INVENTORY //////////////////////////////////////////////////////////
class Inventory(SpatialDB.Inventory):
- """Python object for managing SimpleDB facilities and properties."""
+ """
+ Python object for managing SimpleDB facilities and properties.
+ """
## @class Inventory
## Python object for managing SimpleDB facilities and properties.
@@ -40,13 +49,27 @@
queryType.meta['tip'] = "Type of query to perform."
from SimpleIOAscii import SimpleIOAscii
- iohandler = pyre.inventory.facility("iohandler", factory=SimpleIOAscii)
+ iohandler = pyre.inventory.facility("iohandler", family="simpledb_io",
+ factory=SimpleIOAscii)
iohandler.meta['tip'] = "I/O handler for database."
+
# PUBLIC METHODS /////////////////////////////////////////////////////
+ def __init__(self, name="simpledb"):
+ """
+ Constructor.
+ """
+ SpatialDB.__init__(self, name)
+ import spatialdb as bindings
+ self.cppHandle = bindings.SimpleDB()
+ return
+
+
def initialize(self):
- """Initialize database."""
+ """
+ Initialize database.
+ """
self.iohandler.initialize()
SpatialDB.initialize(self)
self.cppHandle.ioHandler(self.iohandler.cppHandle)
@@ -54,27 +77,33 @@
def open(self):
- """Open database and prepare for querying."""
+ """
+ Open database and prepare for querying.
+ """
SpatialDB.open(self)
self.cppHandle.queryType(self.queryType)
return
- def __init__(self, name="simpledb"):
- """Constructor."""
- SpatialDB.__init__(self, name)
- import spatialdb as bindings
- self.cppHandle = bindings.SimpleDB()
- return
-
-
# PRIVATE METHODS ////////////////////////////////////////////////////
def _configure(self):
+ """
+ Set members based on inventory.
+ """
SpatialDB._configure(self)
self.iohandler = self.inventory.iohandler
self.queryType = self.inventory.queryType
return
+# FACTORIES ////////////////////////////////////////////////////////////
+
+def spatial_database():
+ """
+ Factory associated with SimpleDB.
+ """
+ return SimpleDB()
+
+
# End of file
Modified: cs/spatialdata-0.1/trunk/spatialdata/spatialdb/SimpleIO.py
===================================================================
--- cs/spatialdata-0.1/trunk/spatialdata/spatialdb/SimpleIO.py 2007-03-02 04:38:18 UTC (rev 6155)
+++ cs/spatialdata-0.1/trunk/spatialdata/spatialdb/SimpleIO.py 2007-03-02 04:55:59 UTC (rev 6156)
@@ -11,18 +11,27 @@
#
## @file spatialdata/spatialdb/SimpleIO.py
+##
## @brief Python I/O manager for simple spatial database (SimpleDB).
+##
+## Factory: simpledb_io
from pyre.components.Component import Component
# SimpleIO class
class SimpleIO(Component):
- """Python I/O manager for simple database (SimpleDB)."""
+ """
+ Python I/O manager for simple database (SimpleDB).
+ Factory: simpledb_io
+ """
+
# INVENTORY //////////////////////////////////////////////////////////
class Inventory(Component.Inventory):
- """Python object for managing SimpleIO facilities and properties."""
+ """
+ Python object for managing SimpleIO facilities and properties.
+ """
## @class Inventory
## Python object for managing SimpleIO facilities and properties.
@@ -41,28 +50,41 @@
# PUBLIC METHODS /////////////////////////////////////////////////////
+ def __init__(self, name="simpleio"):
+ """
+ Constructor.
+ """
+ Component.__init__(self, name, facility="simpledb_io")
+ self.cppHandle = None
+ return
+
+
def initialize(self):
- """Initialize the database."""
+ """
+ Initialize the database.
+ """
self.cppHandle.filename(self.filename)
return
- def __init__(self, name="simpleio"):
- """Constructor."""
- Component.__init__(self, name, facility="simpleio")
- self.cppHandle = None
- return
-
-
# PRIVATE METHODS ////////////////////////////////////////////////////
def _configure(self):
- """Set attributes using inventory."""
+ """
+ Set members using inventory.
+ """
+ Component._configure(self)
self.filename = self.inventory.filename
return
-# version
-__id__ = "$Id$"
+# FACTORIES ////////////////////////////////////////////////////////////
+def simpledb_io():
+ """
+ Factory associated with SimpleIO.
+ """
+ return SimpleIO()
+
+
# End of file
Modified: cs/spatialdata-0.1/trunk/spatialdata/spatialdb/SimpleIOAscii.py
===================================================================
--- cs/spatialdata-0.1/trunk/spatialdata/spatialdb/SimpleIOAscii.py 2007-03-02 04:38:18 UTC (rev 6155)
+++ cs/spatialdata-0.1/trunk/spatialdata/spatialdb/SimpleIOAscii.py 2007-03-02 04:55:59 UTC (rev 6156)
@@ -11,8 +11,10 @@
#
## @file spatialdata/spatialdb/SimpleIOAscii.py
-
+##
## @brief Python ascii I/O manager for simple spatial database (SimpleDB).
+##
+## Factory: simpledb_io
from SimpleIO import SimpleIO
@@ -22,6 +24,8 @@
class SimpleIOAscii(SimpleIO):
"""
Python ascii I/O manager for simple spatial database (SimpleDB).
+
+ Factory: simpledb_io
"""
# PUBLIC METHODS /////////////////////////////////////////////////////
@@ -66,4 +70,13 @@
return
+# FACTORIES ////////////////////////////////////////////////////////////
+
+def simpledb_io():
+ """
+ Factory associated with SimpleIOAscii.
+ """
+ return SimpleIOAscii()
+
+
# End of file
Modified: cs/spatialdata-0.1/trunk/spatialdata/spatialdb/SpatialDB.py
===================================================================
--- cs/spatialdata-0.1/trunk/spatialdata/spatialdb/SpatialDB.py 2007-03-02 04:38:18 UTC (rev 6155)
+++ cs/spatialdata-0.1/trunk/spatialdata/spatialdb/SpatialDB.py 2007-03-02 04:55:59 UTC (rev 6156)
@@ -11,7 +11,10 @@
#
## @file spatialdata/spatialdb/SpatialDB.py
+##
## @brief Python abstract base class for spatial database.
+##
+## Factory: spatial_database
from pyre.components.Component import Component
@@ -21,6 +24,8 @@
class SpatialDB(Component):
"""
Python abstract base class for spatial database.
+
+ Factory: spatial_database
"""
# INVENTORY //////////////////////////////////////////////////////////
@@ -51,7 +56,7 @@
"""
Constructor.
"""
- Component.__init__(self, name, facility="spatialdb")
+ Component.__init__(self, name, facility="spatial_database")
self.cppHandle = None
return
@@ -101,8 +106,18 @@
"""
Set attributes based on inventory.
"""
+ Component._configure(self)
self.label = self.inventory.label
return
+# FACTORIES ////////////////////////////////////////////////////////////
+
+def spatial_database():
+ """
+ Factory associated with SimpleDB.
+ """
+ return SpatialDB()
+
+
# End of file
Modified: cs/spatialdata-0.1/trunk/spatialdata/spatialdb/__init__.py
===================================================================
--- cs/spatialdata-0.1/trunk/spatialdata/spatialdb/__init__.py 2007-03-02 04:38:18 UTC (rev 6155)
+++ cs/spatialdata-0.1/trunk/spatialdata/spatialdb/__init__.py 2007-03-02 04:55:59 UTC (rev 6156)
@@ -11,14 +11,14 @@
#
## @file spatialdata/spatialdb/__init__.py
+##
## @brief Python spatialdata spatialdb module initialization.
__all__ = ['SimpleDB',
'SimpleIOAscii',
'SimpleIO',
- 'SpatialDB']
+ 'SpatialDB',
+ 'generator']
-# version
-__id__ = "$Id$"
# End of file
Deleted: cs/spatialdata-0.1/trunk/spatialdata/spatialdb/generator/Filter.py
===================================================================
--- cs/spatialdata-0.1/trunk/spatialdata/spatialdb/generator/Filter.py 2007-03-02 04:38:18 UTC (rev 6155)
+++ cs/spatialdata-0.1/trunk/spatialdata/spatialdb/generator/Filter.py 2007-03-02 04:55:59 UTC (rev 6156)
@@ -1,150 +0,0 @@
-#!/usr/bin/env python
-#
-# ----------------------------------------------------------------------
-#
-# Brad T. Aagaard
-# U.S. Geological Survey
-#
-# <LicenseText>
-#
-# ----------------------------------------------------------------------
-#
-
-## @file spatialdata/spatialdb/generator/Shaper.py
-##
-## @brief Python manager for shaping spatial distribution of data
-## while generating database.
-##
-## Factory: shaper
-
-from pyre.components.Component import Component
-
-import numpy
-
-# Shaper class
-class Shaper(Component):
- """
- Python manager for shaping spatial distribution of data while
- generating database.
-
- Factory: shaper
- """
-
- # INVENTORY //////////////////////////////////////////////////////////
-
- class Inventory(Component.Inventory):
- """
- Python object for managing Shaper facilities and properties.
- """
-
- ## @class Inventory
- ## Python object for managing Shaper facilities and properties.
- ##
- ## \b Properties
- ## @li \b db_value Name of value in supplied in spatial database.
- ## @li \b operand Operand to use in applying shaper.
- ##
- ## \b Facilities
- ## @li \b db Database containing value defining shaper.
-
- import pyre.inventory
-
- default = pyre.inventory.float("default", default=0.0)
- default.meta['tip'] = "Default value for shaper."
-
- dbValue = pyre.inventory.str("db_value", default="")
- dbValue.meta['tip'] = "Name of value supplied in spatial database."
-
- operand = pyre.inventory.str("operand", default="multiply")
- operand.validator = pyre.inventory.choice(["add", "subtract",
- "multiply", "divide"])
- operand.meta['tip'] = "Operand to use in applying shaper."
-
- from spatialdata.spatialdb.SimpleDB import SimpleDB
- db = pyre.inventory.facility("db", family="spatial_database",
- factory=SimpleDB)
- db.meta['tip'] = "Database containing value defining shaper."
-
-
- # PUBLIC METHODS /////////////////////////////////////////////////////
-
- def __init__(self, name="shaper"):
- """
- Constructor.
- """
- Component.__init__(self, name, facility="shaper")
- return
-
-
- def initialize(self):
- """
- Initialize shaper.
- """
- self.db.initialize()
- self.db.open()
- return
-
-
- def finalize(self):
- """
- Cleanup shaper.
- """
- self.db.close()
- return
-
-
- def apply(self, value, locs, cs):
- """
- Shape value.
- """
- self.db.queryVals([self.dbValue])
- (vals, err) = self.db.query(locs, cs, numvals=1)
- vals = numpy.reshape(numpy.array(vals), -1)
- err = numpy.array(err)
- default = self.defaultValue*numpy.ones( vals.shape, dtype=numpy.float64)
- mask = numpy.zeros( vals.shape, dtype=numpy.float64)
- mask[err[:] != 0] = 1.0
- vals[:] += default[:]*mask[:]
-
- if self.operand == "add":
- value[:] += vals[:]
- elif self.operand == "subtract":
- value[:] -= vals[:]
- elif self.operand == "multiply":
- value[:] *= vals[:]
- elif self.operand == "divide":
- value[:] /= vals[:]
- else:
- raise ValueError, \
- "Unknown operand setting '%s'." % self.operand
- return
-
-
- # PRIVATE METHODS ////////////////////////////////////////////////////
-
- def _configure(self):
- """
- Setup members using inventory.
- """
- Component._configure(self)
- if self.inventory.dbValue == "":
- raise ValueError, \
- "Name of value in spatial database must be set for shaper '%s'." %\
- self.name
- self.dbValue = self.inventory.dbValue
- self.operand = self.inventory.operand
- self.db = self.inventory.db
- self.defaultValue = self.inventory.default
- return
-
-
-# FACTORIES ////////////////////////////////////////////////////////////
-
-def shaper():
- """
- Factory associated with SimpleDB.
- """
- return Shaper()
-
-
-# End of file
Deleted: cs/spatialdata-0.1/trunk/spatialdata/spatialdb/generator/Filters.py
===================================================================
--- cs/spatialdata-0.1/trunk/spatialdata/spatialdb/generator/Filters.py 2007-03-02 04:38:18 UTC (rev 6155)
+++ cs/spatialdata-0.1/trunk/spatialdata/spatialdb/generator/Filters.py 2007-03-02 04:55:59 UTC (rev 6156)
@@ -1,36 +0,0 @@
-#!/usr/bin/env python
-#
-# ----------------------------------------------------------------------
-#
-# Brad T. Aagaard
-# U.S. Geological Survey
-#
-# <LicenseText>
-#
-# ----------------------------------------------------------------------
-#
-
-## @file spatialdata/spatialdb/generator/Filters.py
-
-## @brief Python manager for filters controlling spatial distribution.
-
-from pyre.components.Component import Component
-
-# Filters class
-class Filters(Component):
- """
- Python manager for filters controlling spatial distribution.
- """
-
- # PUBLIC METHODS /////////////////////////////////////////////////////
-
- def __init__(self, name="filters"):
- """
- Constructor.
- """
- Component.__init__(self, name, facility="filters")
- self.filters = []
- return
-
-
-# End of file
Modified: cs/spatialdata-0.1/trunk/spatialdata/spatialdb/generator/GenSimpleDBApp.py
===================================================================
--- cs/spatialdata-0.1/trunk/spatialdata/spatialdb/generator/GenSimpleDBApp.py 2007-03-02 04:38:18 UTC (rev 6155)
+++ cs/spatialdata-0.1/trunk/spatialdata/spatialdb/generator/GenSimpleDBApp.py 2007-03-02 04:55:59 UTC (rev 6156)
@@ -11,7 +11,7 @@
#
## @file spatialdata/spatialdb/generator/GenSimpleDBApp.py
-
+##
## @brief Python application to generate simple spatial database from
## other simple spatial databases.
@@ -44,15 +44,18 @@
import pyre.inventory
from Geometry import Geometry
- geometry = pyre.inventory.facility("geometry", factory=Geometry)
+ geometry = pyre.inventory.facility("geometry", family="geometry",
+ factory=Geometry)
geometry.meta['tip'] = "Object defining geometry of database."
from Values import Values
- values = pyre.inventory.facility("values", factory=Values)
+ values = pyre.inventory.facility("values", family="database_values",
+ factory=Values)
values.meta['tip'] = "Values in database."
from spatialdata.spatialdb.SimpleIOAscii import SimpleIOAscii
- iohandler = pyre.inventory.facility("iohandler", factory=SimpleIOAscii)
+ iohandler = pyre.inventory.facility("iohandler", family="simpledb_io",
+ factory=SimpleIOAscii)
iohandler.meta['tip'] = "Object for writing database."
Modified: cs/spatialdata-0.1/trunk/spatialdata/spatialdb/generator/Geometry.py
===================================================================
--- cs/spatialdata-0.1/trunk/spatialdata/spatialdb/generator/Geometry.py 2007-03-02 04:38:18 UTC (rev 6155)
+++ cs/spatialdata-0.1/trunk/spatialdata/spatialdb/generator/Geometry.py 2007-03-02 04:55:59 UTC (rev 6156)
@@ -11,8 +11,10 @@
#
## @file spatialdata/spatialdb/generator/Geometry.py
-
+##
## @brief Python manager for geometry used in generating database.
+##
+## Factory: geometry.
from pyre.components.Component import Component
@@ -27,6 +29,8 @@
class Geometry(Component):
"""
Python manager for geometry used in generating database.
+
+ Factory: geometry.
"""
# INVENTORY //////////////////////////////////////////////////////////
@@ -52,11 +56,13 @@
dataDim.validator = pyre.inventory.choice([0, 1, 2, 3])
dataDim.meta['tip'] = "Spatial dimension of database locations."
- reader = pyre.inventory.facility("reader", factory=Dummy)
+ reader = pyre.inventory.facility("reader", family="reader",
+ factory=Dummy)
reader.meta['tip'] = "Object to read geometry."
from spatialdata.geocoords.CSCart import CSCart
- coordsys = pyre.inventory.facility("coordsys", factory=CSCart)
+ coordsys = pyre.inventory.facility("coordsys", family="coordsys",
+ factory=CSCart)
coordsys.meta['tip'] = "Coordinate system for database."
@@ -94,4 +100,13 @@
return
-# End of file
+# FACTORIES ////////////////////////////////////////////////////////////
+
+def geometry():
+ """
+ Factory associated with Geometry.
+ """
+ return Geometry()
+
+
+# End of file
Copied: cs/spatialdata-0.1/trunk/spatialdata/spatialdb/generator/Shaper.py (from rev 6155, cs/spatialdata-0.1/trunk/spatialdata/spatialdb/generator/Filter.py)
Copied: cs/spatialdata-0.1/trunk/spatialdata/spatialdb/generator/Shapers.py (from rev 6154, cs/spatialdata-0.1/trunk/spatialdata/spatialdb/generator/Filters.py)
===================================================================
--- cs/spatialdata-0.1/trunk/spatialdata/spatialdb/generator/Filters.py 2007-03-02 03:04:51 UTC (rev 6154)
+++ cs/spatialdata-0.1/trunk/spatialdata/spatialdb/generator/Shapers.py 2007-03-02 04:55:59 UTC (rev 6156)
@@ -0,0 +1,49 @@
+#!/usr/bin/env python
+#
+# ----------------------------------------------------------------------
+#
+# Brad T. Aagaard
+# U.S. Geological Survey
+#
+# <LicenseText>
+#
+# ----------------------------------------------------------------------
+#
+
+## @file spatialdata/spatialdb/generator/Shapers.py
+##
+## @brief Python manager for shapers controlling spatial distribution.
+##
+## Factory: shapers
+
+from pyre.components.Component import Component
+
+# Shapers class
+class Shapers(Component):
+ """
+ Python manager for shapers controlling spatial distribution.
+
+ Factory: shapers
+ """
+
+ # PUBLIC METHODS /////////////////////////////////////////////////////
+
+ def __init__(self, name="shapers"):
+ """
+ Constructor.
+ """
+ Component.__init__(self, name, facility="shapers")
+ self.shapers = []
+ return
+
+
+# FACTORIES ////////////////////////////////////////////////////////////
+
+def shapers():
+ """
+ Factory associated with Shapers.
+ """
+ return Shapers()
+
+
+# End of file
Modified: cs/spatialdata-0.1/trunk/spatialdata/spatialdb/generator/Value.py
===================================================================
--- cs/spatialdata-0.1/trunk/spatialdata/spatialdb/generator/Value.py 2007-03-02 04:38:18 UTC (rev 6155)
+++ cs/spatialdata-0.1/trunk/spatialdata/spatialdb/generator/Value.py 2007-03-02 04:55:59 UTC (rev 6156)
@@ -11,8 +11,10 @@
#
## @file spatialdata/spatialdb/generator/Value.py
-
+##
## @brief Python manager for generating value in database.
+##
+## Factory: database_value
from pyre.components.Component import Component
@@ -22,6 +24,8 @@
class Value(Component):
"""
Python manager for generating value in database.
+
+ Factory: database_value
"""
# INVENTORY //////////////////////////////////////////////////////////
@@ -39,7 +43,7 @@
## @li \b units Units for value
##
## \b Facilities
- ## @li \b filters Filters used to construct spatial distribution
+ ## @li \b shapers Shapers used to construct spatial distribution
import pyre.inventory
@@ -49,9 +53,10 @@
units = pyre.inventory.str("units", default="none")
units.meta['tip'] = "Units associated with value."
- from Filters import Filters
- filters = pyre.inventory.facility("filters", factory=Filters)
- filters.meta['tip'] = "Filter used to construct spatial distribution"
+ from Shapers import Shapers
+ shapers = pyre.inventory.facility("shapers", family="shapers",
+ factory=Shapers)
+ shapers.meta['tip'] = "Filter used to construct spatial distribution"
# PUBLIC METHODS /////////////////////////////////////////////////////
@@ -60,17 +65,17 @@
"""
Constructor.
"""
- Component.__init__(self, name, facility="value")
+ Component.__init__(self, name, facility="database_value")
return
def calculate(self, locs, cs):
"""
- Calculate spatial distribution for value using filters.
+ Calculate spatial distribution for value using shapers.
"""
(numLocs, spaceDim) = locs.shape
value = numpy.zeros( (numLocs,), dtype=numpy.float64)
- for filter in self.filters.filters:
+ for filter in self.shapers.shapers:
filter.initialize()
filter.apply(value, locs, cs)
filter.finalize()
@@ -86,8 +91,17 @@
Component._configure(self)
self.name = self.inventory.name
self.units = self.inventory.units
- self.filters = self.inventory.filters
+ self.shapers = self.inventory.shapers
return
+# FACTORIES ////////////////////////////////////////////////////////////
+
+def database_value():
+ """
+ Factory associated with Value.
+ """
+ return Value()
+
+
# End of file
Modified: cs/spatialdata-0.1/trunk/spatialdata/spatialdb/generator/Values.py
===================================================================
--- cs/spatialdata-0.1/trunk/spatialdata/spatialdb/generator/Values.py 2007-03-02 04:38:18 UTC (rev 6155)
+++ cs/spatialdata-0.1/trunk/spatialdata/spatialdb/generator/Values.py 2007-03-02 04:55:59 UTC (rev 6156)
@@ -11,8 +11,10 @@
#
## @file spatialdata/spatialdb/generator/Values.py
-
+##
## @brief Python manager for values in database.
+##
+## Factory: database_values
from pyre.components.Component import Component
@@ -20,6 +22,8 @@
class Values(Component):
"""
Python manager for values in database.
+
+ Factory: database_values
"""
# PUBLIC METHODS /////////////////////////////////////////////////////
@@ -28,9 +32,18 @@
"""
Constructor.
"""
- Component.__init__(self, name, facility="values")
+ Component.__init__(self, name, facility="database_values")
self.values = []
return
+# FACTORIES ////////////////////////////////////////////////////////////
+
+def database_values():
+ """
+ Factory associated with Values.
+ """
+ return Values()
+
+
# End of file
Modified: cs/spatialdata-0.1/trunk/spatialdata/spatialdb/generator/__init__.py
===================================================================
--- cs/spatialdata-0.1/trunk/spatialdata/spatialdb/generator/__init__.py 2007-03-02 04:38:18 UTC (rev 6155)
+++ cs/spatialdata-0.1/trunk/spatialdata/spatialdb/generator/__init__.py 2007-03-02 04:55:59 UTC (rev 6156)
@@ -11,6 +11,7 @@
#
## @file spatialdata/spatialdb/generator/__init__.py
+##
## @brief Python spatialdata generator module initialization.
__all__ = ['Filter',
@@ -21,7 +22,4 @@
'Values']
-# version
-__id__ = "$Id$"
-
# End of file
More information about the cig-commits
mailing list