Created
May 4, 2011 23:57
-
-
Save andrewxhill/956273 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class OccurrenceSetIndex(db.Model): #parent = OccurrenceSet see below | |
term = db.CategoryProperty() #string values to search for sets | |
rank = db.RatingProperty(default=0) #weight of term for an order by | |
class OccurrenceSet(db.Model): #key_name = ecoregion/wwf/puma_concolor or something | |
name = db.StringProperty() #this could be non-unique, Puma concolor is fine | |
source = db.StringProperty() #wwf | |
type = db.StringProperty() #ecoregion | |
info = db.BlobProperty() #some meta standard for sets of occ polygons | |
dateCreated = db.DateTimeProperty(auto_now_add=True) | |
class OccurrenceIndex(db.Model): #parent = OccurrencePolygon see below | |
occurrenceSet = db.StringProperty() #key_name string | |
introduced = db.BooleanProperty(default=None) | |
set = db.ReferenceProperty(OccurrenceSet, collection_name="polygons") #OccurrenceSet | |
class MultiPolygonIndex(db.Model): #parent = OccurrenceSet see below | |
term = db.CategoryProperty() #string values to search for sets | |
rank = db.RatingProperty(default=0) #weight of term for an order by | |
class MultiPolygon(db.Model): #key_name = some_id | |
name = db.StringProperty() | |
type = db.CategoryProperty() #'ecoregion' would be one | |
source = db.CategoryProperty() #'wwf' would be one | |
info = db.BlobProperty() #some meta standard based on the type, but not restriced by the datastore model | |
dateCreated = db.DateTimeProperty(auto_now_add=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment