Commit 7b3f18f6 authored by Michel Pelletier's avatar Michel Pelletier

Polish up API docs, fixed constructors. added record objects (I fergot)

parent f4910674
...@@ -131,6 +131,8 @@ class ExternalMethod: ...@@ -131,6 +131,8 @@ class ExternalMethod:
""" """
__constructor__=manage_addExternalMethod
def manage_edit(self, title, module, function, REQUEST=None): def manage_edit(self, title, module, function, REQUEST=None):
""" """
Change the external method Change the external method
......
...@@ -102,6 +102,7 @@ class MailHost: ...@@ -102,6 +102,7 @@ class MailHost:
""" """
__constructor__=manage_addMailHost
def send(self, messageText, mto=None, mfrom=None, subject=None, def send(self, messageText, mto=None, mfrom=None, subject=None,
encode=None): encode=None):
......
...@@ -129,6 +129,8 @@ class File: ...@@ -129,6 +129,8 @@ class File:
method. method.
""" """
__constructor__=manage_addFile
__extends__=( __extends__=(
'OFSP.ObjectManagerItem.ObjectManagerItem', 'OFSP.ObjectManagerItem.ObjectManagerItem',
'OFSP.PropertyManager.PropertyManager', 'OFSP.PropertyManager.PropertyManager',
......
...@@ -131,6 +131,8 @@ class Image: ...@@ -131,6 +131,8 @@ class Image:
""" """
__constructor__=manage_addImage
__extends__=('OFSP.File.File',) __extends__=('OFSP.File.File',)
def tag(self, height=None, width=None, alt=None, def tag(self, height=None, width=None, alt=None,
......
...@@ -83,6 +83,17 @@ ...@@ -83,6 +83,17 @@
# #
############################################################################## ##############################################################################
def manage_addVocabulary(self, id, title, globbing=None, REQUEST=None):
"""
Add a Vocabulary object to an ObjectManager.
"""
class Vocabulary: class Vocabulary:
""" """
...@@ -92,14 +103,13 @@ class Vocabulary: ...@@ -92,14 +103,13 @@ class Vocabulary:
""" """
__constructor__=manage_addVocabulary
def query(self, pattern): def query(self, pattern):
""" """
Query Vocabulary for words matching pattern. Query Vocabulary for words matching pattern.
Pattern format -- XXX
""" """
...@@ -118,9 +128,3 @@ class Vocabulary: ...@@ -118,9 +128,3 @@ class Vocabulary:
""" """
def manage_addVocabulary(self, id, title, globbing=None, REQUEST=None):
"""
Add a Vocabulary object to an ObjectManager.
"""
...@@ -83,6 +83,19 @@ ...@@ -83,6 +83,19 @@
# #
############################################################################## ##############################################################################
def manage_addZCatalog(self, id, title, vocab_id=None):
"""
Add a ZCatalog object.
'vocab_id' is the name of a Vocabulary object this catalog should
use. A value of None will cause the Catalog to create its own
private vocabulary.
"""
class ZCatalog: class ZCatalog:
""" """
...@@ -95,15 +108,25 @@ class ZCatalog: ...@@ -95,15 +108,25 @@ class ZCatalog:
Indexes Indexes
Text -- XXX Text -- Text indexes index textual content. The index can be
used to search for objects containing certain words.
Field -- XXX Field -- Field indexes index atomic values. The index can be
used to search for objects that have certain properties.
Keyword -- XXX Keyword -- Keyword indexes index sequences of values. The index
can be used to search for objects that match one or more of the
search terms.
Meta-data Meta-data
XXX The ZCatalog can maintain a table of extra data about cataloged
objects. This information can be used on search result pages to
show information about a search result.
The meta-data table schema is used to build the schema for
ZCatalog Result objects. The objects have the same attributes
as the column of the meta-data table.
ZCatalog does not store references to the objects themselves, but ZCatalog does not store references to the objects themselves, but
rather to a unique identifier that defines how to get to the rather to a unique identifier that defines how to get to the
...@@ -113,6 +136,8 @@ class ZCatalog: ...@@ -113,6 +136,8 @@ class ZCatalog:
""" """
__constructor__=manage_addZCatalog
def catalog_object(self, obj, uid): def catalog_object(self, obj, uid):
""" """
...@@ -189,13 +214,3 @@ class ZCatalog: ...@@ -189,13 +214,3 @@ class ZCatalog:
Search the catalog, the same way as 'searchResults'. Search the catalog, the same way as 'searchResults'.
""" """
def manage_addZCatalog(self, id, title, vocab_id=None):
"""
Add a ZCatalog object.
'vocab_id' is the name of a Vocabulary object this catalog should
use. A value of None will cause the Catalog to create its own
private vocabulary.
"""
...@@ -139,8 +139,13 @@ class ZSQLMethod: ...@@ -139,8 +139,13 @@ class ZSQLMethod:
employees/employee_id/1234/service_record employees/employee_id/1234/service_record
Search results are returned as Record objects. The schema of
a Record objects matches the schema of the table queried in
the search.
""" """
__constructor__=manage_addZSQLMethod
def __call__(self, REQUEST=None, **kw): def __call__(self, REQUEST=None, **kw):
""" """
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment