plone.relations

HomePage: http://pypi.python.org/pypi/plone.relations

Author: Alec Mitchell

Download: https://pypi.python.org/packages/source/p/plone.relations/plone.relations-2.0.zip

        Introduction
============

Tools for defining and querying complex relationships between objects. This
product builds on and requires zc.relationship and also five.intid.

Credits
-------

Author: Alec Mitchell <apm13@columbia.edu>

Based on the index and relationship container from zc.relationship by
Gary Poster from Zope Corporation, and the port of the Zope intid utility
to Zope 2 by Whit Morriss in five.intid. This package includes a slightly
modified version of ``container.txt`` from zc.relationship which is copyright
Zope Corporation and distributed under the ZPL. The package was mostly
inspired by ideas in the doctests of that product.

This work was partly sponsored by The Daily Reel (http://www.thedailyreel.com)

Changelog
=========

2.0 - 2011-10-06
----------------

- Updated to work with and require Zope 2.13.
  [hannosch]

1.0rc4 - unreleased
-------------------

- Depend on setuptools as we use namespace packages.
  [maurits]

- Depend on zc.relationship 1.1.1 or higher.
  [maurits]

- Depend on zc.relationship 1.1.1 to allow support for ZODB 3.7 and 3.8.
  [alecm]


1.0rc3 - 2008-12-06
-------------------

- Peg to 1.0 versions of zc.relationship to maximize backwards
  compatibility for now.
  [alecm]


1.0rc2 - unreleased
-------------------

- 1.0rc2 was never released.


1.0rc1 - 2008-11-26
-------------------

- Added a changelog and cleaned up package information boilerplate.
  [hannosch]

- Getting a relation could cause a write transaction. This solved
  http://dev.plone.org/plone/ticket/8631.
  [regebro]


1.0b5 - 2008-05-10
------------------

- Removed unused import statements as reported by pyflakes.
  [tomster]

- Don't assume an IntId already exists.
  [alecm]

- Prep release with fixed dependencies, and new adapter based relationship
  proxying.
  [alecm]

- Added support for relationships to proxy objects obtained using adaptation.
  [massimo]

- It's not safe to use 'not target' when target could be a content item (e.g.
  a folderish one for which an empty folder is false). The new code is now
  identical to the same pattern used in zc.relationship.
  [optilude]

- Update version and zc.relationship dependency.
  [alecm]

- Remove collective.testing dependency.
  [alecm]

- Use a savepoint not a full commit during test.
  [alecm]

- We no longer guarantee that the relation objects themselves are wrapped on
  retrieval, only that they can be wrapped as needed.
  [alecm]

- We need implicit acquisition in order to obtain getPhysicalRoot for
  workflow/template expressions.
  [alecm]

- Remove getPhysicalPath methods as they are no longer needed, make the str
  representation of relationships show something reasonable even if some of
  the sources/targets are missing.
  [alecm]

- Early contributions.
  [optilude, ramon, wichert]

- Initial implementation.
  [alecm]

Detailed Documentation
======================

Overview
--------

This is a product built on the ``zc.relationship`` product for Zope 3.
It attempts to allow the functionality of that package to be used from
Zope 2, along with some simple additional functionality derived from
that package's basic relationship ``Index``.

The relationship container provided here is very similar to the one in
``zc.relationship``.  It is used to store and query objects
implementing or adaptable to the simple IRelationship interface, but
more complex relationships are supported as well.  This extra
functionality is defined in a few extensions to the IRelationship
interface.  These interfaces are described below:

    IRelationship defines a basic relationship consisting of
    only ``sources`` and ``targets``.  These are sequences of
    objects that comprise the relationship.  In the default
    implementation these must all be persistent objects from
    the ZODB (or more generally, objects for which and
    ``intid`` can be generated using the available ``IIntId``
    utility (cf ``zope.intid`` and ``five.intid``)).

    IComplexRelationship adds a relationship predicate to
    indicate the type of relationship involved.  This
    predicate is ret