[z3-checkins] r13935 - z3/zemantic/trunk/doc
michelp at codespeak.net
michelp at codespeak.net
Sun Jun 26 13:50:46 CEST 2005
Author: michelp
Date: Sun Jun 26 13:50:45 2005
New Revision: 13935
Removed:
z3/zemantic/trunk/doc/README.txt
z3/zemantic/trunk/doc/TODO.txt
z3/zemantic/trunk/doc/WALKTHROUGH.txt
z3/zemantic/trunk/doc/ZONTOLOGY.txt
z3/zemantic/trunk/doc/queries.txt
Modified:
z3/zemantic/trunk/doc/INSTALL.txt
Log:
removed old docs
Modified: z3/zemantic/trunk/doc/INSTALL.txt
==============================================================================
--- z3/zemantic/trunk/doc/INSTALL.txt (original)
+++ z3/zemantic/trunk/doc/INSTALL.txt Sun Jun 26 13:50:45 2005
@@ -2,19 +2,10 @@
You must have the rdflib library (rdflib.net) installed in order to
use Zemantic. It uses disutils so it's quite easy to install.
-If you want to use the semantic graph visualization plugin, you will
-need to install the graphviz package *on the server*, specifically the
-"dot" program must be in the executable path of the Zope 3 server.
-Here is a screenshot of the applet visualizer in action
-http://zemantic.org/viz.png.
+After that you install Zemantic with either the distutils installer or
+link it into the "lib/python" directory (or anywhere else on your
+Python path) of your Zope 3 instance and droping the
+"etc/catalog-configure.zcml" into your Zope 3.1 "package-includes".
-After that you install Zemantic by installing it into the "lib/python"
-directory of your Zope 3 instance and dropting the
-"etc/catalog-configure.zcml" into your Zope 3 "etc/package-includes".
-If you want to install the example catalogable content type, install
-"examples/library/etc/library-configure.zcml".
-
-Restart Zope 3, you shold be able to add a Catalog as a local utility
-to your sites. If you installed the example library you should be
-able to add "Book" objects that will be cataloged in the nearest
-catalog utility.
+Restart Zope 3, you shold be able to add an RDF Graph as a local
+utility to your sites.
Deleted: /z3/zemantic/trunk/doc/README.txt
==============================================================================
--- /z3/zemantic/trunk/doc/README.txt Sun Jun 26 13:50:45 2005
+++ (empty file)
@@ -1,225 +0,0 @@
-
-Introduction to Zemantic
-========================
-
-Zemantic is a semantic web catalog for Zope 3 (there is also a Zope 2
-version in the collective, http://sf.net/projects/collective but it
-was only an initial prototype that I don't have time to maintain).
-The Semantic Web is a W3C standard for the exchange and processing of
-data and meta-data for the web.
-
-Zemantic "catalogs" (ie indexes) data expressed in the Resource
-Description Framework (RDF). Any kind of content, whether inside Zope
-or from some outside source, can be cataloged if it can describe
-itself using the RDF standard. Any kind of RDF vocabulary like RSS,
-OWL, DAML+OIL, Dublin Core, or any kind of XML schema or data can be
-expressed into the catalog.
-
-Once data is cataloged into Zemantic it can be queried using either
-the Python query interface or a TALES-based RDF query expression
-language. Results of a query can be either a generator of result
-records or RDF in xml or NT format. Future query languages can be
-easily adapted to Zemantic's IQuery interface.
-
-Zemantic has two main components that are both configured as a local
-Zope 3 site utility. The Zemantic utility is the actual catalog of
-meta-data and the Zontology utility is used to managed registered
-ontologies, or schemas, such as Dublin Core, FoaF
-(Friend-of-a-Friend), OWL, etc. Zontology utilities are used in query
-expressions and are explained later.
-
-A Zemantic catalog utility is not much use without something to put in
-it, so it comes with an example "book" object in the
-"examples/library" package. Book objects implement the dublin core
-and describe themselves using an RDF page template.
-
-Zemantic comes with an example "book" content object (in the
-examples/library package) that shows how automatic cataloging can be
-done for a fictional online library.
-
-Books define an adapter that returns an XML RDF description of the
-book (examples/library/adapter.py). The XML describes the book using
-the dublin core schema and is defined using a page template
-(examples/library/book_rdf.xml).
-
-An event subscriber (examples/library/cataloger.py) queries the
-IZemantic utility and adapts the book the the XML interface
-the catalog expects. This catalogs the object. Now the semantic
-catalog can be searched for the information to object provided the
-catalog.
-
-To install Zemantic, copy the 'zemantic-configure.zcml' into your Zope
-3 instance home's '/etc/package-includes'. If you want to include the
-demo content object, also copy
-'examples/library/etc/library-configure.zcml' into the same location.
-
-Zemantic Basics
-===============
-
-While very similar in many use cases to ZCatalog, it based on a
-radically different design. Zemantic uses W3C semantic web standards
-and concepts, particularly the Resource Description Framework (RDF).
-Here's a brief rundown on how it works:
-
-Resources (content, web pages, internal objects, external systems,
-anything with a URI) describe themselves in the RDF XML format. This
-description has no fixed semantic constraints, any XML schema can be
-used (dublin core, xmls, OWL, custom, any mix thereof) to describe the
-object. Zemantic parses this RDF into a persistent, quickly
-searchable database of semantic information that you can query with
-either Python or a query expression language.
-
-RDF is basicly a way of composing simple subject, predicate, object
-statements. Like "This file" has the "content type", "text/html" is a
-simple statement where each quoted part is the subject, predicate and
-object of the statement, respectively. The result of a subject,
-predicate, object statement is called a *triple*. When you query a
-catalog, you get back the results as a set of triples.
-
-The database is a structure of nested persistent BTrees that index RDF
-in each of three dimensions, subject, predicate and object. This
-structure is called a TripleStore. By indexing each of the three
-parts of a triples, the store can be quickly quieried for patterns of
-relationships.
-
-There are no "indexes" like in the ZCatalog, or perhaps more properly,
-a triple store is a meta-index that indexes the index (predicate) as
-well as the key (subject) and value (object). Zemantic can index any
-predicate in any XML schema, anything that has a URI can be used as a
-predicate. Further these indexed predicates need not be determined at
-the time the catalog was created, Zemantic easily "learns" new
-predicates when they're indexed.
-
-Zemantic also has no "meta-data" because it's all meta data really,
-that's one of RDF's primary use cases. The meta-data is indexed into
-the triple store along with everything else you care to describe the
-object with. If you don't want to have to activate the object for
-something (or re-fetch the resource if its not an internal object)
-then include that information in the RDF.
-
-Another major improvement of the ZCatalog is that Zemantic has no
-problem storing unrelated graphs of information in the same triple
-store. In ZCatalog this can be done but it is usually not very pretty
-since many indexes will be unrelated and every object will get a
-metadata column whether it needs it or not.
-
-Queries
-=======
-
-To query a catalog in python you pass its query() method a query
-object. This object implements the IQuery and is the object that
-carries out the actual search on the catalog store. In this way,
-applications can provide their own form of query logic instead of
-relying on any logic built-in.
-
-A basic query object can be created with the Query(subject=Any,
-predicate=Any, object=Any) class constructor. Query arguments can be
-strings or unicode strings in RDF N3 format, rdflib identifier
-objects, or None. See below in query expressions for a description of
-each type's behavior on the query.
-
-It is an important detail that you pass the query object to the
-catalog for evaluation. The catalog makes no assumptions about the
-business searching logic of the agents, the catalog in fact makes no
-semantic interpretations on the data it contains, it is soley an RDF
-storage. The queries themselves are application specific and thus are
-provided by the application.
-
-More advanced queries can be undertaken by Agents. Agents are not a
-specific interface but they are a more complex peice of software than
-a query. In the semantic web world they tend to involve higher-order
-application specific logic like reasoning and inference.
-
-Zemantic Expressions
-====================
-
-The zemantic expression language is not meant to be a full blown query
-language that supports all forms of rdf queries (see:
-http://www.aifb.uni-karlsruhe.de/WBS/pha/rdf-query/). Many of these
-languages, such as RQL and RDFQL try to define rich business and
-manipulation syntax that looks a lot like SQL.
-
-Of course the idea in Zope 3 is to remove as much business logic
-from presentation as possible, so zemantic expressions (ZEs) are
-based on matching patterns, not complex query logic, and they are
-for query only, they do not allow you to insert or remove
-information from the storage, for that you should use Python code.
-They are meant for clear simple queries for use from zope page
-templates and script to iterator over results.
-
-ZEs are Python expressions that must return a 3-tuple or an IQuery
-implementor. In this first case this typically takes the form of a
-literal tuple construction syntax containing three sub-expressions:
-
- zemantic: <subject expr>, <predicate expr>, <object expr>
-
-The return values of each expression are used in catalog queries when
-the expression is evaluated. Each 3-tuple becomes the arguments for a
-zemantic.query.Query() object. In the following examples, the
-expression type prefix "zemantic:" is assumed. The value of an
-expression must be one of the following:
-
- Any (None) - Matches any value in that position of the expression,
- a 'wildcard' selector. Example returns everything in the store:
-
- Any, Any, Any
-
- String - A string or unicode string in N3 format matches that
- identifier in that position. Not in N3 format will raise a
- ValueError. Example returns anything with a onts.dc.creator
- property:
-
- Any, u'<http://purl.org/dc/elements/1.1/creator>', Any
-
- IIdentifier - an rdflib Identifier. Matches that identifier in
- that position. Registered ontologies in a Zontology utility are
- automatically in scope and any in scope variables can be
- used. Example returns anything with a onts/dc/creator property:
-
- Any, path('onts/dc/creator'), Any
-
- 3-tuple - A 3-tuple in a query term defines an innner query ecah
- of whose results is applied to the outer query. See nested
- queries, below.
-
- IQuery - Another way to speficy an inner query. See nested
- queries, below.
-
-Expressions can be chained together into union (or) and intersection
-(and) operators using the syntax (unimplemented):
-
- (s1, p1, o1) | (s2, p2, o2)
- (s1, p1, o1) & (s2, p2, o2)
-
-Comparison syntax compares every object in a result set to a literal
-value and returns those results in the set that compare properly
-(unimplemented):
-
- (s, p, o) > Literal('...')
-
-Range syntax returns all of the results whose objects fall within a
-range of values (unimplemented):
-
- (s, p, o)[Literal('...'):Literal('...')]
-
-Nested expressions apply the results of an inner query to an outer
-query to extract data not directly represented by the storage. For
-example:
-
- Any, path('onts/dc/creator'), (Any, path('onts/foaf/name'), Literal('bob'))
-
-First queries the catalog for any persons whose name is 'bob', then
-queries any subjects in the store whose onts.dc.creator properties are
-those persons returned by the inner expression. Here's another:
-
- Any, path('onts/foaf/knows'), (Any, path('onts/foaf/knows'), (Any, path('onts/foaf/name'), Literal('bob')))
-
-Returns anyone who knows anyone whose name is 'bob'.
-
-Nested expressions can add a lot of memory and CPU overhead to a
-query, for example, a nested expression (Any, Any, Any) would cause
-the outer query to be executed for every triple in the storage,
-which could be bad if your storage held more data than your RAM can
-hold, this would be very inefficient. Inner expressions should be
-as specific as possible, or select from small sets.
-
Deleted: /z3/zemantic/trunk/doc/TODO.txt
==============================================================================
--- /z3/zemantic/trunk/doc/TODO.txt Sun Jun 26 13:50:45 2005
+++ (empty file)
@@ -1,18 +0,0 @@
-
- 1. Improve query logic
-
- a. possibly add inference logic or language like pylog. See
- doc/query.txt.
-
- 2. Implement REST interface:
-
- a. Fully implement clone of http://www.schemaweb.info/ REST
- interface, start boostrapping users off that.
-
- 3. Implement more natural navigation interfaces.
-
- a. Dont know what that means yet, mSpaces is a cool example
-
- 4.
-
-
Deleted: /z3/zemantic/trunk/doc/WALKTHROUGH.txt
==============================================================================
--- /z3/zemantic/trunk/doc/WALKTHROUGH.txt Sun Jun 26 13:50:45 2005
+++ (empty file)
@@ -1,34 +0,0 @@
-
-Quick walk-through to get you started.
-
-Put etc/zemantic-configure.zcml and
-examples/library/etc/library-configure.zcml into your Zope X3.0
-etc/site-packages/ folder. Restart Zope 3.
-
-Go to your Zope 3 site management folder and add a 'Zemantic' and a
-'Zontology' utility. They don't need a name or any other parameters.
-After adding the Zontology utility, click on the "Load sample
-ontologes" button. This will import some common RDF ontologies like
-dublin core, which is used in this example.
-
-After adding the Zemantic utility leave your browser on the empty
-"Zemantic" tab and in another tab or window go back to the root folder
-and add some 'Book' objects. These objects have a dublin core
-interface. Add a few. Go back to the Zemantic tab on the other
-screen and reload the page. Your books' meta-data has been cataloged.
-Remove a book, the data goes away. Change a book, the data is
-updated.
-
-Create a page template in the root folder next to all your book. Add
-this code:
-
- <html>
- <body>
- <p>The library contains the following titles:</p>
- <ul><li tal:repeat="book zemantic: Any, path('zon/dc/title'), Any"
- tal:content="book/object"/>
- </ul>
- </body>
- </html>
-
-This will render a list of book titles that you added.
Deleted: /z3/zemantic/trunk/doc/ZONTOLOGY.txt
==============================================================================
--- /z3/zemantic/trunk/doc/ZONTOLOGY.txt Sun Jun 26 13:50:45 2005
+++ (empty file)
@@ -1,30 +0,0 @@
-
-Zontology is a folderish object that holds a bunch of zemantic
-catalogs inside it. Eac catalog generally maps to one ""ontology" be
-that what it may. A good way to get started with zontologis is to
-create a new Zontology in your site managment folder named
-"Zontology", then visit the following URL:
-
-
-http://localhost:8080/++etc++site/default/Zontology/@@loadStuff
-
-You may have to adjust the URL to point to your Zontology. This will
-kick in the load script that pulls in the entire schema database at
-www.schemaweb.info. It's interesting to note that the loadStuff
-script pulls in and parses RDF from schemaweb's REST HTTP query
-interface. See browser.py for that code.
-
-This script loads 202 ontologies totalling 104323 triples into
-Zontology. Your database will grow by about 42MB. This breaks down
-to about 409 bytes per triple, which is quite efficient.
-
-Note that even with the use of sub-transactions this load will require
-at least 450MB of process size and several megabytes of internet
-bandwidth to load all of the RDF. Do these heavy loads sparingly so
-as not to overburden schemaweb.info. I have intentionally added a one
-second sleep to the load to prevent this.
-
-The first load requires lost of process space, but after restarting
-Zope it will not require more than 200MB at most, this mass-cataloging
-memory growth problem is symptomatic of ZODB and does not reflect the
-long-term memory needs of Zemantic.
Deleted: /z3/zemantic/trunk/doc/queries.txt
==============================================================================
--- /z3/zemantic/trunk/doc/queries.txt Sun Jun 26 13:50:45 2005
+++ (empty file)
@@ -1,13 +0,0 @@
-
-Let's start with a number of assumptions:
-
- There are a number of query languages out there. Multiple languages
- should be supported.
-
- The needs of one user may prefer one language over another, there is
- no one better than the other.
-
- That being said Python
-
- How about a language whose syntax, query input, datastore and output
- were all RDF?
More information about the z3-checkins
mailing list