Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
a9bee0fa
Commit
a9bee0fa
authored
Jun 22, 1999
by
Michel Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
On the way to alpha
parent
a995cdbe
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
1079 additions
and
59 deletions
+1079
-59
lib/python/Products/ZCatalog/Catalog.py
lib/python/Products/ZCatalog/Catalog.py
+62
-58
lib/python/Products/ZCatalog/Lazy.py
lib/python/Products/ZCatalog/Lazy.py
+279
-0
lib/python/Products/ZCatalog/ZCatalog.py
lib/python/Products/ZCatalog/ZCatalog.py
+358
-0
lib/python/Products/ZCatalog/__init__.py
lib/python/Products/ZCatalog/__init__.py
+1
-1
lib/python/Products/ZCatalog/addZCatalog.dtml
lib/python/Products/ZCatalog/addZCatalog.dtml
+36
-0
lib/python/Products/ZCatalog/catalogAddRowForm.dtml
lib/python/Products/ZCatalog/catalogAddRowForm.dtml
+16
-0
lib/python/Products/ZCatalog/catalogFind.dtml
lib/python/Products/ZCatalog/catalogFind.dtml
+109
-0
lib/python/Products/ZCatalog/catalogFindFrame.dtml
lib/python/Products/ZCatalog/catalogFindFrame.dtml
+14
-0
lib/python/Products/ZCatalog/catalogFindResult.dtml
lib/python/Products/ZCatalog/catalogFindResult.dtml
+100
-0
lib/python/Products/ZCatalog/catalogView.dtml
lib/python/Products/ZCatalog/catalogView.dtml
+94
-0
lib/python/Products/ZCatalog/notes.txt
lib/python/Products/ZCatalog/notes.txt
+10
-0
lib/python/Products/ZCatalog/www/ZCatalog.gif
lib/python/Products/ZCatalog/www/ZCatalog.gif
+0
-0
No files found.
lib/python/Products/ZCatalog/Catalog.py
View file @
a9bee0fa
...
...
@@ -2,7 +2,7 @@ from Persistence import Persistent
import
Acquisition
import
BTree
,
OIBTree
,
IOBTree
from
SearchIndex
import
UnIndex
,
UnTextIndex
,
Query
import
regex
import
regex
,
pdb
import
Record
from
Missing
import
MV
...
...
@@ -40,16 +40,26 @@ class Catalog(Persistent, Acquisition.Implicit):
"""
_v_brains
=
NoBrainer
_v_result_class
=
NoBrainer
def
__init__
(
self
,
brains
=
None
):
self
.
schema
=
{}
# mapping from attribute name to column number
self
.
names
=
()
# sequence of column names
self
.
indexes
=
{}
# the catalog maintains a BTree of object meta_data for
# convienient display on result pages. meta_data attributes
# are turned into brain objects and returned by
# searchResults. The indexing machinery indexes all records
# by an integer id (rid). self.data is a mapping from the
# iteger id to the meta_data, self.uids is a mapping of the
# object unique identifier to the rid, and self.paths is a
# mapping of the rid to the unique identifier.
self
.
data
=
BTree
.
BTree
()
self
.
uids
=
OIBTree
.
BTree
()
self
.
paths
=
IOBTree
.
BTree
()
self
.
data
=
BTree
.
BTree
()
# mapping of rid to meta_data
self
.
uids
=
OIBTree
.
BTree
()
# mapping of uid to rid
self
.
paths
=
IOBTree
.
BTree
()
# mapping of rid to uid
if
brains
is
not
None
:
self
.
_v_brains
=
brains
...
...
@@ -61,6 +71,7 @@ class Catalog(Persistent, Acquisition.Implicit):
""" returns instances of self._v_brains, or whatever is passed
into self.useBrains.
"""
self
.
useBrains
(
self
.
_v_brains
)
r
=
self
.
_v_result_class
(
self
.
data
[
index
]).
__of__
(
self
.
aq_parent
)
r
.
data_record_id_
=
index
...
...
@@ -93,7 +104,7 @@ class Catalog(Persistent, Acquisition.Implicit):
def
addColumn
(
self
,
name
,
default_value
=
None
):
""" adds a row to the schema """
""" adds a row to the
meta_data
schema """
schema
=
self
.
schema
names
=
list
(
self
.
names
)
...
...
@@ -121,7 +132,7 @@ class Catalog(Persistent, Acquisition.Implicit):
def
delColumn
(
self
,
name
):
""" deletes a row from the schema """
""" deletes a row from the
meta_data
schema """
names
=
list
(
self
.
names
)
_index
=
names
.
index
(
name
)
...
...
@@ -147,7 +158,7 @@ class Catalog(Persistent, Acquisition.Implicit):
def
addIndex
(
self
,
name
,
type
):
""" add an index """
""" add
s
an index """
if
self
.
indexes
.
has_key
(
name
):
raise
'Index Exists'
,
'The index specified allready exists'
...
...
@@ -157,7 +168,7 @@ class Catalog(Persistent, Acquisition.Implicit):
self
.
indexes
[
name
]
=
UnTextIndex
.
UnTextIndex
(
name
)
def
delIndex
(
self
,
name
):
""" delete an index """
""" delete
s
an index """
if
not
self
.
indexes
.
has_key
(
name
):
raise
'No Index'
,
'The index specified does not exist'
...
...
@@ -174,19 +185,26 @@ class Catalog(Persistent, Acquisition.Implicit):
'object' is the object to be cataloged
'uid' is the unique Catalog identifier for this object
"""
# store a record in the dataset that coresponds to the object
data
=
self
.
data
if
data
:
i
=
data
.
keys
()[
-
1
]
+
1
# find the next available
else
:
i
=
0
# rid
if
uid
in
self
.
uids
.
keys
():
i
=
self
.
uids
[
uid
]
elif
data
:
i
=
data
.
keys
()[
-
1
]
+
1
# find the next available rid
else
:
i
=
0
self
.
uids
[
uid
]
=
i
self
.
paths
[
i
]
=
uid
# meta_data is stored as a tuple for efficiency
data
[
i
]
=
self
.
recordify
(
object
)
for
x
in
self
.
indexes
.
keys
():
if
hasattr
(
self
.
indexes
[
x
],
'index_object'
):
self
.
indexes
[
x
].
index_object
(
i
,
object
)
for
x
in
self
.
indexes
.
values
():
if
hasattr
(
x
,
'index_object'
):
x
.
index_object
(
i
,
object
)
self
.
data
=
data
...
...
@@ -195,16 +213,33 @@ class Catalog(Persistent, Acquisition.Implicit):
and 'uid' is a unique Catalog identifier
Note, the uid must be the same as when the object was
cataloged, otherwise it will not get unindexed """
cataloged, otherwise it will not get removed from the catalog """
if
uid
not
in
self
.
uids
.
keys
():
'no object with uid %s'
%
uid
return
# un index the object
rid
=
self
.
uids
[
uid
]
for
x
in
self
.
indexes
.
keys
():
if
hasattr
(
self
.
indexes
[
x
],
'unindex_object'
):
self
.
indexes
[
x
].
unindex_object
(
rid
)
del
self
.
_data
[
rid
]
for
x
in
self
.
indexes
.
values
():
if
hasattr
(
x
,
'unindex_object'
):
x
.
unindex_object
(
rid
)
del
self
.
data
[
rid
]
del
self
.
uids
[
uid
]
del
self
.
paths
[
rid
]
def
clear
(
self
):
""" clear catalog """
self
.
data
=
BTree
.
BTree
()
self
.
uids
=
OIBTree
.
BTree
()
self
.
paths
=
IOBTree
.
BTree
()
for
x
in
self
.
indexes
.
values
():
x
.
clear
()
def
recordify
(
self
,
object
):
...
...
@@ -224,17 +259,22 @@ class Catalog(Persistent, Acquisition.Implicit):
return
tuple
(
record
)
def
instantiate
(
self
,
record
):
self
.
useBrains
(
self
.
_v_brains
)
r
=
self
.
_v_result_class
(
record
[
1
])
r
.
data_record_id_
=
record
[
0
]
return
r
.
__of__
(
self
)
# searching VOODOO follows
def
_indexedSearch
(
self
,
args
,
sort_index
,
append
,
used
):
rs
=
None
data
=
self
.
data
## cid=self.id
if
used
is
None
:
used
=
{}
for
i
in
self
.
indexes
.
keys
():
...
...
@@ -338,42 +378,6 @@ class Catalog(Persistent, Acquisition.Implicit):
r
.
reverse
()
r
=
LazyCat
(
map
(
lambda
i
:
i
[
1
],
r
))
## #################################################################
## # Add unindexed search criteria:
## # skey used to get the schema keys, but computed fields aren't in
## # there anymore. instead they're in the data_dictionary.
## skey=_data._data_dictionary.has_key
## ukey=used.has_key
## subqueries=[]
## # join the previously together computed field names and reg names
## allnames=list(_data._names)+list(_data._computed_fields)
## for name in allnames:
## try: v=kw[name]
## except: v=kw
## if v is not kw and (v or v==0) and not ukey(name) and skey(name):
## used[name]=1
## if name in _data._names:
## # use the integer key of the column
## key=_data._schema[name]
## else:
## # it's a computed attribute, use its name. Query.FieldTest
## # will figure it out.
## key=name
## try: q=query_map[type(v)](v)
## except: q=Query.Cmp(v)
## subqueries.append(Query.FieldTest(key,q))
## if subqueries:
## if len(subqueries) > 1: query=apply(Query.And,tuple(subqueries))
## else: query=subqueries[0]
## r=LazyFilter(query,r)
## try: data._len=atoi(kw['DP_CACHED_LENGTH'])
## except: pass
#################################################################
# decorate results and return:
## r._searchable_result_columns=self._searchable_result_columns
return
r
...
...
lib/python/Products/ZCatalog/Lazy.py
0 → 100644
View file @
a9bee0fa
##############################################################################
#
# Zope Public License (ZPL) Version 0.9.7
# ---------------------------------------
#
# Copyright (c) Digital Creations. All rights reserved.
#
# This license has been certified as Open Source(tm).
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# 1. Redistributions in source code must retain the above copyright
# notice, this list of conditions, and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions, and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
#
# 3. Digital Creations requests that attribution be given to Zope
# in any manner possible. Zope includes a "Powered by Zope"
# button that is installed by default. While it is not a license
# violation to remove this button, it is requested that the
# attribution remain. A significant investment has been put
# into Zope, and this effort will continue if the Zope community
# continues to grow. This is one way to assure that growth.
#
# 4. All advertising materials and documentation mentioning
# features derived from or use of this software must display
# the following acknowledgement:
#
# "This product includes software developed by Digital Creations
# for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
#
# In the event that the product being advertised includes an
# intact Zope distribution (with copyright and license included)
# then this clause is waived.
#
# 5. Names associated with Zope or Digital Creations must not be used to
# endorse or promote products derived from this software without
# prior written permission from Digital Creations.
#
# 6. Modified redistributions of any form whatsoever must retain
# the following acknowledgment:
#
# "This product includes software developed by Digital Creations
# for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
#
# Intact (re-)distributions of any official Zope release do not
# require an external acknowledgement.
#
# 7. Modifications are encouraged but must be packaged separately as
# patches to official Zope releases. Distributions that do not
# clearly separate the patches from the original work must be clearly
# labeled as unofficial distributions. Modifications which do not
# carry the name Zope may be packaged in any form, as long as they
# conform to all of the clauses above.
#
#
# Disclaimer
#
# THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS ``AS IS'' AND ANY
# EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DIGITAL CREATIONS OR ITS
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
#
# This software consists of contributions made by Digital Creations and
# many individuals on behalf of Digital Creations. Specific
# attributions are listed in the accompanying credits file.
#
##############################################################################
__doc__
=
'''$Id: Lazy.py,v 1.1 1999/06/22 14:14:47 michel Exp $'''
__version__
=
'$Revision: 1.1 $'
[
11
:
-
2
]
class
Lazy
:
def
__repr__
(
self
):
return
`list(self)`
def
__len__
(
self
):
try
:
return
self
.
_len
except
AttributeError
:
pass
l
=
len
(
self
.
_data
)
while
1
:
try
:
self
[
l
]
l
=
l
+
1
except
:
self
.
_len
=
l
return
l
def
__getslice__
(
self
,
i1
,
i2
):
r
=
[]
for
i
in
range
(
i1
,
i2
):
try
:
r
.
append
(
self
[
i
])
except
IndexError
:
return
r
return
r
slice
=
__getslice__
class
LazyCat
(
Lazy
):
# Lazy concatenation of one or more sequences. Should be handy
# for accessing small parts of big searches.
def
__init__
(
self
,
sequences
):
self
.
_seq
=
sequences
self
.
_data
=
[]
self
.
_sindex
=
0
self
.
_eindex
=-
1
def
__getitem__
(
self
,
index
):
data
=
self
.
_data
try
:
seq
=
self
.
_seq
except
AttributeError
:
return
data
[
index
]
i
=
index
if
i
<
0
:
i
=
len
(
self
)
+
i
if
i
<
0
:
raise
IndexError
,
index
ind
=
len
(
data
)
if
i
<
ind
:
return
data
[
i
]
ind
=
ind
-
1
sindex
=
self
.
_sindex
try
:
s
=
seq
[
sindex
]
except
:
raise
IndexError
,
index
eindex
=
self
.
_eindex
while
i
>
ind
:
try
:
eindex
=
eindex
+
1
v
=
s
[
eindex
]
data
.
append
(
v
)
ind
=
ind
+
1
except
IndexError
:
self
.
_sindex
=
sindex
=
sindex
+
1
try
:
s
=
self
.
_seq
[
sindex
]
except
:
del
self
.
_seq
del
self
.
_sindex
del
self
.
_eindex
raise
IndexError
,
index
self
.
_eindex
=
eindex
=-
1
self
.
_eindex
=
eindex
return
data
[
i
]
class
LazyMap
(
Lazy
):
# Act like a sequence, but get data from a filtering process.
# Don't access data until necessary
def
__init__
(
self
,
func
,
seq
):
self
.
_seq
=
seq
self
.
_len
=
len
(
seq
)
self
.
_data
=
[]
self
.
_func
=
func
def
__getitem__
(
self
,
index
):
data
=
self
.
_data
try
:
s
=
self
.
_seq
except
AttributeError
:
return
data
[
index
]
i
=
index
if
i
<
0
:
i
=
len
(
self
)
+
i
if
i
<
0
:
raise
IndexError
,
index
ind
=
len
(
data
)
if
i
<
ind
:
return
data
[
i
]
ind
=
ind
-
1
func
=
self
.
_func
while
i
>
ind
:
try
:
ind
=
ind
+
1
data
.
append
(
func
(
s
[
ind
]))
except
IndexError
:
del
self
.
_func
del
self
.
_seq
raise
IndexError
,
index
return
data
[
i
]
class
LazyFilter
(
Lazy
):
# Act like a sequence, but get data from a filtering process.
# Don't access data until necessary
def
__init__
(
self
,
test
,
seq
):
self
.
_seq
=
seq
self
.
_data
=
[]
self
.
_eindex
=-
1
self
.
_test
=
test
def
__getitem__
(
self
,
index
):
data
=
self
.
_data
try
:
s
=
self
.
_seq
except
AttributeError
:
return
data
[
index
]
i
=
index
if
i
<
0
:
i
=
len
(
self
)
+
i
if
i
<
0
:
raise
IndexError
,
index
ind
=
len
(
data
)
if
i
<
ind
:
return
data
[
i
]
ind
=
ind
-
1
test
=
self
.
_test
e
=
self
.
_eindex
while
i
>
ind
:
try
:
e
=
e
+
1
v
=
s
[
e
]
if
test
(
v
):
data
.
append
(
v
)
ind
=
ind
+
1
except
IndexError
:
del
self
.
_test
del
self
.
_seq
del
self
.
_eindex
raise
IndexError
,
index
self
.
_eindex
=
e
return
data
[
i
]
class
LazyMop
(
Lazy
):
# Act like a sequence, but get data from a filtering process.
# Don't access data until necessary
def
__init__
(
self
,
test
,
seq
):
self
.
_seq
=
seq
self
.
_data
=
[]
self
.
_eindex
=-
1
self
.
_test
=
test
def
__getitem__
(
self
,
index
):
data
=
self
.
_data
try
:
s
=
self
.
_seq
except
AttributeError
:
return
data
[
index
]
i
=
index
if
i
<
0
:
i
=
len
(
self
)
+
i
if
i
<
0
:
raise
IndexError
,
index
ind
=
len
(
data
)
if
i
<
ind
:
return
data
[
i
]
ind
=
ind
-
1
test
=
self
.
_test
e
=
self
.
_eindex
while
i
>
ind
:
try
:
e
=
e
+
1
v
=
s
[
e
]
try
:
v
=
test
(
v
)
data
.
append
(
v
)
ind
=
ind
+
1
except
:
pass
except
IndexError
:
del
self
.
_test
del
self
.
_seq
del
self
.
_eindex
raise
IndexError
,
index
self
.
_eindex
=
e
return
data
[
i
]
lib/python/Products/ZCatalog/ZCatalog.py
0 → 100644
View file @
a9bee0fa
This diff is collapsed.
Click to expand it.
lib/python/Products/ZCatalog/__init__.py
View file @
a9bee0fa
...
...
@@ -93,7 +93,7 @@ def initialize(context):
permission
=
'Add ZCatalogs'
,
constructors
=
(
ZCatalog
.
manage_addZCatalogForm
,
ZCatalog
.
manage_addZCatalog
),
icon
=
'www/
c
atalog.gif'
,
icon
=
'www/
ZC
atalog.gif'
,
)
...
...
lib/python/Products/ZCatalog/addZCatalog.dtml
0 → 100755
View file @
a9bee0fa
<HTML>
<HEAD>
<TITLE>Add Catalog</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<H2>Add Catalog</H2>
<FORM ACTION="manage_addZCatalog" METHOD="POST">
<TABLE CELLSPACING="2">
<TR>
<TD ALIGN="LEFT" VALIGN="TOP">
<STRONG>Id</STONG>
</TD>
<TD ALIGN="LEFT" VALIGN="TOP">
<INPUT TYPE="TEXT" NAME="id" SIZE="40">
</TD>
</TR>
<TR>
<TD ALIGN="LEFT" VALIGN="TOP">
<EM><STRONG>Title</STRONG></EM>
</TD>
<TD ALIGN="LEFT" VALIGN="TOP">
<INPUT TYPE="TEXT" NAME="title" SIZE="40">
</TD>
</TR>
<TR>
<TD></TD>
<TD>
<BR><INPUT TYPE="SUBMIT" VALUE=" Add ">
</TD>
</TR>
</TABLE>
</FORM>
</BODY>
</HTML>
lib/python/Products/ZCatalog/catalogAddRowForm.dtml
0 → 100644
View file @
a9bee0fa
<HTML>
<HEAD>
<TITLE>View Catalog Records</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<!--#var manage_tabs-->
<form action=".">
</form>
</BODY></HTML>
lib/python/Products/ZCatalog/catalogFind.dtml
0 → 100755
View file @
a9bee0fa
<HTML>
<HEAD>
<TITLE>Advanced Find</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<!--#var manage_tabs-->
<P>
Use this form to locate objects to be cataloged.
<P>
<FORM ACTION="manage_catalogFindResult" METHOD="GET">
<TABLE>
<TR>
<TD ALIGN="LEFT" VALIGN="TOP">
<STRONG>Find objects of type:</STRONG>
</TD>
<TD ALIGN="LEFT" VALIGN="TOP">
<SELECT NAME="obj_metatypes:list" SIZE="4" MULTIPLE>
<OPTION VALUE="all" SELECTED> All types
<!--#in all_meta_types mapping-->
<OPTION VALUE="<!--#var name-->"> <!--#var name-->
<!--#/in-->
</SELECT>
</TD>
</TR>
<TR>
<TD ALIGN="LEFT" VALIGN="TOP">
<STRONG>with ids:</STRONG>
</TD>
<TD ALIGN="LEFT" VALIGN="TOP">
<INPUT TYPE="TEXT" NAME="obj_ids:tokens" SIZE="30">
</TD>
</TR>
<TR>
<TD ALIGN="LEFT" VALIGN="TOP">
<STRONG>containing:</STRONG>
</TD>
<TD ALIGN="LEFT" VALIGN="TOP">
<INPUT TYPE="TEXT" NAME="obj_searchterm" SIZE="30">
</TD>
</TR>
<TR>
<TD ALIGN="LEFT" VALIGN="TOP">
<STRONG>expr:</STRONG>
</TD>
<TD ALIGN="LEFT" VALIGN="TOP">
<TEXTAREA NAME="obj_expr" ROWS="4" COLS="30"></TEXTAREA>
</TD>
</TR>
<TR>
<TD ALIGN="LEFT" VALIGN="TOP">
<STRONG>modified:</STRONG>
</TD>
<TD ALIGN="LEFT" VALIGN="TOP">
<SELECT NAME="obj_mspec">
<OPTION VALUE="<"> before
<OPTION VALUE=">"> after
</SELECT>
<INPUT TYPE="TEXT" NAME="obj_mtime" SIZE="22">
</TD>
</TR>
<TR>
<TD ALIGN="LEFT" VALIGN="TOP">
<STRONG>where the roles:</STRONG>
</TD>
<TD ALIGN="LEFT" VALIGN="TOP">
<SELECT NAME="obj_roles:list" SIZE="3" MULTIPLE>
<!--#in valid_roles-->
<OPTION VALUE="<!--#var sequence-item-->"> <!--#var sequence-item-->
<!--#/in-->
</SELECT>
</TD>
</TR>
<!--#comment-->
<TR>
<TD ALIGN="LEFT" VALIGN="TOP">
<STRONG>have permission:</STRONG>
</TD>
<TD ALIGN="LEFT" VALIGN="TOP">
<SELECT NAME="obj_permission">
<!--#in permission_settings mapping-->
<OPTION VALUE="<!--#var name-->"> <!--#var name-->
<!--#/in-->
</SELECT>
</TD>
</TR>
<!--#/comment-->
<INPUT TYPE="HIDDEN" NAME="search_sub:int" VALUE="1" CHECKED>
<TR>
<TD ALIGN="LEFT" VALIGN="TOP">
</TD>
<TD ALIGN="LEFT" VALIGN="TOP">
<INPUT TYPE="SUBMIT" NAME="btn_submit" VALUE="Find">
</TD>
</TR>
</TABLE>
</FORM>
</BODY>
</HTML>
lib/python/Products/ZCatalog/catalogFindFrame.dtml
0 → 100755
View file @
a9bee0fa
<HTML>
<HEAD>
<TITLE>Find</TITLE>
</HEAD>
<FRAMESET ROWS="52%,*">
<FRAME SRC="manage_catalogFind" NAME="findForm"
MARGINWIDTH="2" MARGINHEIGHT="2" SCROLLING="auto">
<FRAME SRC="manage_catalogFindResult" NAME="findResult"
MARGINWIDTH="2" MARGINHEIGHT="0" SCROLLING="auto">
</FRAMESET>
<NOFRAMES>
Management interfaces require the use of a <B>frames-capable</B> web browser.
</NOFRAMES>
</HTML>
lib/python/Products/ZCatalog/catalogFindResult.dtml
0 → 100755
View file @
a9bee0fa
<HTML>
<HEAD>
<TITLE>Find Results</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<!--#var manage_tabs-->
<P>
<!--#in expr="('obj_ids', 'obj_metatypes', 'obj_searchterm', 'obj_expr', 'obj_mtime', 'obj_mspec', 'obj_permission', 'obj_roles', 'search_sub')"-->
<!--#else expr="_.hasattr(REQUEST, _['sequence-item'])"-->
<!--#call expr="REQUEST.set(_['sequence-item'], _.None)"-->
<!--#/else-->
<!--#/in-->
<!--#if btn_submit-->
<!--#with "_.namespace(
results=ZopeFind(PARENTS[-1],
obj_ids=obj_ids,
obj_metatypes=obj_metatypes,
obj_searchterm=obj_searchterm,
obj_expr=obj_expr,
obj_mtime=obj_mtime,
obj_mspec=obj_mspec,
obj_permission=obj_permission,
obj_roles=obj_roles,
search_sub=search_sub,
REQUEST=REQUEST))"-->
<!--#if results-->
<HR>
<STRONG>
Found <!--#var results fmt=collection-length--> item<!--#if expr="_.len(results) != 1"-->s<!--#/if-->. Boo!
</STRONG>
<HR>
<form action="." method="post">
<input type="submit" name="manage_catalogObject:method" value=" Catalog Items ">
<input type="submit" name="manage_uncatalogObject:method" value=" UnCatalog Items ">
<P>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="2">
<!--#in results-->
<TR>
<TD ALIGN="LEFT" VALIGN="TOP">
<INPUT TYPE="CHECKBOX" NAME="urls:list"
VALUE="<!--#var sequence-key-->"
CHECKED>
</TD>
<TD ALIGN="LEFT" VALIGN="TOP">
<A HREF="<!--#var SCRIPT_NAME-->/<!--#var sequence-key-->/manage_main">
<IMG SRC="<!--#var SCRIPT_NAME-->/<!--#var icon-->"
ALT="<!--#var meta_type-->" BORDER="0"></A>
</TD>
<TD ALIGN="LEFT" VALIGN="TOP">
<A HREF="<!--#var SCRIPT_NAME-->/<!--#var sequence-key-->/manage_main">
<!--#var sequence-key-->
<!--#if title-->
(<!--#var title-->)
<!--#/if-->
</A>
</TD>
<!--#comment-->
<TD>
<!--#if "inCatalog(_['sequence-key'])"-->
In Catalog
<!--#else-->
Not in Catalog
<!--#/if-->
</TD>
<!--#/comment-->
</TR>
<!--#/in-->
</TABLE>
</form>
<!--#else-->
<HR>
<STRONG>
No items were found matching this query.
</STRONG>
<HR>
<!--#/if-->
<!--#/with-->
<!--#/if-->
</BODY>
</HTML>
lib/python/Products/ZCatalog/catalogView.dtml
0 → 100755
View file @
a9bee0fa
<HTML>
<HEAD>
<TITLE>View Catalog Records</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<!--#var manage_tabs-->
<!--#if searchResults-->
<p> Updating the catalog will update all catalog records and remove
invalid records. Clearing the catalog will remove all entries. You
can also remove or update individual catalog records.
<form action=".">
<input type="submit" name="manage_catalogReindex:method" value=" Update Catalog ">
<input type="submit" name="manage_catalogClear:method" value=" Clear Catalog ">
</form>
<p>
<!--#var id--> contains
<em><!--#var searchResults fmt=collection-length thousands_commas--></em>
record(s).<BR><BR>
<!--#in searchResults previous size=20 start=query_start -->
<a href="<!--#var URL-->?query_start=<!--#var
previous-sequence-start-number-->">
[Previous <!--#var previous-sequence-size--> entries]
</a>
<!--#/in-->
<!--#in searchResults next size=20 start=query_start -->
<a href="<!--#var URL-->?query_start=<!--#var
next-sequence-start-number-->">
[Next <!--#var next-sequence-size--> entries]
</a>
<!--#/in-->
<form action="<!--#var URL1-->/">
<input type="submit" value=" Remove " NAME="manage_catalogRemove:method">
<input type="submit" value=" Update " NAME="manage_catalogReindex:method">
<!--#comment-->
<input type="submit" value=" VOODOO "
NAME="manage_enterDebuger:method">
<!--#/comment-->
<input type="hidden" name="individual" value="1">
<table>
<!--#in searchResults size=20 start=query_start -->
<tr valign=top>
<td valign="middle" align="center">
<INPUT TYPE="checkbox" NAME="ids:int:list" VALUE="<!--#var
data_record_id_-->">
</TD>
<td valign="top"><!--#var meta_type--></td>
<td valign="top" align="left">
<a href="<!--#var SCRIPT_NAME-->/<!--#var "getpath(data_record_id_)"-->/manage_main"><!--#var "getpath(data_record_id_)"-->
<!--#if title--> (<!--#var title-->)<!--#/if--></a></td>
</tr>
<!--#/in-->
</table>
<input type="submit" value=" Remove " NAME="unindexObject:method">
<input type="submit" value=" Update " NAME="indexObject:method">
</form>
<!--#in searchResults previous size=20 start=query_start -->
<a href="<!--#var URL-->?query_start=<!--#var
previous-sequence-start-number-->">
[Previous <!--#var previous-sequence-size--> entries]
</a>
<!--#/in-->
<!--#in searchResults next size=20 start=query_start -->
<a href="<!--#var URL-->?query_start=<!--#var
next-sequence-start-number-->">
[Next <!--#var next-sequence-size--> entries]
</a>
<!--#/in-->
<!--#else-->
<P>There are no entries in the Catalog.</P>
<!--#/if-->
</BODY></HTML>
lib/python/Products/ZCatalog/notes.txt
0 → 100644
View file @
a9bee0fa
1 Indexed keep everything needed to unindex a record
2 Brute force unindexing of multiple records
3 Have catalog retain indexing data on behaf of indexes
4 The stamp
5 Dont use spider
lib/python/Products/ZCatalog/www/ZCatalog.gif
0 → 100644
View file @
a9bee0fa
181 Bytes
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment