[Mulgara-general] graph types

Paul Gearon gearon at ieee.org
Sat Aug 29 03:56:09 UTC 2009


As you've already seen, Mulgara goes through a couple of steps when
determining how to find a graph that appears in a query:

1. Look up the system graph. If the graph exists here, then it is an
internal graph.
2. Use the protocol information to retrieve the graph and access it that way.

In fact, it's a little more complex than this.

Accessing a graph (for reading or writing) is done through a module
called a "Resolver". Resolvers are libraries that access data in some
form, and return it as triples. Read/write resolvers, are also able to
write triples back out into the given format.

Resolvers register themselves with the system as being able to handle
graphs of a certain type, or being able to handle a certain protocol.
So now the steps above can be more properly described as:

1. Look in the system graph for the URI of the graph being accessed.
Get the rdf:type of this graph. If an rdf:type is found, then proceed
to step 1a. If not, then jump to step 2.
1a. Take the URI of the graph type, and look up the registered
resolvers for the resolver that handles this type.
1b. Perform all reads/writes for the given graph on the resolver
determined in the previous step.
1c. Exit

2. Presume that the URI of the graph is a URL. Use the "scheme" of the
URI (the "protocol" for a URL) to look up the registered resolvers for
the resolver that handles this protocol. If found, jump to step 3,
otherwise proceed to step 2a.
2a. Perform all reads/writes for the given graph on the resolver
determined in the previous step.
2b. Exit

3. The graph URI is not known in the local system, nor could it be
found by treating it as a URL and downloading the data. Fail.

(It's coded a little nice than this, but that's the operation anyway)

So, graph types are the type that a graph will have in the system
graph. ie. If a graph <A> has a type of <graphType>, then the system
graph will have an entry of:

  <A> rdf:type <graphType>

The URI of the type is then used to connect to the resolver that will
do the work. If the type URI is http://mulgara.org/mulgara#Model then
you'll be accessing the standard storage system. If it is
http://mulgara.org/mulgara#ViewModel  you'll be looking at a view
built from querying other graphs. If it is
http://mulgara.org/mulgara#LuceneModel then literals won't be stored
in the normal data storage, but rather in a Lucene index. The graph
can then be queried for triples that you didn't insert, but which
indicate patterns inside your literals. The list goes on.

Does this help? If not, I'll try again when I've slept.

Paul

On Fri, Aug 28, 2009 at 5:31 PM, Gregg Reynolds<dev at mobileink.com> wrote:
> Wikipage http://www.mulgara.org/trac/wiki/Create talks about "graph type".
> It lists:
>
> http://mulgara.org/mulgara#Model
> This is the default triple store graph. Specifying this type is equivalent
> to omitting the type parameter.
> http://mulgara.org/mulgara#ViewModel
> A view graph that represents a combined set of graphs. See the Views section
> for more information.
> http://mulgara.org/mulgara#LuceneModel
> A full-text string index graph based on Lucene. All statements placed into a
> full-text graph must have a literal-valued object. Queries against a
> full-text graph result in a match if the object in the query constraint is
> similar to any stored statements, rather than needing to be identical. See
> the Full-Text Graphs section for more information.
> http://mulgara.org/mulgara#XMLSchemaModel
> A datatyping graph that represents the property of orderedness that literals
> like dates and numbers possess. Datatyping graphs are used to constrain
> results to be above, below, or between specified dates or numbers. See the
> Datatyping Graphs section for more information.
> http://mulgara.org/mulgara#TypeModel
> A nodetyping graph that represents the type the RDF nodes have in a graph.
> Nodetyping graphs are used to constrain results to be literals or URI
> references. See the Nodetyping Graphss section for more information.
> http://mulgara.org/mulgara#FileSystemModel
> A filesystem graph that can be queried to return information about files and
> directories on filesystems. See the Filesystem Graph section for more
> information.
> http://mulgara.org/mulgara#PrefixModel
> A graph containing virtual statement about the characters prefixing string
> literals, or URI references.
>
> Aside from the fact that this text makes reference to other, non-existent
> documentation, I find this thoroughly opaque.  Anybody care to explicate?
>
> -g
>
> -gregg
>
> _______________________________________________
> Mulgara-general mailing list
> Mulgara-general at mulgara.org
> http://mulgara.org/mailman/listinfo/mulgara-general
>
>



More information about the Mulgara-general mailing list