Author: jmorliaguet
Date: Mon Apr 24 22:03:37 2006
New Revision: 2960

Modified:
   cpsskins/branches/paris-sprint-2006/setup/README.txt
Log:

- added some doc / test about type signatures used to create URIs



Modified: cpsskins/branches/paris-sprint-2006/setup/README.txt
==============================================================================
--- cpsskins/branches/paris-sprint-2006/setup/README.txt        (original)
+++ cpsskins/branches/paris-sprint-2006/setup/README.txt        Mon Apr 24 
22:03:37 2006
@@ -402,14 +402,37 @@
     'standard.actions'
 
 
+Type signatures
+---------------
+
+The type information obtained in this way can be used to create a unique
+*type signature* for classes of resources:
+
+    >>> resource = Actions()
+
+either as a list of interfaces:
+
+    >>> from cpsskins.elements.interfaces import ITypeable
+
+    >>> pprint(ITypeable(resource).getType())
+    [<InterfaceClass cpsskins.elements.interfaces.ICanvas>,
+     <InterfaceClass cpsskins.elements.interfaces.IPortlet>,
+     <InterfaceClass cpsskins.standard.portlets.actions.portlet.IActions>]
+
+or as a string:
+
+    >>> ITypeable(resource).getTypeName()
+    u'canvas-portlet-standard.actions'
+
+
 URI
 ---
 
-To identify resources, a URI (Uniform Resource Identifier) is used.
-A URI consists of a combination of the element type, resource type and content
-type separated with a '-' sign.
+To identify resource *instances* a URI (Uniform Resource Identifier) is used.
+A URI consists of a combination of a type signature's name and a unique
+identifier.
 
-The last part of the URI is the element's identifier as it is used in a
+The last part of the URI is the resource's identifier as it is used in a
 relation (cf. cpsskins.relations.interfaces.IRelatable).
 
     >>> from cpsskins.relations.interfaces import IRelatable
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to