semweb-1.05+dfsg/0000755000175000017500000000000010774502134013141 5ustar meebeymeebeysemweb-1.05+dfsg/examples/0000755000175000017500000000000010774502134014757 5ustar meebeymeebeysemweb-1.05+dfsg/examples/loadfromweb.cs0000644000175000017500000000202010774502134017601 0ustar meebeymeebey// This example loads an RDF file from the web. // It uses RdfReader.LoadFromUri, passing a URI, // which downloads the corresponding URI and looks // at its MIME type to determine what kind of // RdfReader should be used to parse the file. A // default URI (http://www.mozilla.org/news.rdf) // can be used, or pass a URI on the command line // to use a different data source. using System; using SemWeb; public class LoadFromWeb { public static void Main(string[] args) { string uri = "http://www.mozilla.org/news.rdf"; if (args.Length > 0) uri = args[0]; MemoryStore store = new MemoryStore(); // Here's one way... store.Import(RdfReader.LoadFromUri(new Uri(uri))); using (RdfWriter writer = new N3Writer(Console.Out)) store.Select(writer); // Or.... RdfReader file = RdfReader.LoadFromUri(new Uri(uri)); file.Select(new StatementPrinter()); } class StatementPrinter : StatementSink { public bool Add(Statement assertion) { Console.WriteLine(assertion.ToString()); return true; } } } semweb-1.05+dfsg/examples/README.txt0000644000175000017500000000235110774502134016456 0ustar meebeymeebeyBUILDING THE EXAMPLES If you're in Linux, just run make to compile all the examples. Each of the files **.cs in this directory is meant to be compiled on is own. A description of each program is at the top of each source file. If you're using Mono, it'll help to copy or symlink the SemWeb.dll assembly into this directory: ln -s ../bin/SemWeb.dll . To compile an example: mcs example.cs -r:SemWeb.dll To run it: mono example.exe If you're using Visual Studio, create a new project, reference SemWeb.dll in the bin directory, and add the exampleXX.cs file to the project. EXAMPLE RDF DATA In linux, run "./getsomedata.sh" to download some RDF data files. You'll end up with four files about the U.S. Congress: people.rdf, bills.2005.rdf, bills.2005.cosponsors.rdf, and also congress.n3 which contains everything in the first three. Otherwise, you can grab the files at: http://www.govtrack.us/data/rdf/people.rdf.gz http://www.govtrack.us/data/rdf/bills.2005.rdf.gz and http://www.govtrack.us/data/rdf/bills.2005.cosponsors.rdf.gz You'll need to un-gzip them. You might also want to merge them into a single file with: mono ../bin/rdfstorage.exe --out n3:congress.n3 people.rdf bills.2005.rdf bills.2005.cosponsors.rdf semweb-1.05+dfsg/examples/rdfs.cs0000644000175000017500000000337110774502134016250 0ustar meebeymeebey// This example demonstrates basic RDFS reasoning. using System; using System.IO; using SemWeb; using SemWeb.Inference; public class EulerTest { public static void Main() { // Create the instance data MemoryStore dataModel = new MemoryStore(); BNode me = new BNode("me"); BNode you = new BNode("you"); Entity rdfType = "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"; Entity rdfsLabel= "http://www.w3.org/2000/01/rdf-schema#label"; Entity foafPerson = "http://xmlns.com/foaf/0.1/Person"; Entity foafAgent = "http://xmlns.com/foaf/0.1/Agent"; Entity foafName = "http://xmlns.com/foaf/0.1/name"; dataModel.Add(new Statement(me, rdfType, foafPerson)); dataModel.Add(new Statement(you, rdfType, foafPerson)); dataModel.Add(new Statement(me, foafName, (Literal)"John Doe")); dataModel.Add(new Statement(you, foafName, (Literal)"Sam Smith")); // Create the RDFS engine and apply it to the data model. RDFS engine = new RDFS(); engine.LoadSchema(RdfReader.LoadFromUri(new Uri("http://xmlns.com/foaf/0.1/index.rdf"))); dataModel.AddReasoner(engine); // Query the data model // Ask for who are typed as Agents. Note that the people are // typed as foaf:Person, and the schema asserts that foaf:Person // is a subclass of foaf:Agent. Console.WriteLine("Who are Agents?"); foreach (Entity r in dataModel.SelectSubjects(rdfType, foafAgent)) Console.WriteLine("\t" + r); // Ask for the rdfs:labels of everyone. Note that the data model // has foaf:names for the people, and the schema asserts that // foaf:name is a subproperty of rdfs:label. Console.WriteLine("People's labels:"); foreach (Statement s in dataModel.Select(new Statement(null, rdfsLabel, null))) Console.WriteLine("\t" + s); } } semweb-1.05+dfsg/examples/Makefile0000644000175000017500000000050010774502134016412 0ustar meebeymeebeyall: *.cs ln -sf ../bin/SemWeb.dll .; ln -sf ../bin/SemWeb.Sparql.dll .; ln -sf ../bin/sparql-core.dll .; ln -sf ../bin/IVKM.GNU.Classpath.dll .; for sample in `ls *.cs`; do mcs -debug $$sample -r:SemWeb.dll -r:SemWeb.Sparql.dll ; done runtests: all mono helloworld.exe > helloworld.output.rdf clean: rm *.exe* semweb-1.05+dfsg/examples/sparql1.cs0000644000175000017500000000456610774502134016704 0ustar meebeymeebeyusing System; using SemWeb; using SemWeb.Remote; using SemWeb.Query; public class Sparql1 { public static void Main() { string endpoint = "http://www.rdfabout.com/sparql"; string ex1 = "PREFIX foaf: \n" + "SELECT ?name \n" + "WHERE { [] foaf:name ?name . }\n" + "LIMIT 10 \n"; string ex2 = "PREFIX foaf: \n" + "ASK \n" + "WHERE { [] foaf:name ?name . }\n"; string ex3 = "PREFIX foaf: \n" + "CONSTRUCT { ?person foaf:name2 ?name } \n" + "WHERE { ?person foaf:name ?name . }\n" + "LIMIT 10 \n"; SparqlHttpSource source = new SparqlHttpSource(endpoint); Console.WriteLine("RunSparqlQuery(ex1, Console.Out):"); source.RunSparqlQuery(ex1, Console.Out); Console.WriteLine(); Console.WriteLine("RunSparqlQuery(ex1, SparqlXmlQuerySink):"); source.RunSparqlQuery(ex1, new SparqlXmlQuerySink(Console.Out)); Console.WriteLine(); Console.WriteLine(); Console.WriteLine("RunSparqlQuery(ex2, bool):"); bool result; source.RunSparqlQuery(ex2, out result); Console.WriteLine(result); Console.WriteLine(); Console.WriteLine("RunSparqlQuery(ex3, N3Writer):"); using (N3Writer writer = new N3Writer(Console.Out)) source.RunSparqlQuery(ex3, writer); Console.WriteLine(); Console.WriteLine("Select(subject,__,__)"); using (N3Writer writer = new N3Writer(Console.Out)) source.Select(new Statement("http://www.rdfabout.com/rdf/usgov/congress/people/M000303", null, null), writer); Console.WriteLine(); Console.WriteLine("Query(...) A"); Variable a = new Variable("a"); QueryOptions qo = new QueryOptions(); qo.Limit = 10; source.Query(new Statement[] { new Statement(a, "http://xmlns.com/foaf/0.1/name", (Literal)"John McCain"), new Statement(a, new Variable("b"), new Variable("c")), }, qo, new SparqlXmlQuerySink(Console.Out)); Console.WriteLine(); Console.WriteLine(); Console.WriteLine("Query(...) B"); QueryResultBuffer qb = new QueryResultBuffer(); source.Query(new Statement[] { new Statement(a, "http://xmlns.com/foaf/0.1/name", (Literal)"John McCain"), new Statement(a, new Variable("b"), new Variable("c")), }, qo, qb); foreach (VariableBindings b in qb) { Console.WriteLine("a => " + b["a"]); Console.WriteLine("b => " + b["b"]); Console.WriteLine(); } Console.WriteLine(); } } semweb-1.05+dfsg/examples/euler.cs0000644000175000017500000000512410774502134016424 0ustar meebeymeebey// This example demonstrates general reasoning with // the Euler engine based on Jos De Roo's Euler proof // mechanism. The example is based on the "graph" // example from Euler. using System; using System.IO; using SemWeb; using SemWeb.Inference; public class EulerTest { public static void Main() { // Create the instance data MemoryStore dataModel = new MemoryStore(); BNode paris = new BNode("paris"); BNode orleans = new BNode("orleans"); BNode chartres = new BNode("chartres"); BNode amiens = new BNode("amiens"); BNode blois = new BNode("blois"); BNode bourges = new BNode("bourges"); BNode tours = new BNode("tours"); BNode lemans = new BNode("lemans"); BNode angers = new BNode("angers"); BNode nantes = new BNode("nantes"); Entity oneway = new Entity("http://www.agfa.com/w3c/euler/graph.axiom#oneway"); Entity path = new Entity("http://www.agfa.com/w3c/euler/graph.axiom#path"); dataModel.Add(new Statement(paris, oneway, orleans)); dataModel.Add(new Statement(paris, oneway, chartres)); dataModel.Add(new Statement(paris, oneway, amiens)); dataModel.Add(new Statement(orleans, oneway, blois)); dataModel.Add(new Statement(orleans, oneway, bourges)); dataModel.Add(new Statement(blois, oneway, tours)); dataModel.Add(new Statement(chartres, oneway, lemans)); dataModel.Add(new Statement(lemans, oneway, angers)); dataModel.Add(new Statement(lemans, oneway, tours)); dataModel.Add(new Statement(angers, oneway, nantes)); // Create the inference rules by reading them from a N3 string. string rules = "@prefix : .\n" + "\n" + "{ ?a :oneway ?b } => { ?a :path ?b } .\n" + "{ ?a :path ?b . ?b :path ?c . } => { ?a :path ?c } .\n"; // Create our question in the form of a statement to test. Statement question = new Statement(paris, path, nantes); // Create the Euler engine Euler engine = new Euler(new N3Reader(new StringReader(rules))); // First Method of Inference: // Ask the engine whether there is a path from paris to nantes. // The Prove method will return a list of proofs, or an empty // array if it could not find a proof. foreach (Proof p in engine.Prove(dataModel, new Statement[] { question })) { Console.WriteLine(p.ToString()); } // Second Method of Inference: // Apply the engine to the data model and then use the data // model's Contains method to see if the statement is "in" // the model + reasoning. dataModel.AddReasoner(engine); Console.WriteLine("Euler Says the Question is: " + dataModel.Contains(question)); } } semweb-1.05+dfsg/examples/containers.cs0000644000175000017500000000231410774502134017453 0ustar meebeymeebey// This example deals with RDF containers. You can use the rdfs:member // property to match any rdf:_### (i.e. rdf:li) property. Or, // use SelectObjects on the Store, which will return the items // in sorted order. using System; using SemWeb; public class Containers { const string RDF = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"; const string RDFS = "http://www.w3.org/2000/01/rdf-schema#"; public static void Main() { MemoryStore store = new MemoryStore(); Entity container = new Entity("http://www.example.org/#container"); store.Add(new Statement(container, RDF+"type", (Entity)(RDF+"Bag"))); store.Add(new Statement(container, RDF+"_3", (Literal)"Three")); store.Add(new Statement(container, RDF+"_2", (Literal)"Two")); store.Add(new Statement(container, RDF+"_1", (Literal)"One")); // use the rdfs:member property to match for any rdf:_### predicates. Entity rdfs_member = (Entity)(RDFS+"member"); using (RdfWriter writer = new N3Writer(Console.Out)) { writer.Namespaces.AddNamespace(RDF, "rdf"); store.Select(new Statement(container, rdfs_member, null), writer); } foreach (Resource r in store.SelectObjects(container, rdfs_member)) Console.WriteLine(r); } } semweb-1.05+dfsg/examples/filters.cs0000644000175000017500000000206510774502134016761 0ustar meebeymeebeyusing System; using System.Collections; using SemWeb; public class Filters { const string RDF = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"; const string RDFS = "http://www.w3.org/2000/01/rdf-schema#"; public static void Main() { MemoryStore store = new MemoryStore(); Entity container = new Entity("http://www.example.org/#container"); store.Add(new Statement(container, RDF+"type", (Entity)(RDF+"Bag"))); store.Add(new Statement(container, RDF+"_3", (Literal)"Three")); store.Add(new Statement(container, RDF+"_2", (Literal)"Two")); store.Add(new Statement(container, RDF+"_1", (Literal)"One")); // use the rdfs:member property to match for any rdf:_### predicates. Entity rdfs_member = (Entity)(RDFS+"member"); using (RdfWriter writer = new N3Writer(Console.Out)) { writer.Namespaces.AddNamespace(RDF, "rdf"); SelectFilter f = new SelectFilter(); //f.Predicates = new Entity[] { rdfs_member }; f.LiteralFilters = new LiteralFilter[] { new SemWeb.Filters.StringContainsFilter("n") }; store.Select(f, writer); } } } semweb-1.05+dfsg/examples/select.cs0000644000175000017500000000235010774502134016565 0ustar meebeymeebeyusing System; using SemWeb; public class Select { const string RDF = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"; const string FOAF = "http://xmlns.com/foaf/0.1/"; const string example_foaf_file = "http://rdfweb.org/people/danbri/rdfweb/danbri-foaf.rdf"; static readonly Entity rdftype = RDF+"type"; static readonly Entity foafPerson = FOAF+"Person"; static readonly Entity foafknows = FOAF+"knows"; static readonly Entity foafname = FOAF+"name"; public static void Main() { Store store = new MemoryStore(); store.Import(RdfReader.LoadFromUri(new Uri(example_foaf_file))); // Dump out the data, for fun using (RdfWriter writer = new RdfXmlWriter(Console.Out)) { writer.Write(store); } Console.WriteLine("These are the people in the file:"); foreach (Statement s in store.Select(new Statement(null, rdftype, foafPerson))) { foreach (Resource r in store.SelectObjects(s.Subject, foafname)) Console.WriteLine(r); } Console.WriteLine(); Console.WriteLine("And here's RDF/XML just for some of the file:"); using (RdfWriter w = new RdfXmlWriter(Console.Out)) { store.Select(new Statement(null, foafname, null), w); store.Select(new Statement(null, foafknows, null), w); } Console.WriteLine(); } } semweb-1.05+dfsg/examples/getsomedata.sh0000755000175000017500000000105110774502134017610 0ustar meebeymeebey#!/bin/sh # This downloads some RDF data about the U.S. Congress. echo Download RDF file from GovTrack.us... wget -nc http://www.govtrack.us/data/rdf/people.rdf.gz wget -nc http://www.govtrack.us/data/rdf/bills.109.rdf.gz wget -nc http://www.govtrack.us/data/rdf/bills.109.cosponsors.rdf.gz echo Uncompressing them... gunzip people.rdf.gz gunzip bills.109.rdf.gz gunzip bills.109.cosponsors.rdf.gz echo Merging them together into congress.n3... mono ../bin/rdfstorage.exe --out n3:congress.n3 \ people.rdf bills.109.rdf bills.109.cosponsors.rdf semweb-1.05+dfsg/examples/sqlite.cs0000644000175000017500000000156510774502134016616 0ustar meebeymeebeyusing System; using SemWeb; public class Sqlite { const string RDF = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"; const string FOAF = "http://xmlns.com/foaf/0.1/"; static readonly Entity rdftype = RDF+"type"; static readonly Entity foafPerson = FOAF+"Person"; static readonly Entity foafname = FOAF+"name"; public static void Main() { Store store = Store.Create("sqlite:rdf:Uri=file:foaf.sqlite;version=3"); Entity newPerson = new Entity("http://www.example.org/me"); store.Add(new Statement(newPerson, rdftype, foafPerson)); store.Add(new Statement(newPerson, foafname, (Literal)"New Guy")); Console.WriteLine("These are the people in the file:"); foreach (Entity s in store.SelectSubjects(rdftype, foafPerson)) { foreach (Resource r in store.SelectObjects(s, foafname)) Console.WriteLine(r); } Console.WriteLine(); store.Dispose(); } } semweb-1.05+dfsg/examples/query.cs0000644000175000017500000000270610774502134016460 0ustar meebeymeebey// This example runs a query. using System; using System.IO; using SemWeb; using SemWeb.Query; public class Example { public static void Main(string[] argv) { if (argv.Length < 3) { Console.WriteLine("Usage: query.exe format queryfile datafile"); return; } string format = argv[0]; string queryfile = argv[1]; string datafile = argv[2]; Query query; if (format == "rsquary") { // Create a simple-entailment "RSquary" query // from the N3 file. query = new GraphMatch(new N3Reader(queryfile)); } else { // Create a SPARQL query by reading the file's // contents. query = new SparqlEngine(new StreamReader(queryfile)); } // Load the data file from disk MemoryStore data = new MemoryStore(); data.Import(new N3Reader(datafile)); // First, print results in SPARQL XML Results format... // Create a result sink where results are written to. QueryResultSink sink = new SparqlXmlQuerySink(Console.Out); // Run the query. query.Run(data, sink); // Second, print the results via our own custom QueryResultSink... query.Run(data, new PrintQuerySink()); } public class PrintQuerySink : QueryResultSink { public override bool Add(VariableBindings result) { foreach (Variable var in result.Variables) { if (var.LocalName != null && result[var] != null) { Console.WriteLine(var.LocalName + " ==> " + result[var].ToString()); } Console.WriteLine(); } return true; } } } semweb-1.05+dfsg/examples/helloworld.cs0000644000175000017500000000217510774502134017466 0ustar meebeymeebey// This example creates a few RDF statements and adds // them to a MemoryStore. Then it writes out the // statements in RDF/XML format to the console. Note // that the implicit string-to-Entity and string-to- // Literal conversion operators are being used. using System; using SemWeb; public class Example { const string RDF = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"; public static void Main() { MemoryStore store = new MemoryStore(); Entity computer = new Entity("http://example.org/computer"); Entity says = "http://example.org/says"; Entity wants = "http://example.org/wants"; Entity desire = new BNode(); Entity description = new Entity("http://example.org/description"); store.Add(new Statement(computer, says, (Literal)"Hello world!")); store.Add(new Statement(computer, wants, desire)); store.Add(new Statement(desire, description, (Literal)"to be human")); store.Add(new Statement(desire, RDF+"type", (Entity)"http://example.org/Desire")); using (RdfWriter writer = new RdfXmlWriter(Console.Out)) { writer.Namespaces.AddNamespace("http://example.org/", "ex"); writer.Write(store); } } } semweb-1.05+dfsg/examples/simple.cs0000644000175000017500000000104710774502134016601 0ustar meebeymeebey// This example reads an RDF/XML file on standard input // and writes it back out in N3 format to standard output. using System; using SemWeb; public class Simple { public static void Main() { MemoryStore store = new MemoryStore(); store.Import(new RdfXmlReader(Console.In)); // The 'using' is important because it is necessary // to Close or Dispose the writer once writing is // complete so that the final statement is closed // with a period. using (RdfWriter writer = new N3Writer(Console.Out)) writer.Write(store); } } semweb-1.05+dfsg/doc/0000755000175000017500000000000010774502134013706 5ustar meebeymeebeysemweb-1.05+dfsg/doc/stylesheet.css0000644000175000017500000000025710774502134016615 0ustar meebeymeebeypre.code { margin: 1em; padding: .5em; background-color: #FAFAFF; border: 1px solid #CCCCDD; } tt { letter-spacing: 1px; font-size: 105%; background-color: #FFFFEE; } semweb-1.05+dfsg/doc/index.html0000644000175000017500000000245710774502134015713 0ustar meebeymeebey SemWeb: Documentation

SemWeb: A .NET Library for RDF and the Semantic Web

This documentation describes version 0.85 of SemWeb.

To get started, you should use the pre-compiled binaries provided in the download package. These are located in the bin directory. You will need to reference SemWeb.dll in all of the examples.

The documentation is split into several pages:

Library Overview: A design document explaining the basics of the library.
Hello World: A simple SemWeb application.
Reading RDF: Loading in RDF data from files and "streaming" statements.
Selecting Statements: Simple queries to fetch statements.
Using Databases: Persistent storage in an SQL database.
Selecting with Filters: Getting many answers at once.
Querying: Simple Entailment and SPARQL.
Inferencing: Performing RDFS and general reasoning.
semweb-1.05+dfsg/doc/selecting.html0000644000175000017500000001455710774502134016565 0ustar meebeymeebey SemWeb: Docs: Selecting Statements

SemWeb Documentation

Selecting Statements

Using statement templates

In the previous tutorial you saw the Select method of StatementSources, which streams all of the statements into a sink. The name "Select" was derived from SQL syntax, where it's used to retrieve rows that match a criteria. In SemWeb, Select is used to retreive statements matching a filter. (And as with SQL, when no criteria is given all statements are retrieved.)

A template is a Statement but with subject, predicate, and object possibly null. nulls are wildcards. So here are a few examples:

store.Select(sink);  // selects all statements, streaming them into sink
store.Select(new Statement(null, null, null), sink);  // the same
store.Select(Statement.All, sink);  // the same, but shorthand

store.Select(new Statement(subj, null, null), sink);  // any statement with that particular subject entity
store.Select(new Statement(subj, pred, null), sink);  // any statement with that particular subject and predicate
store.Select(new Statement(subj, pred, obj), sink);  // just that statement, if it exists in the store

The sink can be any StatementSink. This includes RdfWriters, which would let you write out just a part of a store to a file, and Stores like the MemoryStore so that you can move statements between data sources.

Stores provide a few convenience methods. Two methods are provided for getting all of the subjects found with a given predicate and object, and similarly all objects found with a given subject and predicate. This can be used to move around in a graph:

foreach (Resource r in store.SelectObjects(person, foafname))
	Console.WriteLine("His name is: " + r);

Other convenience methods are overrides of Select that rather than sending the results to a sink, load them into memory so that you may for-each over them:

foreach (Statement statement in store.Select(new Statement(null, rdftype, foafPerson))) {
	...
}

You obviously shouldn't use these on data sources of unbounded size as you wouldn't necessarily want to load the results all into memory.

These convenience methods are only provided in the Store class and its subclasses. If you want to use them on data from a file or other data source that doesn't extend Store, load the data into a MemoryStore:

Store store = new MemoryStore();
store.Import(RdfReader.LoadFromUri(new Uri("http://dannyayers.com/misc/foaf/foaf.rdf")));

Here's an example program that loads a FOAF document and extracts some information using Select:

using System;
using SemWeb;

public class Select {
    const string RDF = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
    const string FOAF = "http://xmlns.com/foaf/0.1/";
    
    static readonly Entity rdftype = RDF+"type";
    static readonly Entity foafPerson = FOAF+"Person";
    static readonly Entity foafknows = FOAF+"knows";
    static readonly Entity foafname = FOAF+"name";

    public static void Main() {
        Store store = new MemoryStore();
        store.Import(RdfReader.LoadFromUri(new Uri("http://dannyayers.com/misc/foaf/foaf.rdf")));
        
        Console.WriteLine("These are the people in the file:");
        foreach (Statement s in store.Select(new Statement(null, rdftype, foafPerson))) {
            foreach (Resource r in store.SelectObjects(s.Subject, foafname))
                Console.WriteLine(r);
        }
        Console.WriteLine();

        Console.WriteLine("And here's RDF/XML just for some of the file:");
        using (RdfWriter w = new RdfXmlWriter(Console.Out)) {
            store.Select(new Statement(null, foafname, null), w);
            store.Select(new Statement(null, foafknows, null), w);
        }
        Console.WriteLine();    
    }
}

Other notes

RDF collections, like Bag, Alt, and Seq, in RDF/XML use a strange rdf:li pseudo-property. rdf:li isn't actually a property. It is an abbreviation for rdf:_1, rdf:_2, etc. in that order. Thus when you select for members of a collection, you can't use rdf:li. However, RDFS defines the property rdfs:member which rdf:_## properties are all subproperties of. The SemWeb stores all recognize the rdfs:member predicate and will match it to any of the rdf:_## predicates.

In addition, the SelectObjects method of the Store class will automatically sort the objects by their collection order, where possible, when you call the method with the rdfs:member predicate.

Here's an example of that:

// This example deals with RDF containers.  You can use the rdfs:member
// property to match any rdf:_### (i.e. rdf:li) property.  Or,
// use SelectObjects on the Store, which will return the items
// in sorted order.

using System;
using SemWeb;

public class Containers {

    const string RDF = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
    const string RDFS = "http://www.w3.org/2000/01/rdf-schema#";
    
    public static void Main() {
        MemoryStore store = new MemoryStore();
        
        Entity container = new Entity("http://www.example.org/#container");
        
        store.Add(new Statement(container, RDF+"type", (Entity)(RDF+"Bag")));
        store.Add(new Statement(container, RDF+"_3", (Literal)"Three"));
        store.Add(new Statement(container, RDF+"_2", (Literal)"Two"));
        store.Add(new Statement(container, RDF+"_1", (Literal)"One"));
        
        // use the rdfs:member property to match for any rdf:_### predicates.
        Entity rdfs_member = (Entity)(RDFS+"member");
        
        using (RdfWriter writer = new N3Writer(Console.Out)) {
            writer.Namespaces.AddNamespace(RDF, "rdf");
            store.Select(new Statement(container, rdfs_member, null), writer);
        }
        
        foreach (Resource r in store.SelectObjects(container, rdfs_member))
            Console.WriteLine(r);
    }
}
semweb-1.05+dfsg/doc/readingrdf.html0000644000175000017500000000742310774502134016707 0ustar meebeymeebey SemWeb: Docs: Reading RDF

SemWeb Documentation

Reading RDF

Reading RDF files is pretty easy so here are a few examples.

This loads an RDF/XML file into a MemoryStore:

MemoryStore store = new MemoryStore();
store.Import(new RdfXmlReader("data.rdf"));

This loads a N-Triples, Turtle, or Notation 3 file into a store:

store.Import(new N3Reader("data.n3"));

This loads a RDF file from the web:

store.Import(RdfReader.LoadFromUri(new Uri("http://www.mozilla.org/news.rdf")));

LoadFromUri will determine the format of the file (XML or N3) based on the MIME type sent back from the server, or if that fails, the file extension.

You don't have to put the contents of a file into memory. All of the RdfReaders are "streaming", which means it doesn't need to load the entire file before getting statements out of it. The reader can stream statements to a "sink" as soon as each is read.

In fact, readers are one type of StatementSource. StatementSources provide a Select method which streams statements to a StatementSink, providing a corresponding Add method.

Stores are one type of sink. You saw the MemoryStore's Add method in the last tutorial.

The following is pretty much equivalent to the code above:

RdfReader webrdf = RdfReader.LoadFromUri(new Uri("http://www.mozilla.org/news.rdf"));
webrdf.Select(store);

For a MemoryStore, there is no difference. Other stores may override Import with transaction or locking mechanics to speed up the process of loading a large data file.

By creating your own sink, you can process statements in a streaming way:

class StatementPrinter : StatementSink {
    public bool Add(Statement assertion) {
        Console.WriteLine(assertion.ToString());
        return true;
    }
}

This class implements a sink that simply prints out each statement to the console as each statement is received. It returns true to indicate to the source to continue. Returning false would end the streaming.

The Statement type is a struct that contains three fields: Subject, Predicate, and Object (actually it contains a Meta field too). Since RDF statements only have entities as subjects and predicates, the first two fields are typed as Entity, while the last field is typed as Resource. If you want to access the URIs and literal values within the statement, you might write something like this:

Console.WriteLine("Subject: " + assertion.Subject.Uri);
Console.WriteLine("Predicate: " + assertion.Predicate.Uri);
if (assertion.Object is Entity)
    Console.WriteLine("Object: " + ((Entity)assertion.Object).Uri + " (it's an entity)");
else
    Console.WriteLine("Object: " + ((Literal)assertion.Object).Value + " (it's a literal)");

Of course, beware that BNodes are entities without URIs, and the Uri property will return null in that case.

To stream the statements from the web directly to the custom sink, use:

webrdf.Select(new StatementPrinter());

There's one final twist. Stores, as I mentioned, are a type of sink, letting you stream statements into them. They are simultaneously a type of source! This lets you stream statements out of them too, just as you stream statements out of the RdfXmlReader and into your own class.

semweb-1.05+dfsg/doc/selectfilter.html0000644000175000017500000000460410774502134017265 0ustar meebeymeebey SemWeb: Docs: Selecting Many Things at Once

SemWeb Documentation

Selecting Many Things at Once

For anything but the MemoryStore, there is considerable overhead in each request for information from an underlying database. With the MySQL store, for instance, a call to Select makes a SQL SELECT query on the database. There is overhead in constructing, transmitting across processes, and parsing the query, and then the response. This makes repeated calls to Select (the method) much slower than they should be if they could be combined into a single SQL SELECT.

SemWeb has an advanced API call, an overload of Select, taking a SelectFilter argument, which allows the caller to query for statements matching a more complex filter than the simple form of Select. In the simple form, the subject, predicate, object, and meta can be either 1) specified or 2) a wildcard. In the more complex API, there is a third option, which is specifying a range of possible values. Schematically, these three calls to select:

Select(X, null, null)
Select(Y, null, null)
Select(Z, null, null)

can be replaced with a single call like this:

Select( { X, Y, Z}, null, null);

Further, these permutations can be condensed into a single call:

Select(X, A, null)
Select(Y, A, null)
Select(Z, A, null)
Select(X, B, null)
Select(Y, B, null)
Select(Z, B, null)
Select(X, C, null)
Select(Y, C, null)
Select(Z, C, null)

Select( { X, Y, Z}, { A, B, C}, null);

The statements returned from the complex Select are those that match any of the provided resources.

The actual syntax uses arrays of entities or, for objects, resources. As an example, one use case of this is to fetch the foaf:name of many entities in one call.

SelectFilter filter = new SelectFilter(); // for now all wildcards
filter.Subjects = new Entity[] { X, Y, Z };
filter.Predicates = new Entity[] { foaf_name };
// filter.Objects, filter.Metas are left as wildcards
store.Select(filter, sink);

The sink receives all statements whose subject is X, Y, or Z, and whose predicate is foaf_name.

semweb-1.05+dfsg/doc/query.html0000644000175000017500000004261610774502134015752 0ustar meebeymeebey SemWeb: Querying

SemWeb Documentation

Querying: Simple Entailment and SPARQL

This page provides an example for running queries against RDF data using SemWeb. Three query methods are supported. The first is the GraphMatch engine which does simple entailment, matching a simple graph with no disjunctions or optional edges against target data. The second method runs SPARQL queries against any data source supported by SemWeb using a SPARQL query engine. The third method passes SPARQL queries to a remote SPARQL endpoint over HTTP.

Getting the data

We'll use an RDF description of the people in the U.S. Congress for this example. Download the data files at http://www.govtrack.us/data/rdf/people.rdf.gz, http://www.govtrack.us/data/rdf/bills.108.rdf.gz, and http://www.govtrack.us/data/rdf/bills.108.cosponsors.rdf.gz and un-gzip them (on Windows use WinZip).

To simply some things, we'll put the contents of these three files into a single Notation3 file using the following command. (You may need to adjust the path to rdfstorage.exe. It should be in SemWeb's bin directory.)

$ mono rdfstorage.exe --out n3:congress.n3 people.rdf bills.108.rdf bills.108.cosponsors.rdf

rdfstorage.exe reads RDF files into a StatementSink, either an RdfWriter or a Store. The default is to read files in RDF/XML format (with the RdfXmlReader). We specified the output as n3:congress.n3, which means to write the data in Notation 3 (N3) format to the file congress.n3. The command outputs the following:

people.rdf  0m5s, 106423 statements, 19041 st/sec
bills.108.rdf  0m13s, 212142 statements, 15866 st/sec
bills.108.cosponsors.rdf  0m8s, 145743 statements, 16814 st/sec
Total Time: 0m27s, 464308 statements, 16787 st/sec

Writing the GraphMatch Query

The first query method is the GraphMatch method using my own "RSquary" query format, which is actually just plain RDF (think RDF-squared query because it's an RDF query over RDF data). A simple RSquary query is just a graph to be matched against the target data model, here in N3 format:

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix bill: <tag:govshare.info,2005:rdf/usbill/> .

?bill rdf:type bill:SenateBill .
?bill bill:congress "108" .
?bill bill:number "1024" .

?bill bill:cosponsor ?person .
?person foaf:name ?name .

A benefit of using N3 is that it allows entity names starting with "?" which are read in by the N3Reader as Variable objects. (The Variable class is a subclass of BNode.) Actually, in queries BNodes are treated as variables too. This makes sense because a BNode in the query graph could not possibly match a BNode in the target data model since a BNode cannot appear in two documents. So only named entities (with URIs) and literals are used to match against the target data model

The query above says: Find all bindings for the variables ?bill, ?person, and ?name such that 1) ?bill is a Senate bill identified by congress 108 and number 1024, 2) ?bill has ?person as one of its cosponsors, and 3) ?name is a name of ?person.

Save the above query as congress_query.n3.

Running the Query

SemWeb contains a program called rdfquery.exe which runs a query against a target data model. To run the query execute:

$ mono rdfquery.exe n3:congress.n3 < congress_query.n3

rdfquery.exe reads a query from standard input (hence the redirect) and matches it against the data sources listed in arguments on the command line. It will take a few moments to load in the 710k statements from the congress.n3 file before it outputs the results. The output is by default in the standard SPARQL result XML format. Here it is, below. (Some XML comments appear at the top to tell you how the query was executed, but that is not repeated below.)

<sparql xmlns="http://www.w3.org/2005/sparql-results#">
  <head>
    <variable name="bill" />
    <variable name="person" />
    <variable name="name" />
  </head>
  <results ordered="false" distinct="false">
    <result>
      <binding name="bill">
        <uri>tag:govshare.info,2005:data/us/congress/108/bills/s1024</uri>
      </binding>
      <binding name="person">
        <uri>tag:govshare.info,2005:data/us/congress/people/C001041</uri>
      </binding>
      <binding name="name">
        <literal>Hillary Clinton</literal>
      </binding>
    </result>
    <result>
      <binding name="bill">
        <uri>tag:govshare.info,2005:data/us/congress/108/bills/s1024</uri>
      </binding>
      <binding name="person">
        <uri>tag:govshare.info,2005:data/us/congress/people/C000880</uri>
      </binding>
      <binding name="name">
        <literal>Michael Crapo</literal>
      </binding>
    </result>
    <result>
      <binding name="bill">
        <uri>tag:govshare.info,2005:data/us/congress/108/bills/s1024</uri>
      </binding>
      <binding name="person">
        <uri>tag:govshare.info,2005:data/us/congress/people/L000174</uri>
      </binding>
      <binding name="name">
        <literal>Patrick Leahy</literal>
      </binding>
    </result>
    <result>
      <binding name="bill">
        <uri>tag:govshare.info,2005:data/us/congress/108/bills/s1024</uri>
      </binding>
      <binding name="person">
        <uri>tag:govshare.info,2005:data/us/congress/people/M001153</uri>
      </binding>
      <binding name="name">
        <literal>Lisa Murkowski</literal>
      </binding>
    </result>
    <result>
      <binding name="bill">
        <uri>tag:govshare.info,2005:data/us/congress/108/bills/s1024</uri>
      </binding>
      <binding name="person">
        <uri>tag:govshare.info,2005:data/us/congress/people/M001111</uri>
      </binding>
      <binding name="name">
        <literal>Patty Murray</literal>
      </binding>
    </result>
    <result>
      <binding name="bill">
        <uri>tag:govshare.info,2005:data/us/congress/108/bills/s1024</uri>
      </binding>
      <binding name="person">
        <uri>tag:govshare.info,2005:data/us/congress/people/S000148</uri>
      </binding>
      <binding name="name">
        <literal>Charles Schumer</literal>
      </binding>
    </result>
  </results>
</sparql>

The query took 15 seconds to execute on my machine, with a good portion of that just loading the data from the file into memory. We could speed things up by first putting the RDF data into a SQL database and then querying the database directly. This way, the data is not loaded into memory and queries against the database make use of indexes already present.

SPARQL Queries

For executing SPARQL queries over data sources that don't support SPARQL themselves (i.e. the MemoryStore, SQLStore, etc.), SemWeb uses the SPARQL query engine by Ryan Levering. The library is written in Java, but for SemWeb I convert it to a .NET assembly using IKVM.

The advantage of SPARQL over RSquary is that it supports much more complex queries, including optional statements, disjunctions/unions, and special filters.

The query above equivalently in SPARQL is:

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX bill: <tag:govshare.info,2005:rdf/usbill/>
SELECT ?bill ?person ?name
WHERE {
   ?bill rdf:type bill:SenateBill .
   ?bill bill:congress "108" .
   ?bill bill:number "1024" .
   ?bill bill:cosponsor ?person .
   ?person foaf:name ?name .
}

Put that in congress_query.sparql and then run it with:

$ mono rdfquery.exe -type sparql n3:congress.n3 < congress_query.sparql

This has the same output as above.

You can also use the rdfquery tool to query a remote SPARQL end point. Invoke it like this:

echo "DESCRIBE <tag:govshare.info,2005:data/us>" | \
	mono bin/rdfquery.exe -type sparql sparql-http:http://www.govtrack.us/sparql

Running Queries Programmatically

To run a query from a program, you need to 1) create a Query object, 2) create a QueryResultSink object that will receive the results of the query, and 3) run Run on the Query object.

There are two types of Query objects, GraphMatch objects that perform simple entailment queries (i.e. RSquary) and SPARQL objects that perform SPARQL queries.

The GraphMatch classs takes a graph with variables and figures out all of the ways the variables can be assigned to ("bound") to values in the target data model so that the statements in the query are all found in the target data model. Each set of variable assignments becomes a result.

Create a GraphMatch class (in the SemWeb.Query namespace) by passing to its constructor a StatementSource. Remember that RdfReaders and MemoryStores are StatementSources, so you can either pass it a reader over a file or a store in which you've programmatically constructed the query.

Query query = new GraphMatch(new N3Reader(queryfile));

Then load the data that the query will be run against:

MemoryStore data = new MemoryStore();
data.Import(new N3Reader(datafile));

Next, create a QueryResultSink. This class has an Add method that receives an array of variable bindings which is called for each query result. The variable bindings say how each variable in the query was bound to a resource in the target data model. There is one implementation of this class in SemWeb, then SparqlXmlQuerySink which is the standardized XML output format for SPARQL results. Note that you can use this output format with any Query object, not just the Sparql class. The constructor takes a TextWriter or XmlWriter to which the results are written.

QueryResultSink sink = new SparqlXmlQuerySink(Console.Out);

You can, of course, create your own subclass of QueryResultSink which you will have to do if you want to do anything interesting with the results of the query. Here's an example QueryResultSink which simply prints the variable bindings to the Console. (Note that there are several other methods that can be overridden which are executed at the start and end of the query.)

public class PrintQuerySink : QueryResultSink {
    public override bool Add(VariableBindings result) {
        foreach (Variable var in result.Variables) {
            if (var.LocalName != null && result[var] != null) {
                Console.WriteLine(var.LocalName + " ==> " + result[var].ToString());
            }
            Console.WriteLine();
        }
        return true;
    }
}

Lastly, run the query with Run, passing it the target data model and the result sink.

query.Run(data, sink);

To create a SPARQL query instead, construct a new SparqlEngine object (in the SemWeb.Query namespace but in the separate SemWeb.Sparql.dll assembly!).

Query query = new SparqlEngine(new StreamReader(queryfile));

Run the query the same as with GraphMatch. There are several types of SPARQL queries, not all of which result a list of variable bindings. For instance, the DESCRIBE and CONSTRUCT query types return RDF triples. You can run queries generically and output the results to a TextWriter just by passing a TextWriter to Run instead of a QueryResultSink. Or, see the API documentation on the Sparql class for more control over the output of SPARQL queries.

An entire program for querying is below:

// This example runs a query.

using System;
using System.IO;

using SemWeb;
using SemWeb.Query;

public class Example {

    public static void Main(string[] argv) {
        if (argv.Length < 3) {
            Console.WriteLine("Usage: query.exe format queryfile datafile");
            return;
        }
        
        string format = argv[0];
        string queryfile = argv[1];
        string datafile = argv[2];
    
        Query query;
        
        if (format == "rsquary") {
            // Create a simple-entailment "RSquary" query
            // from the N3 file.
            query = new GraphMatch(new N3Reader(queryfile));
        } else {
            // Create a SPARQL query by reading the file's
            // contents.
            query = new SparqlEngine(new StreamReader(queryfile));
        }
    
        // Load the data file from disk
        MemoryStore data = new MemoryStore();
        data.Import(new N3Reader(datafile));
        
        // First, print results in SPARQL XML Results format...
        
        // Create a result sink where results are written to.
        QueryResultSink sink = new SparqlXmlQuerySink(Console.Out);
        
        // Run the query.
        query.Run(data, sink);
        
        // Second, print the results via our own custom QueryResultSink...
        query.Run(data, new PrintQuerySink());
    }

    public class PrintQuerySink : QueryResultSink {
        public override bool Add(VariableBindings result) {
            foreach (Variable var in result.Variables) {
                if (var.LocalName != null && result[var] != null) {
                    Console.WriteLine(var.LocalName + " ==> " + result[var].ToString());
                }
                Console.WriteLine();
            }
            return true;
        }
    }
}

Querying Remote SPARQL Endpoints

It is also possible to run SPARQL queries directly against remote HTTP endpoints. The rdfquery.exe command-line program can be used to run queries directly. Take the following query in the file "dbp.q" to query the DBpedia database (a semantified Wikipedia) for all statements that use the literal "John McCain":

SELECT * WHERE { ?s ?p "John McCain" . }

Run this against the remote SPARQL endpoint at http://DBpedia.org/sparql using:

mono bin/rdfquery.exe sparql-http:http://DBpedia.org/sparql -type sparql < dbp.q

The output is given below:

<sparql>
  <head>
    <variable name="s"/>
    <variable name="p"/>
  </head>
  <results distinct="false" ordered="true">
    <result>
      <binding name="s"><uri>http://dbpedia.org/resource/John_McCain</uri></binding>
      <binding name="p"><uri>rdfs:label</uri></binding>
    </result>
    <result>
      <binding name="s"><uri>http://dbpedia.org/resource/John_McCain</uri></binding>
      <binding name="p"><uri>http://dbpedia.org/property/name</uri></binding>
    </result>
  </results>
</sparql>

It is also possible to query remote endpoints programmatically using the SemWeb.Remote.SparqlHttpSource class. For example:

SparqlHttpSource source = new SparqlHttpSource("http://DBpedia.org/sparql");
source.RunSparqlQuery("SELECT * WHERE { ?s ?p \"John McCain\" . }", Console.Out);
   (or)
source.RunSparqlQuery("SELECT * WHERE { ?s ?p \"John McCain\" . }", new SparqlXmlQuerySink(Console.Out));

There are other overloads of RunSparqlQuery that provide better access to the results than dumping the output to a TextWriter. See the API documentation for details.

semweb-1.05+dfsg/doc/inference.html0000644000175000017500000002424210774502134016536 0ustar meebeymeebey SemWeb: Querying

SemWeb Documentation

Inferencing: RDFS and the Euler Proof Engine

SemWeb provides two inferencing classes in the SemWeb.Inference namespace: RDFS, which implements a subset of RDFS reasoning, and Euler which implements general rule-based reasoning based on the Euler proof mechanism.

The two reasoning engines work similarly. They are initialized with axioms and then perform reasoning on an arbitrary target data model. For the RDFS class, the axioms are an RDFS schema that contains subClassOf relations between classes and subPropertyOf relations between properties. For the Euler class, the axioms are rules of entailment (and possibly some basic instance data). The data model contains an arbitrarily large data set that the axioms are applied to in order to answer some question about the data.

The best way to use these Reasoner classes is to apply them to a Store with the AddReasoner method. When this is done, the Contains, Select, and Query methods on the store will make use of the reasoner applied.

RDFS Reasoning

SemWeb's RDFS class provides limited RDFS reasoning over a data model. See the API documentation for a complete list of what reasoning the class provides.

To use the class, create an instance of it and then load in RDF schemas.

RDFS engine = new RDFS();
engine.LoadSchema(RdfReader.LoadFromUri(new Uri("http://xmlns.com/foaf/0.1/index.rdf")));

Besides passing it an RdfReader, you may also pass it any SelectableSource with RDFS schema statements, such as a MemoryStore that you might construct with your own schema. You can call LoadSchema any number of times.

Then apply the RDFS instance to a Store object.

dataModel.AddReasoner(engine);

The Contains, Select, and Query methods on the store will make use of the RDFS reasoner and will return anything entailed by the instance data in the data model and the schema.

For instance, if the dataModel contains the following:

:me rdf:type foaf:Person .
:you rdf:type foaf:Person .
:me foaf:name "John Doe" .
:you foaf:name "Sam Smith" .

and you load in the FOAF schema, then the following will result

dataModel.Contains(new Statement(me, rdfType, foafAgent)) => Returns True

dataModel.SelectSubjects(rdfType, foafAgent)) => Returns [ me , you ]
		
dataModel.Select(new Statement(null, rdfsLabel, null))
 => me rdfsLabel "John Doe"
 => you rdfsLabel "Sam Smith"

Note that when RDFS returns statements that were found by applying a subproperty closure, the returned statements do not show the subproperty actually in the instance data, but rather the property that was provided in the call to Select. Think of it this way: Select does not return statements in the data model that are relavent to the template, but rather it returns all possible statements that are entailed by the data model and schema that match the template.

A complete example of using the RDFS class is below:

// This example demonstrates basic RDFS reasoning.

using System;
using System.IO;

using SemWeb;
using SemWeb.Inference;

public class EulerTest {

    public static void Main() {
        // Create the instance data
        
        MemoryStore dataModel = new MemoryStore();
        
        BNode me = new BNode("me");
        BNode you = new BNode("you");
        
        Entity rdfType = "http://www.w3.org/1999/02/22-rdf-syntax-ns#type";
        Entity rdfsLabel= "http://www.w3.org/2000/01/rdf-schema#label";
        Entity foafPerson = "http://xmlns.com/foaf/0.1/Person";
        Entity foafAgent = "http://xmlns.com/foaf/0.1/Agent";
        Entity foafName = "http://xmlns.com/foaf/0.1/name";
        
        dataModel.Add(new Statement(me, rdfType, foafPerson));
        dataModel.Add(new Statement(you, rdfType, foafPerson));
        dataModel.Add(new Statement(me, foafName, (Literal)"John Doe"));
        dataModel.Add(new Statement(you, foafName, (Literal)"Sam Smith"));
        
        // Create the RDFS engine and apply it to the data model.
        
        RDFS engine = new RDFS();
        engine.LoadSchema(RdfReader.LoadFromUri(new Uri("http://xmlns.com/foaf/0.1/index.rdf")));
        
        dataModel.AddReasoner(engine);
        
        // Query the data model
        
        // Ask for who are typed as Agents.  Note that the people are
        // typed as foaf:Person, and the schema asserts that foaf:Person
        // is a subclass of foaf:Agent.
        Console.WriteLine("Who are Agents?");
        foreach (Entity r in dataModel.SelectSubjects(rdfType, foafAgent))
            Console.WriteLine("\t" + r);
        
        // Ask for the rdfs:labels of everyone.  Note that the data model
        // has foaf:names for the people, and the schema asserts that
        // foaf:name is a subproperty of rdfs:label.
        Console.WriteLine("People's labels:");
        foreach (Statement s in dataModel.Select(new Statement(null, rdfsLabel, null)))
            Console.WriteLine("\t" + s);
    }

}

General reasoning with the Euler engine

SemWeb has an adaptation of the Euler proof mechanism by Jos De Roo in the class Euler in the namespace SemWeb.Inference.

To use the class, create an instance of it and pass it a StatementSource with the rules of inference:

string rules =
   "@prefix : . " +
   "{ ?a :oneway ?b } => { ?a :path ?b } . " +
   "{ ?a :path ?b . ?b :path ?c . } => { ?a :path ?c } . ";

Euler engine = new Euler(new N3Reader(new StringReader(rules)));

Then form the question to be proved in the form a statement:

Statement question = new Statement(paris, path, nantes);

One way to ask the question is to have the Euler engine return an array of proofs.

Proof[] proofs = engine.Prove(dataModel, new Statement[] { question });
foreach (Proof p in proofs)
   Console.WriteLine(p.ToString());

If it can't find a proof, a zero-length array is returned.

Alternatively, you may add the engine to a Store so that its Contains, Select, and Query methods make use of reasoning. With reasoning, the Contains method returns not just whether the statement is directly in the data model, but also whether it can be proved to be entailed by the data model.

dataModel.AddReasoner(engine);
Console.WriteLine("Euler Says the Question is: " + dataModel.Contains(question));

A complete example for using Euler is below:

// This example demonstrates general reasoning with
// the Euler engine based on Jos De Roo's Euler proof
// mechanism.  The example is based on the "graph"
// example from Euler.

using System;
using System.IO;

using SemWeb;
using SemWeb.Inference;

public class EulerTest {

    public static void Main() {
        // Create the instance data
        
        MemoryStore dataModel = new MemoryStore();
        
        BNode paris = new BNode("paris");
        BNode orleans = new BNode("orleans");
        BNode chartres = new BNode("chartres");
        BNode amiens = new BNode("amiens");
        BNode blois = new BNode("blois");
        BNode bourges = new BNode("bourges");
        BNode tours = new BNode("tours");
        BNode lemans = new BNode("lemans");
        BNode angers = new BNode("angers");
        BNode nantes = new BNode("nantes");
    
        Entity oneway = new Entity("http://www.agfa.com/w3c/euler/graph.axiom#oneway");
        Entity path = new Entity("http://www.agfa.com/w3c/euler/graph.axiom#path");
        
        dataModel.Add(new Statement(paris, oneway, orleans));
        dataModel.Add(new Statement(paris, oneway, chartres));
        dataModel.Add(new Statement(paris, oneway, amiens));
        dataModel.Add(new Statement(orleans, oneway, blois));
        dataModel.Add(new Statement(orleans, oneway, bourges));
        dataModel.Add(new Statement(blois, oneway, tours));
        dataModel.Add(new Statement(chartres, oneway, lemans));
        dataModel.Add(new Statement(lemans, oneway, angers));
        dataModel.Add(new Statement(lemans, oneway, tours));
        dataModel.Add(new Statement(angers, oneway, nantes));
        
        // Create the inference rules by reading them from a N3 string.
        
        string rules =
            "@prefix : <http://www.agfa.com/w3c/euler/graph.axiom#>.\n" +
            "\n" +
            "{ ?a :oneway ?b } => { ?a :path ?b } .\n" +
            "{ ?a :path ?b . ?b :path ?c . } => { ?a :path ?c } .\n";
        
        // Create our question in the form of a statement to test.
        
        Statement question = new Statement(paris, path, nantes);
        
        // Create the Euler engine
        
        Euler engine = new Euler(new N3Reader(new StringReader(rules)));
        
        // First Method of Inference:
        // Ask the engine whether there is a path from paris to nantes.
        // The Prove method will return a list of proofs, or an empty
        // array if it could not find a proof.
        
        foreach (Proof p in engine.Prove(dataModel, new Statement[] { question })) {
            Console.WriteLine(p.ToString());
        }
        
        // Second Method of Inference:
        // Apply the engine to the data model and then use the data
        // model's Contains method to see if the statement is "in"
        // the model + reasoning.
        
        dataModel.AddReasoner(engine);
        
        Console.WriteLine("Euler Says the Question is: " + dataModel.Contains(question));
        
    }

}
semweb-1.05+dfsg/doc/helloworld.html0000644000175000017500000001651110774502134016753 0ustar meebeymeebey SemWeb: Docs: Hello World

SemWeb Documentation

SemWeb Hello World

Here's an example of using SemWeb to construct an RDF/XML or Notation 3 file.

Create a new file called helloworld.cs. If you're using Visual Studio, create this in a new project and reference SemWeb.dll provided in the download package.

First, use the relevant namespaces and create a simple class. Also add a constant for the RDF namespace.

using System;
using SemWeb;

public class Example {
	const string RDF = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";

	public static void Main() {
	}
}

In Main(), create a new MemoryStore, which is an in-memory store of RDF statements:

MemoryStore store = new MemoryStore();

The next thing to do is create some entities for the things you will be asserting statements about. You can do that simply by creating a new Entity object:

Entity computer = new Entity("http://example.org/computer");
Entity description = new Entity("http://example.org/description");

The Entity class has an implicit conversion operator from strings, which means you can just assign a string to an entity variable to save typing:

Entity says = "http://example.org/says";
Entity wants = "http://example.org/wants";

Blank nodes, a.k.a. anonymous entities, are created using the BNode class, which is a subclass of Entity.

Entity desire = new BNode();

Next, we create statements using these entities. To create a statement, use the Statement constructor, which takes a subject, predicate, and object. Note that Statements are structs, not classes, but this probably won't affect you.

Statement assertion = new Statement(computer, says, new Literal("Hello world!"));

Another conversion operator is defined to make it easy for you to create Literals out of strings. Unlike the one that is implict for Entities, this one is explicit, which means you always need to write out the cast. We could have written the previous line like this insted:

Statement assertion = new Statement(computer, says, (Literal)"Hello world!");

Statements have to be put into a Store like this:

store.Add(assertion);

I'll condense that into this:

store.Add(new Statement(computer, says, (Literal)"Hello world!"));
store.Add(new Statement(computer, wants, desire));
store.Add(new Statement(desire, description, (Literal)"to be human"));
store.Add(new Statement(desire, RDF+"type", (Entity)"http://example.org/Desire"));

A store is a collection of statements. In true RDF, the order and number of occurrences of a statement doesn't matter because a graph is simply a set of statements. Some SemWeb stores act like sets, rather than collections. The memory store is not one of these.

Lastly, we want to write out the contents of the store to an RDF/XML file. We do this by creating a new RdfXmlWriter object, sending the store's contents to the writer, and then disposing the writer. It's very important to dispose of writers so they can finish, so you should always wrap writers with the using C# directive.

using (RdfWriter writer = new RdfXmlWriter(Console.Out)) {
    writer.Write(store);
}

If you're using Mono, like I do, to compile and run the program, run the following commands. Be sure to put SemWeb.dll in the current directory so Mono can find it at compile time, and then at run time.

mcs helloworld.cs -r:SemWeb.dll
mono helloworld.exe

If you're using VisualStudio, put this in a new project, reference SemWeb.dll and compile and run it.

Here's the output:

<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:exampleorg="http://example.org/">
    <rdf:Description rdf:about="http://example.org/computer">
        <exampleorg:says>Hello world!</exampleorg:says>
        <exampleorg:wants>
            <exampleorg:Desire>
                <exampleorg:description>to be human</exampleorg:description>
            </exampleorg:Desire>
        </exampleorg:wants>
    </rdf:Description>
</rdf:RDF>

We didn't provide the writer with any namespace prefixes, so it made one up. To provide a prefix for a namespace, use the Namespaces property of the writer:

using (RdfWriter writer = new RdfXmlWriter(Console.Out)) {
    writer.Namespaces.AddNamespace("http://example.org/", "ex");
    ...

You need to set the namespaces before any statements are streamed to the writer. Here's the final output:

<?xml version="1.0"?>
<rdf:RDF xmlns:ex="http://example.org/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
    <rdf:Description rdf:about="http://example.org/computer">
        <ex:says>Hello world!</ex:says>
        <ex:wants>
            <ex:Desire>
                <ex:description>to be human</ex:description>
            </ex:Desire>
        </ex:wants>
    </rdf:Description>
</rdf:RDF>

To write out the statements in Notation 3 format, just use the N3Writer class instead. It produces this output:

@prefix ex: <http://example.org/> .
ex:computer ex:says "Hello world!" ;
    ex:wants _:bnode0 .
_:bnode0 ex:description "to be human" ;
    <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ex:Desire .

Here's the complete program:

// This example creates a few RDF statements and adds
// them to a MemoryStore.  Then it writes out the
// statements in RDF/XML format to the console.  Note
// that the implicit string-to-Entity and string-to-
// Literal conversion operators are being used.

using System;
using SemWeb;

public class Example {

    const string RDF = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";

    public static void Main() {
        MemoryStore store = new MemoryStore();
        
        Entity computer = new Entity("http://example.org/computer");
        Entity says = "http://example.org/says";
        Entity wants = "http://example.org/wants";
        Entity desire = new BNode();
        Entity description = new Entity("http://example.org/description");
        
        store.Add(new Statement(computer, says, (Literal)"Hello world!"));
        store.Add(new Statement(computer, wants, desire));
        store.Add(new Statement(desire, description, (Literal)"to be human"));
        store.Add(new Statement(desire, RDF+"type", (Entity)"http://example.org/Desire"));
        
        using (RdfWriter writer = new RdfXmlWriter(Console.Out)) {
            writer.Namespaces.AddNamespace("http://example.org/", "ex");
            writer.Write(store);
        }
    }
}
semweb-1.05+dfsg/doc/updatecode.pl0000644000175000017500000000102510774502134016356 0ustar meebeymeebey#!/usr/bin/perl opendir D, "."; foreach $f (readdir(D)) { if ($f !~ /\.html$/) { next; } $content = `cat $f`; $content =~ s/
([^<]*?)<\/pre>/"
" . GetFile($1, $2) . "<\/pre>"/egi;
	
	open F, ">$f";
	print F $content;
	close F;
}
closedir D;

sub GetFile {
	print "$f <-- $_[0]\n";
	if (!-e $_[0]) { warn "File not found: $_[0]"; return $_[1]; }
	my $d = `cat $_[0]`;
	$d =~ s/\&/\&/g;
	$d =~ s//\>/g;
	$d =~ s/\t/    /g;
	return $d;
}
semweb-1.05+dfsg/doc/databases.html0000644000175000017500000001712010774502134016524 0ustar  meebeymeebey
	
		SemWeb: Docs: Using Databases
		
	
	
	

SemWeb Documentation

SemWeb: Using Databases

Besides the MemoryStore, SemWeb provides four SQL-backed persistent stores: for MySQL, PostgreSQL, SQL Server, and Sqlite. Since Sqlite is the simplest to get going, I'll use it as an example.

Overview of database storage

Just as a brief note, the MySQL store is several times faster than the Sqlite store, at least for adding statements into the store. Sqlite is easier to work with, so it's appropriate for small stores of data maybe up to 100,000 statements. Using the Import method of the MySQL store, the store can load over ten million statements in as little as 45 minutes on modest hardware, which is about 4,500 statements per second. The Sqlite store loads the same graph at 1,400 statements per second. The speed depends a lot on the structure of data being loaded. I haven't tested the PostgreSQL store myself, so I don't know how fast it is.

The SQL stores keep the RDF data in three tables, which have a common prefix provided by you. The main table is the prefix_statements table, which has a row for each statement in the store. The columns are numeric IDs for the subject, predicate, object, and meta. The IDs are linked to URIs, for entities, and values, for Literals, in the _entities and _literals tables.

The _statements table is indexed many ways to make the performance of Select fast. In the MySQL store, the table has a UNIQUE index over all of the columns to ensure that an assertion can be added only once. This speeds up operations later on when they don't have to check for duplicate statements and doesn't hurt the performance of adding statements significantly.

Getting set up

First, prepare your environment for using Sqlite. To do that, download SQLite and make it available for your program at run time. In Windows, put the dll into your System32 directoy. In Unix, install the RPM, or put the so in /usr/local/lib or else make sure the LD_LIBRARY_PATH environment variable contains a path containing the Sqlite library.

Second, make sure you have the Mono.Data.SqliteClient data adapter from Mono. If you're using Unix, be sure you have the mono-data-sqlite package installed. If you're using Windows and don't have the adapter already, you can get it out of the latest daily MonoCharge (either put it in the GAC, or put it along side the other SemWeb DLLs).

Last, download a RDF file to your hard disk, such as: http://www.mozilla.org/news.rdf.

Moving data into a database

We want to get going quickly, so we'll use SemWeb's rdfstorage.exe tool to move some data into a Sqlite database. Go to a command prompt in the bin directory of the SemWeb package. Then run:

$ mono rdfstorage.exe news.rdf --out "sqlite:rdf:Uri=file:news.sqlite;version=3"
(In Windows, you can leave off the 'mono' to use the Microsoft runtime.) You'll get the following output (or something like it):
news.rdf  0m0s, 81 statements, 597 st/sec
Total Time: 0m0s, 81 statements, 505 st/sec

This command read the RDF/XML file and created a Sqlite version 3 database named news.sqlite.

The "out" argument is what I call a "spec" string. It tells SemWeb how to open up a storage mechanism. This spec string has three parts. The first part is "sqlite" which tells SemWeb to use the Sqlite storage engine. The second part is "rdf" which is the prefix for the tables to use in the database. The third part, "Uri=file:news.sqlite;version=3", is a connection string used by Mono.Data.SqliteClient. (For more info on the connection string, see the Mono website.)

If you omit the "out" argument entirely, the program will dump the file to the console in Turtle format.

Getting data out of the database

To query the database, we'll write a program.

Create a store backed by the database using the following method:

Store store = Store.Create("sqlite:rdf:Uri=file:news.sqlite;version=3");

The argument to Create is the same "spec" string as before. This method can be used to create various types of data sources in the factory design pattern.

The actual implementation of the Sqlite store is in the SemWeb.SqliteStore.dll assembly, but by using Create you don't need to reference that assembly at compile time. Just make sure it's available at run time.

Now you can select statements from it just as before. It will be a little slower than the memory-backed store, but you haven't loaded the entire store into memory.

You can also add statements into the store, just as with the memory store.

Be sure to close the database at the end with Dispose.

Here's a complete program:

using System;
using SemWeb;

public class Sqlite {
    const string RDF = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
    const string FOAF = "http://xmlns.com/foaf/0.1/";
    
    static readonly Entity rdftype = RDF+"type";
    static readonly Entity foafPerson = FOAF+"Person";
    static readonly Entity foafname = FOAF+"name";

    public static void Main() {
        Store store = Store.Create("sqlite:rdf:Uri=file:foaf.sqlite;version=3");
        
        Entity newPerson = new Entity("http://www.example.org/me");
        store.Add(new Statement(newPerson, rdftype, foafPerson));
        store.Add(new Statement(newPerson, foafname, (Literal)"New Guy"));
        
        Console.WriteLine("These are the people in the file:");
        foreach (Entity s in store.SelectSubjects(rdftype, foafPerson)) {
            foreach (Resource r in store.SelectObjects(s, foafname))
                Console.WriteLine(r);
        }
        Console.WriteLine();
        
        store.Dispose();
    }
}

Other Database Notes

Besides Sqlite, MySQL, PostgreSQL, and SQL Server are also supported. To use those databases, just replace the “spec” string ("sqlite:rdf:...") with something like:

"mysql:rdf:Database=rdf; . . ."
"postgresql:rdf:Database=rdf; . . ."
"sqlserver:rdf:Database=rdf; . . ."

Everything after the second colon is a MySQL connection string to make the connection. You'll have to consult the MySQL/Connector.Net documentation for more information about the connection string.

For the SQL stores, the Import() method is optimized so that statements are added to the tables in batch, where possible. Further, the MySQL store can wrap the Import SQL statements with SQL commands that make the Import faster. By default, the Import is wrapped in a BEGIN/COMMIT transaction. Set the SEMWEB_MYSQL_IMPORT_MODE environment variable (or hack the source code) to change the behavior. Setting this environment variable to LOCK will use LOCK TABLES to create a write lock on the statements, entities, and literals tables for the store, which improves performance significantly. Setting the environment variable to DISABLEKEYS uses ALTER TABLE DISABLE KEYS on the statements table, which improves performance while it adds statements, but causes a lengthy rebuilding of the index at the end of the import.

semweb-1.05+dfsg/doc/overview.html0000644000175000017500000002533510774502134016452 0ustar meebeymeebey SemWeb: Docs: Library Overview

SemWeb Documentation

Library Overview

SemWeb is a .NET library for working with Resource Description Framework (RDF) data. It provides classes for reading, writing, manipulating, and querying RDF. The library does not (yet) provide any special tools for OWL ontologies. That is, the library is a general-purpose framework for dealing with RDF statements (i.e. triples).

The primary classes in the library are in the SemWeb namespace. In that namespace, four classes provide the fundamentals for all aspects of the library: Resource, Statement, StatementSource, and StatementSink.

The MemoryStore class and the SelectableSource interface are also discussed below.

Resources and Statements

Resource is the abstract base class of the terms in RDF. The RDF formal model has two types of terms, nodes and literal values, and likewise Resource has two subclasses: Entity and Literal. Nodes, whether they be named (i.e. URIs) or blank (i.e. anonymous), are represented by the Entity class. Named nodes are represented by Entity objects directly, while blank nodes are represented by the BNode class, which is a subclass of Entity. Literal values are represented by the Literal class.

A RDF triple is represented by the Statement struct. This type is a struct, rather than a class, because it is the number of statements that an application will have to process that is the most likely to be subject to scalability concerns. That is, an RDF database can contain billions of triples, but usually won't have nearly so many unique resources. The Statement struct has three main fields: Subject, Predicate, amd Object. Following the RDF specification, the subject and predicate of a triple cannot contain literal values, and thus those fields are typed as Entity, while an object can be a triple, so the object field is typed as Resource. It is thus often necessary to cast values when processing statement objects to get an Entity or Literal value back from a statement.

To construct a triple, use Statement's three-arg constructor:

new Statement(
	new Entity("http://www.example.org/SemWeb"),
	new Entity("http://www.example.org/hasName"),
	new Literal("My Semantic Web library!") );

Note that constructing URI nodes involves calling Entity's constructor and passing a string. (Validation that the string is a legitimate URI is not performed. That is the responsibility of the caller.) To construct blank nodes, you must instantiate the BNode class:

new Statement(
	new Entity("http://www.example.org/SemWeb"),
	new Entity("http://www.example.org/relatedTo"),
	new BNode() );

When adding statements into a store, no fields of a Statement may be null.

While all instances of an Entity constructed by passing a URI are considered equal so long as their URIs are equal, no two BNode object instances are considered equal (mostly). You must create a single BNode instance with "new BNode()" and use that instance throughout to refer to the same BNode at different times.

It is possible to create literal values with a language tag or datatype. To do so, use the three-arg Literal constructor:

new Literal("My Semantic Web library!", "en_US", null);
new Literal("1234", null, XSDNS + "#integer");

A literal value may not have both a language and a datatype, following the RDF spec.

Statements actually have a fourth field, called Meta, which may be used for any purpose. It is envisioned to attach context information to a statement. The Meta field must be an Entity.

The Resource class hierarchy has a fourth subclass. Variable is a subclass of BNode and represents a variable in a query. It is meant to be used only in queries.

StatementSource and StatementSink

Places where you get statements from are StatementSources. This is an interface that has a method called Select whose purpose is to stream some statements to an object (a StatementSink) that is equipt via a method called Add to receive those statements. The approach taken here is an alternative to using the iterator paradigm for scanning through a set of statements. Rather, it is a source/sink type of paradigm, if such a thing exists.

Let's start with the StatementSink. If you want to process a set of statements, you will need to write a class that implements this interface, by adding the method:

public bool Add(Statement statement) {
	...
}

You could create a private nested class to implement the interface, for instance. Inside this method, you place your code to process a single statement. If you need to see more than one statement at once, you could place code in there to put the statement into an ArrayList, and then later on process all of the statements in the ArrayList, for instance. (Or just use a MemoryStore in the first place: more on that later.) Return true at the end, or false to signal the caller to stop sending statements.

StatementSink is implemented by the file-writing classes, including the RDF/XML writer (RdfXmlWriter) and N3 writer (N3Writer).

The StatementSource, on the other hand, is the object with the statements that you want to access. File-reading classes like the RDF/XML and N3 readers (RdfXmlReader and N3Reader) implement this interface. It contains a method Select to which you pass your StatementSink to begin sending the statements from the source into the sink, with the sink's Add method called for each statement. (Select is named after the SQL command of the same name.)

source.Select(new MySink());

MemoryStore

The MemoryStore class is an in-memory storage object for statements. At its core, it is just an ArrayList of statements. This class (and actually all Store classes) are peculiar from the point of view of the class hierarchy discussed so far: It implements both StatementSource and StatementSink. Thus you can add statements to it by calling its Add method. You can also get statements out of it by calling its Select(StatementSink) method, which will stream statements into any StatementSink (including another MemoryStore, a file-writing class, or one of your own classes, for instance).

MemoryStore ms1 = new MemoryStore();
ms1.Add(new Statment(.....);
MemoryStore ms2 = new MemoryStore();
ms1.Select(ms2);

But the MemoryStore can also be used as a utility class for moving from the source-sink paradigm to an iterator paradigm. The class implements IEnumerable, and in the .NET 2.0 build IEnumerable<Statement>, which means you can foreach over them to iterate through the statements they contain. You need to keep in mind scalability issues here, though. Streaming statements into a MemoryStore means you are loading them all into memory, which may not be possible for large applications. And when using the .NET 1.1 build (no generics), using the iterator paradigm requires boxing and unboxing the Statements.

MemoryStore ms = new MemoryStore();
datasource.Select(ms);
foreach (Statement stmt in ms)
	Console.WriteLine(stmt);

As an alternative to foreach, mainly for the .NET 1.1 build, you can loop as follows, which doesn't require boxing/unboxing:

for (int i = 0; i < ms.StatementCount; ms++) {
    Statement stmt = ms[i];
    Console.WriteLine(stmt);
}

SelectableSource

The SelectableSource is another part of the core of the library. This interface extends StatementSource with two new Select methods. Recall the Select(StatementSink) method already introduced which streams all statements from the source into the sink. The MemoryStore and other data sources use the SelectableSource interface to provide a basic filtering mechanism on the statements that are streamed back. These methods are:

void Select(Statement template, StatementSink sink);
void Select(SelectFilter filter, StatementSink sink);

In the first method, the caller provides a "statement template". Unlike statements added into stores, these statements may have null fields for subject, predicate, or object. Those fields are then treated as wildcards, and the fields that have values are applied as filters. Filtering with new Statement(x, null, null) will stream to the sink only statements whose subject is x. While of course you could filter out the statements in your sink, this wouldn't scale when the data source has billions of other irrelevant triples:

// streams just statements that have mySubject as the subject
source.Select(new Statement(mySubject, null, null), new MySink());

// streams just statements that have myPredicate and myObject as the predicate and object
source.Select(new Statement(null, myPredicate, myObject), new MySink());

This template paradigm is useful when you want to get the statements that match some other statement. It is also used by the Contains(Statement) method.

The SelectableSource interface's second new Select method takes a SelectFilter object as its first argument. An object of this class provides more control over the statements selected. In particular, it allows for statements in which the subject, predicate, or object can range over a list of values, rather than just a single value as with the template paradigm. Here is an example:

SelectFilter filter = new SelectFiler();
filter.Subjects = new Entity[] { entity1, entity2, entity3 };
filter.Predicates = new Entity[] { dc_title, rdfs_subject };

// streams statements who have any of the listed entities as
// the subject, and any of the listed predicates as the object
source.Select(filter, new MySink());

The primary advantage of this second Select method is that it is more efficient to query out-of-memory databases as few times as possible, getting as many results in one shot, than repeatedly querying the data source for different triples.

semweb-1.05+dfsg/apidocs/0000755000175000017500000000000010774502134014563 5ustar meebeymeebeysemweb-1.05+dfsg/apidocs/index.html0000644000175000017500000000764510774502134016574 0ustar meebeymeebey SemWeb
Joshua Tauberer's C# Code
SemWeb

SemWeb is a C#/.NET library for manipulating RDF data and interacting with the semantic web. SemWeb was written by Joshua Tauberer (http://razor.occams.info) and has its home at http://razor.occams.info/code/semweb It is developed and tested under Mono, but it should run on Windows fine, in principle.

SemWeb Namespace

The SemWeb namespace contains types related to using information in Resource Description Format (RDF).

SemWeb.Query Namespace

This namespace contains classes for performing queries on stores.

SemWeb.Stores Namespace

This namespace contains implementations of data sources.

SemWeb.Util Namespace

This namespace contains utility classes.

SemWeb.Algos Namespace

Experimental algorithms.

SemWeb.Remote Namespace

This namespace contains classes for accessing remote data sources.

SemWeb.Util.Bind Namespace

To be added.

SemWeb.Filters Namespace

To be added.

SemWeb.Inference Namespace

The types in this namespace provide inferencing capabilities.


semweb-1.05+dfsg/apidocs/SemWeb.Util/0000755000175000017500000000000010774502134016661 5ustar meebeymeebeysemweb-1.05+dfsg/apidocs/SemWeb.Util/index.html0000644000175000017500000000546310774502134020666 0ustar meebeymeebey SemWeb: SemWeb.Util
SemWeb.Util Namespace

Namespace

None.

Type Description
DistinctStatementsSink To be added.
StatementList An expandable array of Statements.
StatementMap A hashtable specialized for statements.

semweb-1.05+dfsg/apidocs/SemWeb.Util/XPathSemWebNavigator.html0000644000175000017500000001457410774502134023564 0ustar meebeymeebey SemWeb.Util.XPathSemWebNavigator
XPathSemWebNavigator Class

Allows XPath expressions to be evaluated in an RDF model.

public class XPathSemWebNavigator : System.Xml.XPath.XPathNavigator


Remarks

To be added.

Members

See Also: Inherited members from System.Xml.XPath.XPathNavigator.

Constructors

Member Details

XPathSemWebNavigator Constructor

public XPathSemWebNavigator (SemWeb.Entity root, SemWeb.Store model, SemWeb.NamespaceManager namespaces)

Creates a new navigator starting at the given entity.

Parameters

root
The entity at the root node of the XPath document model.
model
The data model that the navigator will explore.
namespaces
A NamespaceManager used to resolve prefixes in XPath expressions evaluated by the navigator.

Remarks

None.

XPathSemWebNavigator Constructor

public XPathSemWebNavigator (SemWeb.Store model, SemWeb.NamespaceManager namespaces)

To be added.

Parameters

model
To be added.
namespaces
To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Util/StatementList.html0000644000175000017500000005205710774502134022360 0ustar meebeymeebey SemWeb.Util.StatementList
StatementList Class

An expandable array of Statements.

[System.Reflection.DefaultMember("Item")]
public class StatementList : ICollection


Remarks

This utility class is for manipulating an expandable array of SemWeb.Statements.

Members

See Also: Inherited members from object.

Constructors

Creates a new empty array of statements.
To be added.

Properties

Count [read-only]
int . Gets the number of statements in the list.
IsSynchronized [read-only]
bool . Returns false.
Item [int]
default property
SemWeb.Statement . Gets/sets the statement at the given index.
SyncRoot [read-only]
object . Returns null.

Methods

Add (SemWeb.Statement) : int
Adds a statement to the end of the array.
Clear ()
Clears the array.
CopyTo (Array, int)
Copies this array into another array.
GetEnumerator () : IEnumerator
Gets an enumerator over the statements in the array.
Remove (SemWeb.Statement)
Removes a statement from the array.
RemoveAt (int)
Removes the statement at the given index.
Reverse ()
Reverses the array.
Sort ()
To be added.
ToArray () : SemWeb.Statement[]
Returns an array containing all of the statements in the list.

Operators

Conversion to SemWeb.Statement[] (Implicit)
To be added.

Member Details

StatementList Constructor

public StatementList ()

Creates a new empty array of statements.

Remarks

None.

Add Method

public int Add (SemWeb.Statement value)

Adds a statement to the end of the array.

Parameters

value
The statement to add to the end of the array.

Returns

The index of the newly added statement.

Remarks

None.

Remove Method

public void Remove (SemWeb.Statement s)

Removes a statement from the array.

Parameters

s
The statement to remove.

Remarks

The statement is removed by linearly searching for it in the array.

Clear Method

public virtual void Clear ()

Clears the array.

Remarks

None.

RemoveAt Method

public virtual void RemoveAt (int index)

Removes the statement at the given index.

Parameters

index
The zero-based index at which to remove a statement.

Remarks

None.

Reverse Method

public void Reverse ()

Reverses the array.

Remarks

None.

ToArray Method

public SemWeb.Statement[] ToArray ()

Returns an array containing all of the statements in the list.

Returns

An array of statements.

Remarks

None.

GetEnumerator Method

public IEnumerator GetEnumerator ()

Gets an enumerator over the statements in the array.

Returns

An enumerator over the statements in the array.

Remarks

None.

CopyTo Method

public void CopyTo (Array dest, int start)

Copies this array into another array.

Parameters

dest
The destination array.
start
The starting index in the destination array.

Remarks

None.

Count Property

public int Count { get; }

Gets the number of statements in the list.

Value

The number of statements in the list.

Remarks

None.

SyncRoot Property

public object SyncRoot { get; }

Returns null.

Value

Null.

Remarks

None.

IsSynchronized Property

public bool IsSynchronized { get; }

Returns false.

Value

False.

Remarks

None.

Item Property

public SemWeb.Statement this [int index] { set; get; }

This is the default property for this class.

Gets/sets the statement at the given index.

Parameters

index
A zero-based index.

Value

The statement at the given index.

Remarks

This property is the default indexer for the class.

Conversion Method

public static implicit operator SemWeb.Statement[] (StatementList list)

To be added.

Parameters

list
To be added.

Returns

To be added.

Remarks

To be added.

Sort Method

public void Sort ()

To be added.

Remarks

To be added.

StatementList Constructor

public StatementList (SemWeb.Statement[] statements)

To be added.

Parameters

statements
To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Util/DistinctStatementsSink.html0000644000175000017500000001365610774502134024240 0ustar meebeymeebey SemWeb.Util.DistinctStatementsSink
DistinctStatementsSink Class

To be added.

public class DistinctStatementsSink : SemWeb.StatementSink


Remarks

To be added.

Members

See Also: Inherited members from object.

Constructors

Methods

Add (SemWeb.Statement) : bool
To be added.

Member Details

DistinctStatementsSink Constructor

public DistinctStatementsSink (SemWeb.StatementSink sink, bool resetMeta)

To be added.

Parameters

sink
To be added.
resetMeta
To be added.

Remarks

To be added.

Add Method

public bool Add (SemWeb.Statement s)

To be added.

Parameters

s
To be added.

Returns

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Util/StatementMap.html0000644000175000017500000003215210774502134022154 0ustar meebeymeebey SemWeb.Util.StatementMap
StatementMap Class

A hashtable specialized for statements.

[System.Reflection.DefaultMember("Item")]
public class StatementMap


Remarks

Since the Statement type is a struct, and this library does not use generics, this class is provided to avoid needing to box statements in Hashtables.

Members

See Also: Inherited members from object.

Constructors

To be added.
To be added.

Properties

Count [read-only]
int . To be added.
Item [SemWeb.Statement]
default property
object . To be added.
Keys [read-only]
StatementList . To be added.
Values [read-only]
IEnumerable . To be added.

Methods

Clear ()
To be added.
ContainsKey (SemWeb.Statement) : bool
To be added.
Remove (SemWeb.Statement)
To be added.

Member Details

StatementMap Constructor

public StatementMap ()

To be added.

Remarks

To be added.

StatementMap Constructor

public StatementMap (int capacity, float loadFactor)

To be added.

Parameters

capacity
To be added.
loadFactor
To be added.

Remarks

To be added.

Clear Method

public virtual void Clear ()

To be added.

Remarks

To be added.

ContainsKey Method

public bool ContainsKey (SemWeb.Statement key)

To be added.

Parameters

key
To be added.

Returns

To be added.

Remarks

To be added.

Remove Method

public virtual void Remove (SemWeb.Statement key)

To be added.

Parameters

key
To be added.

Remarks

To be added.

Count Property

public int Count { get; }

To be added.

Value

To be added.

Remarks

To be added.

Keys Property

public StatementList Keys { get; }

To be added.

Value

To be added.

Remarks

To be added.

Values Property

public IEnumerable Values { get; }

To be added.

Value

To be added.

Remarks

To be added.

Item Property

public object this [SemWeb.Statement key] { set; get; }

This is the default property for this class.

To be added.

Parameters

key
To be added.

Value

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.IO/0000755000175000017500000000000010774502134016253 5ustar meebeymeebeysemweb-1.05+dfsg/apidocs/SemWeb.IO/index.html0000644000175000017500000000403510774502134020252 0ustar meebeymeebey SemWeb: SemWeb.IO
SemWeb.IO Namespace
semweb-1.05+dfsg/apidocs/SemWeb.IO/RdfXmlParser.html0000644000175000017500000002476710774502134021532 0ustar meebeymeebey SemWeb.IO.RdfXmlParser
RdfXmlParser

Reads RDF statements from an RDF/XML file.

public class RdfXmlParser : SemWeb.RdfParser


Remarks
The RdfXmlParser loads the complete XML document into memory before any statements are made available.
Members

See Also: Inherited members from SemWeb.RdfParser.

Constructors
Creates a parser from a stream.
Creates a parser from a TextReader.
Creates a parser for a file.
Creates a parser for an XML document already loaded.
Creates a parser for an XmlReader.
Member Details
RdfXmlParser Constructor
public RdfXmlParser (System.Xml.XmlDocument document)

Creates a parser for an XML document already loaded.

Parameters
document
The RDF/XML document.
Remarks
None.

RdfXmlParser Constructor
public RdfXmlParser (System.Xml.XmlReader document)

Creates a parser for an XmlReader.

Parameters
document
A stream containing the RDF/XML file.
Remarks
None.

RdfXmlParser Constructor
public RdfXmlParser (System.IO.TextReader document)

Creates a parser from a TextReader.

Parameters
document
The stream containing the RDF/XML file.
Remarks
None.

RdfXmlParser Constructor
public RdfXmlParser (System.IO.Stream document)

Creates a parser from a stream.

Parameters
document
The stream containing the RDF/XML file.
Remarks
None.

RdfXmlParser Constructor
public RdfXmlParser (string file)

Creates a parser for a file.

Parameters
file
The path of the file containing RDF/XML, or "-" to read from Console.In.
Remarks
None.


semweb-1.05+dfsg/apidocs/SemWeb.IO/RdfXmlReader.html0000644000175000017500000002476710774502134021500 0ustar meebeymeebey SemWeb.IO.RdfXmlReader
RdfXmlReader

Reads RDF statements from an RDF/XML file.

public class RdfXmlReader : SemWeb.RdfReader


Remarks
The RdfXmlReader loads the complete XML document into memory before any statements are made available.
Members

See Also: Inherited members from SemWeb.RdfReader.

Constructors
Creates a parser from a stream.
Creates a parser from a TextReader.
Creates a parser for a file.
Creates a parser for an XML document already loaded.
Creates a parser for an XmlReader.
Member Details
RdfXmlReader Constructor
public RdfXmlReader (System.Xml.XmlDocument document)

Creates a parser for an XML document already loaded.

Parameters
document
The RDF/XML document.
Remarks
None.

RdfXmlReader Constructor
public RdfXmlReader (System.Xml.XmlReader document)

Creates a parser for an XmlReader.

Parameters
document
A stream containing the RDF/XML file.
Remarks
None.

RdfXmlReader Constructor
public RdfXmlReader (System.IO.TextReader document)

Creates a parser from a TextReader.

Parameters
document
The stream containing the RDF/XML file.
Remarks
None.

RdfXmlReader Constructor
public RdfXmlReader (System.IO.Stream document)

Creates a parser from a stream.

Parameters
document
The stream containing the RDF/XML file.
Remarks
None.

RdfXmlReader Constructor
public RdfXmlReader (string file)

Creates a parser for a file.

Parameters
file
The path of the file containing RDF/XML, or "-" to read from Console.In.
Remarks
None.


semweb-1.05+dfsg/apidocs/SemWeb.IO/RdfBinaryWriter.html0000644000175000017500000001354110774502134022222 0ustar meebeymeebey SemWeb.IO.RdfBinaryWriter
RdfBinaryWriter

To be added.

public class RdfBinaryWriter : SemWeb.RdfWriter


Remarks
To be added.
Members

See Also: Inherited members from SemWeb.RdfWriter.

Constructors
Fields
uriSplitChars
static
char[]. To be added.
Member Details
RdfBinaryWriter Constructor
public RdfBinaryWriter (System.IO.Stream stream)

To be added.

Parameters
stream
To be added.
Remarks
To be added.

uriSplitChars
public static char[] uriSplitChars

To be added.

Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb.IO/RdfCompactWriter.html0000644000175000017500000001355610774502134022372 0ustar meebeymeebey SemWeb.IO.RdfCompactWriter
RdfCompactWriter

To be added.

RdfCompactWriter : SemWeb.RdfWriter


Remarks
To be added.
Members

See Also: Inherited members from SemWeb.RdfWriter.

Constructors
Fields
uriSplitChars
static
char[]. To be added.
Member Details
RdfCompactWriter Constructor
public RdfCompactWriter (System.IO.TextWriter writer)

To be added.

Parameters
writer
To be added.
Remarks
To be added.

uriSplitChars
public static char[] uriSplitChars

To be added.

Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb.IO/N3Reader.html0000644000175000017500000001417410774502134020553 0ustar meebeymeebey SemWeb.IO.N3Reader

Reads RDF statements from a Notation 3 (N3, Turtle, or NTriples) stream

public class N3Reader : SemWeb.RdfReader


Remarks
Most of the N3 specification is supported, including everything in NTriples and Turtle. Statements are streamed as soon as they are read from disk.
Members

See Also: Inherited members from SemWeb.RdfReader.

Constructors
Creates a new N3 parser for a stream.
Creates a new N3 parser for the given file.
Member Details
N3Reader Constructor
public N3Reader (System.IO.TextReader source)

Creates a new N3 parser for a stream.

Parameters
source
The N3 stream to read.
Remarks
None.

N3Reader Constructor
public N3Reader (string sourcefile)

Creates a new N3 parser for the given file.

Parameters
sourcefile
The name of a file, or "-" to read from Console.In.
Remarks
None.


semweb-1.05+dfsg/apidocs/SemWeb.IO/N3Parser.html0000644000175000017500000001417410774502134020605 0ustar meebeymeebey SemWeb.IO.N3Parser

Reads RDF statements from a Notation 3 (N3, Turtle, or NTriples) stream

public class N3Parser : SemWeb.RdfParser


Remarks
Most of the N3 specification is supported, including everything in NTriples and Turtle. Statements are streamed as soon as they are read from disk.
Members

See Also: Inherited members from SemWeb.RdfParser.

Constructors
Creates a new N3 parser for a stream.
Creates a new N3 parser for the given file.
Member Details
N3Parser Constructor
public N3Parser (System.IO.TextReader source)

Creates a new N3 parser for a stream.

Parameters
source
The N3 stream to read.
Remarks
None.

N3Parser Constructor
public N3Parser (string sourcefile)

Creates a new N3 parser for the given file.

Parameters
sourcefile
The name of a file, or "-" to read from Console.In.
Remarks
None.


semweb-1.05+dfsg/apidocs/SemWeb.IO/AutoPrefixNamespaceManager.html0000644000175000017500000001300110774502134024332 0ustar meebeymeebey SemWeb.IO.AutoPrefixNamespaceManager
AutoPrefixNamespaceManager

To be added.

public class AutoPrefixNamespaceManager : SemWeb.NamespaceManager


Remarks
To be added.
Members

See Also: Inherited members from SemWeb.NamespaceManager.

Constructors
Member Details
AutoPrefixNamespaceManager Constructor
public AutoPrefixNamespaceManager ()

To be added.

Remarks
To be added.

AutoPrefixNamespaceManager Constructor
public AutoPrefixNamespaceManager (SemWeb.NamespaceManager parent)

To be added.

Parameters
parent
To be added.
Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb.IO/RdfXmlWriter.html0000644000175000017500000003017210774502134021535 0ustar meebeymeebey SemWeb.IO.RdfXmlWriter
RdfXmlWriter

To be added.

public class RdfXmlWriter : SemWeb.RdfWriter


Remarks
To be added.
Members
Member Details
RdfXmlWriter Constructor
public RdfXmlWriter (string file)

To be added.

Parameters
file
To be added.
Remarks
To be added.

RdfXmlWriter Constructor
public RdfXmlWriter (string file, SemWeb.NamespaceManager ns)

To be added.

Parameters
file
To be added.
ns
To be added.
Remarks
To be added.

RdfXmlWriter Constructor
public RdfXmlWriter (System.IO.TextWriter writer)

To be added.

Parameters
writer
To be added.
Remarks
To be added.

RdfXmlWriter Constructor
public RdfXmlWriter (System.IO.TextWriter writer, SemWeb.NamespaceManager ns)

To be added.

Parameters
writer
To be added.
ns
To be added.
Remarks
To be added.

RdfXmlWriter Constructor
public RdfXmlWriter (System.Xml.XmlWriter writer)

To be added.

Parameters
writer
To be added.
Remarks
To be added.

RdfXmlWriter Constructor
public RdfXmlWriter (System.Xml.XmlWriter writer, SemWeb.NamespaceManager ns)

To be added.

Parameters
writer
To be added.
ns
To be added.
Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb.IO/N3Writer.html0000644000175000017500000002775010774502134020631 0ustar meebeymeebey SemWeb.IO.N3Writer

Writes out RDF statements to a stream in Notation 3 or NTriples format.

public class N3Writer : SemWeb.RdfWriter


Remarks
None.
Members

See Also: Inherited members from SemWeb.RdfWriter.

Constructors
Creates an N3Writer that outputs statements to a TextWriter.
Creates an N3Writer that outputs statements to a file.
Creates an N3Writer that outputs statements to a TextWriter, using a list of namespace prefixes.
Creates an N3Writer that outputs statements to a file, using a list of namespace prefixes.
Properties
NTriples
bool . Gets or sets whether the writer will output strict NTriples, or full N3.
Member Details
N3Writer Constructor
public N3Writer (string file)

Creates an N3Writer that outputs statements to a file.

Parameters
file
The path to a file where the statements will be stored, or "-" to output to Console.Out.
Remarks
None.

N3Writer Constructor
public N3Writer (string file, SemWeb.NamespaceManager ns)

Creates an N3Writer that outputs statements to a file, using a list of namespace prefixes.

Parameters
file
The path to a file where the statements will be stored, or "-" to output to Console.Out.
ns
A NamespaceManager containing a mapping from prefixes to namespace URIs.
Remarks
A "@prefix" directive is written for each prefix in the NamespaceManager, if SemWeb.IO.N3Writer.NTriples is false, which is the default. The NamespaceManager should not be modified once statements have been written.

N3Writer Constructor
public N3Writer (System.IO.TextWriter writer)

Creates an N3Writer that outputs statements to a TextWriter.

Parameters
writer
The TextWriter to which statements will be written.
Remarks
None.

N3Writer Constructor
public N3Writer (System.IO.TextWriter writer, SemWeb.NamespaceManager ns)

Creates an N3Writer that outputs statements to a TextWriter, using a list of namespace prefixes.

Parameters
writer
The TextWriter to which statements will be written.
ns
A NamespaceManager containing a mapping from prefixes to namespace URIs.
Remarks
A "@prefix" directive is written for each prefix in the NamespaceManager, if SemWeb.IO.N3Writer.NTriples is false, which is the default. The NamespaceManager should not be modified once statements have been written.

NTriples
public bool NTriples { set; get; }

Gets or sets whether the writer will output strict NTriples, or full N3.

Value
True if the write will output strict NTriples, false to output full N3.
Remarks
The default value is false.


semweb-1.05+dfsg/apidocs/SemWeb.IO/SQLWriter.html0000644000175000017500000002111710774502134020777 0ustar meebeymeebey SemWeb.IO.SQLWriter

This class writes RDF statements to a stream as SQL suitable to be loaded into a database that will be used by SemWeb.Stores.SQLStore.

public class SQLWriter : SemWeb.RdfWriter


Remarks
None.
Members

See Also: Inherited members from SemWeb.RdfWriter.

Constructors
Creates a new SQLWriter that outputs to Console.Out and uses the given table name prefix.
Creates a new SQLWriter that outputs to a TextWriter and uses the given table name prefix.
Creates a new SQLWriter that outputs to the names file and uses the given table name prefix.
Member Details
SQLWriter Constructor
public SQLWriter (string spec)

Creates a new SQLWriter that outputs to Console.Out and uses the given table name prefix.

Parameters
spec
The prefix for the names of the tables used by the writer.
Remarks
None.

SQLWriter Constructor
public SQLWriter (string file, string tablename)

Creates a new SQLWriter that outputs to the names file and uses the given table name prefix.

Parameters
file
The name of the file to write SQL statements to, or "-" to write to Console.Out.
tablename
The prefix for the names of the tables used by the writer.
Remarks
To be added.

SQLWriter Constructor
public SQLWriter (System.IO.TextWriter writer, string tablename)

Creates a new SQLWriter that outputs to a TextWriter and uses the given table name prefix.

Parameters
writer
The TextWriter to output SQL statements to.
tablename
The prefix for the names of the tables used by the writer.
Remarks
None.


semweb-1.05+dfsg/apidocs/SemWeb.Bind/0000755000175000017500000000000010774502134016620 5ustar meebeymeebeysemweb-1.05+dfsg/apidocs/SemWeb.Bind/index.html0000644000175000017500000000376110774502134020624 0ustar meebeymeebey SemWeb: SemWeb.Bind
SemWeb.Bind Namespace
semweb-1.05+dfsg/apidocs/SemWeb.Bind/Any.html0000644000175000017500000004067310774502134020247 0ustar meebeymeebey SemWeb.Bind.Any

To be added.

public class Any


Remarks
To be added.
Members

See Also: Inherited members from object.

Constructors
To be added.
Properties
Entity [read-only]
SemWeb.Entity . To be added.
Model [read-only]
SemWeb.Store . To be added.
Uri [read-only]
string . To be added.
Protected Methods
Member Details
Any Constructor
public Any (SemWeb.Entity entity, SemWeb.Store model)

To be added.

Parameters
entity
To be added.
model
To be added.
Remarks
To be added.

Entity
public SemWeb.Entity Entity { get; }

To be added.

Value
To be added.
Remarks
To be added.

Model
public SemWeb.Store Model { get; }

To be added.

Value
To be added.
Remarks
To be added.

Uri
public string Uri { get; }

To be added.

Value
To be added.
Remarks
To be added.

AddValue
protected void AddValue (SemWeb.Entity predicate, object value, bool forward)

To be added.

Parameters
predicate
To be added.
value
To be added.
forward
To be added.
Remarks
To be added.

RemoveValue
protected void RemoveValue (SemWeb.Entity predicate, object value, bool forward)

To be added.

Parameters
predicate
To be added.
value
To be added.
forward
To be added.
Remarks
To be added.

SetFuncProperty
protected void SetFuncProperty (SemWeb.Entity predicate, object value, bool forward)

To be added.

Parameters
predicate
To be added.
value
To be added.
forward
To be added.
Remarks
To be added.

SetNonFuncProperty
protected void SetNonFuncProperty (SemWeb.Entity predicate, object[] values, bool forward)

To be added.

Parameters
predicate
To be added.
values
To be added.
forward
To be added.
Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Query/0000755000175000017500000000000010774502134017051 5ustar meebeymeebeysemweb-1.05+dfsg/apidocs/SemWeb.Query/QueryExecutionException.html0000644000175000017500000001354710774502134024621 0ustar meebeymeebey SemWeb.Query.QueryExecutionException
QueryExecutionException Class

This exception may be thrown during the execution of a query.

public class QueryExecutionException : ApplicationException


Remarks

None.

Members

See Also: Inherited members from ApplicationException.

Constructors

Creates a new QueryExecutionException.
To be added.

Member Details

QueryExecutionException Constructor

public QueryExecutionException (string message)

Creates a new QueryExecutionException.

Parameters

message
The message of the exception.

Remarks

None.

QueryExecutionException Constructor

public QueryExecutionException (string message, Exception cause)

To be added.

Parameters

message
The message of the exception.
cause
The cause of the exception.

Remarks

None.


semweb-1.05+dfsg/apidocs/SemWeb.Query/Sparql+QueryType.html0000644000175000017500000000667210774502134023157 0ustar meebeymeebey SemWeb.Query.Sparql.QueryType
Sparql.QueryType Enum

The types of a SPARQL query.

public enum Sparql.QueryType


Remarks

There are four types of SPARQL queries, each returning a different type of answer.
Members
Member name Description
Select Represents a SELECT query.
Describe Represents a DESCRIBE query.
Ask Represents an ASK query.
Construct Represents a CONSTRUCT query.

semweb-1.05+dfsg/apidocs/SemWeb.Query/SparqlProtocolServerHandler.html0000644000175000017500000004131510774502134025414 0ustar meebeymeebey SemWeb.Query.SparqlProtocolServerHandler
SparqlProtocolServerHandler Class

Implements a SPARQL Protocol server for ASP.NET.

public class SparqlProtocolServerHandler : System.Web.IHttpHandler


Remarks

This class implements the System.Web.IHttpHandler interface to provide a SPARQL Protocol query server over HTTP.

To activate the SPARQL server in your ASP.NET site, place the SemWeb.dll, SemWeb.Sparql.dll, and sparql-core.dll assemblies in the bin directory of your ASP.NET application. Then add the following to your web.config file. Note that you must specify a spec string to a data source to serve, as described in SemWeb.Store.CreateForInput(string).

Example
<configuration>
     <configSections>
          <section name="sparqlSources" type="System.Configuration.NameValueSectionHandler,System"/>
     </configSections>

     <system.web>
          <httpHandlers>
               <!-- This line associates the SPARQL Protocol implementation with a path on your
                    website. With this, you get a SPARQL server at http://yourdomain.com/sparql.  -->
               <add verb="*" path="sparql" type="SemWeb.Query.SparqlProtocolServerHandler, SemWeb.Sparql" />
          </httpHandlers>
     </system.web>

     <sparqlSources>
          <!-- This line configures the data source associated with each SPARQL server added above.
                  This sets the server to query the RDF/XML file at the given path.  You can use any
                  spec string described in SemWeb.Store.CreateForInput(). -->
          <add key="/sparql" value="xml:/home/user/datafile.rdf"/>
     </sparqlSources>
</configuration>

Precede the data source specification string with "rdfs+" to wrap the data source with the SemWeb.Inference.RDFS reasoning engine. And precede that with "noreuse," to create a new instance of the data source on each request, which is good for SQL-backed stores to allow for concurrent queries, but bad for file-backed stores which would be read from disk on each request. For instance:

Example
<add key="/sparql" value="noreuse,rdfs+mysql:rdftable:Database=databasename;Server=localhost;User Id=username"/>

Using Mono's XSP light-weight web server, you can create a standalone SPARQL Protocol server by:

  • Creating a new directory for your server.
  • Creating a bin directory within it, and placing the files mentioned above into the directory.
  • Creating a web.config file in the directory using the template above.
  • Running "xsp" from within the directory.

You may want to add this index.html file to create a form to experiment with SPARQL queries:

Example
<html>
     <body>
          <form action="/sparql" method="get">
        <input type="hidden" name="outputMimeType" value="text/xml"/>
        <textarea name="query" rows="10" cols="80">
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX pol: <tag:govshare.info,2005:rdf/politico/>
SELECT * WHERE {
?s rdf:type pol:Politician .
?s foaf:gender "male" .
?s foaf:name ?name .
}
LIMIT 10
        </textarea>
        <p><input type="submit"/></p>
          </form>
     </body>
</html>  

Members

See Also: Inherited members from object.

Constructors

Creates a new SPARQL Protocol implementation class.

Fields

MaximumLimit
int . The maximum number of bindings to return for any query.

Methods

ProcessRequest (System.Web.HttpContext)
Processes an HTTP request from the ASP.NET subsystem.

Protected Methods

CreateQuery (string) : Query
Constructs a Query object for a SPARQL query.
GetDataSource (out bool) : SemWeb.SelectableSource
Gets the data source to query.
RunQuery (Query, SemWeb.SelectableSource, System.IO.TextWriter)
Runs a query.

Member Details

SparqlProtocolServerHandler Constructor

public SparqlProtocolServerHandler ()

Creates a new SPARQL Protocol implementation class.

Remarks

This class does not listen on an HTTP port by itself. It is meant to be embedded in an ASP.NET site.

MaximumLimit Field

public int MaximumLimit

The maximum number of bindings to return for any query.

Remarks

Set to -1, the default, to have no limit.

ProcessRequest Method

public virtual void ProcessRequest (System.Web.HttpContext context)

Processes an HTTP request from the ASP.NET subsystem.

Parameters

context
The request context.

Remarks

This method is not meant to be called from user code.

CreateQuery Method

protected virtual Query CreateQuery (string query)

Constructs a Query object for a SPARQL query.

Parameters

query
The SPARQL query as a string.

Returns

A Query object.

Remarks

The default implementation returns a new SPARQL query object based on the query. Override in subclasses to create a query in a different way, or to set limits on the query.

RunQuery Method

protected virtual void RunQuery (Query query, SemWeb.SelectableSource source, System.IO.TextWriter output)

Runs a query.

Parameters

query
The query to run.
source
The data source to query against.
output
The output stream.

Remarks

The default implementation runs the query on the data source and outputs the results in the SPARQL XML Results specification format. Override in subclasses to output the results in a different way, to run the query differently, or to set limits on the query or output.

GetDataSource Method

protected virtual SemWeb.SelectableSource GetDataSource (out bool closeAfterQuery)

Gets the data source to query.

Parameters

closeAfterQuery
Set to true to indicate that the data source should be closed/disposed after the query is complete.

Returns

A data source to query.

Remarks

None.


semweb-1.05+dfsg/apidocs/SemWeb.Query/XMLQuerySink.html0000644000175000017500000001345010774502134022255 0ustar meebeymeebey SemWeb.Query.XMLQuerySink

To be added.

public class XMLQuerySink : QueryResultSink, IDisposable


Remarks
To be added.
Members

See Also: Inherited members from QueryResultSink.

Constructors
Methods
Dispose ()
To be added.
Member Details
XMLQuerySink Constructor
public XMLQuerySink (System.Xml.XmlWriter output)

To be added.

Parameters
output
To be added.
Remarks
To be added.

Dispose
public void Dispose ()

To be added.

Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Query/QueryFormatException.html0000644000175000017500000001350710774502134024102 0ustar meebeymeebey SemWeb.Query.QueryFormatException
QueryFormatException Class

This exception may be thrown while parsing or initializing a query.

public class QueryFormatException : ApplicationException


Remarks

None.

Members

See Also: Inherited members from ApplicationException.

Constructors

Creates a new QueryFormatException.
To be added.

Member Details

QueryFormatException Constructor

public QueryFormatException (string message)

Creates a new QueryFormatException.

Parameters

message
The message of the exception.

Remarks

To be added.

QueryFormatException Constructor

public QueryFormatException (string message, Exception cause)

To be added.

Parameters

message
The message of the exception.
cause
The cause of the exception.

Remarks

None.


semweb-1.05+dfsg/apidocs/SemWeb.Query/SparqlProtocol.html0000644000175000017500000004273410774502134022735 0ustar meebeymeebey SemWeb.Query.SparqlProtocol
SparqlProtocol Class

Implements a SPARQL Protocol server for ASP.NET.

public class SparqlProtocol : System.Web.IHttpHandler


Remarks

This class implements the System.Web.IHttpHandler interface to provide a SPARQL Protocol query server over HTTP.

To activate the SPARQL server in your ASP.NET site, place the SemWeb.dll, SemWeb.Sparql.dll, and sparql-core.dll assemblies in the bin directory of your ASP.NET application. Then add the following to your web.config file. Note that you must specify a spec string to a data source to serve, as described in SemWeb.Store.CreateForInput(string).

Example
<configuration>
     <configSections>
          <section name="sparqlSources" type="System.Configuration.NameValueSectionHandler,System"/>
     </configSections>

     <system.web>
          <httpHandlers>
               <!-- This line associates the SPARQL Protocol implementation with a path on your
                    website. With this, you get a SPARQL server at http://yourdomain.com/sparql.  -->
               <add verb="*" path="sparql" type="SemWeb.Query.SparqlProtocol, SemWeb.Sparql" />
          </httpHandlers>
     </system.web>

     <sparqlSources>
          <!-- This line configures the data source associated with each SPARQL server added above.
                  This sets the server to query the RDF/XML file at the given path.  You can use any
                  spec string described in SemWeb.Store.CreateForInput(). -->
          <add key="/sparql" value="xml:/home/user/datafile.rdf"/>
     </sparqlSources>
</configuration>

Precede the data source specification string with "rdfs+" to wrap the data source with the SemWeb.Inference.RDFS reasoning engine. And precede that with "noreuse," to create a new instance of the data source on each request, which is good for SQL-backed stores to allow for concurrent queries, but bad for file-backed stores which would be read from disk on each request. For instance:

Example
<add key="/sparql" value="noreuse,rdfs+mysql:rdftable:Database=databasename;Server=localhost;User Id=username"/>

Using Mono's XSP light-weight web server, you can create a standalone SPARQL Protocol server by:

  • Creating a new directory for your server.
  • Creating a bin directory within it, and placing the files mentioned above into the directory.
  • Creating a web.config file in the directory using the template above.
  • Running "xsp" from within the directory.

You may want to add this index.html file to create a form to experiment with SPARQL queries:

Example
<html>
     <body>
          <form action="/sparql" method="get">
        <input type="hidden" name="outputMimeType" value="text/xml"/>
        <textarea name="query" rows="10" cols="80">
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX pol: <tag:govshare.info,2005:rdf/politico/>
SELECT * WHERE {
?s rdf:type pol:Politician .
?s foaf:gender "male" .
?s foaf:name ?name .
}
LIMIT 10
        </textarea>
        <p><input type="submit"/></p>
          </form>
     </body>
</html>  

Members

See Also: Inherited members from object.

Constructors

Creates a new SPARQL Protocol implementation class.

Fields

MaximumLimit
int . The maximum number of bindings to return for any query.
MimeType
string . The MIME type of query responses.

Methods

ProcessRequest (System.Web.HttpContext)
Processes an HTTP request from the ASP.NET subsystem.

Protected Methods

CreateQuery (string) : Query
Constructs a Query object for a SPARQL query.
GetDataSource (out bool) : SemWeb.SelectableSource
Gets the data source to query.
RunQuery (Query, SemWeb.SelectableSource, System.IO.TextWriter)
Runs a query.

Member Details

SparqlProtocol Constructor

public SparqlProtocol ()

Creates a new SPARQL Protocol implementation class.

Remarks

This class does not listen on an HTTP port by itself. It is meant to be embedded in an ASP.NET site.

MaximumLimit Field

public int MaximumLimit

The maximum number of bindings to return for any query.

Remarks

Set to -1, the default, to have no limit.

MimeType Field

public string MimeType

The MIME type of query responses.

Remarks

The default MIME type is "application/sparql-results+xml".

ProcessRequest Method

public virtual void ProcessRequest (System.Web.HttpContext context)

Processes an HTTP request from the ASP.NET subsystem.

Parameters

context
The request context.

Remarks

This method is not meant to be called from user code.

CreateQuery Method

protected virtual Query CreateQuery (string query)

Constructs a Query object for a SPARQL query.

Parameters

query
The SPARQL query as a string.

Returns

A Query object.

Remarks

The default implementation returns a new SPARQL query object based on the query. Override in subclasses to create a query in a different way, or to set limits on the query.

RunQuery Method

protected virtual void RunQuery (Query query, SemWeb.SelectableSource source, System.IO.TextWriter output)

Runs a query.

Parameters

query
The query to run.
source
The data source to query against.
output
The output stream.

Remarks

The default implementation runs the query on the data source and outputs the results in the SPARQL XML Results specification format. Override in subclasses to output the results in a different way, to run the query differently, or to set limits on the query or output.

GetDataSource Method

protected virtual SemWeb.SelectableSource GetDataSource (out bool closeAfterQuery)

Gets the data source to query.

Parameters

closeAfterQuery
Set to true to indicate that the data source should be closed/disposed after the query is complete.

Returns

A data source to query.

Remarks

None.


semweb-1.05+dfsg/apidocs/SemWeb.Query/QueryException.html0000644000175000017500000001450410774502134022727 0ustar meebeymeebey SemWeb.Query.QueryException
QueryException

To be added.

public class QueryException : ApplicationException


Remarks
To be added.
Members

See Also: Inherited members from ApplicationException.

Constructors
To be added.
To be added.
Member Details
QueryException Constructor
public QueryException (string message)

To be added.

Parameters
message
To be added.
Remarks
To be added.

QueryException Constructor
public QueryException (string message, Exception cause)

To be added.

Parameters
message
To be added.
cause
To be added.
Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Query/index.html0000644000175000017500000001514510774502134021054 0ustar meebeymeebey SemWeb: SemWeb.Query
SemWeb.Query Namespace

Namespace

Two implementations of the abstract SemWeb.Query.Query class are provided in this namespace. A Query class implements an algorithm to return all of the ways a set of variables may bind to resources in a SemWeb.Store, subject to different types of constraints.

The SemWeb.Query.GraphMatch class implements a basic graph-matching algorithm. This algorithm takes two graphs and matches the variables in the query graph to resources in the target graph. Each of the ways a variable can bind to a resource is returned as a SemWeb.Query.VariableBindings instance.

The SemWeb.Query.Sparql class implements the SPARQL query specification. This class wraps the SPARQL Engine for Sesame found at http://sparql.sf.net (via IKVM).

Type Description
GraphMatch The GraphMatch class implements an algorithm for determining all of the ways the variables in one graph can be bound to resources in another graph.
MetaQueryResult This structure is used by SemWeb.QueryableSource.MetaQuery(SemWeb.Statement[],SemWeb.Query.QueryOptions) when asking for the querying capabilities of a data source.
Query A Query is something that returns all of the ways a set of variables may bind to a graph. This is the abstract base class of several query methods.
QueryExecutionException This exception may be thrown during the execution of a query.
QueryFormatException This exception may be thrown while parsing or initializing a query.
QueryOptions A structure specifying options for carrying out a query.
QueryResultBuffer A buffer for results of a query.
QueryResultSink A class that receives the results of a query.
RdfFunction To be added.
SparqlEngine A SPARQL query engine.
SparqlEngine.QueryType The types of a SPARQL query.
SparqlProtocolServerHandler Implements a SPARQL Protocol server for ASP.NET.
SparqlXmlQuerySink A QueryResultSink outputting results in the SPARQL output XML format.
VariableBindings Represents a row of results from a query.

semweb-1.05+dfsg/apidocs/SemWeb.Query/SparqlParser.html0000644000175000017500000004105710774502134022365 0ustar meebeymeebey SemWeb.Query.SparqlParser

To be added.

public class SparqlParser


Remarks
To be added.
Members

See Also: Inherited members from object.

Constructors
Properties
All [read-only]
bool . To be added.
AllVariables [read-only]
IList . To be added.
BaseUri [read-only]
string . To be added.
Distinct [read-only]
bool . To be added.
Graph [read-only]
SemWeb.Store . To be added.
Question [read-only]
SparqlParser+SparqlQuestion . To be added.
SelectVariables [read-only]
IList . To be added.
VariableNames [read-only]
IDictionary . To be added.
Methods
CreateQuery () : GraphMatch
To be added.
Member Details
SparqlParser Constructor
public SparqlParser (System.IO.TextReader reader)

To be added.

Parameters
reader
To be added.
Remarks
To be added.

BaseUri
public string BaseUri { get; }

To be added.

Value
To be added.
Remarks
To be added.

Question
public SparqlParser+SparqlQuestion Question { get; }

To be added.

Value
To be added.
Remarks
To be added.

Distinct
public bool Distinct { get; }

To be added.

Value
To be added.
Remarks
To be added.

All
public bool All { get; }

To be added.

Value
To be added.
Remarks
To be added.

Graph
public SemWeb.Store Graph { get; }

To be added.

Value
To be added.
Remarks
To be added.

CreateQuery
public GraphMatch CreateQuery ()

To be added.

Returns
To be added.
Remarks
To be added.

AllVariables
public IList AllVariables { get; }

To be added.

Value
To be added.
Remarks
To be added.

SelectVariables
public IList SelectVariables { get; }

To be added.

Value
To be added.
Remarks
To be added.

VariableNames
public IDictionary VariableNames { get; }

To be added.

Value
To be added.
Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Query/StringCompareFilter.html0000644000175000017500000001603610774502134023670 0ustar meebeymeebey SemWeb.Query.StringCompareFilter
StringCompareFilter

To be added.

StringCompareFilter : StringFilter


Remarks
To be added.
Members

See Also: Inherited members from StringFilter.

Constructors
Member Details
StringCompareFilter Constructor
public StringCompareFilter (SemWeb.Literal res, int compareResult, bool orEqual)

To be added.

Parameters
res
To be added.
compareResult
To be added.
orEqual
To be added.
Remarks
To be added.

StringCompareFilter Constructor
public StringCompareFilter (string pattern, int compareResult, bool orEqual)

To be added.

Parameters
pattern
To be added.
compareResult
To be added.
orEqual
To be added.
Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Query/PrintQuerySink.html0000644000175000017500000001006710774502134022712 0ustar meebeymeebey SemWeb.Query.PrintQuerySink
PrintQuerySink

To be added.

public class PrintQuerySink : QueryResultSink


Remarks
To be added.
Members

See Also: Inherited members from QueryResultSink.

Constructors
To be added.
Member Details
PrintQuerySink Constructor
public PrintQuerySink ()

To be added.

Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Query/QueryResultBuffer.html0000644000175000017500000002477310774502134023412 0ustar meebeymeebey SemWeb.Query.QueryResultBuffer
QueryResultBuffer Class

A buffer for results of a query.

Remarks

This class implements the QueryResultSink interface and can be used to buffer the results of a query.
C# Example
QueryResultBuffer buffer = new QueryResultBuffer();

Variable a = new Variable("a"), b = new Variable("b"), c = new Variable("c");
source.Query(
	new Statement[] {
		new Statement(a, "http://xmlns.com/foaf/0.1/nick", (Literal)"MyNickName"),
		new Statement(a, b, c) },
	, new QueryOptions(), buffer);

foreach (VariableBindings b in buffer) {
	Console.WriteLine("a => " + b["a"]);
	Console.WriteLine("b => " + b["b"]);
	Console.WriteLine();
}

Members

See Also: Inherited members from QueryResultSink.

Constructors

Creates a new instance of this class.

Properties

Bindings [read-only]
System.Collections.Generic.List<SemWeb.Query.VariableBindings> . The bindings that have been buffered.
Comments [read-only]
System.Collections.Generic.List<System.String> . To be added.
Variables [read-only]
SemWeb.Variable[]. A list of the variables potentially bound by the query.

Methods

abstract Add (VariableBindings) : bool
Called to add a new result row. (Inherited from QueryResultSink.)
AddComments (string)
Adds comments about how the query has been processed. (Inherited from QueryResultSink.)
Finished ()
This method is called by a Query object after the last variable binding is added. (Inherited from QueryResultSink.)
Init (SemWeb.Variable[])
Called by the Query to initialize the result sink. (Inherited from QueryResultSink.)

Member Details

QueryResultBuffer Constructor

public QueryResultBuffer ()

Creates a new instance of this class.

Remarks

None.

Bindings Property

The bindings that have been buffered.

Value

A list of the bindings that have been buffered by this object.

Remarks

None.

Variables Property

public SemWeb.Variable[] Variables { get; }

A list of the variables potentially bound by the query.

Value

A list of variables that may be bound in the result bindings of the query.

Remarks

Even if the Bindings property is an empty list, this array will contain the variables processed by the query.

Comments Property

To be added.

Value

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Query/RdfFunction.html0000644000175000017500000001421610774502134022164 0ustar meebeymeebey SemWeb.Query.RdfFunction
RdfFunction Class

To be added.

public abstract class RdfFunction


Remarks

To be added.

Members

See Also: Inherited members from object.

Protected Constructors

To be added.

Properties

Uri [read-only]
abstract
string . To be added.

Methods

abstract Evaluate (SemWeb.Resource[]) : SemWeb.Resource
To be added.

Member Details

RdfFunction Constructor

protected RdfFunction ()

To be added.

Remarks

To be added.

Evaluate Method

public abstract SemWeb.Resource Evaluate (SemWeb.Resource[] args)

To be added.

Parameters

args
To be added.

Returns

To be added.

Remarks

To be added.

Uri Property

public abstract string Uri { get; }

To be added.

Value

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Query/HTMLQuerySink.html0000644000175000017500000001104210774502134022354 0ustar meebeymeebey SemWeb.Query.HTMLQuerySink
HTMLQuerySink

To be added.

public class HTMLQuerySink : QueryResultSink


Remarks
To be added.
Members

See Also: Inherited members from QueryResultSink.

Constructors
Member Details
HTMLQuerySink Constructor
public HTMLQuerySink (System.IO.TextWriter output)

To be added.

Parameters
output
To be added.
Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Query/LiteralValueFilter.html0000644000175000017500000001013510774502134023476 0ustar meebeymeebey SemWeb.Query.LiteralValueFilter
LiteralValueFilter

To be added.

public abstract class LiteralValueFilter : ValueFilter


Remarks
To be added.
Members

See Also: Inherited members from ValueFilter.

Protected Constructors
To be added.
Member Details
LiteralValueFilter Constructor
protected LiteralValueFilter ()

To be added.

Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Query/SparqlEngine.html0000644000175000017500000007524010774502134022337 0ustar meebeymeebey SemWeb.Query.SparqlEngine
SparqlEngine Class

A SPARQL query engine.

public class SparqlEngine : Query


Remarks

This class is based on the engine at http://sparql.sourceforge.net/ by Ryan Levering, version 0.8.

This example runs a SELECT query on a data source and writes the results as XML to standard output.

C# Example
MemoryStore datamodel = new MemoryStore(new RdfXmlReader("rdfdata.rdf"));

string sparqlQuery = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n"
                           + "PREFIX foaf: <http://xmlns.com/foaf/0.1/>\n"
                           + "SELECT * WHERE { ?person rdf:type foaf:Agent . \n"
                           + "?person foaf:name ?name . }";

SparqlEngine query = new SparqlEngine(sparqlQuery);
query.Run(datamodel, Console.Out).  

Although this example sends the results to a stream, the results can be processed programmatically by passing a SemWeb.Query.QueryResultSink instead of a TextWriter.

Members

See Also: Inherited members from Query.

Constructors

Initialized the SPARQL query from a TextReader.
Initializes the SPARQL query from a string.

Fields

AllowPersistBNodes
bool . To be added.

Properties

MimeType
string . Gets or sets the preferred MIME type for the output of the query. (Inherited from Query.)
QueryMeta
SemWeb.Entity . A filter on the Meta value of statements in the target graph considered by the query. (Inherited from Query.)
ReturnLimit
int . The number of bindings to return. (Inherited from Query.)
ReturnStart
int . The index of the first binding to return. (Inherited from Query.)
Type [read-only]
SparqlEngine.QueryType . Gets the type of the query.

Methods

AddExternalFunction (RdfFunction)
Registers an external function that can be used in FILTER clauses.
Ask (SemWeb.SelectableSource) : bool
Executes an ASK query on the given data source and returns the result of the query as a boolean.
Ask (SemWeb.SelectableSource, System.IO.TextWriter)
Executes an ASK query on the given data source and outputs the result of the query in the SPARQL results format to a TextWriter.
Construct (SemWeb.SelectableSource, SemWeb.StatementSink)
Executes a CONSTRUCT query on the given data source and sends the constructed statements to a StatementSink.
Construct (SemWeb.SelectableSource, System.IO.TextWriter)
Executes a CONSTRUCT query on the given data source and outputs the result of the query in the SPARQL results format to a TextWriter.
Describe (SemWeb.SelectableSource, SemWeb.StatementSink)
Executes a DESCRIBE query on the given data source and sends the constructed statements to a StatementSink.
Describe (SemWeb.SelectableSource, System.IO.TextWriter)
Executes a DESCRIBE query on the given data source and outputs the result of the query in the SPARQL results format to a TextWriter.
abstract GetExplanation () : string
Returns a textual explanation of the query. (Inherited from Query.)
GetQueryPrefixes () : SemWeb.NamespaceManager
Gets a NamespaceManager containing all of the PREFIX definitions used in the query.
abstract Run (SemWeb.SelectableSource, QueryResultSink)
Runs the query on a data source, outputting to a QueryResultSink. (Inherited from Query.)
Run (SemWeb.SelectableSource, System.IO.TextWriter)
Runs the query on a data source, outputting to a TextWriter. (Inherited from Query.)
Select (SemWeb.SelectableSource, System.IO.TextWriter)
Executes a SELECT query on the given data source and outputs the result of the query in the SPARQL results format to a TextWriter.
Select (SemWeb.SelectableSource, QueryResultSink)
Executes a SELECT query on the given data source and sends the resulting variable bindings to a QueryResultSink.

Member Details

SparqlEngine Constructor

public SparqlEngine (string query)

Initializes the SPARQL query from a string.

Parameters

query
The SPARQL query.

Remarks

None.

SparqlEngine Constructor

public SparqlEngine (System.IO.TextReader query)

Initialized the SPARQL query from a TextReader.

Parameters

query
A TextReader containing the SPARQL query.

Remarks

None.

Ask Method

public bool Ask (SemWeb.SelectableSource source)

Executes an ASK query on the given data source and returns the result of the query as a boolean.

Parameters

source
The data source to query.

Returns

A boolean value giving the result of the ASK query.

Remarks

None.

Ask Method

Executes an ASK query on the given data source and outputs the result of the query in the SPARQL results format to a TextWriter.

Parameters

source
The data source to query.
output
The System.IO.TextWriter to output the results to in the SPARQL Results XML output format.

Remarks


Construct Method

public void Construct (SemWeb.SelectableSource source, SemWeb.StatementSink sink)

Executes a CONSTRUCT query on the given data source and sends the constructed statements to a StatementSink.

Parameters

source
The data source to query.
sink
The SemWeb.StatementSink to send the constructed statements to.

Remarks

None.

Construct Method

public void Construct (SemWeb.SelectableSource source, System.IO.TextWriter output)

Executes a CONSTRUCT query on the given data source and outputs the result of the query in the SPARQL results format to a TextWriter.

Parameters

source
The data source to query.
output
The System.IO.TextWriter to output the results to in the SPARQL Results XML output format.

Remarks


Describe Method

public void Describe (SemWeb.SelectableSource source, SemWeb.StatementSink sink)

Executes a DESCRIBE query on the given data source and sends the constructed statements to a StatementSink.

Parameters

source
The data source to query.
sink
The SemWeb.StatementSink to send the constructed statements to.

Remarks

None.

Describe Method

public void Describe (SemWeb.SelectableSource source, System.IO.TextWriter output)

Executes a DESCRIBE query on the given data source and outputs the result of the query in the SPARQL results format to a TextWriter.

Parameters

source
The data source to query.
output
The System.IO.TextWriter to output the results to in the SPARQL Results XML output format.

Remarks


Select Method

public void Select (SemWeb.SelectableSource source, System.IO.TextWriter output)

Executes a SELECT query on the given data source and outputs the result of the query in the SPARQL results format to a TextWriter.

Parameters

source
The data source to query.
output
The System.IO.TextWriter to output the results to in the SPARQL Results XML output format.

Remarks


Select Method

public void Select (SemWeb.SelectableSource source, QueryResultSink sink)

Executes a SELECT query on the given data source and sends the resulting variable bindings to a QueryResultSink.

Parameters

source
The data source to query.
sink
The SemWeb.Query.QueryResultSink to send the resulting variable bindings to.

Remarks

None.

Type Property

public SparqlEngine.QueryType Type { get; }

Gets the type of the query.

Value

The type of the query: SELECT, DESCRIBE, CONSTRUCT, or ASK.

Remarks

None.

AllowPersistBNodes Field

public bool AllowPersistBNodes

To be added.

Remarks

To be added.

AddExternalFunction Method

public void AddExternalFunction (RdfFunction function)

Registers an external function that can be used in FILTER clauses.

Parameters

function
An object implementing an external function.

Remarks

None.

GetQueryPrefixes Method

public SemWeb.NamespaceManager GetQueryPrefixes ()

Gets a NamespaceManager containing all of the PREFIX definitions used in the query.

Returns

A NamespaceManager.

Remarks

None.


semweb-1.05+dfsg/apidocs/SemWeb.Query/DateTimeCompareFilter.html0000644000175000017500000001611210774502134024111 0ustar meebeymeebey SemWeb.Query.DateTimeCompareFilter
DateTimeCompareFilter

To be added.

DateTimeCompareFilter : DateTimeFilter


Remarks
To be added.
Members

See Also: Inherited members from DateTimeFilter.

Constructors
Member Details
DateTimeCompareFilter Constructor
public DateTimeCompareFilter (SemWeb.Literal res, int compareResult, bool orEqual)

To be added.

Parameters
res
To be added.
compareResult
To be added.
orEqual
To be added.
Remarks
To be added.

DateTimeCompareFilter Constructor
public DateTimeCompareFilter (DateTime datetime, int compareResult, bool orEqual)

To be added.

Parameters
datetime
To be added.
compareResult
To be added.
orEqual
To be added.
Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Query/StringFilter.html0000644000175000017500000001620210774502134022354 0ustar meebeymeebey SemWeb.Query.StringFilter

To be added.

StringFilter : LiteralValueFilter


Remarks
To be added.
Members

See Also: Inherited members from LiteralValueFilter.

Constructors
To be added.
To be added.
Protected Fields
pattern
readonly
string . To be added.
Member Details
StringFilter Constructor
public StringFilter (SemWeb.Literal res)

To be added.

Parameters
res
To be added.
Remarks
To be added.

StringFilter Constructor
public StringFilter (string pattern)

To be added.

Parameters
pattern
To be added.
Remarks
To be added.

pattern
protected readonly string pattern

To be added.

Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Query/ValueFilter.html0000644000175000017500000001744010774502134022167 0ustar meebeymeebey SemWeb.Query.ValueFilter

To be added.

public abstract class ValueFilter


Remarks
To be added.
Members

See Also: Inherited members from object.

Protected Constructors
To be added.
Methods
Member Details
ValueFilter Constructor
protected ValueFilter ()

To be added.

Remarks
To be added.

GetValueFilter
public static ValueFilter GetValueFilter (SemWeb.Entity predicate, SemWeb.Resource obj)

To be added.

Parameters
predicate
To be added.
obj
To be added.
Returns
To be added.
Remarks
To be added.

Filter
public abstract bool Filter (SemWeb.Resource resource, SemWeb.SelectableSource targetModel)

To be added.

Parameters
resource
To be added.
targetModel
To be added.
Returns
To be added.
Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Query/NumericCompareFilter.html0000644000175000017500000001606110774502134024022 0ustar meebeymeebey SemWeb.Query.NumericCompareFilter
NumericCompareFilter

To be added.

NumericCompareFilter : NumericFilter


Remarks
To be added.
Members

See Also: Inherited members from NumericFilter.

Constructors
Member Details
NumericCompareFilter Constructor
public NumericCompareFilter (SemWeb.Literal res, int compareResult, bool orEqual)

To be added.

Parameters
res
To be added.
compareResult
To be added.
orEqual
To be added.
Remarks
To be added.

NumericCompareFilter Constructor
public NumericCompareFilter (decimal number, int compareResult, bool orEqual)

To be added.

Parameters
number
To be added.
compareResult
To be added.
orEqual
To be added.
Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Query/QueryResultBufferSink.html0000644000175000017500000001307310774502134024226 0ustar meebeymeebey SemWeb.Query.QueryResultBufferSink
QueryResultBufferSink

To be added.

public class QueryResultBufferSink : QueryResultSink


Remarks
To be added.
Members

See Also: Inherited members from QueryResultSink.

Constructors
To be added.
Fields
Bindings
ArrayList . To be added.
Member Details
QueryResultBufferSink Constructor
public QueryResultBufferSink ()

To be added.

Remarks
To be added.

Bindings
public ArrayList Bindings

To be added.

Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Query/QueryOptions.html0000644000175000017500000003042010774502134022417 0ustar meebeymeebey SemWeb.Query.QueryOptions
QueryOptions Struct

A structure specifying options for carrying out a query.

public struct QueryOptions


Member Details

Limit Field

public int Limit

To be added.

Remarks

To be added.

DistinguishedVariables Field

To be added.

Remarks

To be added.

VariableKnownValues Field

To be added.

Remarks

To be added.

VariableLiteralFilters Field

To be added.

Remarks

To be added.

AddLiteralFilter Method

public void AddLiteralFilter (SemWeb.Variable variable, SemWeb.LiteralFilter filter)

To be added.

Parameters

variable
To be added.
filter
To be added.

Remarks

To be added.

SetVariableKnownValues Method

public void SetVariableKnownValues (SemWeb.Variable variable, System.Collections.Generic.ICollection<SemWeb.Resource> knownValues)

To be added.

Parameters

variable
To be added.
knownValues
To be added.

Remarks

To be added.

AddDistinguishedVariable Method

public void AddDistinguishedVariable (SemWeb.Variable variable)

To be added.

Parameters

variable
To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Query/SparqlParser+SparqlQuestion.html0000644000175000017500000000660110774502134025347 0ustar meebeymeebey SemWeb.Query.SparqlParser+SparqlQuestion
SparqlParser+SparqlQuestion

To be added.

public enum SparqlParser+SparqlQuestion


Remarks
To be added.
Members
Member name Description
Select To be added.
Construct To be added.
Describe To be added.
Ask To be added.

semweb-1.05+dfsg/apidocs/SemWeb.Query/RSquary.html0000644000175000017500000002571510774502134021357 0ustar meebeymeebey SemWeb.Query.RSquary

To be added.

public class RSquary : GraphMatch


Remarks
To be added.
Members

See Also: Inherited members from GraphMatch.

Constructors
Properties
ReturnLimit
int . To be added.
ReturnStart
int . To be added.
Member Details
ReturnStart
public int ReturnStart { set; get; }

To be added.

Value
To be added.
Remarks
To be added.

ReturnLimit
public int ReturnLimit { set; get; }

To be added.

Value
To be added.
Remarks
To be added.

RSquary Constructor
public RSquary (SemWeb.RdfReader query)

To be added.

Parameters
query
To be added.
Remarks
To be added.

RSquary Constructor
public RSquary (SemWeb.Store queryModel, SemWeb.Entity queryNode)

To be added.

Parameters
queryModel
To be added.
queryNode
To be added.
Remarks
To be added.

RSquary Constructor
public RSquary (SemWeb.Store queryModel, SemWeb.Entity queryNode, IDictionary variableNames, IDictionary extraValueFilters)

To be added.

Parameters
queryModel
To be added.
queryNode
To be added.
variableNames
To be added.
extraValueFilters
To be added.
Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Query/SparqlEngine+QueryType.html0000644000175000017500000000671410774502134024302 0ustar meebeymeebey SemWeb.Query.SparqlEngine.QueryType
SparqlEngine.QueryType Enum

The types of a SPARQL query.

public enum SparqlEngine.QueryType


Remarks

There are four types of SPARQL queries, each returning a different type of answer.
Members
Member name Description
Select Represents a SELECT query.
Describe Represents a DESCRIBE query.
Ask Represents an ASK query.
Construct Represents a CONSTRUCT query.

semweb-1.05+dfsg/apidocs/SemWeb.Query/ValueFilterFactory.html0000644000175000017500000001411110774502134023507 0ustar meebeymeebey SemWeb.Query.ValueFilterFactory
ValueFilterFactory

To be added.

public abstract class ValueFilterFactory


Remarks
To be added.
Members

See Also: Inherited members from object.

Protected Constructors
To be added.
Methods
abstract GetValueFilter (string, SemWeb.Resource) : ValueFilter
To be added.
Member Details
ValueFilterFactory Constructor
protected ValueFilterFactory ()

To be added.

Remarks
To be added.

GetValueFilter
public abstract ValueFilter GetValueFilter (string predicate, SemWeb.Resource obj)

To be added.

Parameters
predicate
To be added.
obj
To be added.
Returns
To be added.
Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Query/StringContainsFilter.html0000644000175000017500000001350710774502134024060 0ustar meebeymeebey SemWeb.Query.StringContainsFilter
StringContainsFilter

To be added.

StringContainsFilter : StringFilter


Remarks
To be added.
Members

See Also: Inherited members from StringFilter.

Constructors
Member Details
StringContainsFilter Constructor
public StringContainsFilter (SemWeb.Literal res)

To be added.

Parameters
res
To be added.
Remarks
To be added.

StringContainsFilter Constructor
public StringContainsFilter (string pattern)

To be added.

Parameters
pattern
To be added.
Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Query/Sparql.html0000644000175000017500000007350410774502134021212 0ustar meebeymeebey SemWeb.Query.Sparql

A SPARQL query engine.

public class Sparql : Query


Remarks

This class is based on the engine at http://sparql.sourceforge.net/ by Ryan Levering, version 0.8.

This example runs a SELECT query on a data source and writes the results as XML to standard output.

C# Example
MemoryStore datamodel = new MemoryStore(new RdfXmlReader("rdfdata.rdf"));

string sparqlQuery = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n"
                           + "PREFIX foaf: <http://xmlns.com/foaf/0.1/>\n"
                           + "SELECT * WHERE { ?person rdf:type foaf:Agent . \n"
                           + "?person foaf:name ?name . }";

Sparql query = new Sparql(sparqlQuery);
query.Run(datamodel, Console.Out).  

Although this example sends the results to a stream, the results can be processed programmatically by passing a SemWeb.Query.QueryResultSink instead of a TextWriter.

Members

See Also: Inherited members from Query.

Constructors

Initialized the SPARQL query from a TextReader.
Initializes the SPARQL query from a string.

Fields

AllowPersistBNodes
bool . To be added.

Properties

QueryMeta
SemWeb.Entity . A filter on the Meta value of statements in the target graph considered by the query. (Inherited from Query.)
ReturnLimit
int . The number of bindings to return. (Inherited from Query.)
ReturnStart
int . The index of the first binding to return. (Inherited from Query.)
Type [read-only]
Sparql.QueryType . Gets the type of the query.

Methods

AddExternalFunction (RdfFunction)
Registers an external function that can be used in FILTER clauses.
Ask (SemWeb.SelectableSource) : bool
Executes an ASK query on the given data source and returns the result of the query as a boolean.
Ask (SemWeb.SelectableSource, System.IO.TextWriter)
Executes an ASK query on the given data source and outputs the result of the query in the SPARQL results format to a TextWriter.
Construct (SemWeb.SelectableSource, SemWeb.StatementSink)
Executes a CONSTRUCT query on the given data source and sends the constructed statements to a StatementSink.
Construct (SemWeb.SelectableSource, System.IO.TextWriter)
Executes a CONSTRUCT query on the given data source and outputs the result of the query in the SPARQL results format to a TextWriter.
Describe (SemWeb.SelectableSource, SemWeb.StatementSink)
Executes a DESCRIBE query on the given data source and sends the constructed statements to a StatementSink.
Describe (SemWeb.SelectableSource, System.IO.TextWriter)
Executes a DESCRIBE query on the given data source and outputs the result of the query in the SPARQL results format to a TextWriter.
abstract GetExplanation () : string
Returns a textual explanation of the query. (Inherited from Query.)
GetQueryPrefixes () : SemWeb.NamespaceManager
Gets a NamespaceManager containing all of the PREFIX definitions used in the query.
abstract Run (SemWeb.SelectableSource, QueryResultSink)
Runs the query on a data source, outputting to a QueryResultSink. (Inherited from Query.)
Run (SemWeb.SelectableSource, System.IO.TextWriter)
Runs the query on a data source, outputting to a TextWriter. (Inherited from Query.)
Select (SemWeb.SelectableSource, System.IO.TextWriter)
Executes a SELECT query on the given data source and outputs the result of the query in the SPARQL results format to a TextWriter.
Select (SemWeb.SelectableSource, QueryResultSink)
Executes a SELECT query on the given data source and sends the resulting variable bindings to a QueryResultSink.

Member Details

Sparql Constructor

public Sparql (string query)

Initializes the SPARQL query from a string.

Parameters

query
The SPARQL query.

Remarks

None.

Sparql Constructor

public Sparql (System.IO.TextReader query)

Initialized the SPARQL query from a TextReader.

Parameters

query
A TextReader containing the SPARQL query.

Remarks

None.

Ask Method

public bool Ask (SemWeb.SelectableSource source)

Executes an ASK query on the given data source and returns the result of the query as a boolean.

Parameters

source
The data source to query.

Returns

A boolean value giving the result of the ASK query.

Remarks

None.

Ask Method

Executes an ASK query on the given data source and outputs the result of the query in the SPARQL results format to a TextWriter.

Parameters

source
The data source to query.
output
The System.IO.TextWriter to output the results to in the SPARQL Results XML output format.

Remarks


Construct Method

public void Construct (SemWeb.SelectableSource source, SemWeb.StatementSink sink)

Executes a CONSTRUCT query on the given data source and sends the constructed statements to a StatementSink.

Parameters

source
The data source to query.
sink
The SemWeb.StatementSink to send the constructed statements to.

Remarks

None.

Construct Method

public void Construct (SemWeb.SelectableSource source, System.IO.TextWriter output)

Executes a CONSTRUCT query on the given data source and outputs the result of the query in the SPARQL results format to a TextWriter.

Parameters

source
The data source to query.
output
The System.IO.TextWriter to output the results to in the SPARQL Results XML output format.

Remarks


Describe Method

public void Describe (SemWeb.SelectableSource source, SemWeb.StatementSink sink)

Executes a DESCRIBE query on the given data source and sends the constructed statements to a StatementSink.

Parameters

source
The data source to query.
sink
The SemWeb.StatementSink to send the constructed statements to.

Remarks

None.

Describe Method

public void Describe (SemWeb.SelectableSource source, System.IO.TextWriter output)

Executes a DESCRIBE query on the given data source and outputs the result of the query in the SPARQL results format to a TextWriter.

Parameters

source
The data source to query.
output
The System.IO.TextWriter to output the results to in the SPARQL Results XML output format.

Remarks


Select Method

public void Select (SemWeb.SelectableSource source, System.IO.TextWriter output)

Executes a SELECT query on the given data source and outputs the result of the query in the SPARQL results format to a TextWriter.

Parameters

source
The data source to query.
output
The System.IO.TextWriter to output the results to in the SPARQL Results XML output format.

Remarks


Select Method

public void Select (SemWeb.SelectableSource source, QueryResultSink sink)

Executes a SELECT query on the given data source and sends the resulting variable bindings to a QueryResultSink.

Parameters

source
The data source to query.
sink
The SemWeb.Query.QueryResultSink to send the resulting variable bindings to.

Remarks

None.

Type Property

public Sparql.QueryType Type { get; }

Gets the type of the query.

Value

The type of the query: SELECT, DESCRIBE, CONSTRUCT, or ASK.

Remarks

None.

AllowPersistBNodes Field

public bool AllowPersistBNodes

To be added.

Remarks

To be added.

AddExternalFunction Method

public void AddExternalFunction (RdfFunction function)

Registers an external function that can be used in FILTER clauses.

Parameters

function
An object implementing an external function.

Remarks

None.

GetQueryPrefixes Method

public SemWeb.NamespaceManager GetQueryPrefixes ()

Gets a NamespaceManager containing all of the PREFIX definitions used in the query.

Returns

A NamespaceManager.

Remarks

None.


semweb-1.05+dfsg/apidocs/SemWeb.Query/QueryResultSink.html0000644000175000017500000002227210774502134023075 0ustar meebeymeebey SemWeb.Query.QueryResultSink
QueryResultSink Class

A class that receives the results of a query.

public abstract class QueryResultSink


Remarks

This is an abstract base class. SemWeb.Query.SparqlXmlQuerySink is an implementation that writes out the results of a query in SPARQL XML Results Format.

Members

See Also: Inherited members from object.

Protected Constructors

The protected no-arg constructor used by inherited classes.

Methods

abstract Add (VariableBindings) : bool
Called to add a new result row.
AddComments (string)
Adds comments about how the query has been processed.
Finished ()
This method is called by a Query object after the last variable binding is added.
Init (SemWeb.Variable[])
Called by the Query to initialize the result sink.

Member Details

QueryResultSink Constructor

protected QueryResultSink ()

The protected no-arg constructor used by inherited classes.

Remarks

None.

Finished Method

public virtual void Finished ()

This method is called by a Query object after the last variable binding is added.

Remarks

None.

AddComments Method

public virtual void AddComments (string comments)

Adds comments about how the query has been processed.

Parameters

comments
Arbitrary comments.

Remarks

This method may be called at any time, before, during, and after all bindings have been written.

Add Method

public abstract bool Add (VariableBindings result)

Called to add a new result row.

Parameters

result
The variable bindings to values in this row.

Returns

Return true to have the caller continue streaming results, otherwise the caller will abort the query.

Remarks

None.

Init Method

public virtual void Init (SemWeb.Variable[] variables)

Called by the Query to initialize the result sink.

Parameters

variables
An array of variables whose bindings will be reported. The order of the variables here will match that in the bindings provided in Add.

Remarks

None.


semweb-1.05+dfsg/apidocs/SemWeb.Query/MetaQueryResult.html0000644000175000017500000001373310774502134023061 0ustar meebeymeebey SemWeb.Query.MetaQueryResult
MetaQueryResult Struct

This structure is used by SemWeb.QueryableSource.MetaQuery(SemWeb.Statement[],SemWeb.Query.QueryOptions) when asking for the querying capabilities of a data source.

public struct MetaQueryResult


Remarks

See the fields of this structure for more information.

Members

See Also: Inherited members from ValueType.

Fields

IsDefinitive
bool[]. To be added.
NoData
bool[]. To be added.
QuerySupported
bool . To be added.

Member Details

IsDefinitive Field

public bool[] IsDefinitive

To be added.

Remarks

To be added.

NoData Field

public bool[] NoData

To be added.

Remarks

To be added.

QuerySupported Field

public bool QuerySupported

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Query/SQLQuerySink.html0000644000175000017500000001151610774502134022255 0ustar meebeymeebey SemWeb.Query.SQLQuerySink

To be added.

public class SQLQuerySink : QueryResultSink


Remarks
To be added.
Members

See Also: Inherited members from QueryResultSink.

Constructors
Member Details
SQLQuerySink Constructor
public SQLQuerySink (System.IO.TextWriter output, string table)

To be added.

Parameters
output
To be added.
table
To be added.
Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Query/GraphMatch.html0000644000175000017500000004524210774502134021764 0ustar meebeymeebey SemWeb.Query.GraphMatch
GraphMatch Class

The GraphMatch class implements an algorithm for determining all of the ways the variables in one graph can be bound to resources in another graph.

public class GraphMatch : Query


Remarks

None.

Members

See Also: Inherited members from Query.

Constructors

Creates an empty GraphMatch object.
Creates a query based on an RDF file.
Creates a query based on a graph in queryModel.

Properties

MimeType
string . Gets or sets the preferred MIME type for the output of the query. (Inherited from Query.)
QueryMeta
SemWeb.Entity . A filter on the Meta value of statements in the target graph considered by the query. (Inherited from Query.)
ReturnLimit
int . The number of bindings to return. (Inherited from Query.)
ReturnStart
int . The index of the first binding to return. (Inherited from Query.)

Methods

AddGraphStatement (SemWeb.Statement)
Adds a statement to the graph pattern (the query).
AddLiteralFilter (SemWeb.Variable, SemWeb.LiteralFilter)
Adds a filter to be applied to literal values that match against a given variable.
abstract GetExplanation () : string
Returns a textual explanation of the query. (Inherited from Query.)
abstract Run (SemWeb.SelectableSource, QueryResultSink)
Runs the query on a data source, outputting to a QueryResultSink. (Inherited from Query.)
Run (SemWeb.SelectableSource, System.IO.TextWriter)
Runs the query on a data source, outputting to a TextWriter. (Inherited from Query.)
SetDistinguishedVariable (SemWeb.Variable)
Marks a variable as distinguished.
SetVariableRange (SemWeb.Variable, System.Collections.Generic.ICollection<SemWeb.Resource>)
Sets the range of values that the variable's bindings must be drawn from.

Member Details

GraphMatch Constructor

public GraphMatch ()

Creates an empty GraphMatch object.

Remarks

Set up the GraphMatch with calls to SemWeb.Query.GraphMatch.AddEdge(SemWeb.Statement).

GraphMatch Constructor

public GraphMatch (SemWeb.RdfReader query)

Creates a query based on an RDF file.

Parameters

query
An RDF reader (normally a SemWeb.N3Reader) containing the query.

Remarks

The contents of the RDF stream are read. Statements in the stream are passed to SemWeb.Query.GraphMatch.AddEdge(SemWeb.Statement).

All of the anonymous nodes in the stream are considered variables, but only the N3 format allows anonymous nodes to be named variables. Thus the N3 format is recommended. Although variable names are not required by the GraphMatch class, they may be needed by whatever processes the query results.

The following is an example query:

Example
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
?person rdf:type foaf:Agent .
?person foaf:name ?name .

To run this query:

C# Example
Store queryGraph = new MemoryStore(new N3Reader(new StringReader(stringAbove)));
new GraphMatch(queryGraph).Run(targetData, Console.Out);  

GraphMatch Constructor

public GraphMatch (SemWeb.StatementSource queryModel)

Creates a query based on a graph in queryModel.

Parameters

queryModel
A graph that represents the query.

Remarks

None.

AddGraphStatement Method

public void AddGraphStatement (SemWeb.Statement statement)

Adds a statement to the graph pattern (the query).

Parameters

statement
A statement.

Remarks

Keep in mind that distinct instances of the SemWeb.Variable class are treated as separate variables, even if they have the same name.

AddLiteralFilter Method

public void AddLiteralFilter (SemWeb.Variable variable, SemWeb.LiteralFilter filter)

Adds a filter to be applied to literal values that match against a given variable.

Parameters

variable
The variable to apply the filter to.
filter
A filter.

Remarks

None.

SetVariableRange Method

Sets the range of values that the variable's bindings must be drawn from.

Parameters

variable
A variable in the query.
range
A collection of Resources.

Remarks

All bindings for this variable will be in the provided set of resources.

SetDistinguishedVariable Method

public void SetDistinguishedVariable (SemWeb.Variable variable)

Marks a variable as distinguished.

Parameters

variable
A variable in the query.

Remarks

If this method is never called, all variables in the query are returned in the variable bindings. However, once this method is called, only variables distinguished by this method will be included the resulting bindings. This is useful to avoid getting distinct answers on variables that the user does not care about.


semweb-1.05+dfsg/apidocs/SemWeb.Query/QueryEngine.html0000644000175000017500000003767210774502134022211 0ustar meebeymeebey SemWeb.Query.QueryEngine

To be added.

public class QueryEngine


Remarks
To be added.
Members

See Also: Inherited members from object.

Constructors
To be added.
Properties
ReturnLimit
int . To be added.
ReturnStart
int . To be added.
Methods
Member Details
QueryEngine Constructor
public QueryEngine ()

To be added.

Remarks
To be added.

Select
public void Select (SemWeb.Entity entity)

To be added.

Parameters
entity
To be added.
Remarks
To be added.

MakeDistinct
public void MakeDistinct (SemWeb.Entity a, SemWeb.Entity b)

To be added.

Parameters
a
To be added.
b
To be added.
Remarks
To be added.

AddValueFilter
public void AddValueFilter (SemWeb.Entity entity, ValueFilter filter)

To be added.

Parameters
entity
To be added.
filter
To be added.
Remarks
To be added.

Query
public void Query (SemWeb.Store targetModel, QueryResultSink result)

To be added.

Parameters
targetModel
To be added.
result
To be added.
Remarks
To be added.

ReturnStart
public int ReturnStart { set; get; }

To be added.

Value
To be added.
Remarks
To be added.

ReturnLimit
public int ReturnLimit { set; get; }

To be added.

Value
To be added.
Remarks
To be added.

AddFilter
public void AddFilter (SemWeb.Statement filter)

To be added.

Parameters
filter
To be added.
Remarks
To be added.

AddOptionalFilter
public void AddOptionalFilter (SemWeb.Statement filter)

To be added.

Parameters
filter
To be added.
Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Query/SparqlXmlQuerySink.html0000644000175000017500000002211110774502134023532 0ustar meebeymeebey SemWeb.Query.SparqlXmlQuerySink
SparqlXmlQuerySink Class

A QueryResultSink outputting results in the SPARQL output XML format.

public class SparqlXmlQuerySink : QueryResultSink


Remarks

Although the format was designed for SPARQL queries, it can be used with any Query class.

Members

See Also: Inherited members from QueryResultSink.

Constructors

Creates the sink to write the results to a TextWriter.
Creates the sink to write the results to an XmlWriter.

Fields

MimeType
const
string . Gets the MIME type for the SPARQL XML Results format.

Methods

abstract Add (VariableBindings) : bool
Called to add a new result row. (Inherited from QueryResultSink.)
AddComments (string)
Adds comments about how the query has been processed. (Inherited from QueryResultSink.)
Finished ()
This method is called by a Query object after the last variable binding is added. (Inherited from QueryResultSink.)
Init (SemWeb.Variable[])
Called by the Query to initialize the result sink. (Inherited from QueryResultSink.)

Member Details

SparqlXmlQuerySink Constructor

public SparqlXmlQuerySink (System.IO.TextWriter output)

Creates the sink to write the results to a TextWriter.

Parameters

output
The TextWriter to write results to.

Remarks

None.

SparqlXmlQuerySink Constructor

public SparqlXmlQuerySink (System.Xml.XmlWriter output)

Creates the sink to write the results to an XmlWriter.

Parameters

output
The XmlWriter to write results to.

Remarks

None.

MimeType Field

public const string MimeType

Gets the MIME type for the SPARQL XML Results format.

Remarks

Returns "application/sparql-results+xml".


semweb-1.05+dfsg/apidocs/SemWeb.Query/DateTimeFilter.html0000644000175000017500000001626510774502134022613 0ustar meebeymeebey SemWeb.Query.DateTimeFilter
DateTimeFilter

To be added.

DateTimeFilter : LiteralValueFilter


Remarks
To be added.
Members

See Also: Inherited members from LiteralValueFilter.

Constructors
Protected Fields
datetime
readonly
DateTime . To be added.
Member Details
DateTimeFilter Constructor
public DateTimeFilter (SemWeb.Literal res)

To be added.

Parameters
res
To be added.
Remarks
To be added.

DateTimeFilter Constructor
public DateTimeFilter (DateTime datetime)

To be added.

Parameters
datetime
To be added.
Remarks
To be added.

datetime
protected readonly DateTime datetime

To be added.

Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Query/TimeSpanCompareFilter.html0000644000175000017500000001611210774502134024135 0ustar meebeymeebey SemWeb.Query.TimeSpanCompareFilter
TimeSpanCompareFilter

To be added.

TimeSpanCompareFilter : TimeSpanFilter


Remarks
To be added.
Members

See Also: Inherited members from TimeSpanFilter.

Constructors
Member Details
TimeSpanCompareFilter Constructor
public TimeSpanCompareFilter (SemWeb.Literal res, int compareResult, bool orEqual)

To be added.

Parameters
res
To be added.
compareResult
To be added.
orEqual
To be added.
Remarks
To be added.

TimeSpanCompareFilter Constructor
public TimeSpanCompareFilter (TimeSpan timespan, int compareResult, bool orEqual)

To be added.

Parameters
timespan
To be added.
compareResult
To be added.
orEqual
To be added.
Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Query/VariableBinding.html0000644000175000017500000002432410774502134022764 0ustar meebeymeebey SemWeb.Query.VariableBinding
VariableBinding Struct

A binding between a query variable and a resource in the target data model.

public struct VariableBinding


Remarks

None.

Members

See Also: Inherited members from ValueType.

Constructors

Constructs a new VariableBinding struct.

Properties

Name [read-only]
string . The name of the variable as used in the query, or null if it had no name.
Target
SemWeb.Resource . The resource in the target data model that the variable is bound to, or null.
Variable
SemWeb.Variable . The variable.

Methods

static Substitute (VariableBinding[], SemWeb.Statement) : SemWeb.Statement
Replaces the variables in the statement with their bound values.

Member Details

Variable Property

public SemWeb.Variable Variable { set; get; }

The variable.

Value

An anonymous entity.

Remarks

None.

Target Property

public SemWeb.Resource Target { set; get; }

The resource in the target data model that the variable is bound to, or null.

Value

The resource in the target data model that the variable is bound to, or null if the variable is not bound in this result.

Remarks

A variable may be unbound only if it was used exclusively in optional statements.

Substitute Method

public static SemWeb.Statement Substitute (VariableBinding[] variables, SemWeb.Statement template)

Replaces the variables in the statement with their bound values.

Parameters

variables
An array of variable bindings.
template
The statement containing variables to replace.

Returns

The statement with variables replaced by target values.

Remarks

Variables may be unbound, in which case their values are null. The returned statement may therefore have a null subject, predicate, object, or meta.

Name Property

public string Name { get; }

The name of the variable as used in the query, or null if it had no name.

Value

The name of the variable as used in the query, or null if it had no name.

Remarks

None.

VariableBinding Constructor

public VariableBinding (SemWeb.Variable variable, SemWeb.Resource target)

Constructs a new VariableBinding struct.

Parameters

variable
The variable in the query represented by this binding.
target
The bound value of the variable, or null if the variable is unbound in this result.

Remarks

None.


semweb-1.05+dfsg/apidocs/SemWeb.Query/NumericFilter.html0000644000175000017500000001622410774502134022514 0ustar meebeymeebey SemWeb.Query.NumericFilter
NumericFilter

To be added.

NumericFilter : LiteralValueFilter


Remarks
To be added.
Members

See Also: Inherited members from LiteralValueFilter.

Constructors
To be added.
To be added.
Protected Fields
number
readonly
decimal . To be added.
Member Details
NumericFilter Constructor
public NumericFilter (SemWeb.Literal res)

To be added.

Parameters
res
To be added.
Remarks
To be added.

NumericFilter Constructor
public NumericFilter (decimal number)

To be added.

Parameters
number
To be added.
Remarks
To be added.

number
protected readonly decimal number

To be added.

Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Query/VariableBindings.html0000644000175000017500000003320410774502134023144 0ustar meebeymeebey SemWeb.Query.VariableBindings
VariableBindings Class

Represents a row of results from a query.

[System.Reflection.DefaultMember("Item")]
public class VariableBindings


Remarks

This class maps variables to their target values in a single row of query results.

Members

See Also: Inherited members from object.

Constructors

Constructs a VariableBindings instance.

Properties

Count [read-only]
int . The number of variables represented by this row.
Item [SemWeb.Variable] [read-only]
default property
SemWeb.Resource . Gets the resource bound by a variable.
Item [string] [read-only]
default property
SemWeb.Resource . Gets the resource bound by a variable of the given name.
Values [read-only]
System.Collections.Generic.IList<SemWeb.Resource> . The values bound by the variables in this row.
Variables [read-only]
System.Collections.Generic.IList<SemWeb.Variable> . The variables bound in this row.

Methods

Substitute (SemWeb.Statement) : SemWeb.Statement
Performs a substitution on a statement.

Member Details

VariableBindings Constructor

public VariableBindings (SemWeb.Variable[] vars, SemWeb.Resource[] vals)

Constructs a VariableBindings instance.

Parameters

vars
The variables.
vals
Their corresponding values (in the same order). Values may be null to indicate an unbound variable.

Remarks

None.

Count Property

public int Count { get; }

The number of variables represented by this row.

Value

The number of variables in the row.

Remarks

None.

Item Property

public SemWeb.Resource this [SemWeb.Variable variable] { get; }

This is the default property for this class.

Gets the resource bound by a variable.

Parameters

variable
A variable mentioned in this row.

Value

The value of the variable, or null if the variable is unbound in this row.

Remarks

None.

Substitute Method

public SemWeb.Statement Substitute (SemWeb.Statement template)

Performs a substitution on a statement.

Parameters

template
A statement template (a statement with possibly null fields).

Returns

A new statement will all occurrences of variables in this row of bindings replaced by their values.

Remarks

If a variable in the Subject, Predicate, or Meta fields is bound by a Literal value, a InvalidCastException is thrown.

Values Property

The values bound by the variables in this row.

Value

The values of the variables, in the same order as the variables are in the Variables property.

Remarks

A value may be null to indicate an unbound variable.

Variables Property

The variables bound in this row.

Value

The variables bound in this row.

Remarks

None.

Item Property

public SemWeb.Resource this [string variableName] { get; }

This is the default property for this class.

Gets the resource bound by a variable of the given name.

Parameters

variableName
The name of a variable in the binding set.

Value

The resource that is bound by the variable in this row of results, or null if the variable is not bound.

Remarks

If more than one variable (distinct Variable instance) has the same name in this row, the result of this function is unspecified. Use the other overload of this method instead.


semweb-1.05+dfsg/apidocs/SemWeb.Query/TimeSpanFilter.html0000644000175000017500000001626510774502134022637 0ustar meebeymeebey SemWeb.Query.TimeSpanFilter
TimeSpanFilter

To be added.

TimeSpanFilter : LiteralValueFilter


Remarks
To be added.
Members

See Also: Inherited members from LiteralValueFilter.

Constructors
Protected Fields
timespan
readonly
TimeSpan . To be added.
Member Details
TimeSpanFilter Constructor
public TimeSpanFilter (SemWeb.Literal res)

To be added.

Parameters
res
To be added.
Remarks
To be added.

TimeSpanFilter Constructor
public TimeSpanFilter (TimeSpan timespan)

To be added.

Parameters
timespan
To be added.
Remarks
To be added.

timespan
protected readonly TimeSpan timespan

To be added.

Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Query/Query.html0000644000175000017500000003672010774502134021054 0ustar meebeymeebey SemWeb.Query.Query

A Query is something that returns all of the ways a set of variables may bind to a graph. This is the abstract base class of several query methods.

public abstract class Query


Remarks

The SemWeb.Query.GraphMatch class provides a query algorithm to match a graph with variables against another graph.

The SemWeb.Query.Sparql class provides a SPARQL query engine.

Members

See Also: Inherited members from object.

Protected Constructors

Query ()
The protected no-arg constructor used by subclasses.

Properties

MimeType
string . Gets or sets the preferred MIME type for the output of the query.
QueryMeta
Entity . A filter on the Meta value of statements in the target graph considered by the query.
ReturnLimit
int . The number of bindings to return.
ReturnStart
int . The index of the first binding to return.

Methods

abstract GetExplanation () : string
Returns a textual explanation of the query.
abstract Run (SelectableSource, SemWeb.Query.QueryResultSink)
Runs the query on a data source, outputting to a QueryResultSink.
Run (SelectableSource, System.IO.TextWriter)
Runs the query on a data source, outputting to a TextWriter.

Member Details

Query Constructor

protected Query ()

The protected no-arg constructor used by subclasses.

Remarks

None.

GetExplanation Method

public abstract string GetExplanation ()

Returns a textual explanation of the query.

Returns

A textual string describing the query or how the query will be performed.

Remarks

This method is provided for debugging or for users to be able to optimize the query based on the information in the returned string.

ReturnStart Property

public int ReturnStart { set; get; }

The index of the first binding to return.

Value

The index of the first binding to return. The value of this property is 1-based.

Remarks

The first binding returned is by default the first binding.

ReturnLimit Property

public int ReturnLimit { set; get; }

The number of bindings to return.

Value

The maximum number of bindings to return, or -1 to return all bindings.

Remarks

All bindings are returned by default.

QueryMeta Property

public SemWeb.Entity QueryMeta { set; get; }

A filter on the Meta value of statements in the target graph considered by the query.

Value

The value of this property is null by default, meaning the Meta field of statements in the target graph is ignored for the purposes of the query. Otherwise, the query is restricted to statements with the given entity as a Meta value.

Remarks

None.

Run Method

public abstract void Run (SemWeb.SelectableSource source, QueryResultSink resultsink)

Runs the query on a data source, outputting to a QueryResultSink.

Parameters

source
The data source to query.
resultsink
The sink to which each set of variable bindings is written.

Remarks

None.

Run Method

public virtual void Run (SemWeb.SelectableSource source, System.IO.TextWriter output)

Runs the query on a data source, outputting to a TextWriter.

Parameters

source
The data source to query.
output
The TextWriter to which to write results.

Remarks

The normal output format uses the SemWeb.Query.SparqlXmlQuerySink.

MimeType Property

public virtual string MimeType { set; get; }

Gets or sets the preferred MIME type for the output of the query.

Value

The preferred MIME type for the output of the query.

Remarks

This propery returns the MIME type of the output that results from calling SemWeb.Query.Run(SemWeb.SelectableSource,System.IO.TextWriter). Output is often in the SPARQL XML Results format, so this property often returns "application/sparql-results+xml".

The SemWeb.Query.SparqlEngine class handles several different types of queries. ASK and SELECT queries return the MIME type above. CONSTRUCT and DESCRIBE queries will be output in RDF/XML format by default, and so this property returns "application/rdf+xml" for those queries.

This property can also be used to change the ouput format of queries, where supported. A MIME type that is not supported or recognized will cause the property setter to throw NotSupportedException. Always catch this exception when setting this property.

The SemWeb.GraphMatch class and SPARQL SELECT and ASK queries with the SemWeb.Query.SparqlEngine class do not support other output formats than SPARQL XML Results.

SPARQL CONSTRUCT and DESCRIBE queries with the SemWeb.Query.SparqlEngine class can be set to output in either RDF/XML or N3 format by setting this property to "application/n3" or any of the values listed in SemWeb.RdfWriter.Create(System.String,System.IO.TextWriter).



semweb-1.05+dfsg/apidocs/SemWeb/0000755000175000017500000000000010774502134015745 5ustar meebeymeebeysemweb-1.05+dfsg/apidocs/SemWeb/SelectResult.html0000644000175000017500000002323710774502134021260 0ustar meebeymeebey SemWeb.SelectResult
SelectResult Class

This class is used to hold the results of a call to Select.

Remarks

Members

See Also: Inherited members from object.

Properties

Distinct [read-only]
bool . Gets whether this select result returns only distinct statments from Select calls.
StatementCount [read-only]
long . Gets the number of matching statements.

Methods

Load () : MemoryStore
Loads all of the matching statements into memory and returns a MemoryStore containing the statements.
abstract Select (StatementSink)
Streams the result of this Select call to a StatementSink.
ToArray () : Statement[]
Loads all of the matching statements into memory and returns them as an array.

Member Details

Select Method

public abstract void Select (StatementSink sink)

Streams the result of this Select call to a StatementSink.

Parameters

sink
The sink to receive the statements.

Remarks

If the statements have not yet been loaded into memory, this call will stream the result of the Select call to the sink without loading all of the statements into memory at once.

Load Method

public MemoryStore Load ()

Loads all of the matching statements into memory and returns a MemoryStore containing the statements.

Returns

A MemoryStore containing the matching statements.

Remarks

Calling this method is not advised when the number of matching statements may be very large.

StatementCount Property

public long StatementCount { get; }

Gets the number of matching statements.

Value

The number of matching statements.

Remarks

Upon accessing this property, all of the matching statements are loaded into memory as if through a call to SemWeb.SelectResult.Load().

ToArray Method

public Statement[] ToArray ()

Loads all of the matching statements into memory and returns them as an array.

Returns

An array of matching statements.

Remarks

Calling this method is not advised when the number of matching statements may be very large.

Distinct Property

public bool Distinct { get; }

Gets whether this select result returns only distinct statments from Select calls.

Value

True if any call to Select and its overloads yields only distinct statements (i.e. no duplicates).

Remarks

None.


semweb-1.05+dfsg/apidocs/SemWeb/SelectPartialFilter.html0000644000175000017500000004446310774502134022550 0ustar meebeymeebey SemWeb.SelectPartialFilter
SelectPartialFilter

Indicates which fields of a statement are to be returned in a call to SemWeb.Store.Select.

SelectPartialFilter


Remarks
None.
Members

See Also: Inherited members from ValueType.

Constructors
Constructs a new SelectPartialFilter.
Fields
All
static readonly
SelectPartialFilter . A SelectPartialFilter which has all of its properties set to true
Properties
Meta [read-only]
bool . Whether the Meta field of statements should be filled in.
Object [read-only]
bool . Whether the Object field of statements should be filled in.
Predicate [read-only]
bool . Whether the Predicate field of statements should be filled in.
SelectAll [read-only]
bool . Returns whether the Subject, Predicate, Object, and Meta properties are all true.
SelectFirst
bool . Indicates whether only the first matching result in a Select call is needed.
SelectNone [read-only]
bool . Returns whether the Subject, Predicate, Object, and Meta properties are all false.
Subject [read-only]
bool . Whether the Subject field of statements should be filled in.
Member Details
SelectPartialFilter Constructor
public SelectPartialFilter (bool subject, bool predicate, bool object, bool meta)

Constructs a new SelectPartialFilter.

Parameters
subject
true to fill in the Subject field of statements, false to leave the field blank.
predicate
true to fill in the Predicate field of statements, false to leave the field blank.
object
true to fill in the Object field of statements, false to leave the field blank.
meta
true to fill in the Meta field of statements, false to leave the field blank.
Remarks
None.

All
public static readonly SelectPartialFilter All

A SelectPartialFilter which has all of its properties set to true

Remarks
This is the default filter used in Select calls without a SelectPartialFilter parameter.

Subject
public bool Subject { get; }

Whether the Subject field of statements should be filled in.

Value
true to fill in the Subject field of statements, false to leave the field blank.
Remarks
None.

Predicate
public bool Predicate { get; }

Whether the Predicate field of statements should be filled in.

Value
true to fill in the Predicate field of statements, false to leave the field blank.
Remarks
None.

Object
public bool Object { get; }

Whether the Object field of statements should be filled in.

Value
true to fill in the Object field of statements, false to leave the field blank.
Remarks
None.

Meta
public bool Meta { get; }

Whether the Meta field of statements should be filled in.

Value
true to fill in the Meta field of statements, false to leave the field blank.
Remarks
None.

SelectAll
public bool SelectAll { get; }

Returns whether the Subject, Predicate, Object, and Meta properties are all true.

Value
Returns whether the Subject, Predicate, Object, and Meta properties are all true.
Remarks
None.

SelectNone
public bool SelectNone { get; }

Returns whether the Subject, Predicate, Object, and Meta properties are all false.

Value
Returns whether the Subject, Predicate, Object, and Meta properties are all false.
Remarks
None.

SelectFirst
public bool SelectFirst { set; get; }

Indicates whether only the first matching result in a Select call is needed.

Value
true if only the first matching result in a Select call should be returned. false to return all matching statements.
Remarks
The default is false.


semweb-1.05+dfsg/apidocs/SemWeb/BNode.html0000644000175000017500000002310510774502134017623 0ustar meebeymeebey SemWeb.BNode
BNode Class

A blank (anonymous) node.

public class BNode : Entity


Remarks

Blank nodes are a type of SemWeb.Entity that have no globally unique identifier. Two blank node instances are generally references to distinct nodes in a graph, unless they were created in the same SemWeb.StatementSource which marked them as being equivalent.

The SemWeb.Variable class is a subclass of the BNode class. Variables are used for queries. Variable names are accessible through the LocalName property.

The following example creates a new blank node.

C# Example
BNode node = new BNode();  

Members

See Also: Inherited members from Entity.

Constructors

BNode ()
Creates a new blank node.
Creates a new blank node with a local name.

Properties

LocalName [read-only]
string . The suggested local name of the node.
Uri [read-only]
abstract
string . The URI of this resource. (Inherited from Resource.)

Methods

CompareTo (Resource) : int
Compares two resources. (Inherited from Resource.)
GetResourceKey (object) : object
To be added. (Inherited from Resource.)
SetResourceKey (object, object)
To be added. (Inherited from Resource.)

Member Details

BNode Constructor

public BNode ()

Creates a new blank node.

Remarks

None.

BNode Constructor

public BNode (string localName)

Creates a new blank node with a local name.

Parameters

localName
The local name of the node as used in some RDF document.

Remarks

The local name does not affect whether two BNodes are considered equal. It is merely used as a suggestion when serializing a RDF graph.

LocalName Property

public string LocalName { get; }

The suggested local name of the node.

Value

The local name of the node, as it was found in some document or as it should be used when serializing the node.

Remarks

The local name is set when the BNode is created, usually by RDF readers of streams that give local names to blank nodes. The local name does not affect whether two BNodes are considered equal. It is merely used as a suggestion when serializing a RDF graph.


semweb-1.05+dfsg/apidocs/SemWeb/StatementSource.html0000644000175000017500000001330410774502134021761 0ustar meebeymeebey SemWeb.StatementSource
StatementSource Interface

A source of statements, such as a RdfReader or a Store.

public interface StatementSource


Remarks

Access to the statements in this source is provided through calling Select.

Members

Properties

Distinct [read-only]
bool . Gets whether the statement source returns only distinct statments from Select calls.

Methods

Select (StatementSink)
Called to stream the statements in the source into a StatementSink.

Member Details

Select Method

public void Select (StatementSink sink)

Called to stream the statements in the source into a StatementSink.

Parameters

sink
The destination for statements.

Remarks

The SemWeb.StatementSink.Add(SemWeb.Statement) method is called on sink for each statement in this StatementSource.

Distinct Property

public bool Distinct { get; }

Gets whether the statement source returns only distinct statments from Select calls.

Value

True if any call to Select (and its overloads when they are implemented) yields only distinct statements (i.e. no duplicates).

Remarks

None.


semweb-1.05+dfsg/apidocs/SemWeb/index.html0000644000175000017500000003226010774502134017745 0ustar meebeymeebey SemWeb: SemWeb
SemWeb Namespace

Namespace

The SemWeb.Statement structure represents a RDF statement, with a subject. predicate, object, and meta value. The use of the meta field is optional and application-specified.

Subjects, predicates, objects, and metas are all SemWeb.Resource objects. SemWeb.Resource is an abstract class with two subclasses: SemWeb.Entity and SemWeb.Literal. Only objects can be literals. The SemWeb.Entity class has one subclass, SemWeb.BNode, for blank nodes (anonymous entities), which itself has a subclass SemWeb.Variable for use with queries.

Graphs, or repositories of statements, are contained in classes that variously implement SemWeb.StatementSource (for forward-only streaming of statements), SemWeb.SelectableSource (for data sources that support querying for triples based on simple triple templates), and/or SemWeb.QueryableSource (for data sources that support queries on simple conjunctive graph patterns). Often you will put an instance of one of those classes into a SemWeb.Store, which wraps the data source with additional functionality and provides default implementations of methods (like querying) for data sources that don't support the operations themselves. You can, in fact, put multiple data sources within a Store to automatically have the stores act together as a single data source. The SemWeb.MemoryStore class is for a graph held in memory. Data sources for holding graphs in SQL databases are also provided. Create them through either SemWeb.Store.CreateForInput(string) or SemWeb.Store.CreateForOutput(string).

RDF input/output is done through the SemWeb.RdfReader and SemWeb.RdfWriter classes. These are abstract base classes with RDF/XML and Notation 3 implementations. The SemWeb.N3Reader and SemWeb.N3Writer are used for reading and writing data in Notation 3 format. Most of the N3 specification is supported, including everything in NTriples and Turtle. N3 is the recommended format for IO because reading and writing N3 data does not require loading the entire data source into memory, it supports all valid RDF graphs, and namespaces do not need to be configured by the user. The SemWeb.RdfXmlReader and SemWeb.RdfXmlWriter are used for reading and writing data in RDF/XML format. Like the N3Reader, the RdfXmlReader streams statements as they are read from the stream. However, the RdfXmlWriter creates the entire output document in memory before writing anything to the stream, so it is not a recommended output form. Also bear in mind that RDF/XML cannot be used for all RDF graphs, such as those with blank nodes as predicates, and it may require that the user explicitly provides namespace prefixes for some URIs used in the data.

You can also use SemWeb.RdfReader.LoadFromUri(System.Uri) to load RDF data, in either format, from a web address.

Type Description
BNode A blank (anonymous) node.
CanForgetBNodes To be added.
Entity An entity resource in a graph.
Literal A literal (text string) node in an RDF graph.
LiteralFilter The LiteralFilter represents a filter over literal values.
LiteralFilter.CompType Represents a type of relational comparison.
MemoryStore A graph of statements held in memory.
ModifiableSource This interface is implemented by data sources that support modifying the contents of the store.
N3Reader Reads RDF statements from a Notation 3 (N3, Turtle, or NTriples) stream.
N3Writer Writes out RDF statements to a stream in Notation 3, Turtle (the default), or NTriples format.
N3Writer.Formats Output formats used for the SemWeb.N3Writer.
NamespaceManager A class that maintains a mapping between namespace prefixes and URIs.
ParserException An exception thrown when an error occurs parsing an RDF document.
QueryableSource A QueryableSource is a data source that supports a graph-matching query operation.
RdfReader The base class of types that read statements from streams.
RdfWriter The base class of types that write statements to a stream.
RdfXmlReader Reads RDF statements from an RDF/XML file.
RdfXmlWriter Writes RDF statements to an RDF/XML file.
RdfXmlWriter.Options This class specifies output style options for the SemWeb.RdfXmlWriter.
Resource The base class of SemWeb.Entity, SemWeb.BNode, SemWeb.Literal, and SemWeb.Variable, the nodes in an RDF graph.
SelectableSource An interface implemented by RDF sources that supports Select operations.
SelectFilter This structure provides the arguments to the more powerful Select overload.
SelectResult This class is used to hold the results of a call to Select.
Statement A statement, comprising a subject, predicate, and object.
StatementSink A sink for statements, such as a RdfWriter or a Store.
StatementSource A source of statements, such as a RdfReader or a Store.
StaticSource This interface is implemented by SelectableSource classes that represent concrete data sources.
Store The store class is used to group data sources and to provide inferencing capabilities over data sources.
Variable A variable resource in a query or inference rule.

semweb-1.05+dfsg/apidocs/SemWeb/Variable.html0000644000175000017500000002022010774502134020354 0ustar meebeymeebey SemWeb.Variable
Variable Class

A variable resource in a query or inference rule.

public class Variable : BNode


Remarks

This class is used to represent variables in queries or inferencing. It is a subclass of SemWeb.BNode.

Note that two variables are equal by the equality operator == or Equals() only if the two variables are the same object. Different variables with the same name are not considered references to the same variable.

Members

See Also: Inherited members from BNode.

Constructors

Creates a new unnamed variable.
Creates a new named variable.

Properties

LocalName [read-only]
string . The suggested local name of the node. (Inherited from BNode.)
Uri [read-only]
abstract
string . The URI of this resource. (Inherited from Resource.)

Methods

CompareTo (Resource) : int
Compares two resources. (Inherited from Resource.)
GetResourceKey (object) : object
To be added. (Inherited from Resource.)
SetResourceKey (object, object)
To be added. (Inherited from Resource.)

Member Details

Variable Constructor

public Variable ()

Creates a new unnamed variable.

Remarks

None.

Variable Constructor

public Variable (string variableName)

Creates a new named variable.

Parameters

variableName
The name of the variable.

Remarks

The name of the variable can be accessed through the SemWeb.BNode.LocalName property.


semweb-1.05+dfsg/apidocs/SemWeb/LiteralFilter.html0000644000175000017500000002334310774502134021402 0ustar meebeymeebey SemWeb.LiteralFilter
LiteralFilter Class

The LiteralFilter represents a filter over literal values.

public abstract class LiteralFilter


Remarks

This class is used to filter the results of a Select using the SemWeb.SelectFilter type. This is an abstract base class for filters, which are defined in the SemWeb.Filters namespace.

Members

See Also: Inherited members from object.

Protected Constructors

This is the protected constructor used by subclasses.

Methods

static Create (LiteralFilter.CompType, object) : LiteralFilter
Creates a comparison filter.
abstract Filter (Literal, SelectableSource) : bool
Filters a literal value.
static MatchesFilters (Resource, LiteralFilter[], SelectableSource) : bool
Filters a literal value against multiple filters.

Member Details

LiteralFilter Constructor

protected LiteralFilter ()

This is the protected constructor used by subclasses.

Remarks

None.

Filter Method

public abstract bool Filter (Literal value, SelectableSource targetModel)

Filters a literal value.

Parameters

value
The literal value to be filtered.
targetModel
The model over which the literal was selected from.

Returns

True if the literal matches the filter; false otherwise.

Remarks

None.

MatchesFilters Method

public static bool MatchesFilters (Resource literal, LiteralFilter[] filters, SelectableSource targetModel)

Filters a literal value against multiple filters.

Parameters

literal
To be added.
filters
An array of filters to test.
targetModel
The model over which the literal was selected from.

Returns

True if the literal value matches all of the filters; false otherwise.

Remarks

None.

Create Method

public static LiteralFilter Create (LiteralFilter.CompType type, object value)

Creates a comparison filter.

Parameters

type
The type of comparison: less than (or equal), equal, not equal, or greater than (or equal).
value
The value to compare literals against.

Returns

A LiteralFilter that compares literals against value.

Remarks

None.


semweb-1.05+dfsg/apidocs/SemWeb/Entity+LazyUriLoader.html0000644000175000017500000001153610774502134022637 0ustar meebeymeebey SemWeb.Entity+LazyUriLoader
Entity+LazyUriLoader

This class is used by Store implementations to create entities whose URIs are loaded lazily -- that is, the first time the URI is needed.

public interface Entity+LazyUriLoader


Remarks
None.
Members
Methods
LazyLoadUri (Entity) : string
Gets the URI associated with an entity. The entity is one that was created with Entity.LazyLoadUri.
Member Details
LazyLoadUri
public string LazyLoadUri (Entity entity)

Gets the URI associated with an entity. The entity is one that was created with Entity.LazyLoadUri.

Parameters
entity
The entity to get the URI of.
Returns
The URI of the entity, or null if the entity is anonymous.
Remarks
None.


semweb-1.05+dfsg/apidocs/SemWeb/KnowledgeModel.html0000644000175000017500000003166210774502134021543 0ustar meebeymeebey SemWeb.KnowledgeModel
KnowledgeModel

A store for combining multiple stores and inference engines.

public class KnowledgeModel : Store


Remarks

Resources and stores can be associated with KnowledgeModels through their constructors. Associating a KnowledgeModel is optional, but doing so enables the default accessor of Resources, which allows for easy traversal of the RDF graph.

Associating resources and stores with KnowledgeModels can only be done through their constructors. But, doing so to stores does not add the store into the KnowledgeModel to make the statements available for calls to SemWeb.Store.Select(SemWeb.Statement,SemWeb.StatementSink). SemWeb.KnowledgeModel.Add(SemWeb.Store) must be called separately. Likewise, calling SemWeb.KnowledgeModel.Add(SemWeb.Store) does not change which KnowledgeModel a store is associate with (if any).

The following is a basic example of an RDF application using a KnowledgeModel. It reads an RDF/XML file on standard input and writes an N3 version of the statements to standard output.

C# Example
// Compile with: mcs -r:../bin/SemWeb.dll simple.cs
// Execute with: MONO_PATH=../bin mono simple.exe < testfile.rdf

using System;
using SemWeb;
using SemWeb.IO;
using SemWeb.Stores;

public class Simple {
	public static void Main() {
		KnowledgeModel model = new KnowledgeModel();
		
		MemoryStore store = new MemoryStore(model);
		model.Add(store);
		
		store.Import(new RdfXmlParser(Console.In));
		store.Write(new N3Writer(Console.Out));
	}
}
Members

See Also: Inherited members from Store.

Constructors
Constructs a new empty KnowledgeModel.
Creates a new KnowledgeModel, adds to it a SemWeb.Stores.MemoryStore, and loads in the statements from the given parser.
Properties
Storage [read-only]
SemWeb.Stores.MultiStore . The MultiStore that maintains the list of stores within this KnowledgeModel.
Methods
Add (Store)
Adds a store into the KnowledgeModel.
AddReasoning (ReasoningEngine)
Adds an inference engine to the KnowledgeModel.
Member Details
KnowledgeModel Constructor
public KnowledgeModel ()

Constructs a new empty KnowledgeModel.

Remarks
None.

KnowledgeModel Constructor
public KnowledgeModel (RdfParser parser)

Creates a new KnowledgeModel, adds to it a SemWeb.Stores.MemoryStore, and loads in the statements from the given parser.

Parameters
parser
A parser containing statements to load into the memory store.
Remarks
This is a convenience function.

Add
public void Add (Store storage)

Adds a store into the KnowledgeModel.

Parameters
storage
The store to add into the model.
Remarks

The statements in store become available through calls to this KnowledgeModel's select and contains methods.

The store should have been created passing this KnowledgeModel to its constructor so that the store is associated with this KnowledgeModel.


AddReasoning
public void AddReasoning (ReasoningEngine engine)

Adds an inference engine to the KnowledgeModel.

Parameters
engine
An inference engine.
Remarks

Calls to Select and Contains on this KnowledgeModel will reflect the capabilities of the added inference engine.

Inference engines are executed in the order in which they were added. The inferences made by a later engine are not available as input to an earlier engine.


Storage
public SemWeb.Stores.MultiStore Storage { get; }

The MultiStore that maintains the list of stores within this KnowledgeModel.

Value
The list of stores within this KnowledgeModel.
Remarks

It is safe to manipulate the object returned by this property to change the stores associated with the KnowledgeModel.

Calls to Contains and Select on the MultiStore reflect the contents of the stores contained in it without the application of the KnowledgeModel's inference engines.



semweb-1.05+dfsg/apidocs/SemWeb/SelectableSource.html0000644000175000017500000003210110774502134022054 0ustar meebeymeebey SemWeb.SelectableSource
SelectableSource Interface

An interface implemented by RDF sources that supports Select operations.

public interface SelectableSource : , StatementSource


Remarks

Classes that implement this interface support the SemWeb.SelectableSource.Contains(SemWeb.Statement) which returns whether any statement matches the given statement template, and SemWeb.SelectableSource.Select(SemWeb.Statement,SemWeb.StatementSink) and SemWeb.SelectableSource.Select(SemWeb.SelectFilter,SemWeb.StatementSink).

Members

Methods

Contains (Resource) : bool
Tests whether a resource is mentioned in the data source.
Contains (Statement) : bool
Returns whether the store contains a statement, or any statement that matches the template.
Select (SelectFilter, StatementSink)
Queries the story for matching statements, with advanced options, and writes the statements to a SemWeb.StatementSink.
Select (Statement, StatementSink)
Queries the story for matching statements, and writes the statements to a SemWeb.StatementSink.

Member Details

Contains Method

public bool Contains (Statement template)

Returns whether the store contains a statement, or any statement that matches the template.

Parameters

template
The statement to search for, or a statement template.

Returns

true if the store contains the statement or any statement matching the template.

Remarks

The following expression tests for the existence of any rdf:type predicate in the store.

C# Example
store.Contains(new Statement(null, "http://www.w3.org/1999/02/22-rdf-syntax-ns#type", null));  

Select Method

public void Select (Statement template, StatementSink sink)

Queries the story for matching statements, and writes the statements to a SemWeb.StatementSink.

Parameters

template
A statement template. Use SemWeb.Statement.All to select all statements in the store, or a statement with null fields to select statements that match the non-null parts of the statement.
sink
A StatementSink to which each matching statement will be added.

Remarks

Each statement in the store matching template is added to sink with a call to SemWeb.StatementSink.Add(SemWeb.Statement). If the call to Add returns false, the select operation is aborted and returns immediately.

template is a statement template, which means any field in template may be null, and those fields are excluded from the statement filter. For example, setting the Subject and Predicate fields but leaving the Object and Meta fields null will match all statements in the store that have the given Subject and Predicate, and anything in their Object and Meta fields.

The following expression writes out all statements with the rdf:type predicate to standard output.

C# Example
using (StatementSink sink = new N3Writer(Console.Out)) {
    store.Select(new Statement(null, "http://www.w3.org/1999/02/22-rdf-syntax-ns#type", null), sink);
}

Select Method

public void Select (SelectFilter filter, StatementSink sink)

Queries the story for matching statements, with advanced options, and writes the statements to a SemWeb.StatementSink.

Parameters

filter
A filter specifying what statements to return.
sink
A StatementSink to which each matching statement will be added.

Remarks

This overload of Select is used to query for statements matching many resources.

The following expression writes out all statements with either of two entities as the subject.

C# Example
Entity a = "http://www.example.org/entityA";
Entity b = "http://www.example.org/entityB";

using (StatementSink sink = new N3Writer(Console.Out)) {
    store.Select(
        new SelectFilter(new Entity[] { a , b }, null, null),
        sink);
}

Contains Method

public bool Contains (Resource resource)

Tests whether a resource is mentioned in the data source.

Parameters

resource
A Resource (an entity, bnode, or literal value).

Returns

A boolean value indicating whether the resource is mentioned in the store.

Remarks

None.


semweb-1.05+dfsg/apidocs/SemWeb/XPathSemWebNavigator.html0000644000175000017500000001176010774502134022642 0ustar meebeymeebey SemWeb.XPathSemWebNavigator
XPathSemWebNavigator

To be added.

public class XPathSemWebNavigator : System.Xml.XPath.XPathNavigator


Remarks
To be added.
Members

See Also: Inherited members from System.Xml.XPath.XPathNavigator.

Constructors
Member Details
XPathSemWebNavigator Constructor
public XPathSemWebNavigator (Entity root, Store model, NamespaceManager namespaces)

To be added.

Parameters
root
To be added.
model
To be added.
namespaces
To be added.
Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb/RdfReader.html0000644000175000017500000006442210774502134020501 0ustar meebeymeebey SemWeb.RdfReader
RdfReader Class

The base class of types that read statements from streams.

public abstract class RdfReader : StatementSource, IDisposable


Remarks

This is an abstract class. Two subclasses are provided: SemWeb.N3Reader and SemWeb.RdfXmlReader.

SemWeb.RdfReader.LoadFromUri(System.Uri) can be used to load RDF data, in either N3 or XML format, from a web address.

SemWeb.RdfReader.Create(string,string) can be used to create a reader in the factory paradigm.

Members

See Also: Inherited members from object.

Protected Constructors

The protected no-arg constructor used by derived classes.

Properties

BaseUri
string . The base URI for resolving relative URIs found in the stream. If a base URI is provided within the stream, this property may be updated to indicate the base URI found.
Meta
Entity . An entity to assign as the meta entity for statements loaded by this reader.
Namespaces [read-only]
NamespaceManager . Gets the NamespaceManager that contains all of the namespace-prefix mappings used in the input stream.
ReuseEntities
bool . Determines whether the reader must reuse Entity objects that it creates.
Variables [read-only]
System.Collections.Generic.ICollection<SemWeb.Variable> . A list of SemWeb.Variables found in the stream.
Warnings [read-only]
System.Collections.Generic.ICollection<System.String> . Gets a list of warnings generated while parsing the input stream.

Methods

static Create (string, string) : RdfReader
Creates a RdfReader in the factory paradigm for the given file.
static Create (string, System.IO.Stream) : RdfReader
Creates a RdfReader in the factory paradigm for the given Stream.
Dispose ()
Disposes the reader.
static LoadFromUri (Uri) : RdfReader
Loads an RDF document from the Internet.
abstract Select (StatementSink)
Reads the stream into the statement sink.

Protected Methods

AddVariable (Variable)
Adds a Variable to the Variables collection.
OnWarning (string)
Implementors of RdfReader may call this method to indicate a parsing warning.

Member Details

RdfReader Constructor

protected RdfReader ()

The protected no-arg constructor used by derived classes.

Remarks

None.

Dispose Method

public virtual void Dispose ()

Disposes the reader.

Remarks

The resources associated with the reader are freed.

Create Method

public static RdfReader Create (string type, string source)

Creates a RdfReader in the factory paradigm for the given file.

Parameters

type
The stream type.
source
The name of the source stream, as a file name, or "-" for standard input.

Returns

The type of reader returned is given in the following table.

type Reader
"xml", "text/xml", "application/xml", "application/rdf+xml" SemWeb.RdfXmlReader
"n3", "text/n3", "application/n3", "application/turtle", "application/x-turtle" SemWeb.N3Reader

Remarks

None.

Meta Property

public Entity Meta { set; get; }

An entity to assign as the meta entity for statements loaded by this reader.

Value

An entity to use for meta information. Cannot be null.

Remarks

The value of this property is used as the meta argument in calls to the Statement constructor SemWeb.Statement(SemWeb.Entity,SemWeb.Entity,SemWeb.Resource,SemWeb.Entity). The use of SemWeb.Statement.Meta is up to the application.

The default value of this property is SemWeb.Statement.DefaultMeta, which is also the meta value used in the three-arg constructor for SemWeb.Statement. If the meta field is not important for the application, this field should be left unchanged.


BaseUri Property

public string BaseUri { set; get; }

The base URI for resolving relative URIs found in the stream. If a base URI is provided within the stream, this property may be updated to indicate the base URI found.

Value

The base URI for resolving relative URIs found in the stream. May be, and is initially, null.

Remarks

When this property is null, the reader will not correctly resolve relative URIs in the stream. Always set this property before beginning reading when the base URI of the document is known.

OnWarning Method

protected void OnWarning (string message)

Implementors of RdfReader may call this method to indicate a parsing warning.

Parameters

message
A warning message.

Remarks

This is not currently used for anything.

Variables Property

A list of SemWeb.Variables found in the stream.

Value

A list of SemWeb.Variables found in the stream.

Remarks

Not all readers support variables. (N3-formatted RDF does, but XML formatted RDF doesn't.)

Select Method

public abstract void Select (StatementSink sink)

Reads the stream into the statement sink.

Parameters

sink
Each statement found in the stream is added to the statement sink via SemWeb.StatementSink.Add(SemWeb.Statement).

Remarks

User code should call SemWeb.Store.Import(SemWeb.StatementSource) rather than calling this method directly.

ReuseEntities Property

public bool ReuseEntities { set; get; }

Determines whether the reader must reuse Entity objects that it creates.

Value

If false (the default), the reader may create a new Entity object each time an entity is encoutered in the stream. If true, the reader must return the same Entity object each time it encounters a reference to the same entity.

Remarks

Setting this property to true may slow down the performance of the reader, as it may need to consult a hashtable each time a URI is read mapping the URI to an Entity it has previously created.

LoadFromUri Method

public static RdfReader LoadFromUri (Uri webresource)

Loads an RDF document from the Internet.

Parameters

webresource
The URI of the RDF document.

Returns

An RdfReader over the remote document.

Remarks

The document is fetched with System.Net.WebRequest and must be in RDF/XML or Notation3 (NTriples/Turtle/N3) format.

The format of the document is detected as follows. If the document has a mime-type of text/xml, application/xml, application/rss+xml, or application/rdf+xml, the document is treated as an RDF/XML document. If the document has a mime-type of text/rdf+n3, application/n3, application/turtle, or application/x-turtle, the document is treated as a Notation3 document. If the mime-type is not recognized, the document's file name extension is checked. If it is .xml or .rss, it is treated as an RDF/XML document. If it is .n3, .ttl, or .nt, it is treated as a Notation3 document.

If the format could not be determined, a InvalidOperationException is thrown.


Namespaces Property

public NamespaceManager Namespaces { get; }

Gets the NamespaceManager that contains all of the namespace-prefix mappings used in the input stream.

Value

A NamespaceManager that contains all of the namespace-prefix mappings used in the input stream.

Remarks

None.

Warnings Property

Gets a list of warnings generated while parsing the input stream.

Value

A list of warnings generated while parsing the input stream. Each element of the list is a string.

Remarks

None.

AddVariable Method

protected void AddVariable (Variable variable)

Adds a Variable to the Variables collection.

Parameters

variable
A variable.

Remarks

Used by RdfReader implementations to add a variable into the Variables collection.

Create Method

public static RdfReader Create (string type, System.IO.Stream source)

Creates a RdfReader in the factory paradigm for the given Stream.

Parameters

type
The stream type.
source
A stream to read from.

Returns

The type of reader returned is given in the following table.

type Reader
"xml", "text/xml", "application/xml", "application/rdf+xml" SemWeb.RdfXmlReader
"n3", "text/n3", "application/n3", "application/turtle", "application/x-turtle" SemWeb.N3Reader

Remarks

None.


semweb-1.05+dfsg/apidocs/SemWeb/ParserException.html0000644000175000017500000001351710774502134021755 0ustar meebeymeebey SemWeb.ParserException
ParserException Class

An exception thrown when an error occurs parsing an RDF document.

public class ParserException : ApplicationException


Remarks

None.

Members

See Also: Inherited members from ApplicationException.

Constructors

Creates a new ParserException.
Creates a new ParserException.

Member Details

ParserException Constructor

public ParserException (string message)

Creates a new ParserException.

Parameters

message
A text message indicating the parsing exception that occurred.

Remarks

None.

ParserException Constructor

public ParserException (string message, Exception cause)

Creates a new ParserException.

Parameters

message
A text message indicating the parsing exception that occurred.
cause
A thrown exception that caused the parsing exception.

Remarks

None.


semweb-1.05+dfsg/apidocs/SemWeb/StatementCounterSink.html0000644000175000017500000001651610774502134022775 0ustar meebeymeebey SemWeb.StatementCounterSink
StatementCounterSink

To be added.

StatementCounterSink : StatementSink


Remarks
To be added.
Members

See Also: Inherited members from object.

Constructors
To be added.
Properties
StatementCount [read-only]
int . To be added.
Methods
Add (Statement) : bool
To be added.
Member Details
StatementCounterSink Constructor
public StatementCounterSink ()

To be added.

Remarks
To be added.

Add
public bool Add (Statement statement)

To be added.

Parameters
statement
To be added.
Returns
To be added.
Remarks
To be added.

StatementCount
public int StatementCount { get; }

To be added.

Value
To be added.
Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb/Store.html0000644000175000017500000024551410774502134017742 0ustar meebeymeebey SemWeb.Store
Store Class

The store class is used to group data sources and to provide inferencing capabilities over data sources.

Remarks

The SemWeb.MemoryStore is a special subclass of Store which maintains an in-memory array of statements. Although the MemoryStore inherits from Store, it is illegal to call AddSource on a MemoryStore.

Members

See Also: Inherited members from object.

Constructors

Store ()
Creates an empty store with no data storage backing.
Creates a store that wraps the given SelectableSource.
Creates a Store that loads the statements from the StatementSource into memory.

Properties

DataSources [read-only]
System.Collections.Generic.IList<SemWeb.SelectableSource> . To be added.
Distinct [read-only]
bool . Gets whether the store returns only distinct statments from Select calls.
StatementCount [read-only]
int . Gets the number of statements in the store.

Methods

Add (Statement)
Adds a statement to the store.
AddReasoner (SemWeb.Inference.Reasoner)
Adds inferencing capabilities to the Select and Query methods of this Store.
AddSource (SelectableSource)
Adds a data source to this store.
AddSource (SelectableSource, string)
Adds a named data source to this store.
Clear ()
Clears the contents of the store.
Contains (Resource) : bool
Tests whether the store contains any statements that mention the given resource.
Contains (Statement) : bool
Returns whether the store contains a statement, or any statement that matches the template.
static Create (string) : Store
Creates a Store in the factory design pattern.
static CreateForInput (string) : StatementSource
Creates a StatementSource in the factory design pattern from which statements will be read.
static CreateForOutput (string) : StatementSink
Creates a SemWeb.StatementSink into which statements will be added.
static DefaultContains (SelectableSource, Statement) : bool
A default implementation of the Contains operation for implementors of SelectableSource.
static DefaultReplace (ModifiableSource, Entity, Entity)
To be added.
static DefaultReplace (ModifiableSource, Statement, Statement)
To be added.
static DefaultSelect (SelectableSource, SelectFilter, StatementSink)
This method provides a default implementation of the Select method that takes a SelectFilter argument.
Dispose ()
Releases any external resources associated with the Store.
GetBNodeFromPersistentId (string) : BNode
To be added.
GetEntities () : Entity[]
Returns an array of all entities mentioned in the store.
GetEntitiesOfType (Entity) : Entity[]
Returns an array of all entities in the store whose type is known to be the given type.
GetMetas () : Entity[]
Returns an array of all entities used in the Meta field of any statement in the store.
GetPersistentBNodeId (BNode) : string
To be added.
GetPredicates () : Entity[]
Returns an array of all predicates mentioned in the store.
Import (StatementSource)
Batch copies the contents of a StatementSource into the ModifyableSource contained in the store.
MetaQuery (Statement[], SemWeb.Query.QueryOptions) : SemWeb.Query.MetaQueryResult
Tests the querying capabilities of the store.
Query (Statement[]) : System.Collections.Generic.ICollection<SemWeb.Query.VariableBindings>
Queries the data sources in the Store and returns the resulting variable bindings.
Query (Statement[], SemWeb.Query.QueryOptions, SemWeb.Query.QueryResultSink)
Queries the store with a simple graph match query.
Remove (Statement)
Removes statements from the store.
RemoveAll (Statement[])
Removes all statements matching an array of templates.
Replace (Entity, Entity)
Replaces all occurences of one Entity with another Entity.
Replace (Statement, Statement)
Replaces a single statement with another statement.
Select (SelectFilter) : SelectResult
Retuns a SemWeb.SelectResult object that represents the result of the corresponding select call with a StatementSink.
Select (Statement) : SelectResult
Retuns a SemWeb.SelectResult object that represents the result of matching a statement template against the store.
Select (StatementSink)
Streams all statements in this store into a StatementSink.
Select (SelectFilter, StatementSink)
Queries the story for matching statements, with advanced options, and writes the statements to a SemWeb.StatementSink.
Select (Statement, StatementSink)
Queries the story for matching statements, and writes the statements to a SemWeb.StatementSink.
SelectObjects (Entity, Entity) : Resource[]
Finds all objects in statements with the given subject and predicate.
SelectSubjects (Entity, Resource) : Entity[]
Finds all subjects in statements with the given predicate and object.
Write (System.IO.TextWriter)
Writes the contents of the store to a stream in N3 format.

Member Details

Clear Method

public void Clear ()

Clears the contents of the store.

Remarks

An InvalidOperationException is thrown if more than one data source has been added to the Store with AddSource (in which case SemWeb would not want to clear them all) or if the data source added is not a SemWeb.ModifiableSource. The underlying data source is cleared with SemWeb.ModifiableSource.Clear().

GetEntitiesOfType Method

public Entity[] GetEntitiesOfType (Entity type)

Returns an array of all entities in the store whose type is known to be the given type.

Parameters

type
The type of entities to return.

Returns

An array of all entities in the store whose type is known to be the given type.

Remarks

Types are indicated using the rdf:type predicate.

Add Method

public void Add (Statement statement)

Adds a statement to the store.

Parameters

statement
The statement to add.

Remarks

The Subject, Predicate, Object, and Meta fields of the statement must not be null or an ArgumentNullException is thrown.

An InvalidOperationException is thrown if more than one data source has been added to the Store with AddSource (in which case SemWeb would not know which data source to add the statement to) or if the data source added is not a SemWeb.ModifiableSource.


Remove Method

public void Remove (Statement template)

Removes statements from the store.

Parameters

template
A statement or statement template to remove from the store.

Remarks

Every matching statement from all of the data sources included in this store is removed from the store that contains it. An InvalidOperationException is thrown if any data source added to the Store with AddSource is not a SemWeb.ModifiableSource.

Import Method

public void Import (StatementSource source)

Batch copies the contents of a StatementSource into the ModifyableSource contained in the store.

Parameters

source
The source whose statements will be copied into the store.

Remarks

An InvalidOperationException is thrown if more than one data source has been added to the Store with AddSource or if the data source added is not a SemWeb.ModifiableSource.

See SemWeb.ModifiableSource.Import(SemWeb.StatementSource).


Contains Method

public bool Contains (Statement template)

Returns whether the store contains a statement, or any statement that matches the template.

Parameters

template
The statement to search for, or a statement template.

Returns

true if the store contains the statement or any statement matching the template.

Remarks


Select Method

public void Select (Statement template, StatementSink result)

Queries the story for matching statements, and writes the statements to a SemWeb.StatementSink.

Parameters

template
A statement template. Use SemWeb.Statement.All to select all statements in the store, or a statement with null fields to select statements that match the non-null parts of the statement.
result
A StatementSink to which each matching statement will be added.

Remarks


SelectObjects Method

public Resource[] SelectObjects (Entity subject, Entity predicate)

Finds all objects in statements with the given subject and predicate.

Parameters

subject
The subject of the statements to query.
predicate
The predicate of the statements to query.

Returns

An array of the entities found as the object of the matching statements, excluding literal values. An entity occurs in the array at most once.

Remarks

Note:

This method is not recommended when the store can contain a large number of statements, as every matching entity must be loaded into memory before this method returns.


SelectSubjects Method

public Entity[] SelectSubjects (Entity predicate, Resource object)

Finds all subjects in statements with the given predicate and object.

Parameters

predicate
The predicate of the statements to query.
object
The object of the statements to query.

Returns

An array of the entities found as the subject of the matching statements. An entity occurs in the array at most once.

Remarks

Note:

This method is not recommended when the store can contain a large number of statements, as every matching entity must be loaded into memory before this method returns.


StatementCount Property

public int StatementCount { get; }

Gets the number of statements in the store.

Value

The number of statements in the store.

Remarks

An InvalidOperationException is thrown if any data source added to the Store with AddSource is not a SemWeb.StaticSource.

Write Method

public void Write (System.IO.TextWriter writer)

Writes the contents of the store to a stream in N3 format.

Parameters

writer
The stream to which statements are sent.

Remarks

None.

GetEntities Method

public Entity[] GetEntities ()

Returns an array of all entities mentioned in the store.

Returns

An array of all entities mentioned in the store.

Remarks

None.

GetPredicates Method

public Entity[] GetPredicates ()

Returns an array of all predicates mentioned in the store.

Returns

An array of all predicates mentioned in the store.

Remarks

None.

Replace Method

public void Replace (Entity find, Entity replacement)

Replaces all occurences of one Entity with another Entity.

Parameters

find
The Entity to search for in the store.
replacement
The Entity to replace a.

Remarks

All occurences of find in statements in the Store are replaced with references to replacement.

An InvalidOperationException is thrown if any data source added to the Store with AddSource does not implement SemWeb.ModifiableSource.


Store Constructor

public Store ()

Creates an empty store with no data storage backing.

Remarks


CreateForInput Method

public static StatementSource CreateForInput (string spec)

Creates a StatementSource in the factory design pattern from which statements will be read.

Parameters

spec
A specifier string, whose format is given below.

Returns

A StatementSource from which statements can be read. You may cast the value to SemWeb.RdfReader or SemWeb.SelectableSource when appropriate.

Remarks

The specifier string is in one of the following formats. When a filename is expected, a dash can be used to indicate standard input.

spec Meaning
mem A new SemWeb.MemoryStore.
xml:[filename] A SemWeb.RdfXmlReader to read the RDF/XML file. Example: "xml:mydata.rdf"

n3:[filename]

turtle:[filename]

nt:[filename]

ntriples:[filename]

A SemWeb.N3Reader to read the N3/Turtle/NTriples file. Example: "n3:mydata.n3"
sqlite:[table]:[connection string]

A SemWeb.Stores.SQLStore connected to the SQLite database given in the connection string, using the tables prefixed by the table parameter. The returned store can be both read from and written to, despite the name of this method. Example: "sqlite:rdf:Uri=file:mydatabase.sqlite;Version=3"

mysql:[table]:[connection string] A SemWeb.Stores.SQLStore connected to the MySQL database given in the connection string, using the tables prefixed by the table parameter. The returned store can be both read from and written to, despite the name of this method. Example: "mysql:rdf:Database=databasename;Server=localhost;User Id=username"
postgresql:[table]:[connection string] A SemWeb.Stores.SQLStore connected to the PostgreSQL database given in the connection string, using the tables prefixed by the table parameter. The returned store can be both read from and written to, despite the name of this method. Example: "postgresql:rdf:Server=localhost;Port=5432;Database=SemanticWeb;User Id=user"
sparql-http:[URL] A SemWeb.Remote.SparqlHttpSource, which accesses a remote data source using the SPARQL Protocol. Example: "sparql-http:http://www.govtrack.us/sparql"

The SQL stores can be both read from and written to, despite the name of this method.


CreateForOutput Method

public static StatementSink CreateForOutput (string spec)

Creates a SemWeb.StatementSink into which statements will be added.

Parameters

spec
A specification string whose format is given below.

Returns

A StatementSink. You may cast the value to SemWeb.RdfWriter or SemWeb.ModifiableSource when appropriate.

Remarks

The specifier string is in one of the following formats. When a filename is expected, a dash can be used to indicate standard output.

spec Meaning
mem A new SemWeb.MemoryStore.
xml:[filename] A SemWeb.RdfXmlWriter opened on the given file. Example: "xml:mydata.rdf"

n3:[filename]

turtle:[filename]

nt:[filename]

ntriples:[filename]

A SemWeb.N3Writer opened on the given file, writing in the indicated format. Example: "turtle:mydata.turtle"
SQL-based stores For Sqlite, MySQL, and PostgreSQL-based stores, use the spec string described in SemWeb.Store.CreateForInput(string). These stores can be both read from and written to, despite the name of this method.

Select Method

public SelectResult Select (Statement template)

Retuns a SemWeb.SelectResult object that represents the result of matching a statement template against the store.

Parameters

template
A statement template. Use SemWeb.Statement.All to select all statements in the store, or a statement with null fields to select statements that match the non-null parts of the statement.

Returns

A SemWeb.SelectResult representing the matching statements.

Remarks

On calling this method, the data in this store is not immediately accessed. The matching statements are loaded the first time they are requested through the returned SemWeb.SelectResult object. Those statements are accessed in one of three ways:

SemWeb.SelectResult implements IEnumerable, so the result object can be used in foreach loops, shown in this example:

C# Example
foreach (Statement s in mystore.Select(Statement.All)) {
    Console.WriteLine(s.ToString());
}

The drawback of this method is that all of the matching statements are loaded into memory before the loop begins, and so this method is not recommended when the number of matching statements may be very large.

The SemWeb.SelectResult.Load() method loads all of the matching statements into a SemWeb.MemoryStore. The MemoryStore can then be used to perform further Selects, or to get the matching statements as an array. This method is not advised when the number of matching statements may be very large.

SemWeb.SelectResult implements SemWeb.StatementSource, and the SemWeb.StatementSource.Select(SemWeb.StatementSink) method on the returned object will stream the matching statements directly from this store to the provided SemWeb.StatementSink without keeping the statements in memory.

template is a statement template, which means any field in template may be null, and those fields are excluded from the statement filter. For example, setting the Subject and Predicate fields but leaving the Object and Meta fields null will match all statements in the store that have the given Subject and Predicate, and anything in their Object and Meta fields.


Select Method

public void Select (StatementSink result)

Streams all statements in this store into a StatementSink.

Parameters

result
The destination for the statements in this store.

Remarks

The SemWeb.StatementSink.Add(SemWeb.Statement) method is called on result for each statement in this store.

Replace Method

public void Replace (Statement find, Statement replacement)

Replaces a single statement with another statement.

Parameters

find
The statement to find. This parameter must be a complete statement (with subject, predicate, and object non-null), not a template.
replacement
The statement that will replace the first statement.

Remarks

Store implementations may choose to optimize this method over a call to Remove followed by Add.

An InvalidOperationException is thrown if any data source added to the Store with AddSource does not implement SemWeb.ModifiableSource.


GetMetas Method

public Entity[] GetMetas ()

Returns an array of all entities used in the Meta field of any statement in the store.

Returns

An array of entities used in the Meta field of statements in the store.

Remarks

None.

RemoveAll Method

public void RemoveAll (Statement[] templates)

Removes all statements matching an array of templates.

Parameters

templates
An array of statement templates. Statement templates may contain a null subject, predicate, object, and/or meta.

Remarks

An InvalidOperationException is thrown if any data source added to the Store with AddSource does not implement SemWeb.ModifiableSource.

Dispose Method

public void Dispose ()

Releases any external resources associated with the Store.

Remarks

Calls System.IDisposable.Dispose() on any data sources added to the Store with the AddSource method that implement IDisposable. Stores may release external resources or close remote connections through Dispose, so users of the Store class should Dispose stores when they are finished being used.

DefaultContains Method

public static bool DefaultContains (SelectableSource source, Statement template)

A default implementation of the Contains operation for implementors of SelectableSource.

Parameters

source
A data source.
template
A statement template to match against the source.

Returns

Whether any statements in the source match the template.

Remarks

This method is intended to be used by implementors of SelectableSource.

Distinct Property

public bool Distinct { get; }

Gets whether the store returns only distinct statments from Select calls.

Value

True if any call to Select and its overloads yields only distinct statements (i.e. no duplicates).

Remarks

When this property returns false, callers of Select may want to ensure the resulting statements have no duplicates. It this property returns true, such a check is unnecessary.

Select Method

public void Select (SelectFilter filter, StatementSink result)

Queries the story for matching statements, with advanced options, and writes the statements to a SemWeb.StatementSink.

Parameters

filter
A filter specifying what statements to return.
result
A StatementSink to which each matching statement will be added.

Remarks


Select Method

public SelectResult Select (SelectFilter filter)

Retuns a SemWeb.SelectResult object that represents the result of the corresponding select call with a StatementSink.

Parameters

filter
A filter specifying what statements to return.

Returns

A SemWeb.SelectResult representing the matching statements.

Remarks


DefaultSelect Method

public static void DefaultSelect (SelectableSource source, SelectFilter filter, StatementSink sink)

This method provides a default implementation of the Select method that takes a SelectFilter argument.

Parameters

source
The source to query.
filter
The select filter to query with.
sink
The result sink to send matching statements to.

Remarks

This method is intended to be used by subclasses of Store that do not want to provide their own implementation of Select with a SelectFilter.

Contains Method

public bool Contains (Resource resource)

Tests whether the store contains any statements that mention the given resource.

Parameters

resource
A Resource (entity, literal, or bnode).

Returns

A boolean value indicating whether the Store contains any statements mentioning the resource.

Remarks

None.

MetaQuery Method

Tests the querying capabilities of the store.

Parameters

graph
The graph to be matched in a call to Query.
options
The options to be passed to the call to Query.

Returns

A SemWeb.Query.MetaQueryResult indicating how the query will be executed.

Remarks

See SemWeb.QueryableSource for more information. The default implementation of this method returns a SemWeb.Query.MetaQueryResult structure with the SemWeb.Query.MetaQueryResult.QuerySupported flag set to true. In addition, the SemWeb.Query.MetaQueryResult.NoData field is initialized by checking that the resources mentioned in the query are present in the store (with SemWeb.Store.Contains(SemWeb.Resource)).

Query Method

Queries the store with a simple graph match query.

Parameters

graph
The graph to match.
options
Query options.
sink
The output sink.

Remarks

See SemWeb.QueryableSource for more information. The default implementation of this method uses the SemWeb.Query.GraphMatch class to answer the query.

Store Constructor

public Store (SelectableSource source)

Creates a store that wraps the given SelectableSource.

Parameters

source
The data source to add to the Store.

Remarks

Other data sources can be added with SemWeb.Store.AddSource(SemWeb.SelectableSource).

Store Constructor

public Store (StatementSource source)

Creates a Store that loads the statements from the StatementSource into memory.

Parameters

source
A source of statements.

Remarks

The store loads the statements into memory.

AddReasoner Method

public virtual void AddReasoner (SemWeb.Inference.Reasoner reasoner)

Adds inferencing capabilities to the Select and Query methods of this Store.

Parameters

reasoner
A reasoning engine, such as SemWeb.Inference.RDFS or SemWeb.Inference.Euler.

Remarks

The Select and Query methods will apply inferencing to the store. The reasoners are applied recursively in the reverse order that they were added with this method. That is, if reasoner A is added before reasoner B, then a call to select will start with reasoner B, but when reasoner B queries the underlying data it will query reasoner A, and reasoner A will actually access any underlying data.

AddSource Method

public virtual void AddSource (SelectableSource source)

Adds a data source to this store.

Parameters

source
A data source.

Remarks

None.

AddSource Method

public virtual void AddSource (SelectableSource source, string uri)

Adds a named data source to this store.

Parameters

source
A data source.
uri
A URI identifying the data source.

Remarks

The data source is added to the store and is identified by uri. An ArgumentException is thrown if uri has already been used in a previous call to this method.

In calls to Contains(Statement), Select, Add, Remove, RemoveAll, and Replace(Statement,Statement), the Meta field of the statement argument is used to choose which data source added with AddSource to query for information. When the supplied Meta field is null or when no named data sources have been added to the Store through a call to this method, all data sources are queried. However, when named data sources have been added with this method and the supplied Meta field is SemWeb.Statement.DefaultMeta, only unnamed data sources added through the other AddSource method (SemWeb.Store.AddSource(SemWeb.SelectableSource)) are queried, and when the supplied SemWeb.Statement.DefaultMeta's URI matches the URI of a named data source added through this method, only that data source is queried.


Create Method

public static Store Create (string spec)

Creates a Store in the factory design pattern.

Parameters

spec
A specification string whose format is given below.

Returns

A Store object to which data sources and reasoning may have been added according to the specification string spec.

Remarks

spec is a newline- or pipe- ("|") delimited string of specification strings to be passed to SemWeb.Store.CreateForInput(string).

For each of those substrings, SemWeb.Store.CreateForInput(string) is called on that string. If the result is a SemWeb.SelectableSource, it is added to the returned Store with AddSource. If the data source is a SemWeb.StatementSource but not a SemWeb.SelectableSource, like an SemWeb.RdfReader, the contents of the data source are first loaded into a SemWeb.MemoryStore and the SemWeb.MemoryStore is then added to the Store to be returned.

In addition, spec can be prefixed with "rdfs+" so that an SemWeb.Inference.RDFS reasoning engine is added to the Store with AddReasoner.

The following are example specification strings:

Example
mysql:rdf:Database=databasename;Server=localhost;User Id=username  (creates a Store around a SQLStore)

rdfs+mysql:rdf:Database=databasename;Server=localhost;User Id=username (creates a Store around an SQLStore and applies RDFS reasoning)

n3:filename.n3 (loads the file into memory and returns a Store containing the data)

n3:file1.n3|n3:file2.n3|...  (loads each of the files into memory and returns a Store containing all of them)

DefaultReplace Method

public static void DefaultReplace (ModifiableSource source, Entity find, Entity replacement)

To be added.

Parameters

source
To be added.
find
To be added.
replacement
To be added.

Remarks

To be added.

DefaultReplace Method

public static void DefaultReplace (ModifiableSource source, Statement find, Statement replacement)

To be added.

Parameters

source
To be added.
find
To be added.
replacement
To be added.

Remarks

To be added.

GetBNodeFromPersistentId Method

public BNode GetBNodeFromPersistentId (string persistentId)

To be added.

Parameters

persistentId
To be added.

Returns

To be added.

Remarks

To be added.

GetPersistentBNodeId Method

public string GetPersistentBNodeId (BNode node)

To be added.

Parameters

node
To be added.

Returns

To be added.

Remarks

To be added.

Query Method

Queries the data sources in the Store and returns the resulting variable bindings.

Parameters

graph
A graph pattern, which is an array of Statements, to match against the store.

Returns

The variable bindings as a collection over SemWeb.Query.VariableBindings instances.

Remarks


DataSources Property

To be added.

Value

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb/RdfXmlParser.html0000644000175000017500000002375410774502134021217 0ustar meebeymeebey SemWeb.RdfXmlParser
RdfXmlParser

To be added.

public class RdfXmlParser : RdfParser


Remarks
To be added.
Members

See Also: Inherited members from RdfParser.

Constructors
Member Details
RdfXmlParser Constructor
public RdfXmlParser (System.Xml.XmlDocument document)

To be added.

Parameters
document
To be added.
Remarks
To be added.

RdfXmlParser Constructor
public RdfXmlParser (System.Xml.XmlReader document)

To be added.

Parameters
document
To be added.
Remarks
To be added.

RdfXmlParser Constructor
public RdfXmlParser (System.IO.TextReader document)

To be added.

Parameters
document
To be added.
Remarks
To be added.

RdfXmlParser Constructor
public RdfXmlParser (System.IO.Stream document)

To be added.

Parameters
document
To be added.
Remarks
To be added.

RdfXmlParser Constructor
public RdfXmlParser (string file)

To be added.

Parameters
file
To be added.
Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb/MemoryStore.html0000644000175000017500000007074310774502134021133 0ustar meebeymeebey SemWeb.MemoryStore
MemoryStore Class

A graph of statements held in memory.

[System.Reflection.DefaultMember("Item")]
public class MemoryStore : Store, System.Collections.Generic.IEnumerable<SemWeb.Statement>


Remarks

The MemoryStore is the main storage mechanism for small amounts of data.

Although the MemoryStore inherits from Store, which can be used to group multiple data sources together, it is illegal to call AddSource on a MemoryStore.

Here are some examples of using a MemoryStore:

C# Example
// Load data from mydata.rdf file
MemoryStore store = new MemoryStore(new RdfXmlReader("mydata.rdf"));

// Add some statements
store.Add(new Statement("http://www.mysite.com", "http://purl.org/dc/elements/1.1/title", (Literal)"My Web Site"));
store.Add(new Statement("http://www.mysite.com", "http://purl.org/dc/elements/1.1/description",
     (Literal)"My site is all about me."));

// You can also use Entity and Literal objects
Entity othersite = new Entity("http://www.anothersite.com");
Entity dctitle = new Entity("http://purl.org/dc/elements/1.1/title");
store.Add(new Statement(othersite, dctitle, new Literal("Create a literal object."));

// Get the statements back by looping through the store
foreach (Statement statement in store) {
    Console.WriteLine(statement);
}

// Or by streaming them to a StatementSink
using (StatementSink sink = new N3Writer(Console.Out))
    store.Write(sink);

// You can get statements back selectively by filtering.  This just gets
// statements about othersite.
using (StatementSink sink = new N3Writer(Console.Out))
    store.Select(new Statement(othersite, null, null), sink);

// And there are some utility functions like this:
foreach (Resource res in store.SelectObjects(othersite, dctitle)) {
    if (res is Literal) // might also be an Entity
        Console.WriteLine("Other site's title: " + ((Literal)res).Value);
}
  

Members

See Also: Inherited members from Store.

Constructors

Creates a new empty MemoryStore.
Creates a MemoryStore initialized with the given array of statements.
Creates a new MemoryStore and reads the data from a StatementSource, which might be a SemWeb.RdfReader, for instance.

Properties

DataSources [read-only]
System.Collections.Generic.IList<SemWeb.SelectableSource> . To be added. (Inherited from Store.)
Distinct [read-only]
bool . Gets whether the store returns only distinct statments from Select calls. (Inherited from Store.)
Item [int] [read-only]
default property
Statement . Returns a statement in the store by index.
StatementCount [read-only]
int . Gets the number of statements in the store. (Inherited from Store.)

Methods

Add (Statement)
Adds a statement to the store. (Inherited from Store.)
AddReasoner (SemWeb.Inference.Reasoner)
Adds inferencing capabilities to the Select and Query methods of this Store. (Inherited from Store.)
AddSource (SelectableSource)
Adds a data source to this store. (Inherited from Store.)
AddSource (SelectableSource, string)
Adds a named data source to this store. (Inherited from Store.)
Clear ()
Clears the contents of the store. (Inherited from Store.)
Contains (Resource) : bool
Tests whether the store contains any statements that mention the given resource. (Inherited from Store.)
Contains (Statement) : bool
Returns whether the store contains a statement, or any statement that matches the template. (Inherited from Store.)
Dispose ()
Releases any external resources associated with the Store. (Inherited from Store.)
GetBNodeFromPersistentId (string) : BNode
To be added. (Inherited from Store.)
GetEntities () : Entity[]
Returns an array of all entities mentioned in the store. (Inherited from Store.)
GetEntitiesOfType (Entity) : Entity[]
Returns an array of all entities in the store whose type is known to be the given type. (Inherited from Store.)
GetMetas () : Entity[]
Returns an array of all entities used in the Meta field of any statement in the store. (Inherited from Store.)
GetPersistentBNodeId (BNode) : string
To be added. (Inherited from Store.)
GetPredicates () : Entity[]
Returns an array of all predicates mentioned in the store. (Inherited from Store.)
Import (StatementSource)
Batch copies the contents of a StatementSource into the ModifyableSource contained in the store. (Inherited from Store.)
MetaQuery (Statement[], SemWeb.Query.QueryOptions) : SemWeb.Query.MetaQueryResult
Tests the querying capabilities of the store. (Inherited from Store.)
Query (Statement[]) : System.Collections.Generic.ICollection<SemWeb.Query.VariableBindings>
Queries the data sources in the Store and returns the resulting variable bindings. (Inherited from Store.)
Query (Statement[], SemWeb.Query.QueryOptions, SemWeb.Query.QueryResultSink)
Queries the store with a simple graph match query. (Inherited from Store.)
Remove (Statement)
Removes statements from the store. (Inherited from Store.)
RemoveAll (Statement[])
Removes all statements matching an array of templates. (Inherited from Store.)
Replace (Entity, Entity)
Replaces all occurences of one Entity with another Entity. (Inherited from Store.)
Replace (Statement, Statement)
Replaces a single statement with another statement. (Inherited from Store.)
Select (SelectFilter) : SelectResult
Retuns a SemWeb.SelectResult object that represents the result of the corresponding select call with a StatementSink. (Inherited from Store.)
Select (Statement) : SelectResult
Retuns a SemWeb.SelectResult object that represents the result of matching a statement template against the store. (Inherited from Store.)
Select (StatementSink)
Streams all statements in this store into a StatementSink. (Inherited from Store.)
Select (SelectFilter, StatementSink)
Queries the story for matching statements, with advanced options, and writes the statements to a SemWeb.StatementSink. (Inherited from Store.)
Select (Statement, StatementSink)
Queries the story for matching statements, and writes the statements to a SemWeb.StatementSink. (Inherited from Store.)
SelectObjects (Entity, Entity) : Resource[]
Finds all objects in statements with the given subject and predicate. (Inherited from Store.)
SelectSubjects (Entity, Resource) : Entity[]
Finds all subjects in statements with the given predicate and object. (Inherited from Store.)
ToArray () : Statement[]
Returns the contents of the store as an array of Statements.
Write (System.IO.TextWriter)
Writes the contents of the store to a stream in N3 format. (Inherited from Store.)

Member Details

MemoryStore Constructor

public MemoryStore ()

Creates a new empty MemoryStore.

Remarks

None.

MemoryStore Constructor

public MemoryStore (StatementSource source)

Creates a new MemoryStore and reads the data from a StatementSource, which might be a SemWeb.RdfReader, for instance.

Parameters

source
A StatementSource, the contents of which are read into the memory store.

Remarks

None.

ToArray Method

public Statement[] ToArray ()

Returns the contents of the store as an array of Statements.

Returns

An array of Statements that make up the contents of the store.

Remarks

None.

Item Property

public Statement this [int index] { get; }

This is the default property for this class.

Returns a statement in the store by index.

Parameters

index
The 0-based index to a statement in the store.

Value

Remarks

None.

MemoryStore Constructor

public MemoryStore (Statement[] statements)

Creates a MemoryStore initialized with the given array of statements.

Parameters

statements
An array of statements.

Remarks

The statements in the array are added to the MemoryStore on creation.


semweb-1.05+dfsg/apidocs/SemWeb/InferenceStore.html0000644000175000017500000001753210774502134021556 0ustar meebeymeebey SemWeb.InferenceStore
InferenceStore

A store that draws interences using reasoning engines.

public class InferenceStore : Store


Remarks

Reasoning engines are implemented in the SemWeb.Reasoning namespace.

This class overrides the Contains and Select methods to augment the corresponding methods in the underlying data model with inferences.

The underlying data store should not be modified once it is passed to the constructor of InferenceStore.

Members

See Also: Inherited members from Store.

Constructors
Constructs a new inference store.
Properties
Engine [read-only]
ReasoningEngine . The reasoning engine passed to the constructor.
Source [read-only]
Store . The underlying data model passed to the constructor.
Member Details
InferenceStore Constructor
public InferenceStore (Store store, ReasoningEngine engine)

Constructs a new inference store.

Parameters
store
The underlying data model from which to draw inferences.
engine
A reasoning engine that is able to draw interences.
Remarks
None.

Source
public Store Source { get; }

The underlying data model passed to the constructor.

Value
The underlying data model passed to the constructor.
Remarks
None.

Engine
public ReasoningEngine Engine { get; }

The reasoning engine passed to the constructor.

Value
The reasoning engine passed to the constructor.
Remarks
None.


semweb-1.05+dfsg/apidocs/SemWeb/RDFSReasoning.html0000644000175000017500000005527510774502134021255 0ustar meebeymeebey SemWeb.RDFSReasoning
RDFSReasoning

To be added.

public class RDFSReasoning : ReasoningEngine


Remarks
To be added.
Members

See Also: Inherited members from ReasoningEngine.

Constructors
To be added.
Fields
rdfsClass
static readonly
Entity . To be added.
rdfsDomain
static readonly
Entity . To be added.
rdfsLiteral
static readonly
Entity . To be added.
rdfsRange
static readonly
Entity . To be added.
rdfsResource
static readonly
Entity . To be added.
rdfsSubClassOf
static readonly
Entity . To be added.
rdfsSubPropertyOf
static readonly
Entity . To be added.
rdfType
static readonly
Entity . To be added.
Methods
Member Details
RDFSReasoning Constructor
public RDFSReasoning ()

To be added.

Remarks
To be added.

rdfType
public static readonly Entity rdfType

To be added.

Remarks
To be added.

rdfsSubClassOf
public static readonly Entity rdfsSubClassOf

To be added.

Remarks
To be added.

rdfsSubPropertyOf
public static readonly Entity rdfsSubPropertyOf

To be added.

Remarks
To be added.

rdfsDomain
public static readonly Entity rdfsDomain

To be added.

Remarks
To be added.

rdfsRange
public static readonly Entity rdfsRange

To be added.

Remarks
To be added.

rdfsResource
public static readonly Entity rdfsResource

To be added.

Remarks
To be added.

rdfsClass
public static readonly Entity rdfsClass

To be added.

Remarks
To be added.

rdfsLiteral
public static readonly Entity rdfsLiteral

To be added.

Remarks
To be added.

getClosure
public ArrayList getClosure (Entity type, Store source, Entity relation, bool inverse)

To be added.

Parameters
type
To be added.
source
To be added.
relation
To be added.
inverse
To be added.
Returns
To be added.
Remarks
To be added.

getSuperTypes
public ArrayList getSuperTypes (Entity type, Store source)

To be added.

Parameters
type
To be added.
source
To be added.
Returns
To be added.
Remarks
To be added.

getSubTypes
public IList getSubTypes (Entity type, Store source)

To be added.

Parameters
type
To be added.
source
To be added.
Returns
To be added.
Remarks
To be added.

getSuperProperties
public ArrayList getSuperProperties (Entity type, Store source)

To be added.

Parameters
type
To be added.
source
To be added.
Returns
To be added.
Remarks
To be added.

getSubProperties
public ArrayList getSubProperties (Entity type, Store source)

To be added.

Parameters
type
To be added.
source
To be added.
Returns
To be added.
Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb/BDBStore.html0000644000175000017500000001325410774502134020244 0ustar meebeymeebey SemWeb.BDBStore

To be added.

public class BDBStore : Store, IDisposable


Remarks
To be added.
Members

See Also: Inherited members from Store.

Constructors
To be added.
Methods
Dispose ()
To be added.
Member Details
BDBStore Constructor
public BDBStore (string directory)

To be added.

Parameters
directory
To be added.
Remarks
To be added.

Dispose
public void Dispose ()

To be added.

Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb/RdfXmlReader.html0000644000175000017500000005275410774502134021167 0ustar meebeymeebey SemWeb.RdfXmlReader
RdfXmlReader Class

Reads RDF statements from an RDF/XML file.

public class RdfXmlReader : RdfReader


Remarks

The RdfXmlReader streams the statements to the StatementSink as they are read from the XML stream. The entire XML document will not be loaded into memory.

The following example reads a RDF/XML file from disk:

C# Example
using (RdfReader data = new RdfXmlReader("filename.rdf")) {
    store.Import(data);
}  

It is strongly recommended that you use one of the constructors that takes a Base URI argument, or else set the Base URI of the reader before reading statements from it, so that relative URIs found in the document can be interpreted. If a BaseURI has not been set and a relative URI is encountered, parsing the document will fail.

The stream is begun to be read as soon as the constructor is called. Any namespace declarations found on the document element of the RDF/XML document will be available in the SemWeb.RdfXmlReader.Namespaces property once the constructor returns. Once the document is fully read, all namespace declarations in the document are available in the SemWeb.RdfReader.Namespaces property and can be copied into the namespace manager of a SemWeb.RdfWriter using the SemWeb.NamespaceManager.AddFrom(SemWeb.NamespaceManager) method.

Members

See Also: Inherited members from RdfReader.

Constructors

Creates a parser from a stream.
Creates a parser from a TextReader.
Creates a parser for a file.
Creates a parser for an XML document already loaded.
Creates a parser for an XmlReader.
Creates a parser from a stream with the given base URI.
Creates a parser from a TextReader with the given base URI.
Creates a parser from a file with the given base URI.

Properties

BaseUri
string . The base URI for resolving relative URIs found in the stream. If a base URI is provided within the stream, this property may be updated to indicate the base URI found. (Inherited from RdfReader.)
Meta
Entity . An entity to assign as the meta entity for statements loaded by this reader. (Inherited from RdfReader.)
Namespaces [read-only]
NamespaceManager . Gets the NamespaceManager that contains all of the namespace-prefix mappings used in the input stream. (Inherited from RdfReader.)
ReuseEntities
bool . Determines whether the reader must reuse Entity objects that it creates. (Inherited from RdfReader.)
Variables [read-only]
System.Collections.Generic.ICollection<SemWeb.Variable> . A list of SemWeb.Variables found in the stream. (Inherited from RdfReader.)
Warnings [read-only]
System.Collections.Generic.ICollection<System.String> . Gets a list of warnings generated while parsing the input stream. (Inherited from RdfReader.)

Methods

Dispose ()
Disposes the reader. (Inherited from RdfReader.)
abstract Select (StatementSink)
Reads the stream into the statement sink. (Inherited from RdfReader.)

Protected Methods

AddVariable (Variable)
Adds a Variable to the Variables collection. (Inherited from RdfReader.)
OnWarning (string)
Implementors of RdfReader may call this method to indicate a parsing warning. (Inherited from RdfReader.)

Member Details

RdfXmlReader Constructor

public RdfXmlReader (System.Xml.XmlDocument document)

Creates a parser for an XML document already loaded.

Parameters

document
The RDF/XML document.

Remarks

None.

RdfXmlReader Constructor

public RdfXmlReader (System.Xml.XmlReader document)

Creates a parser for an XmlReader.

Parameters

document
A stream containing the RDF/XML file.

Remarks

None.

RdfXmlReader Constructor

public RdfXmlReader (System.IO.TextReader document)

Creates a parser from a TextReader.

Parameters

document
The stream containing the RDF/XML file.

Remarks

None.

RdfXmlReader Constructor

public RdfXmlReader (System.IO.Stream document)

Creates a parser from a stream.

Parameters

document
The stream containing the RDF/XML file.

Remarks

None.

RdfXmlReader Constructor

public RdfXmlReader (string file)

Creates a parser for a file.

Parameters

file
The path of the file containing RDF/XML, or "-" to read from Console.In.

Remarks

None.

RdfXmlReader Constructor

public RdfXmlReader (System.IO.TextReader document, string baseUri)

Creates a parser from a TextReader with the given base URI.

Parameters

document
A TextReader containing the RDF/XML document.
baseUri
The URI of the document itself, to be taken as the Base URI for relative URIs encoutered in the document.

Remarks

None.

RdfXmlReader Constructor

public RdfXmlReader (System.IO.Stream document, string baseUri)

Creates a parser from a stream with the given base URI.

Parameters

document
The stream containing the RDF/XML file.
baseUri
The URI of the document itself, to be taken as the Base URI for relative URIs encoutered in the document.

Remarks

None.

RdfXmlReader Constructor

public RdfXmlReader (string file, string baseUri)

Creates a parser from a file with the given base URI.

Parameters

file
The path of the file containing RDF/XML, or "-" to read from Console.In.
baseUri
The URI of the document itself, to be taken as the Base URI for relative URIs encoutered in the document.

Remarks

None.


semweb-1.05+dfsg/apidocs/SemWeb/RdfWriter.html0000644000175000017500000004351110774502134020547 0ustar meebeymeebey SemWeb.RdfWriter
RdfWriter Class

The base class of types that write statements to a stream.

public abstract class RdfWriter : StatementSink, IDisposable


Remarks

This is an abstract class. Two subclasses are provided: SemWeb.N3Writer and SemWeb.RdfXmlWriter.

Members

See Also: Inherited members from object.

Protected Constructors

The protected no-arg constructor used by derived classes.

Properties

BaseUri
string . Gets or sets the base URI for the output document.
Namespaces [read-only]
abstract
NamespaceManager . The NamespaceManager that manages namespace URIs and their prefixes.

Methods

abstract Add (Statement)
Writes a statement to the stream.
Close ()
Completes writing the data and closes the stream.
static Create (string, System.IO.TextWriter) : RdfWriter
Creates a new RdfWriter whose type is specified by a string constant.
static Create (string, string) : RdfWriter
Creates a new RdfWriter whose type is specified by a string constant.
Write (StatementSource)
Writes out the contents of the StatementSource.

Protected Methods

Member Details

RdfWriter Constructor

protected RdfWriter ()

The protected no-arg constructor used by derived classes.

Remarks

None.

Add Method

public abstract void Add (Statement statement)

Writes a statement to the stream.

Parameters

statement
The statement to write.

Remarks

None.

Close Method

public virtual void Close ()

Completes writing the data and closes the stream.

Remarks

None.

Namespaces Property

public abstract NamespaceManager Namespaces { get; }

The NamespaceManager that manages namespace URIs and their prefixes.

Value

A NamespaceManager.

Remarks

For some parsers, it is necessary to give a prefix for all namespaces that occur in the data model being written before the writing begins.

BaseUri Property

public string BaseUri { set; get; }

Gets or sets the base URI for the output document.

Value

A string containing the base URI of the output document, or null if the output document base URI is unknown or not applicable.

Remarks

A writer may choose to abbreviate URIs in the output according to the base URI.

GetResourceKey Method

protected object GetResourceKey (Resource resource)

See SemWeb.Store.GetResourceKey(SemWeb.Resource).

Parameters

resource
A resource.

Returns

A resource key associated with the resource and this writer.

Remarks


SetResourceKey Method

protected void SetResourceKey (Resource resource, object value)

See SemWeb.Store.SetResourceKey(SemWeb.Resource).

Parameters

resource
A resource.
value
A key to associate with the resource and the writer.

Remarks


Write Method

public virtual void Write (StatementSource source)

Writes out the contents of the StatementSource.

Parameters

source
A source containing statements to write.

Remarks

None.

Create Method

public static RdfWriter Create (string type, System.IO.TextWriter output)

Creates a new RdfWriter whose type is specified by a string constant.

Parameters

type
The type of the writer to create. See below for possible values.
output
A TextWriter to output to.

Returns

A new RdfWriter.

Remarks

The possible values for type are:
typeReader
"xml", "text/xml", "application/xml", "application/rdf+xml"SemWeb.RdfXmlWriter
"n3", "text/n3", "application/n3", "application/turtle", "application/x-turtle"SemWeb.N3Writer

Create Method

public static RdfWriter Create (string type, string file)

Creates a new RdfWriter whose type is specified by a string constant.

Parameters

type
The type of the writer to create. See below for possible values.
file
The name of a file to output to, or "-" to output to Standard Output.

Returns

A new RdfWriter.

Remarks

The possible values for type are listed in the Remarks section of SemWeb.RdfWriter.Create(System.String,System.IO.TextWriter)


semweb-1.05+dfsg/apidocs/SemWeb/AnonymousNode.html0000644000175000017500000001315010774502134021431 0ustar meebeymeebey SemWeb.AnonymousNode
AnonymousNode

A type of Entity that has no URI. Also called a blank node.

public class AnonymousNode : Entity


Remarks
Not all anonymous nodes will be instances of this class. SemWeb.Entity objects with null URIs are also used as anonymous nodes.
Members

See Also: Inherited members from Entity.

Constructors
Creates a new anonymous node.
Creates a new anonymous node associated with a KnowledgeModel.
Member Details
AnonymousNode Constructor
public AnonymousNode ()

Creates a new anonymous node.

Remarks
To be added.

AnonymousNode Constructor
public AnonymousNode (KnowledgeModel model)

Creates a new anonymous node associated with a KnowledgeModel.

Parameters
model
A KnowledgeModel to associate with the node.
Remarks
None.


semweb-1.05+dfsg/apidocs/SemWeb/MultiStore.html0000644000175000017500000002120310774502134020740 0ustar meebeymeebey SemWeb.MultiStore
MultiStore

To be added.

public class MultiStore : Store


Remarks
To be added.
Members

See Also: Inherited members from Store.

Constructors
To be added.
Methods
Add (Store)
To be added.
Add (Store, RdfParser)
To be added.
Remove (Store)
To be added.
Member Details
MultiStore Constructor
public MultiStore (KnowledgeModel model)

To be added.

Parameters
model
To be added.
Remarks
To be added.

Add
public void Add (Store store)

To be added.

Parameters
store
To be added.
Remarks
To be added.

Add
public void Add (Store store, RdfParser source)

To be added.

Parameters
store
To be added.
source
To be added.
Remarks
To be added.

Remove
public void Remove (Store store)

To be added.

Parameters
store
To be added.
Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb/WriterStore.html0000644000175000017500000001346010774502134021130 0ustar meebeymeebey SemWeb.WriterStore
WriterStore

To be added.

public class WriterStore : Store, IDisposable


Remarks
To be added.
Members

See Also: Inherited members from Store.

Constructors
Methods
Dispose ()
To be added.
Member Details
WriterStore Constructor
public WriterStore (RdfWriter writer, KnowledgeModel model)

To be added.

Parameters
writer
To be added.
model
To be added.
Remarks
To be added.

Dispose
public void Dispose ()

To be added.

Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb/LiteralFilter+CompType.html0000644000175000017500000000727010774502134023137 0ustar meebeymeebey SemWeb.LiteralFilter.CompType
LiteralFilter.CompType Enum

Represents a type of relational comparison.

public enum LiteralFilter.CompType


Remarks

This enumeration is used by various derivatives of the SemWeb.LiteralFilter class.
Members
Member name Description
NE Not equal
GE Greater than or equal
LE Less than or equal
GT Greater than
LT Less than
EQ Equal

semweb-1.05+dfsg/apidocs/SemWeb/StaticSource.html0000644000175000017500000002670010774502134021250 0ustar meebeymeebey SemWeb.StaticSource
StaticSource Interface

This interface is implemented by SelectableSource classes that represent concrete data sources.

public interface StaticSource : , SelectableSource


Remarks

None.

Members

Properties

StatementCount [read-only]
int . Returns the number of statements in the data source.

Methods

GetBNodeFromPersistentId (string) : BNode
Gets a BNode from a persistent identifier generated by SemWeb.StaticSource.GetPersistentBNodeId(SemWeb.BNode).
GetEntities () : Entity[]
Gets an array of all of the entities mentioned in the data source.
GetMetas () : Entity[]
Gets an array of all of the entities in the Meta position of statements in the data source.
GetPersistentBNodeId (BNode) : string
Creates a persistent identifier for a BNode which can be used with SemWeb.StaticSource.GetBNodeFromPersistentId(string).
GetPredicates () : Entity[]
Gets an array of all of the entities used in the predicate position of statements in the data source.

Member Details

GetBNodeFromPersistentId Method

public BNode GetBNodeFromPersistentId (string persistentId)

Gets a BNode from a persistent identifier generated by SemWeb.StaticSource.GetPersistentBNodeId(SemWeb.BNode).

Parameters

persistentId
A persistent identifier generated by SemWeb.StaticSource.GetPersistentBNodeId(SemWeb.BNode).

Returns

The BNode corresponding to the identifier, or null if the identifier doesn't (or no longer) corresponds to a BNode.

Remarks

This method is never guarenteed to return a BNode, even if an identifier was previously returned for it.

GetEntities Method

public Entity[] GetEntities ()

Gets an array of all of the entities mentioned in the data source.

Returns

An array of Entities. Each entity appears just once.

Remarks

None.

GetMetas Method

public Entity[] GetMetas ()

Gets an array of all of the entities in the Meta position of statements in the data source.

Returns

An array of Entities. Each entity appears just once.

Remarks

None.

GetPersistentBNodeId Method

public string GetPersistentBNodeId (BNode node)

Creates a persistent identifier for a BNode which can be used with SemWeb.StaticSource.GetBNodeFromPersistentId(string).

Parameters

node
A BNode contained within this data source.

Returns

null if an identifier could not be assigned to this BNode, otherwise a globally-unique string identifier for this BNode.

Remarks

Use SemWeb.StaticSource.GetBNodeFromPersistentId(string) to get the BNode back at a future time.

GetPredicates Method

public Entity[] GetPredicates ()

Gets an array of all of the entities used in the predicate position of statements in the data source.

Returns

An array of Entities. Each entity appears just once.

Remarks

None.

StatementCount Property

public int StatementCount { get; }

Returns the number of statements in the data source.

Value

The number of statements in the data source.

Remarks

None.


semweb-1.05+dfsg/apidocs/SemWeb/QueryableSource.html0000644000175000017500000002660510774502134021756 0ustar meebeymeebey SemWeb.QueryableSource
QueryableSource Interface

A QueryableSource is a data source that supports a graph-matching query operation.

public interface QueryableSource : , SelectableSource


Remarks

The QueryableSource interface is meant to expose the functionality of simple graph matching over a data source. For instance, the following simple type of query can be answered through the QueryableSource interface:

Example
?book dc:title ?title .
?book ex:isbn ?isbn.

In these queries, the QueryableSouce returns all ways to bind variables to values such that for each binding, all the statements in the query with the variables replaced with their values are contained within data source.

The SemWeb.QueryableSource.Query(SemWeb.Statement[],SemWeb.Query.QueryOptions,SemWeb.Query.QueryResultSink) method takes three parameters. The first parameter is the graph, as an array of SemWeb.Statements. For the example above, the array could be created as follows:

C# Example
Variable book = new Variable();
Variable title = new Variable();
Variable isbn = new Variable();

Statement[] graph = new Statement[] {
	new Statement(book, DCNS + "title", title),
	new Statement(book, EXNS + "isbn", isbn)
}

Keep in mind that different SemWeb.Variable instances always represent different variables. Be sure to reuse the same Variable object when you want to use the same variable more than once in the query.

The second argument to Query is a SemWeb.Query.QueryOptions structure which provides additional details on how the query should be executed. No members of that structure are required to be set for a run-of-the-mill query.

The final argument is a SemWeb.Query.QueryResultSink to which each of the bindings are sent as they are computed. All of the results are sent to the sink before the Query method returns.

This interface also has a SemWeb.QueryableSource.MetaQuery(SemWeb.Statement[],SemWeb.Query.QueryOptions) method which is used before invoking the Query method to determine whether the data source can answer the query. Calling MetaQuery is optional; however, Query may throw a NotSupportedException if the query cannot even be processed, something that can be avoided by calling MetaQuery first and checking the return value.

Members

Methods

MetaQuery (Statement[], SemWeb.Query.QueryOptions) : SemWeb.Query.MetaQueryResult
This method is used to cheaply get information on how the Query method will execute a query.
Query (Statement[], SemWeb.Query.QueryOptions, SemWeb.Query.QueryResultSink)
Queries the data source with a simple graph pattern containing variables.

Member Details

Query Method

Queries the data source with a simple graph pattern containing variables.

Parameters

graph
An array of Statements forming a simple graph.
options
Query options.
sink
A sink to which the results of the query will be sent.

Remarks

The graph consists of an array of SemWeb.Statements. None of the fields of the statements may be null, as in the Select calls. Rather, wildcards are given as instances of the SemWeb.Variable class. The query's results are all ways the variables can be "bound" (ie. assigned) to resources in the data source such that the graph, with the variables replaced by their values, is found or supported by the data source.

Bear in mind that two instances of the Variable class are never considered equal even if their names are equal. Reuse the same Variable instance object to refer to a variable more than once in the graph.

This method may throw a NotSupportedException if the query cannot even be processed. No other exceptions, besides ArgumentException, will be thrown.


MetaQuery Method

This method is used to cheaply get information on how the Query method will execute a query.

Parameters

graph
The query.
options
The query options.

Returns

A SemWeb.Query.MetaQueryResult structure indicating whether and how the query will be executed.

Remarks

Call this method before the Query method to check whether a query is supported on the data source and to get more information on how the query will be executed. Use the same arguments for graph and options as you are about to pass to the Query method. See the documentation for SemWeb.Query.MetaQueryResult for more information.


semweb-1.05+dfsg/apidocs/SemWeb/Statement.html0000644000175000017500000006701610774502134020611 0ustar meebeymeebey SemWeb.Statement
Statement Struct

A statement, comprising a subject, predicate, and object.

Remarks

RDF requires that subjects and predicates be entities (non-literals).

The SemWeb.Statement.Meta property optionally contains an entity that has meta-information about the statement. The use of the Meta property is left up to application writers.

The subject, predicate, and object fields should not normally be null. They must not be null in a call to SemWeb.Store.Add(SemWeb.Statement). They may be null when used in a call to SemWeb.Store.Select.

Members

See Also: Inherited members from ValueType.

Constructors

Creates a new Statement.
Creates a new Statement with a meta entity.

Fields

All
static
Statement . A statement whose fields are all null.
DefaultMeta
static
Entity . The entity used for the SemWeb.Statement.Meta field of statements when a Meta value is not given by the caller.
Meta
Entity . The meta field for the statement.
Object
Resource . The object of the statement.
Predicate
Entity . The predicate of the statement.
Subject
Entity . The subject of the statement.

Properties

AnyNull [read-only]
bool . Gets whether any of the Subject, Predicate, Object, or Meta fields are null.

Methods

CompareTo (Statement) : int
Compares two statements.
Invert () : Statement
Returns a new statement with the same predicate but with subject and object reversed.
Matches (Statement) : bool
To be added.
Replace (Hashtable) : Statement
Replaces instances of resources in the statement with other resources.
Replace (Resource, Resource) : Statement
Replaces occurrences of a resource with another resource.

Operators

Equality (Statement, Statement)
Tests two statements for equality.
Inequality (Statement, Statement)
Tests two statements for inequality.

Member Details

Statement Constructor

public Statement (Entity subject, Entity predicate, Resource object)

Creates a new Statement.

Parameters

subject
The subject of the statement.
predicate
The predicate of the statement.
object
The object of the statement.

Remarks

No arguments to this constructor may be null if this statement will be used in a call to the Add method of SemWeb.Store or SemWeb.StatementSink. Any of the arguments may be null if the statement will be used as a template for calls to a Contains or Select method.

The value of the SemWeb.Statement.Meta is set to SemWeb.Statement.DefaultMeta.


Statement Constructor

public Statement (Entity subject, Entity predicate, Resource object, Entity meta)

Creates a new Statement with a meta entity.

Parameters

subject
The subject of the statement.
predicate
The predicate of the statement.
object
The object of the statement.
meta
An entity providing meta-information about the statement.

Remarks

No arguments to this constructor may be null if this statement will be used in a call to the Add method of SemWeb.Store or SemWeb.StatementSink. Any of the arguments may be null if the statement will be used as a template for calls to a Contains or Select method.

Invert Method

public Statement Invert ()

Returns a new statement with the same predicate but with subject and object reversed.

Returns

The inverse of this statement.

Remarks

A stem.ArgumentException is thrown if the object of the statement is not an entity, since subjects can only be entities.

op_Equality Method

public static bool == (Statement a, Statement b)

Tests two statements for equality.

Parameters

a
A statement.
b
A statement.

Returns

Whether the two statements are equal.

Remarks

Statements are considered equal when their subjects, predicates, objects, and meta entities are considered equal, or both are null.

op_Inequality Method

public static bool != (Statement a, Statement b)

Tests two statements for inequality.

Parameters

a
A statement.
b
A statement.

Returns

Whether the two statements are not equal.

Remarks

Statements are considered equal when their subjects, predicates, objects, and meta entities are considered equal, or both are null.

DefaultMeta Field

public static Entity DefaultMeta

The entity used for the SemWeb.Statement.Meta field of statements when a Meta value is not given by the caller.

Remarks

None.

All Field

public static Statement All

A statement whose fields are all null.

Remarks

This statement is provided as a convience to easily select all statements in a source by a call to Select.

The following expression writes out all statements in a store.

C# Example
using (StatementSink sink = new N3Writer(Console.Out)) {
    store.Select(Statement.All);
}

AnyNull Property

public bool AnyNull { get; }

Gets whether any of the Subject, Predicate, Object, or Meta fields are null.

Value

true if any of the Subject, Predicate, Object, or Meta fields are null.

Remarks

This is used to detect whether the Statement is a template.

Replace Method

public Statement Replace (Resource find, Resource replacement)

Replaces occurrences of a resource with another resource.

Parameters

find
The resource to be replaced.
replacement
The new resource to use.

Returns

A new statement in which occurrences of find have been replaced with replacement.

Remarks

An ArgumentException is thrown if find is the subject, predicate, or meta of the statement and replacement is not an SemWeb.Entity.

Subject Field

public Entity Subject

The subject of the statement.

Remarks

None.

Predicate Field

public Entity Predicate

The predicate of the statement.

Remarks

None.

Object Field

public Resource Object

The object of the statement.

Remarks

Objects can be entities or literals.

Meta Field

public Entity Meta

The meta field for the statement.

Remarks

This field is often left as its default value, which is SemWeb.Statement.DefaultMeta, but the value of this field can be used for any application-specific purpose. Uses include tracking context and provenance, reification, and for formulas and named graphs.

Replace Method

public Statement Replace (Hashtable resourceMap)

Replaces instances of resources in the statement with other resources.

Parameters

resourceMap
A mapping from resources to resources.

Returns

A new statement in which instances of the keys of resourceMap have been replaced by their corresponding values.

Remarks

An exception will be thrown if a resource in subject, predicate, or meta position is mapped to a literal value.

Matches Method

public bool Matches (Statement statement)

To be added.

Parameters

statement
To be added.

Returns

To be added.

Remarks

To be added.

CompareTo Method

public int CompareTo (Statement s)

Compares two statements.

Parameters

s
Another statement.

Returns

0 if the two statements are equal, -1 if this statement should be ordered before s, otherwise 1 if s should be ordered before this statement.

Remarks

Statements are ordered first by subject, then by predicate, then object, then meta. For each of those fields, this statement comes first if its field is null or if the resource in the field would be ordered first compared to the corresponding resource in s, according to the ordering defined in the Resource class.


semweb-1.05+dfsg/apidocs/SemWeb/NS.html0000644000175000017500000001226510774502134017161 0ustar meebeymeebey SemWeb.NS

To be added.

NS


Remarks
To be added.
Members

See Also: Inherited members from object.

Constructors
NS ()
To be added.
Fields
RDF
const
string . To be added.
Member Details
NS Constructor
public NS ()

To be added.

Remarks
To be added.

RDF
public const string RDF

To be added.

Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb/NamespaceManager.html0000644000175000017500000004616010774502134022031 0ustar meebeymeebey SemWeb.NamespaceManager
NamespaceManager Class

A class that maintains a mapping between namespace prefixes and URIs.

public class NamespaceManager


Remarks

None.

Members

See Also: Inherited members from object.

Constructors

Creates a new namespace manager.
Creates a new namespace manager who will look in another namespace manager when it cannot find a matching prefix or URI.

Methods

AddFrom (NamespaceManager)
Adds all of the namespace declarations from another NamespaceManager.
AddNamespace (string, string)
Adds a prefix-URI mapping to the table.
GetNamespace (string) : string
Returns the namespace associated with a prefix.
GetNamespaces () : ICollection
Gets all of the namespace URIs known to the namespace manager.
GetPrefix (string) : string
Gets the prefix associated with a namespace URI.
GetPrefixes () : ICollection
Gets all of the prefixes known to the namespace manager.
Normalize (string) : string
Normalizes a URI in N3 format.
Normalize (string, out string, out string) : bool
Splits a URI into a prefix and local name.
Resolve (string) : string
Converts a QName into a full URI.

Member Details

NamespaceManager Constructor

public NamespaceManager ()

Creates a new namespace manager.

Remarks

None.

NamespaceManager Constructor

public NamespaceManager (NamespaceManager parent)

Creates a new namespace manager who will look in another namespace manager when it cannot find a matching prefix or URI.

Parameters

parent
Another namespace manager.

Remarks

When the new namespace manager cannot find a prefix or URI in its own table, it will consult parent's table.

AddNamespace Method

public virtual void AddNamespace (string uri, string prefix)

Adds a prefix-URI mapping to the table.

Parameters

uri
A URI.
prefix
A namespace prefix for the URI.

Remarks

If prefix was already used in a call to this method, the previous prefix-to-URI mapping will be overwritten. Likewise, if uri was used before, the previous uri-to-prefix mapping will be overwritten.

GetNamespace Method

public virtual string GetNamespace (string prefix)

Returns the namespace associated with a prefix.

Parameters

prefix
The prefix to look up.

Returns

The corresponding namespace, or null if the prefix is not in the table.

Remarks

None.

GetPrefix Method

public virtual string GetPrefix (string uri)

Gets the prefix associated with a namespace URI.

Parameters

uri
A URI.

Returns

The prefix associated with this namespace, or null if the URI is not associated with a prefix.

Remarks

None.

Normalize Method

public bool Normalize (string uri, out string prefix, out string localname)

Splits a URI into a prefix and local name.

Parameters

uri
The URI to split.
prefix
This parameter is set to a namespace prefix.
localname
This parameter is set to a local name.

Returns

True if the URI could be split into a prefix and local name, false otherwise.

Remarks

None.

Normalize Method

public string Normalize (string uri)

Normalizes a URI in N3 format.

Parameters

uri
A URI to normalize.

Returns

If a namespace matches part of this URI, a QName (prefix:localname) is returned. Otherwise, the URI is returned in angled brackets (<uri>).

Remarks

A QName will only be returned if the localname consists only of valid characters for a QName.

Resolve Method

public string Resolve (string qname)

Converts a QName into a full URI.

Parameters

qname
A QName, e.g. "dc:title."

Returns

A URI equivalent to the QName.

Remarks

The QName is split on its colon. The prefix and colon are replaced by the namespace corresponding to the prefix. An exception is thrown if the prefix is not known to the namespace manager.

GetNamespaces Method

public ICollection GetNamespaces ()

Gets all of the namespace URIs known to the namespace manager.

Returns

A collection of all namespace URIs known to this namespace manager.

Remarks

None.

GetPrefixes Method

public ICollection GetPrefixes ()

Gets all of the prefixes known to the namespace manager.

Returns

A collection of all prefixes known to this namespace manager.

Remarks

None.

AddFrom Method

public void AddFrom (NamespaceManager nsmgr)

Adds all of the namespace declarations from another NamespaceManager.

Parameters

nsmgr
The NamespaceManager to copy the declarations from.

Remarks

None.


semweb-1.05+dfsg/apidocs/SemWeb/StatementFilterSink.html0000644000175000017500000002431010774502134022572 0ustar meebeymeebey SemWeb.StatementFilterSink
StatementFilterSink

To be added.

StatementFilterSink : StatementSinkEx


Remarks
To be added.
Members

See Also: Inherited members from object.

Constructors
Properties
StatementCount [read-only]
int . To be added.
Methods
Add (Statement) : bool
To be added.
CreateAnonymousEntity () : Entity
To be added.
Import (RdfParser)
To be added.
Member Details
StatementFilterSink Constructor
public StatementFilterSink (StatementSink sink)

To be added.

Parameters
sink
To be added.
Remarks
To be added.

Add
public bool Add (Statement statement)

To be added.

Parameters
statement
To be added.
Returns
To be added.
Remarks
To be added.

CreateAnonymousEntity
public Entity CreateAnonymousEntity ()

To be added.

Returns
To be added.
Remarks
To be added.

Import
public void Import (RdfParser parser)

To be added.

Parameters
parser
To be added.
Remarks
To be added.

StatementCount
public int StatementCount { get; }

To be added.

Value
To be added.
Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb/Literal.html0000644000175000017500000014627310774502134020244 0ustar meebeymeebey SemWeb.Literal
Literal Class

A literal (text string) node in an RDF graph.

public sealed class Literal : Resource


Remarks

Literals are string values optionally tagged with a language or datatype URI.

An explicit conversion operator is defined from strings to literals as a convenience. The operator converts the string to a literal by returning a literal with that value, and null language and datatype.

The following examples create literal nodes.

C# Example
Literal thing1 = new Literal("SemWeb: The C# Library");
Literal thing2 = (Literal)"SemWeb: The C# Library"; // explicit operator overload
Literal thing3 = new Literal("SemWeb: The C# Library", "en", null); // with language
Literal thing3 = new Literal("SemWeb: The C# Library", null, "http://www.w3.org/2001/XMLSchema#string"); // with datatype

Console.WriteLine(thing1.Value);
Console.WriteLine(thing2.Language);
Console.WriteLine(thing3.DataType);

Members

See Also: Inherited members from Resource.

Constructors

Creates a new Literal with the given string value.
Creates a new Literal with the given value, language, and datatype.

Properties

DataType [read-only]
string . The datatype URI of the literal.
Language [read-only]
string . The language of the literal.
Uri [read-only]
abstract
string . The URI of this resource. (Inherited from Resource.)
Value [read-only]
string . The value of the literal.

Methods

CompareTo (Resource) : int
Compares two resources. (Inherited from Resource.)
static FromValue (bool) : Literal
Returns an XSD-typed boolean literal from the given value.
static FromValue (byte) : Literal
Returns an XSD-typed (unsigned) byte literal from the given value.
static FromValue (DateTime) : Literal
Returns an XSD-typed dateTime literal from the given value representing a date and UTC time.
static FromValue (decimal) : Literal
Returns an XSD-typed decimal literal from the given value.
static FromValue (double) : Literal
Returns an XSD-typed double-precision literal from the given value.
static FromValue (short) : Literal
Returns an XSD-typed short literal from the given value.
static FromValue (int) : Literal
Returns an XSD-typed int literal from the given value.
static FromValue (long) : Literal
Returns an XSD-typed long literal from the given value.
static FromValue (sbyte) : Literal
Returns an XSD-typed (signed) byte literal from the given value.
static FromValue (float) : Literal
Returns an XSD-typed floating-point literal from the given value.
static FromValue (string) : Literal
Returns an XSD-typed string literal from the given value.
static FromValue (TimeSpan) : Literal
Returns an XSD-typed duration literal from the given value.
static FromValue (ushort) : Literal
Returns an XSD-typed unsigned short literal from the given value.
static FromValue (uint) : Literal
Returns an XSD-typed unsigned int literal from the given value.
static FromValue (ulong) : Literal
Returns an XSD-typed boolean literal from the given value.
static FromValue (Uri) : Literal
Returns an XSD-typed URI (anyURI) literal from the given value.
static FromValue (DateTime, bool, bool) : Literal
Returns an XSD-typed date or dateTime literal from the given value.
static FromValue (TimeSpan, bool, bool) : Literal
Returns an XSD-typed duration or time literal from the given value.
GetResourceKey (object) : object
To be added. (Inherited from Resource.)
Normalize () : Literal
Creates a normalized form of the literal.
static Parse (string, NamespaceManager) : Literal
Parses a literal value.
ParseValue () : object
Gets a native .NET type for the literl value using a XSD DataType.
SetResourceKey (object, object)
To be added. (Inherited from Resource.)

Operators

Conversion to SemWeb.Literal (Explicit)
Converts a string to a Literal object whose language and datatype are null.

Member Details

Literal Constructor

public Literal (string value)

Creates a new Literal with the given string value.

Parameters

value
The value of the Literal node.

Remarks

None.

Literal Constructor

public Literal (string value, string language, string dataType)

Creates a new Literal with the given value, language, and datatype.

Parameters

value
The value of the Literal node.
language
A language identifier, or null to leave the language unspecified.
dataType
The URI that gives the datatype of the literal, or null to leave the specific datatype unspecified.

Remarks

A language and datatype cannot both be specified, following to the RDF standard. An exception will be thrown if both are given.

Value Property

public string Value { get; }

The value of the literal.

Value

The string value of the literal.

Remarks

None.

Language Property

public string Language { get; }

The language of the literal.

Value

The language identifier of the literal, or null.

Remarks

None.

DataType Property

public string DataType { get; }

The datatype URI of the literal.

Value

The datatype URI of the literal, or null.

Remarks

None.

Parse Method

public static Literal Parse (string literal, NamespaceManager namespaces)

Parses a literal value.

Parameters

literal
An N3-encoded form of a literal.
namespaces
A namespace manager used to resolve the literal's datatype, if present, or null.

Returns

A Literal object.

Remarks

The encoded literal must be in the form of: "value"[@langcode | ^^datatypeURI].

If namespaces is null and a datatype was provided as a QName, or if the QName prefix was not found in the namespace manager, an ArgumentException is thrown.


Conversion Method

public static explicit operator Literal (string value)

Converts a string to a Literal object whose language and datatype are null.

Parameters

value
The string value to convert to a Literal object.

Returns

A literal object whose Value is the string, and whose language and datatype are null.

Remarks

This is an explicit cast operator.

ParseValue Method

public object ParseValue ()

Gets a native .NET type for the literl value using a XSD DataType.

Returns

A string, boolean, integer, or other value, as described below.

Remarks

If the DataType of the literal is not set, or if the DataType is not one of the following recognized types, the literal's string value is returned.

The recognized types below are all in the http://www.w3.org/2001/XMLSchema# namespace. That is, where it says "string" below, it means the DataType is http://www.w3.org/2001/XMLSchema#string.

DataType(s) Return Value
string, normalizedString, anyURI The literal's value, as a string.
boolean A bool, true if the literal's value is "true" or "1", false otherwise.
decimal, integer, positiveInteger, nonPositiveInteger, negativeInteger, nonNegativeInteger The literal's value as a decimal using System.Decimal.Parse(string).
float or double The literal's value as a float for float or double for double, using the appropriate Parse method.
duration The literal's value as a TimeSpan using System.TimeSpan.Parse(string).
dateTime, time, date The literal's value as a DateTime using System.DateTime.Parse(string).
long, int, short, byte The literal's value as a long, int, short, or sbyte using the appropriate Parse method.
unsignedLong, unsignedInt, unsignedShort, unsignedByte The literal's value as a ulong, uint, ushort, or byte using the appropriate Parse method.

Normalize Method

public Literal Normalize ()

Creates a normalized form of the literal.

Returns

A normalized form of the literal.

Remarks

If this literal has a DataType recognized by the SemWeb.Literal.ParseValue() method, this method returns a new literal whose value is a normalized form of the value of this literal. Otherwise, Normalize returns the literal unchanged.

FromValue Method

public static Literal FromValue (float value)

Returns an XSD-typed floating-point literal from the given value.

Parameters

value
A value.

Returns

A new Literal object with the indicated XSD datatype and a value in the lexical space of that datatype according to the parameters given.

Remarks

None.

FromValue Method

public static Literal FromValue (double value)

Returns an XSD-typed double-precision literal from the given value.

Parameters

value
A value.

Returns

A new Literal object with the indicated XSD datatype and a value in the lexical space of that datatype according to the parameters given.

Remarks

None.

FromValue Method

public static Literal FromValue (byte value)

Returns an XSD-typed (unsigned) byte literal from the given value.

Parameters

value
A value.

Returns

A new Literal object with the indicated XSD datatype and a value in the lexical space of that datatype according to the parameters given.

Remarks

None.

FromValue Method

public static Literal FromValue (short value)

Returns an XSD-typed short literal from the given value.

Parameters

value
A value.

Returns

A new Literal object with the indicated XSD datatype and a value in the lexical space of that datatype according to the parameters given.

Remarks

None.

FromValue Method

public static Literal FromValue (int value)

Returns an XSD-typed int literal from the given value.

Parameters

value
A value.

Returns

A new Literal object with the indicated XSD datatype and a value in the lexical space of that datatype according to the parameters given.

Remarks

None.

FromValue Method

public static Literal FromValue (long value)

Returns an XSD-typed long literal from the given value.

Parameters

value
A value.

Returns

A new Literal object with the indicated XSD datatype and a value in the lexical space of that datatype according to the parameters given.

Remarks

None.

FromValue Method

public static Literal FromValue (sbyte value)

Returns an XSD-typed (signed) byte literal from the given value.

Parameters

value
A value.

Returns

A new Literal object with the indicated XSD datatype and a value in the lexical space of that datatype according to the parameters given.

Remarks

None.

FromValue Method

public static Literal FromValue (ushort value)

Returns an XSD-typed unsigned short literal from the given value.

Parameters

value
A value.

Returns

A new Literal object with the indicated XSD datatype and a value in the lexical space of that datatype according to the parameters given.

Remarks

None.

FromValue Method

public static Literal FromValue (uint value)

Returns an XSD-typed unsigned int literal from the given value.

Parameters

value
A value.

Returns

A new Literal object with the indicated XSD datatype and a value in the lexical space of that datatype according to the parameters given.

Remarks

None.

FromValue Method

public static Literal FromValue (ulong value)

Returns an XSD-typed boolean literal from the given value.

Parameters

value
A value.

Returns

A new Literal object with the indicated XSD datatype and a value in the lexical space of that datatype according to the parameters given.

Remarks

None.

FromValue Method

public static Literal FromValue (bool value)

Returns an XSD-typed boolean literal from the given value.

Parameters

value
A value.

Returns

A new Literal object with the indicated XSD datatype and a value in the lexical space of that datatype according to the parameters given.

Remarks

None.

FromValue Method

public static Literal FromValue (string value)

Returns an XSD-typed string literal from the given value.

Parameters

value
A value.

Returns

A new Literal object with the indicated XSD datatype and a value in the lexical space of that datatype according to the parameters given.

Remarks

None.

FromValue Method

public static Literal FromValue (Uri value)

Returns an XSD-typed URI (anyURI) literal from the given value.

Parameters

value
A value.

Returns

A new Literal object with the indicated XSD datatype and a value in the lexical space of that datatype according to the parameters given.

Remarks

None.

FromValue Method

public static Literal FromValue (DateTime value)

Returns an XSD-typed dateTime literal from the given value representing a date and UTC time.

Parameters

value
A value whose time is in UTC.

Returns

A new Literal object with the indicated XSD datatype and a value in the lexical space of that datatype according to the parameters given.

Remarks

None.

FromValue Method

public static Literal FromValue (DateTime value, bool withTime, bool isLocalTime)

Returns an XSD-typed date or dateTime literal from the given value.

Parameters

value
A date value, optionally with a time component.
withTime
A boolean indicating whether value has a time component, or else only has a date component.
isLocalTime
A boolean value indicating whether the time component of value is a local time, or else is a UTC time.

Returns

A new Literal object with the indicated XSD datatype and a value in the lexical space of that datatype according to the parameters given.

Remarks

None.

FromValue Method

public static Literal FromValue (TimeSpan value)

Returns an XSD-typed duration literal from the given value.

Parameters

value
A value.

Returns

A new Literal object with the indicated XSD datatype and a value in the lexical space of that datatype according to the parameters given.

Remarks

None.

FromValue Method

public static Literal FromValue (TimeSpan value, bool asTime, bool isLocalTime)

Returns an XSD-typed duration or time literal from the given value.

Parameters

value
A value.
asTime
A boolean value indicating whether value should be interpreted as a time, or else as a duration.
isLocalTime
If asTime is true, then isLocalTime is a boolean value indicating whether value is a local time, or else is a UTC time.

Returns

A new Literal object with the indicated XSD datatype and a value in the lexical space of that datatype according to the parameters given.

Remarks

None.

FromValue Method

public static Literal FromValue (decimal value)

Returns an XSD-typed decimal literal from the given value.

Parameters

value
A value.

Returns

A new Literal object with the indicated XSD datatype and a value in the lexical space of that datatype according to the parameters given.

Remarks

None.


semweb-1.05+dfsg/apidocs/SemWeb/SelectFilter.html0000644000175000017500000004644510774502134021235 0ustar meebeymeebey SemWeb.SelectFilter
SelectFilter Struct

This structure provides the arguments to the more powerful Select overload.

public struct SelectFilter : IEnumerable


Remarks

Members

See Also: Inherited members from ValueType.

Constructors

Creates a new SelectFilter which selects for statements matching the template.
Creates a SelectFilter to select for matching statements.

Fields

All
static
SelectFilter . A SelectFilter than selects for all statements.
Limit
int . Maximum number of statements to return.
LiteralFilters
LiteralFilter[]. An array of filters that the object value of statements must match.
Metas
Entity[]. The filter for the meta value of statements.
Objects
Resource[]. The filter for the object value of statements.
Predicates
Entity[]. The filter for the predicate value of statements.
Subjects
Entity[]. The filter for the subject value of statements.

Methods

static FromGraph (Statement[]) : SelectFilter[]
To be added.
GetEnumerator () : IEnumerator
To be added.

Operators

Equality (SelectFilter, SelectFilter)
Tests two SelectFilters for equality.
Inequality (SelectFilter, SelectFilter)
Tests two SelectFilters for inequality.

Member Details

SelectFilter Constructor

public SelectFilter (Statement statement)

Creates a new SelectFilter which selects for statements matching the template.

Parameters

statement
The statement template to select for.

Remarks

None.

SelectFilter Constructor

public SelectFilter (Entity[] subjects, Entity[] predicates, Resource[] objects, Entity[] metas)

Creates a SelectFilter to select for matching statements.

Parameters

subjects
null to match any entity, or an array of entities any of which match the filter.
predicates
null to match any entity, or an array of entities any of which match the filter.
objects
null to match any resource, or an array of resources any of which match the filter.
metas
null to match any entity, or an array of entities any of which match the filter.

Remarks

None.

Subjects Field

public Entity[] Subjects

The filter for the subject value of statements.

Remarks

null to match any entity, or an array of entities any of which match the filter.

Predicates Field

public Entity[] Predicates

The filter for the predicate value of statements.

Remarks

null to match any entity, or an array of entities any of which match the filter.

Objects Field

public Resource[] Objects

The filter for the object value of statements.

Remarks

null to match any resource, or an array of resources any of which match the filter.

Metas Field

public Entity[] Metas

The filter for the meta value of statements.

Remarks

null to match any entity, or an array of entities any of which match the filter.

LiteralFilters Field

public LiteralFilter[] LiteralFilters

An array of filters that the object value of statements must match.

Remarks

An array of filters that the object value of any matching statements must match.

Limit Field

public int Limit

Maximum number of statements to return.

Remarks

Stores are free to ignore the limit provided.

All Field

public static SelectFilter All

A SelectFilter than selects for all statements.

Remarks

This is equivalent to SemWeb.Statement.All.

FromGraph Method

public static SelectFilter[] FromGraph (Statement[] graph)

To be added.

Parameters

graph
To be added.

Returns

To be added.

Remarks

To be added.

GetEnumerator Method

public IEnumerator GetEnumerator ()

To be added.

Returns

To be added.

Remarks

To be added.

op_Equality Method

public static bool == (SelectFilter a, SelectFilter b)

Tests two SelectFilters for equality.

Parameters

a
A SelectFilter.
b
A SelectFilter.

Returns

True if the two SelectFilters have equivalent values for all fields.

Remarks

None.

op_Inequality Method

public static bool != (SelectFilter a, SelectFilter b)

Tests two SelectFilters for inequality.

Parameters

a
A SelectFilter.
b
A SelectFilter.

Returns

False if the two SelectFilters have equivalent values for all fields.

Remarks

None.


semweb-1.05+dfsg/apidocs/SemWeb/ReasoningEngine.html0000644000175000017500000002657210774502134021722 0ustar meebeymeebey SemWeb.ReasoningEngine
ReasoningEngine

To be added.

public abstract class ReasoningEngine


Remarks
To be added.
Members

See Also: Inherited members from object.

Protected Constructors
To be added.
Methods
Member Details
ReasoningEngine Constructor
protected ReasoningEngine ()

To be added.

Remarks
To be added.

IsAsserted
public virtual bool IsAsserted (Statement statement, Store source)

To be added.

Parameters
statement
To be added.
source
To be added.
Returns
To be added.
Remarks
To be added.

FindEntailments
public virtual void FindEntailments (Statement statement, Statement template, StatementSink result, Store source)

To be added.

Parameters
statement
To be added.
template
To be added.
result
To be added.
source
To be added.
Remarks
To be added.

Select
public virtual void Select (Statement statement, StatementSink result, Store source)

To be added.

Parameters
statement
To be added.
result
To be added.
source
To be added.
Remarks
To be added.

SelectFilter
public virtual void SelectFilter (ref Statement statement, Store source)

To be added.

Parameters
statement
To be added.
source
To be added.
Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb/OWLReasoning.html0000644000175000017500000003274110774502134021151 0ustar meebeymeebey SemWeb.OWLReasoning
OWLReasoning

To be added.

public class OWLReasoning : ReasoningEngine


Remarks
To be added.
Members

See Also: Inherited members from ReasoningEngine.

Constructors
To be added.
Fields
owlFunctional
static readonly
Entity . To be added.
owlInverseFunctional
static readonly
Entity . To be added.
owlInverseOf
static readonly
Entity . To be added.
owlSymmetric
static readonly
Entity . To be added.
owlTransitive
static readonly
Entity . To be added.
rdfType
static readonly
Entity . To be added.
Methods
Member Details
OWLReasoning Constructor
public OWLReasoning ()

To be added.

Remarks
To be added.

rdfType
public static readonly Entity rdfType

To be added.

Remarks
To be added.

owlInverseOf
public static readonly Entity owlInverseOf

To be added.

Remarks
To be added.

owlTransitive
public static readonly Entity owlTransitive

To be added.

Remarks
To be added.

owlSymmetric
public static readonly Entity owlSymmetric

To be added.

Remarks
To be added.

owlFunctional
public static readonly Entity owlFunctional

To be added.

Remarks
To be added.

owlInverseFunctional
public static readonly Entity owlInverseFunctional

To be added.

Remarks
To be added.

TransitiveSelect
public static void TransitiveSelect (Entity subject, Entity start, Entity predicate, bool inverse, Store source, StatementSink result)

To be added.

Parameters
subject
To be added.
start
To be added.
predicate
To be added.
inverse
To be added.
source
To be added.
result
To be added.
Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb/N3Reader.html0000644000175000017500000003144010774502134020240 0ustar meebeymeebey SemWeb.N3Reader
N3Reader Class

Reads RDF statements from a Notation 3 (N3, Turtle, or NTriples) stream.

public class N3Reader : RdfReader


Remarks

Most of the N3 specification is supported, including everything in NTriples and Turtle. Statements are streamed as soon as they are read from the stream.

N3 formula notation with { and } is supported in the following way. For every formula, an anonymous entity is created to represent that graph. Every statement in the formula is imported with the SemWeb.Statement.Meta property set to the anonymous entity (unless it is recursively embedded in another formula, in which case it uses the innermost formula's anonymous entity).

The following example reads a N-Triples, Turtle, or N3 file from disk:

C# Example
using (RdfReader data = new N3Reader("filename.n3")) {
    store.Import(data);
}  

Once the document is fully read, all namespace declarations in the document are available in the SemWeb.RdfReader.Namespaces property and can be copied into the namespace manager of a SemWeb.RdfWriter using the SemWeb.NamespaceManager.AddFrom(SemWeb.NamespaceManager) method.

Members

See Also: Inherited members from RdfReader.

Constructors

Creates a new N3 parser for a stream.
Creates a new N3 parser for the given file.

Properties

BaseUri
string . The base URI for resolving relative URIs found in the stream. If a base URI is provided within the stream, this property may be updated to indicate the base URI found. (Inherited from RdfReader.)
Meta
Entity . An entity to assign as the meta entity for statements loaded by this reader. (Inherited from RdfReader.)
Namespaces [read-only]
NamespaceManager . Gets the NamespaceManager that contains all of the namespace-prefix mappings used in the input stream. (Inherited from RdfReader.)
ReuseEntities
bool . Determines whether the reader must reuse Entity objects that it creates. (Inherited from RdfReader.)
Variables [read-only]
System.Collections.Generic.ICollection<SemWeb.Variable> . A list of SemWeb.Variables found in the stream. (Inherited from RdfReader.)
Warnings [read-only]
System.Collections.Generic.ICollection<System.String> . Gets a list of warnings generated while parsing the input stream. (Inherited from RdfReader.)

Methods

Dispose ()
Disposes the reader. (Inherited from RdfReader.)
abstract Select (StatementSink)
Reads the stream into the statement sink. (Inherited from RdfReader.)

Protected Methods

AddVariable (Variable)
Adds a Variable to the Variables collection. (Inherited from RdfReader.)
OnWarning (string)
Implementors of RdfReader may call this method to indicate a parsing warning. (Inherited from RdfReader.)

Member Details

N3Reader Constructor

public N3Reader (System.IO.TextReader source)

Creates a new N3 parser for a stream.

Parameters

source
The N3 stream to read.

Remarks

None.

N3Reader Constructor

public N3Reader (string sourcefile)

Creates a new N3 parser for the given file.

Parameters

sourcefile
The name of a file, or "-" to read from Console.In.

Remarks

None.


semweb-1.05+dfsg/apidocs/SemWeb/N3Parser.html0000644000175000017500000001340610774502134020274 0ustar meebeymeebey SemWeb.N3Parser

To be added.

public class N3Parser : RdfParser


Remarks
To be added.
Members

See Also: Inherited members from RdfParser.

Constructors
To be added.
To be added.
Member Details
N3Parser Constructor
public N3Parser (System.IO.TextReader source)

To be added.

Parameters
source
To be added.
Remarks
To be added.

N3Parser Constructor
public N3Parser (string sourcefile)

To be added.

Parameters
sourcefile
To be added.
Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb/AutoPrefixNamespaceManager.html0000644000175000017500000001272310774502134024036 0ustar meebeymeebey SemWeb.AutoPrefixNamespaceManager
AutoPrefixNamespaceManager

To be added.

public class AutoPrefixNamespaceManager : NamespaceManager


Remarks
To be added.
Members

See Also: Inherited members from NamespaceManager.

Constructors
Member Details
AutoPrefixNamespaceManager Constructor
public AutoPrefixNamespaceManager ()

To be added.

Remarks
To be added.

AutoPrefixNamespaceManager Constructor
public AutoPrefixNamespaceManager (NamespaceManager parent)

To be added.

Parameters
parent
To be added.
Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb/RdfParser.html0000644000175000017500000004454410774502134020536 0ustar meebeymeebey SemWeb.RdfParser
RdfParser

The base class of types that read statements from streams.

public abstract class RdfParser : IDisposable


Remarks
This is an abstract class. See the classes in SemWeb.IO for implementations of parsers.
Members

See Also: Inherited members from object.

Protected Constructors
The protected no-arg constructor used by derived classes.
Properties
BaseUri
string . The base URI for resolving relative URIs found in the stream.
Meta
Entity . An entity to assign as the meta entity for statements loaded by this parser.
Variables [read-only]
ICollection . A list of SemWeb.Entity objects found in the strem that were marked as being variables (e.g. for queries).
Methods
static Create (string, string) : RdfParser
Creates a parser in the factory paradigm.
Dispose ()
Disposes the parser.
abstract Parse (StatementSinkEx)
Parses the stream into the statement sink.
Protected Methods
AddVariable (Entity)
Called by parser implementations to indicate that the entity was marked in the stream as being a variable for a query.
OnWarning (string)
Implementors of RdfParser may call this method to indicate a parsing warning.
Member Details
RdfParser Constructor
protected RdfParser ()

The protected no-arg constructor used by derived classes.

Remarks
None.

Dispose
public virtual void Dispose ()

Disposes the parser.

Remarks
The resources associated with the parser are freed.

Create
public static RdfParser Create (string type, string source)

Creates a parser in the factory paradigm.

Parameters
type
The stream type.
source
The name of the source stream, as a file name, or "-" for standard input.
Returns

The type of parser returned is given in the following table.

type Parser
"xml" or "text/xml" SemWeb.IO.RdfXmlParser
"n3" or "text/n3" SemWeb.IO.N3Parser
Remarks
None.

Meta
public Entity Meta { set; get; }

An entity to assign as the meta entity for statements loaded by this parser.

Value
An entity to use for meta information, or null.
Remarks
The value of this property is used as the meta argument in calls to SemWeb.Statement(SemWeb.Entity,SemWeb.Entity,SemWeb.Resource,SemWeb.Entity). The use of SemWeb.Statement.Meta is up to the application.

BaseUri
public string BaseUri { set; get; }

The base URI for resolving relative URIs found in the stream.

Value
The base URI for resolving relative URIs found in the stream. May be, and is initially, null.
Remarks
When this property is null, the parser may not be able to parse streams containing relative URIs.

OnWarning
protected void OnWarning (string message)

Implementors of RdfParser may call this method to indicate a parsing warning.

Parameters
message
A warning message.
Remarks
This is not currently used for anything.

Variables
public ICollection Variables { get; }

A list of SemWeb.Entity objects found in the strem that were marked as being variables (e.g. for queries).

Value
A list of SemWeb.Entity objects found in the strem that were marked as being variables (e.g. for queries).
Remarks
The list of variables is set by the parser implementation. Not all parsers support variables. (N3-formatted RDF does, but XML formatted RDF doesn't.)

Parse
public abstract void Parse (StatementSinkEx storage)

Parses the stream into the statement sink.

Parameters
storage
Each statement found in the stream is added to the statement sink via SemWeb.StatementSink.Add(SemWeb.Statement).
Remarks
User code should call SemWeb.Store.Import(SemWeb.RdfParser) rather than calling this method directly.

AddVariable
protected void AddVariable (Entity variable)

Called by parser implementations to indicate that the entity was marked in the stream as being a variable for a query.

Parameters
variable
An entity that was marked as being a variable.
Remarks
None.


semweb-1.05+dfsg/apidocs/SemWeb/StatementExistsSink.html0000644000175000017500000001646010774502134022633 0ustar meebeymeebey SemWeb.StatementExistsSink
StatementExistsSink

To be added.

StatementExistsSink : StatementSink


Remarks
To be added.
Members

See Also: Inherited members from object.

Constructors
To be added.
Properties
Exists [read-only]
bool . To be added.
Methods
Add (Statement) : bool
To be added.
Member Details
StatementExistsSink Constructor
public StatementExistsSink ()

To be added.

Remarks
To be added.

Add
public bool Add (Statement statement)

To be added.

Parameters
statement
To be added.
Returns
To be added.
Remarks
To be added.

Exists
public bool Exists { get; }

To be added.

Value
To be added.
Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb/RdfXmlWriter.html0000644000175000017500000005120510774502134021227 0ustar meebeymeebey SemWeb.RdfXmlWriter
RdfXmlWriter Class

Writes RDF statements to an RDF/XML file.

public class RdfXmlWriter : RdfWriter


Remarks

The RdfXmlWriter buffers the entire output document in memory, before writing the document to the stream when Close is called.

The namespaces used in the output data must be registered with the NamespaceManager in the SemWeb.RdfWriter.Namespaces property before the first call to Add. Failure to do so may prevent the document from being written to the stream, as not all URIs can be automatically converted into an XML qualified name.

The following example writes out RDF statements in RDF/XML format to a file:

C# Example
using (RdfXmlWriter output = new RdfXmlWriter("filename.rdf")) {
    output.Namespaces.AddNamespace("http://xmlns.com/foaf/0.1/", "foaf");
    output.BaseUri = "http://www.example.org/";
    output.Write(datasource);
}  

All constructors for the RdfXmlWriter have a couterpart with an additional parameter for a SemWeb.RdfXmlWriter.Options object that specifies formatting parameters for the output. When an Options object is not used, SemWeb.RdfXmlWriter.Options.Full is used. This parameter can be used with the SemWeb.RdfXmlWriter.Options.XMP field to ensure the resulting XML document conforms to the Adobe XMP specification.

Members

See Also: Inherited members from RdfWriter.

Constructors

Creates an RDF/XML writer that writes to the given TextWriter.
Creates an RDF/XML writer that writes to the named file.
Creates an RDF/XML writer that writes to the given XmlDocument.
Creates an RDF/XML writer that writes to the given XmlWriter.
Creates an RDF/XML writer that writes to the given TextWriter with output style options.
Creates an RDF/XML writer that writes to the named file with output style options.
Creates an RDF/XML writer that writes to the given XmlDocument with output style options.
Creates an RDF/XML writer that writes to the given XmlWriter with output style options.

Properties

BaseUri
string . Gets or sets the base URI for the output document. (Inherited from RdfWriter.)
Namespaces [read-only]
abstract
NamespaceManager . The NamespaceManager that manages namespace URIs and their prefixes. (Inherited from RdfWriter.)

Methods

abstract Add (Statement)
Writes a statement to the stream. (Inherited from RdfWriter.)
Close ()
Completes writing the data and closes the stream. (Inherited from RdfWriter.)
Write (StatementSource)
Writes out the contents of the StatementSource. (Inherited from RdfWriter.)

Protected Methods

Member Details

RdfXmlWriter Constructor

public RdfXmlWriter (string file)

Creates an RDF/XML writer that writes to the named file.

Parameters

file
A file name, or "-" for standard output.

Remarks

None.

RdfXmlWriter Constructor

public RdfXmlWriter (System.IO.TextWriter writer)

Creates an RDF/XML writer that writes to the given TextWriter.

Parameters

writer
A TextWriter.

Remarks

None.

RdfXmlWriter Constructor

public RdfXmlWriter (System.Xml.XmlWriter writer)

Creates an RDF/XML writer that writes to the given XmlWriter.

Parameters

writer
An XmlWriter.

Remarks

None.

RdfXmlWriter Constructor

public RdfXmlWriter (System.Xml.XmlDocument dest)

Creates an RDF/XML writer that writes to the given XmlDocument.

Parameters

dest
A new, empty XmlDocument.

Remarks

The document must be empty.

RdfXmlWriter Constructor

public RdfXmlWriter (string file, RdfXmlWriter.Options style)

Creates an RDF/XML writer that writes to the named file with output style options.

Parameters

file
A file name, or "-" for standard output.
style
An instance of SemWeb.RdfXmlWriter.Options providing options for how the output document should be formatted.

Remarks

None.

RdfXmlWriter Constructor

public RdfXmlWriter (System.IO.TextWriter writer, RdfXmlWriter.Options style)

Creates an RDF/XML writer that writes to the given TextWriter with output style options.

Parameters

writer
A TextWriter.
style
An instance of SemWeb.RdfXmlWriter.Options providing options for how the output document should be formatted.

Remarks

None.

RdfXmlWriter Constructor

public RdfXmlWriter (System.Xml.XmlDocument dest, RdfXmlWriter.Options style)

Creates an RDF/XML writer that writes to the given XmlDocument with output style options.

Parameters

dest
A new, empty XmlDocument.
style
An instance of SemWeb.RdfXmlWriter.Options providing options for how the output document should be formatted.

Remarks

None.

RdfXmlWriter Constructor

public RdfXmlWriter (System.Xml.XmlWriter writer, RdfXmlWriter.Options style)

Creates an RDF/XML writer that writes to the given XmlWriter with output style options.

Parameters

writer
An XmlWriter.
style
An instance of SemWeb.RdfXmlWriter.Options providing options for how the output document should be formatted.

Remarks

None.


semweb-1.05+dfsg/apidocs/SemWeb/N3Writer+Formats.html0000644000175000017500000001002110774502134021711 0ustar meebeymeebey SemWeb.N3Writer.Formats
N3Writer.Formats Enum

Output formats used for the SemWeb.N3Writer.

public enum N3Writer.Formats


Remarks

This enumeration is used for the SemWeb.N3Writer.Format property.
Members
Member name Description
NTriples

The N3Writer will write in NTriples notation, which has the following format for each statement:

<subjectURI> <predicateURI> <objectURI> .

Turtle Turtle format adds to NTriples @prefix notation for namespace declarations, qualified names in place of <URI> notation, and comma and semicolon abbreviation.
Notation3 Notation3 adds to Turtle format is...of syntax and predicate abbreviations, such as a for rdf:type.

semweb-1.05+dfsg/apidocs/SemWeb/RdfXmlWriter+Options.html0000644000175000017500000005213510774502134022661 0ustar meebeymeebey SemWeb.RdfXmlWriter.Options
RdfXmlWriter.Options Class

This class specifies output style options for the SemWeb.RdfXmlWriter.

public class RdfXmlWriter.Options


Remarks

This class defines two static fields which have option settings for two common styles: SemWeb.RdfXmlWriter.Options.Full and SemWeb.RdfXmlWriter.Options.XMP. See the documentation for those fields for details.

Members

See Also: Inherited members from object.

Constructors

This is the default public constructor.

Fields

EmbedNamedNodes
bool . Sets whether named nodes (nodes with URIs) are embedded within property elements.
Full
static
RdfXmlWriter.Options . An instance of Options specifying that all output options are turned on.
UseParseTypeLiteral
bool . Sets whether parseType=Literal is used for xsd:XMLLiteral values.
UsePredicateAttributes
bool . Sets whether predicate attributes may be used.
UseRdfID
bool . Sets whether the rdf:ID attribute is used to identify named nodes with URIs relative to the Base URI of the document, instead of an rdf:about attribute.
UseRdfLI
bool . Sets whether rdf:_nnn URIs are replaced with rdf:li.
UseTypedNodes
bool . Sets whether typed rdf:Description elements are allowed.
XMP
static
RdfXmlWriter.Options . An instance of Options with only the options turned on supported by the Adobe XMP metadata format.

Member Details

RdfXmlWriter.Options Constructor

public RdfXmlWriter.Options ()

This is the default public constructor.

Remarks

None.

EmbedNamedNodes Field

public bool EmbedNamedNodes

Sets whether named nodes (nodes with URIs) are embedded within property elements.

Remarks

When this field is true, the following output might be generated:

RDF/XML Example
<rdf:Description>
   <ex:hasRelationTo>
      <rdf:Description rdf:about="http://www.example.org/">
         ...
      </rdf:Description>
   </ex:hasRelationTo>
</rdf:Description>

But when this field is false, the following output would be generated instead:

RDF/XML Example
<rdf:Description>
   <ex:hasRelationTo rdf:resource="http://www.example.org/"/>
</rdf:Description>
<rdf:Description rdf:about="http://www.example.org/">
   ...
</rdf:Description>

Full Field

public static RdfXmlWriter.Options Full

An instance of Options specifying that all output options are turned on.

Remarks

All of the instance fields in this object are true, providing general RDF/XML output with options to make the document more readable.

UseParseTypeLiteral Field

public bool UseParseTypeLiteral

Sets whether parseType=Literal is used for xsd:XMLLiteral values.

Remarks

When this field is true, the following output might be generated:

RDF/XML Example
<rdf:Description>
   <ex:hasContent rdf:parseType="Literal">
      <myContent>this is <b>my</b> content</myContent>
   </ex:hasContent>
</rdf:Description>

But when this field is false, the following output would be generated instead:

RDF/XML Example
<rdf:Description>
   <ex:hasContent>
      &lt;myContent&gt;this is &lt;b&gt;my&lt;/b&gt; content&lt;/myContent&gt;
   </ex:hasContent>
</rdf:Description>

UsePredicateAttributes Field

public bool UsePredicateAttributes

Sets whether predicate attributes may be used.

Remarks

When this field is true, the following output might be generated:

RDF/XML Example
<foaf:Person>
   <foaf:knows foaf:firstname="John" foaf:lastname="Doe"/>
</foaf:Person>

But when this field is false, the following output would be generated instead:

RDF/XML Example
<foaf:Person>
   <foaf:knows>
      <rdf:Description>
         <foaf:firstname>John</foaf:firstname>
         <foaf:lastname>Doe</foaf:lastname>
      </rdf:Description>
   </foaf:knows>
</foaf:Person>

UseRdfID Field

public bool UseRdfID

Sets whether the rdf:ID attribute is used to identify named nodes with URIs relative to the Base URI of the document, instead of an rdf:about attribute.

Remarks

When this field is true, the following output might be generated:

RDF/XML Example
<foaf:Person rdf:ID="John">
   ...
</foaf:Person>

But when this field is false, the following output would be generated instead:

RDF/XML Example
<foaf:Person rdf:about="http://www.example.org/baseURI#John">
   ...
</foaf:Person>

UseRdfLI Field

public bool UseRdfLI

Sets whether rdf:_nnn URIs are replaced with rdf:li.

Remarks

This field controls whether rdf:_nnn properties are written out as rdf:li. This field only has an effect when the rdf:_nnn properties are streamed into the RdfXmlWriter in numerical order.

When this field is true, the following output might be generated:

RDF/XML Example
<rdf:Bag>
   <rdf:li rdf:resource="http://www.example.org/one"/>
   <rdf:li rdf:resource="http://www.example.org/two"/>
   <rdf:li rdf:resource="http://www.example.org/three"/>
</rdf:Bag>

But when this field is false, the following output would be generated instead:

RDF/XML Example
<rdf:Bag>
   <rdf:_1 rdf:resource="http://www.example.org/one"/>
   <rdf:_2 rdf:resource="http://www.example.org/two"/>
   <rdf:_3 rdf:resource="http://www.example.org/three"/>
</rdf:Bag>

UseTypedNodes Field

public bool UseTypedNodes

Sets whether typed rdf:Description elements are allowed.

Remarks

When this field is true, the following output might be generated:

RDF/XML Example
<foaf:Person>
   ...
</foaf:Person>

But when this field is false, the following output would be generated instead:

RDF/XML Example
<rdf:Description>
   <rdf:type rdf:resource="http://xmlns.com/foaf/0.1/Person"/>
   ...
</rdf:Description>

XMP Field

public static RdfXmlWriter.Options XMP

An instance of Options with only the options turned on supported by the Adobe XMP metadata format.

Remarks

The Adobe XMP format is a reduced version of RDF/XML used for embedding metadata in images and other files. This class turns off the output options of the RdfXmlWriter that are not supported in XMP. The UseTypedNodes, UseRdfID, UseParseTypeLiteral, and UsePredicateAttributes fields are set to false. The remaining fields are set to true.


semweb-1.05+dfsg/apidocs/SemWeb/N3Writer.html0000644000175000017500000002641510774502134020320 0ustar meebeymeebey SemWeb.N3Writer
N3Writer Class

Writes out RDF statements to a stream in Notation 3, Turtle (the default), or NTriples format.

public class N3Writer : RdfWriter, CanForgetBNodes


Remarks

The following example writes out RDF statements in Turtle format to a file:

C# Example
using (N3Writer output = new N3Writer("filename.n3")) {
    store.Write(data);
}  

Members

See Also: Inherited members from RdfWriter.

Constructors

Creates an N3Writer that outputs statements to a TextWriter.
Creates an N3Writer that outputs statements to a file.

Properties

BaseUri
string . Gets or sets the base URI for the output document. (Inherited from RdfWriter.)
Format
N3Writer.Formats . Sets the format for output to Notation3, Turtle, or NTriples.
Namespaces [read-only]
abstract
NamespaceManager . The NamespaceManager that manages namespace URIs and their prefixes. (Inherited from RdfWriter.)

Methods

abstract Add (Statement)
Writes a statement to the stream. (Inherited from RdfWriter.)
Close ()
Completes writing the data and closes the stream. (Inherited from RdfWriter.)
Write (StatementSource)
Writes out the contents of the StatementSource. (Inherited from RdfWriter.)

Protected Methods

Member Details

N3Writer Constructor

public N3Writer (string file)

Creates an N3Writer that outputs statements to a file.

Parameters

file
The path to a file where the statements will be stored, or "-" to output to Console.Out.

Remarks

None.

N3Writer Constructor

public N3Writer (System.IO.TextWriter writer)

Creates an N3Writer that outputs statements to a TextWriter.

Parameters

writer
The TextWriter to which statements will be written.

Remarks

None.

Format Property

public N3Writer.Formats Format { set; get; }

Sets the format for output to Notation3, Turtle, or NTriples.

Value

A value from SemWeb.N3Writer.Formats that specifies the output format.

Remarks

The default format is Turtle.


semweb-1.05+dfsg/apidocs/SemWeb/StatementSink.html0000644000175000017500000001070210774502134021424 0ustar meebeymeebey SemWeb.StatementSink
StatementSink Interface

A sink for statements, such as a RdfWriter or a Store.

public interface StatementSink


Remarks

Inherit from the class to create an object that can receive streaming statements from a call to SemWeb.Store.Select(SemWeb.Statement,SemWeb.StatementSink).

Members

Methods

Add (Statement) : bool
Called to stream a new statement.

Member Details

Add Method

public bool Add (Statement statement)

Called to stream a new statement.

Parameters

statement
A statement.

Returns

Return false to signal the caller to discontinue streaming. Otherwise, return true.

Remarks

None.


semweb-1.05+dfsg/apidocs/SemWeb/ModifiableSource.html0000644000175000017500000003060710774502134022055 0ustar meebeymeebey SemWeb.ModifiableSource
ModifiableSource Interface

This interface is implemented by data sources that support modifying the contents of the store.

public interface ModifiableSource : , SelectableSource, StatementSink


Remarks

Operations including Clear, Replace, and Remove are specified by this interface.

Members

Methods

Clear ()
Clears the contents of the data store.
Import (StatementSource)
Loads the contents of a StatementSource into the data store.
Remove (Statement)
Removes statements from the data store.
RemoveAll (Statement[])
Removes all statements matching an array of templates.
Replace (Entity, Entity)
Replaces all occurences of one Entity with another Entity.
Replace (Statement, Statement)
Replaces a single statement with another statement.

Member Details

Clear Method

public void Clear ()

Clears the contents of the data store.

Remarks

The data store is empty after a call to Clear.

Import Method

public void Import (StatementSource source)

Loads the contents of a StatementSource into the data store.

Parameters

source
The source whose statements will be added into the data store.

Remarks

This method wraps a call to SemWeb.StatementSource.Select(SemWeb.StatementSink) in store-specific code that prepares the store for receiving many statements. The store may make itself locked for access by other processes to make the parsing faster. To avoid this, call SemWeb.StatementSource.Select(SemWeb.StatementSink) directly.

Remove Method

public void Remove (Statement template)

Removes statements from the data store.

Parameters

template
A statement or statement template to remove from the data store.

Remarks

All statements in the data store that match template are removed. The template argument is a template. The non-null fields of template are used as a filter on the statements in the store. Statements that match the filter are removed. null fields of template are ignored during filtering. Any field in template (Subject, Predicate, Object, and Meta) may be null.

The following examples erase all statements in a store (although you should use SemWeb.ModifiableSource.Clear().

C# Example
store.Remove(new Statement(null, null, null));
store.Remove(Statement.All);

RemoveAll Method

public void RemoveAll (Statement[] templates)

Removes all statements matching an array of templates.

Parameters

templates
An array of statement templates. Statement templates may contain a null subject, predicate, object, and/or meta.

Remarks

Stores may be more efficient removing statements in one call than through repeated calls to SemWeb.ModifiableSource.Remove(SemWeb.Statement).

Replace Method

public void Replace (Entity find, Entity replacement)

Replaces all occurences of one Entity with another Entity.

Parameters

find
The Entity to search for in the store.
replacement
The Entity to replace a.

Remarks

All occurences of find in statements in the store are replaced with references to replacement.

Replace Method

public void Replace (Statement find, Statement replacement)

Replaces a single statement with another statement.

Parameters

find
The statement to find. This parameter must be a complete statement (with subject, predicate, and object non-null), not a template.
replacement
The statement that will replace the first statement.

Remarks

Store implementations may choose to optimize this method over a call to Remove followed by Add.


semweb-1.05+dfsg/apidocs/SemWeb/StatementSinkEx.html0000644000175000017500000001333610774502134021727 0ustar meebeymeebey SemWeb.StatementSinkEx
StatementSinkEx

An extended StatementSink with extra support for creating new anonymous nodes.

public interface StatementSinkEx : , StatementSink


Remarks
None.
Members
Methods
CreateAnonymousEntity () : Entity
Creates a new anonymous entity tracked by this StatementSinkEx.
Import (RdfReader)
Imports the contents of a RdfReader.
Member Details
CreateAnonymousEntity
public Entity CreateAnonymousEntity ()

Creates a new anonymous entity tracked by this StatementSinkEx.

Returns
A new anonymous entity.
Remarks
None.

Import
public void Import (RdfReader parser)

Imports the contents of a RdfReader.

Parameters
parser
The parser whose contents should be imported.
Remarks
See SemWeb.Store.Import(SemWeb.RdfReader).


semweb-1.05+dfsg/apidocs/SemWeb/SQLWriter.html0000644000175000017500000001732410774502134020476 0ustar meebeymeebey SemWeb.SQLWriter
SQLWriter

To be added.

public class SQLWriter : RdfWriter


Remarks
To be added.
Members

See Also: Inherited members from RdfWriter.

Constructors
To be added.
To be added.
To be added.
Member Details
SQLWriter Constructor
public SQLWriter (string spec)

To be added.

Parameters
spec
To be added.
Remarks
To be added.

SQLWriter Constructor
public SQLWriter (string file, string tablename)

To be added.

Parameters
file
To be added.
tablename
To be added.
Remarks
To be added.

SQLWriter Constructor
public SQLWriter (System.IO.TextWriter writer, string tablename)

To be added.

Parameters
writer
To be added.
tablename
To be added.
Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb/Entity.html0000644000175000017500000003550710774502134020121 0ustar meebeymeebey SemWeb.Entity
Entity Class

An entity resource in a graph.

public class Entity : Resource


Remarks

Entities can have URIs, or they can be anonymous, in which case their URI is null. However, in order to construct a blank node, use new SemWeb.BNode().

Specialized stores will attach caching information to Entity objects to make interaction with the store faster. It is therefore better to reuse existing Entity objects where possible.

The == and != operators have been overloaded for entities. Two named entities are equal when they both have the same URI. Two anonymous Entity objects are equal if they were created by the same Store and were assigned the same resource key.

An implicit conversion operator is defined from strings to entities. The operator converts the string to an entity by returning an entity with that URI.

The following examples all create entities.

C# Example
Entity thing1 = new Entity("http://www.example.com/#thing");
Entity thing2 = "http://www.example.com/#thing"; // operator overload
Entity thing3 = (Entity)"http://www.example.com/#thing"; // operator overload with explicit cast

Console.WriteLine(thing1.Uri)

Members

See Also: Inherited members from Resource.

Constructors

Constructs a new entity with the given URI.

Properties

Uri [read-only]
abstract
string . The URI of this resource. (Inherited from Resource.)

Methods

CompareTo (Resource) : int
Compares two resources. (Inherited from Resource.)
GetResourceKey (object) : object
To be added. (Inherited from Resource.)
SetResourceKey (object, object)
To be added. (Inherited from Resource.)
static ValidateUri (string) : string
Validates that a string is a legitimate IRI-Reference, i.e. a legitimate URI in RDF.

Operators

Equality (Entity, Entity)
Tests whether two entities are equal.
Inequality (Entity, Entity)
Tests whether two entities are not equal.
Conversion to SemWeb.Entity (Implicit)
Implicitly converts a string URI to an entity.

Member Details

Entity Constructor

public Entity (string uri)

Constructs a new entity with the given URI.

Parameters

uri
The URI of the entity.

Remarks

uri may not be null. To construct a blank node, use new SemWeb.BNode().

Conversion Method

public static implicit operator Entity (string uri)

Implicitly converts a string URI to an entity.

Parameters

uri
A URI.

Returns

An entity whose URI is uri.

Remarks

None.

op_Equality Method

public static bool == (Entity a, Entity b)

Tests whether two entities are equal.

Parameters

a
An entity.
b
An entity.

Returns

If both parameters are null, the operator returns true.

Otherwise, the operator returns true if the two entities are the same instance, or if their URIs are equal.

Remarks

Two anonymous entities are not equal unless they are the same instance, or if they represent the same resource and were created by the same store.

Note that the SemWeb.Resource class does not have an equality operator, so you must be comparing two variables typed as Entity to use this operator.


op_Inequality Method

public static bool != (Entity a, Entity b)

Tests whether two entities are not equal.

Parameters

a
An entity.
b
An entity.

Returns

The negation of the result of applying the equality operator.

Remarks

See the equality operator.

ValidateUri Method

public static string ValidateUri (string uri)

Validates that a string is a legitimate IRI-Reference, i.e. a legitimate URI in RDF.

Parameters

uri
The URI to validate.

Returns

null if uri is valid, otherwise a string describing the problem.

Remarks

When creating an Entity instance, the string passed into the constructor as the URI is not validated (because validation is a somewhat expensive process). It is the caller's responsibility to validate the URI using this method.


semweb-1.05+dfsg/apidocs/SemWeb/CanForgetBNodes.html0000644000175000017500000000761310774502134021605 0ustar meebeymeebey SemWeb.CanForgetBNodes
CanForgetBNodes Interface

To be added.

public interface CanForgetBNodes


Remarks

To be added.

Members

Methods

ForgetBNode (BNode)
To be added.

Member Details

ForgetBNode Method

public void ForgetBNode (BNode bnode)

To be added.

Parameters

bnode
To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb/MultiRdfParser.html0000644000175000017500000001274710774502134021551 0ustar meebeymeebey SemWeb.MultiRdfParser
MultiRdfParser

To be added.

MultiRdfParser : RdfParser


Remarks
To be added.
Members

See Also: Inherited members from RdfParser.

Constructors
To be added.
Properties
Parsers [read-only]
ArrayList . To be added.
Member Details
MultiRdfParser Constructor
public MultiRdfParser ()

To be added.

Remarks
To be added.

Parsers
public ArrayList Parsers { get; }

To be added.

Value
To be added.
Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb/Resource.html0000644000175000017500000003477310774502134020440 0ustar meebeymeebey SemWeb.Resource
Resource Class

The base class of SemWeb.Entity, SemWeb.BNode, SemWeb.Literal, and SemWeb.Variable, the nodes in an RDF graph.

public abstract class Resource : System.IComparable<SemWeb.Resource>


Remarks

There are two types of resources in the RDF world: entities and literals. Entities are nodes in the graph. They can be either named (i.e. they have a URI) or unnamed (i.e. they are anonymous, or "blank"). All of these things are represented by the SemWeb.Entity class, which is a subclass of SemWeb.Resource. However, unnamed "blank" nodes are represented by a special subclass of Entity, the SemWeb.BNode class. So, when you want to create a named node, use new Entity(uri), but when you want to create a new blank node, use new BNode(). Never say new Entity(null).

Literals, which are textual strings, are represented by the SemWeb.Literal class. In RDF, literals can only be the objects of statements. Use the Value property of a literal to get back its string value.

There is a special type of blank node in this library for variables used in queries and inferencing. These are represented by the SemWeb.Variable class, which inherits from the SemWeb.BNode class. The SemWeb.N3Reader will read ?variable resources as SemWeb.Variables. The name of the variable will be put in its SemWeb.BNode.LocalName property.

The == and != operators have been overloaded for Resources. Two resources are equal if they are both SemWeb.Entity objects and the SemWeb.Entity overloaded == operator returns true, or if they are both SemWeb.Literal objects with equal values for Value, Language, and DataType.

Members

See Also: Inherited members from object.

Properties

Uri [read-only]
abstract
string . The URI of this resource.

Methods

CompareTo (Resource) : int
Compares two resources.
GetResourceKey (object) : object
To be added.
SetResourceKey (object, object)
To be added.

Operators

Equality (Resource, Resource)
Tests two Resources for equality.
Inequality (Resource, Resource)
Tests two Resources for inequality.

Member Details

Uri Property

public abstract string Uri { get; }

The URI of this resource.

Value

The URI of the resource, or null if the resource is anonymous or a literal.

Remarks

None.

op_Equality Method

public static bool == (Resource a, Resource b)

Tests two Resources for equality.

Parameters

a
A Resource.
b
A Resource.

Returns

Returns whether the two resources are equal. If both arguments are null, returns true; otherwise, if one argument is null, returns false.

Remarks

Two resources are equal if they are both entities and either 1) are the same object, 2) have the same URI, or 3) are anonymous entities created by the same Store and marked as representing the same entity; or if they are Literals, if they have the same value, language, and datatype.

op_Inequality Method

public static bool != (Resource a, Resource b)

Tests two Resources for inequality.

Parameters

a
A Resource.
b
A Resource.

Returns

The negation of a == b.

Remarks

See the Resource equality operator.

CompareTo Method

public int CompareTo (Resource other)

Compares two resources.

Parameters

other
The other resource.

Returns

0 if the resources are equal, -1 if this resource should be ordered before other, or 1 if other should be ordered first.

Remarks

The ordering used by this method is as follows: Entities sorted by URI, then BNodes sorted by HashCode, and finally Literals sorted by their Value.

GetResourceKey Method

public object GetResourceKey (object key)

To be added.

Parameters

key
To be added.

Returns

To be added.

Remarks

To be added.

SetResourceKey Method

public void SetResourceKey (object key, object value)

To be added.

Parameters

key
To be added.
value
To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb/SQLStore.html0000644000175000017500000004523710774502134020322 0ustar meebeymeebey SemWeb.SQLStore

To be added.

public abstract class SQLStore : Store


Remarks
To be added.
Members

See Also: Inherited members from Store.

Constructors
To be added.
Protected Properties
TableName [read-only]
string . To be added.
Protected Methods
BeginTransaction ()
To be added.
CreateIndexes ()
To be added.
CreateTable ()
To be added.
EndTransaction ()
To be added.
abstract RunCommand (string)
To be added.
abstract RunReader (string) : System.Data.IDataReader
To be added.
abstract RunScalar (string) : object
To be added.
RunScalarInt (string, int) : int
To be added.
RunScalarString (string) : string
To be added.
Member Details
SQLStore Constructor
public SQLStore (string table, KnowledgeModel model)

To be added.

Parameters
table
To be added.
model
To be added.
Remarks
To be added.

RunCommand
protected abstract void RunCommand (string sql)

To be added.

Parameters
sql
To be added.
Remarks
To be added.

RunScalar
protected abstract object RunScalar (string sql)

To be added.

Parameters
sql
To be added.
Returns
To be added.
Remarks
To be added.

RunReader
protected abstract System.Data.IDataReader RunReader (string sql)

To be added.

Parameters
sql
To be added.
Returns
To be added.
Remarks
To be added.

RunScalarInt
protected int RunScalarInt (string sql, int def)

To be added.

Parameters
sql
To be added.
def
To be added.
Returns
To be added.
Remarks
To be added.

RunScalarString
protected string RunScalarString (string sql)

To be added.

Parameters
sql
To be added.
Returns
To be added.
Remarks
To be added.

CreateTable
protected virtual void CreateTable ()

To be added.

Remarks
To be added.

CreateIndexes
protected virtual void CreateIndexes ()

To be added.

Remarks
To be added.

BeginTransaction
protected virtual void BeginTransaction ()

To be added.

Remarks
To be added.

EndTransaction
protected virtual void EndTransaction ()

To be added.

Remarks
To be added.

TableName
protected string TableName { get; }

To be added.

Value
To be added.
Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Stores/0000755000175000017500000000000010774502134017223 5ustar meebeymeebeysemweb-1.05+dfsg/apidocs/SemWeb.Stores/PostgreSQLStore.html0000644000175000017500000002253010774502134023133 0ustar meebeymeebey SemWeb.Stores.PostgreSQLStore

A PostgreSQL-backed persistent data store.

public class PostgreSQLStore : SQLStore


Remarks
None.
Members

See Also: Inherited members from SQLStore.

Constructors
Creates a new PostgreSQL-backed store.
Protected Properties
SupportsInsertCombined [read-only]
override
bool . To be added.
SupportsInsertIgnore [read-only]
override
bool . To be added.
SupportsNoDuplicates [read-only]
override
bool . To be added.
Member Details
PostgreSQLStore Constructor
public PostgreSQLStore (string connectionString, string table)

Creates a new PostgreSQL-backed store.

Parameters
connectionString
The PostgreSQL connection string.
table
The prefix name of the tables to use.
Remarks
An example connection string is: string "Server=localhost;" + "Database=test;" + "User ID=postgres;" + "Password=fun2db;".

SupportsNoDuplicates
protected override bool SupportsNoDuplicates { get; }

To be added.

Value
To be added.
Remarks
To be added.

SupportsInsertIgnore
protected override bool SupportsInsertIgnore { get; }

To be added.

Value
To be added.
Remarks
To be added.

SupportsInsertCombined
protected override bool SupportsInsertCombined { get; }

To be added.

Value
To be added.
Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Stores/index.html0000644000175000017500000000571510774502134021230 0ustar meebeymeebey SemWeb: SemWeb.Stores
SemWeb.Stores Namespace

Namespace

None.

Type Description
CachedSource To be added.
DebuggedSource To be added.
SimpleSourceWrapper To be added.
SQLStore A store that holds statements in an SQL database.

semweb-1.05+dfsg/apidocs/SemWeb.Stores/SimpleSourceWrapper.html0000644000175000017500000005305210774502134024071 0ustar meebeymeebey SemWeb.Stores.SimpleSourceWrapper
SimpleSourceWrapper Class

To be added.

public abstract class SimpleSourceWrapper : SemWeb.SelectableSource


Remarks

To be added.

Members

Member Details

SimpleSourceWrapper Constructor

protected SimpleSourceWrapper ()

To be added.

Remarks

To be added.

Select Method

public virtual void Select (SemWeb.StatementSink sink)

To be added.

Parameters

sink
To be added.

Remarks

To be added.

Contains Method

public abstract bool Contains (SemWeb.Resource resource)

To be added.

Parameters

resource
To be added.

Returns

To be added.

Remarks

To be added.

Contains Method

public virtual bool Contains (SemWeb.Statement template)

To be added.

Parameters

template
To be added.

Returns

To be added.

Remarks

To be added.

SelectAllSubject Method

protected virtual void SelectAllSubject (SemWeb.Entity subject, SemWeb.StatementSink sink)

To be added.

Parameters

subject
To be added.
sink
To be added.

Remarks

To be added.

SelectAllObject Method

protected virtual void SelectAllObject (SemWeb.Resource object, SemWeb.StatementSink sink)

To be added.

Parameters

object
To be added.
sink
To be added.

Remarks

To be added.

SelectRelationsBetween Method

protected virtual void SelectRelationsBetween (SemWeb.Entity subject, SemWeb.Resource object, SemWeb.StatementSink sink)

To be added.

Parameters

subject
To be added.
object
To be added.
sink
To be added.

Remarks

To be added.

SelectAllPairs Method

protected virtual void SelectAllPairs (SemWeb.Entity predicate, SemWeb.StatementSink sink)

To be added.

Parameters

predicate
To be added.
sink
To be added.

Remarks

To be added.

SelectSubjects Method

protected virtual void SelectSubjects (SemWeb.Entity predicate, SemWeb.Resource object, SemWeb.StatementSink sink)

To be added.

Parameters

predicate
To be added.
object
To be added.
sink
To be added.

Remarks

To be added.

SelectObjects Method

protected virtual void SelectObjects (SemWeb.Entity subject, SemWeb.Entity predicate, SemWeb.StatementSink sink)

To be added.

Parameters

subject
To be added.
predicate
To be added.
sink
To be added.

Remarks

To be added.

Select Method

public void Select (SemWeb.Statement template, SemWeb.StatementSink sink)

To be added.

Parameters

template
To be added.
sink
To be added.

Remarks

To be added.

Select Method

public void Select (SemWeb.SelectFilter filter, SemWeb.StatementSink sink)

To be added.

Parameters

filter
To be added.
sink
To be added.

Remarks

To be added.

Distinct Property

public virtual bool Distinct { get; }

To be added.

Value

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Stores/DebuggedSource.html0000644000175000017500000003766010774502134023014 0ustar meebeymeebey SemWeb.Stores.DebuggedSource
DebuggedSource Class

To be added.

public class DebuggedSource : SemWeb.QueryableSource


Remarks

To be added.

Members

Member Details

DebuggedSource Constructor

public DebuggedSource (SemWeb.SelectableSource source, System.IO.TextWriter output)

To be added.

Parameters

source
To be added.
output
To be added.

Remarks

To be added.

Select Method

public void Select (SemWeb.StatementSink sink)

To be added.

Parameters

sink
To be added.

Remarks

To be added.

Contains Method

public bool Contains (SemWeb.Resource resource)

To be added.

Parameters

resource
To be added.

Returns

To be added.

Remarks

To be added.

Contains Method

public bool Contains (SemWeb.Statement template)

To be added.

Parameters

template
To be added.

Returns

To be added.

Remarks

To be added.

Select Method

public void Select (SemWeb.Statement template, SemWeb.StatementSink sink)

To be added.

Parameters

template
To be added.
sink
To be added.

Remarks

To be added.

Select Method

public void Select (SemWeb.SelectFilter filter, SemWeb.StatementSink sink)

To be added.

Parameters

filter
To be added.
sink
To be added.

Remarks

To be added.

Distinct Property

public bool Distinct { get; }

To be added.

Value

To be added.

Remarks

To be added.

MetaQuery Method

public virtual SemWeb.Query.MetaQueryResult MetaQuery (SemWeb.Statement[] graph, SemWeb.Query.QueryOptions options)

To be added.

Parameters

graph
To be added.
options
To be added.

Returns

To be added.

Remarks

To be added.

Query Method

To be added.

Parameters

graph
To be added.
options
To be added.
sink
To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Stores/KnowledgeModel.html0000644000175000017500000002651110774502134023016 0ustar meebeymeebey SemWeb.Stores.KnowledgeModel
KnowledgeModel

A store for combining multiple stores and inference engines.

public class KnowledgeModel : SemWeb.Store


Remarks
None.
Members

See Also: Inherited members from SemWeb.Store.

Constructors
Constructs a new empty KnowledgeModel.
Creates a new KnowledgeModel, adds to it a SemWeb.Stores.MemoryStore, and loads in the statements from the given reader.
Properties
Storage [read-only]
MultiStore . The MultiStore that maintains the list of stores within this KnowledgeModel.
Methods
Add (SemWeb.Store)
Adds a store into the KnowledgeModel.
AddReasoning (SemWeb.Reasoning.ReasoningEngine)
Adds a reasoning engine to the KnowledgeModel.
Member Details
KnowledgeModel Constructor
public KnowledgeModel ()

Constructs a new empty KnowledgeModel.

Remarks
None.

KnowledgeModel Constructor
public KnowledgeModel (SemWeb.RdfReader parser)

Creates a new KnowledgeModel, adds to it a SemWeb.Stores.MemoryStore, and loads in the statements from the given reader.

Parameters
parser
A parser containing statements to load into the memory store.
Remarks
This is a convenience function.

Add
public void Add (SemWeb.Store storage)

Adds a store into the KnowledgeModel.

Parameters
storage
The store to add into the model.
Remarks

The statements in store become available through calls to this KnowledgeModel's select and contains methods.

The store should have been created passing this KnowledgeModel to its constructor so that the store is associated with this KnowledgeModel.


Storage
public MultiStore Storage { get; }

The MultiStore that maintains the list of stores within this KnowledgeModel.

Value
The list of stores within this KnowledgeModel.
Remarks

It is safe to manipulate the object returned by this property to change the stores associated with the KnowledgeModel.

Calls to Contains and Select on the MultiStore reflect the contents of the stores contained in it without the application of the KnowledgeModel's inference engines.


AddReasoning
public void AddReasoning (SemWeb.Reasoning.ReasoningEngine engine)

Adds a reasoning engine to the KnowledgeModel.

Parameters
engine
The reasoning engine.
Remarks
Select calls on this store will now return statements filtered by the reasoning engine.


semweb-1.05+dfsg/apidocs/SemWeb.Stores/SupportsPersistableBNodes.html0000644000175000017500000001504310774502134025244 0ustar meebeymeebey SemWeb.Stores.SupportsPersistableBNodes
SupportsPersistableBNodes Interface

To be added.

public interface SupportsPersistableBNodes


Remarks

To be added.

Members

Methods

GetNodeFromId (string) : SemWeb.BNode
To be added.
GetNodeId (SemWeb.BNode) : string
To be added.
GetStoreGuid () : string
To be added.

Member Details

GetStoreGuid Method

public string GetStoreGuid ()

To be added.

Returns

To be added.

Remarks

To be added.

GetNodeId Method

public string GetNodeId (SemWeb.BNode node)

To be added.

Parameters

node
To be added.

Returns

To be added.

Remarks

To be added.

GetNodeFromId Method

public SemWeb.BNode GetNodeFromId (string persistentId)

To be added.

Parameters

persistentId
To be added.

Returns

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Stores/SqliteStore.html0000644000175000017500000002547410774502134022403 0ustar meebeymeebey SemWeb.Stores.SqliteStore

A Sqlite-backed persistent data store.

public class SqliteStore : SQLStore


Remarks
Note that Sqlite, either version 2 or version 3, must be installed so that Mono can find the so library file, and Mono's Sqlite binding must also be installed.
Members

See Also: Inherited members from SQLStore.

Constructors
Creates a new Sqlite store.
Protected Properties
SupportsFastJoin [read-only]
override
bool . To be added.
SupportsInsertCombined [read-only]
override
bool . To be added.
SupportsInsertIgnore [read-only]
override
bool . To be added.
SupportsNoDuplicates [read-only]
override
bool . To be added.
Member Details
SqliteStore Constructor
public SqliteStore (string connectionString, string table)

Creates a new Sqlite store.

Parameters
connectionString
The Sqlite connection string.
table
The prefix name of the tables to use for storing data.
Remarks
Here is an example connection string: "URI=file:SqliteTest.db". For Sqlite version 3, add "; Version=3".

SupportsNoDuplicates
protected override bool SupportsNoDuplicates { get; }

To be added.

Value
To be added.
Remarks
To be added.

SupportsInsertIgnore
protected override bool SupportsInsertIgnore { get; }

To be added.

Value
To be added.
Remarks
To be added.

SupportsInsertCombined
protected override bool SupportsInsertCombined { get; }

To be added.

Value
To be added.
Remarks
To be added.

SupportsFastJoin
protected override bool SupportsFastJoin { get; }

To be added.

Value
To be added.
Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Stores/MemoryStore.html0000644000175000017500000001601610774502134022402 0ustar meebeymeebey SemWeb.Stores.MemoryStore

A store of statements held in memory.

public class MemoryStore : SemWeb.Store, IEnumerable


Remarks
In addition to an array of statements, the statements are indexed by subject and object to speed Select queries.
Members

See Also: Inherited members from SemWeb.Store.

Constructors
To be added.
To be added.
Properties
Statements [read-only]
IList . To be added.
Member Details
Statements
public IList Statements { get; }

To be added.

Value
To be added.
Remarks
To be added.

MemoryStore Constructor
public MemoryStore ()

To be added.

Remarks
To be added.

MemoryStore Constructor
public MemoryStore (SemWeb.RdfParser parser)

To be added.

Parameters
parser
To be added.
Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Stores/MultiStore.html0000644000175000017500000006526410774502134022235 0ustar meebeymeebey SemWeb.Stores.MultiStore
MultiStore Class

A store that combines the statements of multiple stores.

public class MultiStore : SemWeb.Store


Remarks

The class groups together multiple stores. It is used by the SemWeb.KnowledgeModel class.

The MultiStore does not support the Clear, Add, and Remove methods.

Members

See Also: Inherited members from SemWeb.Store.

Constructors

Creates a new MultiStore.

Properties

Distinct [read-only]
abstract
bool . Gets whether the store returns only distinct statments from Select calls. (Inherited from SemWeb.Store.)
StatementCount [read-only]
abstract
int . Gets the number of statements in the store. (Inherited from SemWeb.Store.)

Methods

Add (SemWeb.RdfReader)
To be added.
Add (SemWeb.SelectableSource)
To be added.
abstract Add (SemWeb.Statement)
Adds a statement to the store. (Inherited from SemWeb.Store.)
Add (string, SemWeb.SelectableSource)
To be added.
Add (string, SemWeb.RdfReader)
To be added.
abstract Clear ()
Clears the contents of the store. (Inherited from SemWeb.Store.)
Close ()
Closes the store. (Inherited from SemWeb.Store.)
Contains (SemWeb.Resource) : bool
Tests whether the store contains any statements that mention the given resource. (Inherited from SemWeb.Store.)
Contains (SemWeb.Statement) : bool
Returns whether the store contains a statement, or any statement that matches the template. (Inherited from SemWeb.Store.)
abstract GetEntities () : SemWeb.Entity[]
Returns an array of all entities mentioned in the store. (Inherited from SemWeb.Store.)
GetEntitiesOfType (SemWeb.Entity) : SemWeb.Entity[]
Returns an array of all entities in the store whose type is known to be the given type. (Inherited from SemWeb.Store.)
abstract GetMetas () : SemWeb.Entity[]
Returns an array of all entities used in the Meta field of any statement in the store. (Inherited from SemWeb.Store.)
abstract GetPredicates () : SemWeb.Entity[]
Returns an array of all predicates mentioned in the store. (Inherited from SemWeb.Store.)
Import (SemWeb.StatementSource)
Loads the contents of a StatementSource into the store. (Inherited from SemWeb.Store.)
MetaQuery (SemWeb.Statement[], SemWeb.Query.QueryOptions) : SemWeb.Query.MetaQueryResult
To be added. (Inherited from SemWeb.Store.)
Query (SemWeb.Statement[], SemWeb.Query.QueryOptions, SemWeb.Query.QueryResultSink)
Queries the store with a simple graph match query. (Inherited from SemWeb.Store.)
Remove (SemWeb.SelectableSource)
To be added.
abstract Remove (SemWeb.Statement)
Removes statements from the store. (Inherited from SemWeb.Store.)
Remove (string)
To be added.
RemoveAll (SemWeb.Statement[])
Removes all statements matching an array of templates. (Inherited from SemWeb.Store.)
Replace (SemWeb.Entity, SemWeb.Entity)
Replaces all occurences of one Entity with another Entity. (Inherited from SemWeb.Store.)
Replace (SemWeb.Statement, SemWeb.Statement)
Replaces a single statement with another statement. (Inherited from SemWeb.Store.)
Select (SemWeb.SelectFilter) : SemWeb.SelectResult
Retuns a SemWeb.SelectResult object that represents the result of the corresponding select call with a StatementSink. (Inherited from SemWeb.Store.)
Select (SemWeb.Statement) : SemWeb.SelectResult
Retuns a SemWeb.SelectResult object that represents the result of matching a statement template against the store. (Inherited from SemWeb.Store.)
Select (SemWeb.StatementSink)
Streams all statements in this store into a StatementSink. (Inherited from SemWeb.Store.)
abstract Select (SemWeb.SelectFilter, SemWeb.StatementSink)
Queries the story for matching statements, with advanced options, and writes the statements to a SemWeb.StatementSink. (Inherited from SemWeb.Store.)
abstract Select (SemWeb.Statement, SemWeb.StatementSink)
Queries the story for matching statements, and writes the statements to a SemWeb.StatementSink. (Inherited from SemWeb.Store.)
SelectObjects (SemWeb.Entity, SemWeb.Entity) : SemWeb.Resource[]
Finds all objects in statements with the given subject and predicate. (Inherited from SemWeb.Store.)
SelectSubjects (SemWeb.Entity, SemWeb.Resource) : SemWeb.Entity[]
Finds all subjects in statements with the given predicate and object. (Inherited from SemWeb.Store.)
Write (System.IO.TextWriter)
Writes the contents of the store to a stream in N3 format. (Inherited from SemWeb.Store.)

Protected Methods

GetResourceKey (SemWeb.Resource) : object
Used by Store implementations to retrieve cached information in an entity. (Inherited from SemWeb.Store.)
SetResourceKey (SemWeb.Resource, object)
Used by Store implementations to cache information with the entity. (Inherited from SemWeb.Store.)

Member Details

MultiStore Constructor

public MultiStore ()

Creates a new MultiStore.

Remarks

Add stores to the MultiStore with the Add method.

Add Method

public void Add (SemWeb.SelectableSource store)

To be added.

Parameters

store
To be added.

Remarks

To be added.

Add Method

public void Add (string uri, SemWeb.SelectableSource store)

To be added.

Parameters

uri
To be added.
store
To be added.

Remarks

To be added.

Add Method

public void Add (SemWeb.RdfReader source)

To be added.

Parameters

source
To be added.

Remarks

To be added.

Add Method

public void Add (string uri, SemWeb.RdfReader source)

To be added.

Parameters

uri
To be added.
source
To be added.

Remarks

To be added.

Remove Method

public void Remove (SemWeb.SelectableSource store)

To be added.

Parameters

store
To be added.

Remarks

To be added.

Remove Method

public void Remove (string uri)

To be added.

Parameters

uri
To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Stores/WriterStore.html0000644000175000017500000001360410774502134022406 0ustar meebeymeebey SemWeb.Stores.WriterStore

To be added.

public class WriterStore : SemWeb.Store, IDisposable


Remarks
To be added.
Members

See Also: Inherited members from SemWeb.Store.

Constructors
Methods
Dispose ()
To be added.
Member Details
WriterStore Constructor
public WriterStore (SemWeb.RdfWriter writer, SemWeb.KnowledgeModel model)

To be added.

Parameters
writer
To be added.
model
To be added.
Remarks
To be added.

Dispose
public void Dispose ()

To be added.

Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Stores/MySQLStore.html0000644000175000017500000002246110774502134022100 0ustar meebeymeebey SemWeb.Stores.MySQLStore

A MySQL-backed persistent data store.

public class MySQLStore : SQLStore


Remarks
This store is the recommended storage type for persistent data.
Members

See Also: Inherited members from SQLStore.

Constructors
Creates a new MySQL-backed store.
Protected Properties
SupportsInsertCombined [read-only]
override
bool . To be added.
SupportsInsertIgnore [read-only]
override
bool . To be added.
SupportsNoDuplicates [read-only]
override
bool . To be added.
Member Details
MySQLStore Constructor
public MySQLStore (string connectionString, string table)

Creates a new MySQL-backed store.

Parameters
connectionString
The MySQL connection string.
table
The prefix name of the tables to use.
Remarks
The connection string format is: "Server=hostname;" + "Database=database;" + "User ID=username;" + "Password=password".

SupportsNoDuplicates
protected override bool SupportsNoDuplicates { get; }

To be added.

Value
To be added.
Remarks
To be added.

SupportsInsertIgnore
protected override bool SupportsInsertIgnore { get; }

To be added.

Value
To be added.
Remarks
To be added.

SupportsInsertCombined
protected override bool SupportsInsertCombined { get; }

To be added.

Value
To be added.
Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Stores/CachedSource.html0000644000175000017500000003007010774502134022441 0ustar meebeymeebey SemWeb.Stores.CachedSource
CachedSource Class

To be added.

public class CachedSource : SemWeb.SelectableSource


Remarks

To be added.

Members

See Also: Inherited members from object.

Constructors

Properties

Distinct [read-only]
bool . To be added.

Methods

Member Details

CachedSource Constructor

public CachedSource (SemWeb.SelectableSource s)

To be added.

Parameters

s
To be added.

Remarks

To be added.

Select Method

public void Select (SemWeb.StatementSink sink)

To be added.

Parameters

sink
To be added.

Remarks

To be added.

Contains Method

public bool Contains (SemWeb.Resource resource)

To be added.

Parameters

resource
To be added.

Returns

To be added.

Remarks

To be added.

Contains Method

public bool Contains (SemWeb.Statement template)

To be added.

Parameters

template
To be added.

Returns

To be added.

Remarks

To be added.

Select Method

public void Select (SemWeb.Statement template, SemWeb.StatementSink sink)

To be added.

Parameters

template
To be added.
sink
To be added.

Remarks

To be added.

Select Method

public void Select (SemWeb.SelectFilter filter, SemWeb.StatementSink sink)

To be added.

Parameters

filter
To be added.
sink
To be added.

Remarks

To be added.

Distinct Property

public bool Distinct { get; }

To be added.

Value

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Stores/SQLStore.html0000644000175000017500000017624610774502134021605 0ustar meebeymeebey SemWeb.Stores.SQLStore
SQLStore Class

A store that holds statements in an SQL database.

Remarks

This class is abstract and is inherited by classes for particular database backends. Backends are provided for MySQL and SQLite in separate assemblies. Rather than referencing those assemblies and using their constructors to create stores for those databases, it is easier to use SemWeb.Store.CreateForInput(string) or SemWeb.Store.CreateForOutput(string). Both methods return SQLStores that can be used for both reading and writing.

The SQLStore uses three tables, one containing the statement triples (actually quadruples with meta information) using numeric identifiers for each resource, one mapping entity identifiers to URIs, and the last mapping literal identifiers to string/language/datatype triples. The CREATE statements for the tables, which are automatically executed by the SQLStore when needed, are:

SQL Example
CREATE TABLE TABLEPREFIX_statements (subject int UNSIGNED NOT NULL,
       predicate int UNSIGNED NOT NULL, objecttype int NOT NULL, object int UNSIGNED NOT NULL,
       meta int UNSIGNED NOT NULL);

CREATE TABLE TABLEPREFIX_entities (id INT NOT NULL, value BLOB NOT NULL,
      PRIMARY KEY(id));

CREATE TABLE TABLEPREFIX_literals (id INT NOT NULL, value BLOB NOT NULL,
      language TEXT, datatype TEXT, PRIMARY KEY(id));

Indexes are created on the subject, predicate, and object/objecttype columns in the statements table, and on the value columns in the entities and literals table. Because MySQL before version 4.1.2 supported text indexes of length up to 255 bytes, URIs in the SQLStore are limited to this length.

Each resource stored in the tables is given an ID starting at 1 which is used as the value of the subject, predicate, object, and meta columns when the entity appears in a statement. The value 0 is used for statements with no meta information. When the object of a statement is an entity, objecttype is 0 and object contains the ID of the entity. When the object of a statement is a literal, objecttype is 1 and the object column contains the value of the id column in the literals table for the literal value. Literals in the literals table can be referenced by more than one statement.

Anonymous entities (blank nodes) are simply those entities mentioned in the statements table that have no entry giving their URI in the entities table.

Note:

While it is safe to use many SQLStores to read from the same store, it is not safe to use multiple SQLStores to write to the same store concurrently.

Inheritors must implement SemWeb.Stores.SQLStore.RunCommand(string), SemWeb.Stores.SQLStore.RunReader(string), and SemWeb.Stores.SQLStore.RunScalar(string).

Members

See Also: Inherited members from object.

Protected Constructors

The protected constructor used by inherited classes.

Properties

Distinct [read-only]
bool . To be added.
StatementCount [read-only]
int . To be added.

Protected Properties

HasUniqueStatementsConstraint [read-only]
abstract
bool . To be added.
InsertIgnoreCommand [read-only]
abstract
string . To be added.
MaximumUriLength [read-only]
int . To be added.
SupportsInsertCombined [read-only]
abstract
bool . Implemented by inheritors to indicate whether the backend supports inserting mutliple rows at once in a single INSERT command.
SupportsSubquery [read-only]
abstract
bool . To be added.
SupportsViews [read-only]
bool . To be added.
TableName [read-only]
string . Gets the table prefix passed to the constructor.

Methods

Protected Methods

BeginTransaction ()
CreateEntityPrefixTest (string, string, System.Text.StringBuilder) : bool
To be added.
CreateIndexes ()
Creates the indexes on the tables.
abstract CreateLikeTest (string, string, int, System.Text.StringBuilder)
To be added.
abstract CreateNullTest (string, System.Text.StringBuilder)
To be added.
CreateTable ()
Creates the tables needed by the SQLStore.
EndTransaction ()
EscapedAppend (System.Text.StringBuilder, string)
To be added.
EscapedAppend (System.Text.StringBuilder, string, bool, bool)
To be added.
GetQuoteChar () : char
Implemented by inheritors to provide the character used to surround strings in a SQL query.
abstract RunCommand (string)
Executes an SQL statement without a return value.
abstract RunReader (string) : System.Data.IDataReader
Executes an SQL statement that returns a table.
abstract RunScalar (string) : object
Executes an SQL statement that returns a scalar value.

Member Details

RunCommand Method

protected abstract void RunCommand (string sql)

Executes an SQL statement without a return value.

Parameters

sql
The SQL statement to execute.

Remarks

Inheritors must implemented this method.

RunScalar Method

protected abstract object RunScalar (string sql)

Executes an SQL statement that returns a scalar value.

Parameters

sql
The SQL statement to run that returns a number of text value.

Returns

The numeric or text value.

Remarks

Inheritors must implement this method.

RunReader Method

protected abstract System.Data.IDataReader RunReader (string sql)

Executes an SQL statement that returns a table.

Parameters

sql
The SQL statement to run.

Returns

An IDataReader containing the result of the tabular query.

Remarks

Inheritors must implement this method.

CreateTable Method

protected virtual void CreateTable ()

Creates the tables needed by the SQLStore.

Remarks

Inheritors may override this method to change the way tables are created by the SQLStore.

CreateIndexes Method

protected virtual void CreateIndexes ()

Creates the indexes on the tables.

Remarks

Inheritors may override this method to change the way indexes are created on the tables used by the SQLStore.

BeginTransaction Method

protected virtual void BeginTransaction ()

Called at the start of SemWeb.Store.Import(SemWeb.RdfReader).

Remarks

Inheritors may override this method to put a lock on the tables or begin a transaction to speed up the process of adding many statements into the tables. The default implementation does nothing.

EndTransaction Method

protected virtual void EndTransaction ()

Called at the end of SemWeb.Store.Import(SemWeb.RdfReader).

Remarks

Inheritors may override this method to end a lock or transaction started in SemWeb.Stores.SQLStore.BeginTransaction().

TableName Property

protected string TableName { get; }

Gets the table prefix passed to the constructor.

Value

The table prefix passed to the constructor.

Remarks

This property is protected and read-only.

SQLStore Constructor

protected SQLStore (string table)

The protected constructor used by inherited classes.

Parameters

table
The prefix name of the tables used by this store.

Remarks

The two tables used by this store will be table_statements and table_literals.

EscapedAppend Method

protected void EscapedAppend (System.Text.StringBuilder b, string str)

To be added.

Parameters

b
To be added.
str
To be added.

Remarks

To be added.

SupportsInsertCombined Property

protected abstract bool SupportsInsertCombined { get; }

Implemented by inheritors to indicate whether the backend supports inserting mutliple rows at once in a single INSERT command.

Value

If true, the more efficient multiple-row INSERT syntax is used, e.g.: INSERT INTO table VALUES (row1a, row1b), (row2a, row2b), .... ;

Remarks

None.

GetQuoteChar Method

protected virtual char GetQuoteChar ()

Implemented by inheritors to provide the character used to surround strings in a SQL query.

Returns

The string quotation character, usually an apostrophe or double-quote.

Remarks

The default implementation returns a double-quote.

GetStoreGuid Method

public string GetStoreGuid ()

To be added.

Returns

To be added.

Remarks

To be added.

CreateNullTest Method

protected abstract void CreateNullTest (string column, System.Text.StringBuilder command)

To be added.

Parameters

column
To be added.
command
To be added.

Remarks

To be added.

SupportsSubquery Property

protected abstract bool SupportsSubquery { get; }

To be added.

Value

To be added.

Remarks

To be added.

HasUniqueStatementsConstraint Property

protected abstract bool HasUniqueStatementsConstraint { get; }

To be added.

Value

To be added.

Remarks

To be added.

InsertIgnoreCommand Property

protected abstract string InsertIgnoreCommand { get; }

To be added.

Value

To be added.

Remarks

To be added.

CreateEntityPrefixTest Method

protected virtual bool CreateEntityPrefixTest (string column, string prefix, System.Text.StringBuilder command)

To be added.

Parameters

column
To be added.
prefix
To be added.
command
To be added.

Returns

To be added.

Remarks

To be added.

CreateLikeTest Method

protected abstract void CreateLikeTest (string column, string prefix, int method, System.Text.StringBuilder command)

To be added.

Parameters

column
To be added.
prefix
To be added.
method
To be added.
command
To be added.

Remarks

To be added.

EscapedAppend Method

protected virtual void EscapedAppend (System.Text.StringBuilder b, string str, bool quotes, bool forLike)

To be added.

Parameters

b
To be added.
str
To be added.
quotes
To be added.
forLike
To be added.

Remarks

To be added.

Add Method

public void Add (SemWeb.Statement statement)

To be added.

Parameters

statement
To be added.

Remarks

To be added.

Clear Method

public void Clear ()

To be added.

Remarks

To be added.

Close Method

public virtual void Close ()

To be added.

Remarks

To be added.

Contains Method

public bool Contains (SemWeb.Resource resource)

To be added.

Parameters

resource
To be added.

Returns

To be added.

Remarks

To be added.

Contains Method

public bool Contains (SemWeb.Statement template)

To be added.

Parameters

template
To be added.

Returns

To be added.

Remarks

To be added.

Distinct Property

public bool Distinct { get; }

To be added.

Value

To be added.

Remarks

To be added.

GetBNodeFromPersistentId Method

public SemWeb.BNode GetBNodeFromPersistentId (string persistentId)

To be added.

Parameters

persistentId
To be added.

Returns

To be added.

Remarks

To be added.

GetEntities Method

public SemWeb.Entity[] GetEntities ()

To be added.

Returns

To be added.

Remarks

To be added.

GetMetas Method

public SemWeb.Entity[] GetMetas ()

To be added.

Returns

To be added.

Remarks

To be added.

GetPersistentBNodeId Method

public string GetPersistentBNodeId (SemWeb.BNode node)

To be added.

Parameters

node
To be added.

Returns

To be added.

Remarks

To be added.

GetPredicates Method

public SemWeb.Entity[] GetPredicates ()

To be added.

Returns

To be added.

Remarks

To be added.

Import Method

public void Import (SemWeb.StatementSource source)

To be added.

Parameters

source
To be added.

Remarks

To be added.

MetaQuery Method

To be added.

Parameters

graph
To be added.
options
To be added.

Returns

To be added.

Remarks

To be added.

Query Method

To be added.

Parameters

graph
To be added.
options
To be added.
sink
To be added.

Remarks

To be added.

Remove Method

public void Remove (SemWeb.Statement template)

To be added.

Parameters

template
To be added.

Remarks

To be added.

RemoveAll Method

public void RemoveAll (SemWeb.Statement[] templates)

To be added.

Parameters

templates
To be added.

Remarks

To be added.

Replace Method

public void Replace (SemWeb.Entity a, SemWeb.Entity b)

To be added.

Parameters

a
To be added.
b
To be added.

Remarks

To be added.

Replace Method

public void Replace (SemWeb.Statement find, SemWeb.Statement replacement)

To be added.

Parameters

find
To be added.
replacement
To be added.

Remarks

To be added.

Select Method

public void Select (SemWeb.SelectFilter filter, SemWeb.StatementSink result)

To be added.

Parameters

filter
To be added.
result
To be added.

Remarks

To be added.

Select Method

public void Select (SemWeb.Statement template, SemWeb.StatementSink result)

To be added.

Parameters

template
To be added.
result
To be added.

Remarks

To be added.

Select Method

public void Select (SemWeb.StatementSink result)

To be added.

Parameters

result
To be added.

Remarks

To be added.

StatementCount Property

public int StatementCount { get; }

To be added.

Value

To be added.

Remarks

To be added.

SupportsViews Property

protected virtual bool SupportsViews { get; }

To be added.

Value

To be added.

Remarks

To be added.

MaximumUriLength Property

protected virtual int MaximumUriLength { get; }

To be added.

Value

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Inference/0000755000175000017500000000000010774502134017642 5ustar meebeymeebeysemweb-1.05+dfsg/apidocs/SemWeb.Inference/Reasoner.html0000644000175000017500000003064310774502134022314 0ustar meebeymeebey SemWeb.Inference.Reasoner

To be added.

public abstract class Reasoner


Remarks

To be added.

Members

See Also: Inherited members from object.

Protected Constructors

To be added.

Properties

Distinct [read-only]
abstract
bool . To be added.

Methods

Member Details

Reasoner Constructor

protected Reasoner ()

To be added.

Remarks

To be added.

Distinct Property

public abstract bool Distinct { get; }

To be added.

Value

To be added.

Remarks

To be added.

MetaQuery Method

To be added.

Parameters

graph
To be added.
options
To be added.
targetModel
To be added.

Returns

To be added.

Remarks

To be added.

Query Method

public abstract void Query (SemWeb.Statement[] graph, SemWeb.Query.QueryOptions options, SemWeb.SelectableSource targetModel, SemWeb.Query.QueryResultSink result)

To be added.

Parameters

graph
To be added.
options
To be added.
targetModel
To be added.
result
To be added.

Remarks

To be added.

Select Method

public abstract void Select (SemWeb.SelectFilter filter, SemWeb.SelectableSource targetModel, SemWeb.StatementSink sink)

To be added.

Parameters

filter
To be added.
targetModel
To be added.
sink
To be added.

Remarks

To be added.

Select Method

public void Select (SemWeb.Statement template, SemWeb.SelectableSource targetModel, SemWeb.StatementSink sink)

To be added.

Parameters

template
To be added.
targetModel
To be added.
sink
To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Inference/Proof.html0000644000175000017500000001405010774502134021615 0ustar meebeymeebey SemWeb.Inference.Proof

To be added.

public class Proof


Remarks

To be added.

Members

See Also: Inherited members from object.

Constructors

To be added.

Fields

Proved
readonly
SemWeb.Statement[]. To be added.
Steps
readonly
ProofStep[]. To be added.

Member Details

Proof Constructor

public Proof (SemWeb.Statement[] proved, ProofStep[] steps)

To be added.

Parameters

proved
To be added.
steps
To be added.

Remarks

To be added.

Proved Field

public readonly SemWeb.Statement[] Proved

To be added.

Remarks

To be added.

Steps Field

public readonly ProofStep[] Steps

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Inference/index.html0000644000175000017500000000720510774502134021643 0ustar meebeymeebey SemWeb: SemWeb.Inference
SemWeb.Inference Namespace

Namespace

None.

Type Description
Euler Implements a backward-chaining reasoner with Euler path detection based on the Euler library by Jos de Roo.
Proof To be added.
ProofStep To be added.
RdfRelation To be added.
RDFS A RDFS inferencing engine.
Reasoner To be added.
Rule To be added.
SimpleEntailment To be added.

semweb-1.05+dfsg/apidocs/SemWeb.Inference/RdfRelation.html0000644000175000017500000001522110774502134022742 0ustar meebeymeebey SemWeb.Inference.RdfRelation
RdfRelation Class

To be added.

public abstract class RdfRelation : SemWeb.Query.RdfFunction


Remarks

To be added.

Members

See Also: Inherited members from SemWeb.Query.RdfFunction.

Protected Constructors

To be added.

Properties

Uri [read-only]
abstract
string . To be added. (Inherited from SemWeb.Query.RdfFunction.)

Methods

abstract Evaluate (SemWeb.Resource[]) : SemWeb.Resource
To be added. (Inherited from SemWeb.Query.RdfFunction.)
abstract Evaluate (SemWeb.Resource[], ref SemWeb.Resource) : bool
To be added.

Member Details

RdfRelation Constructor

protected RdfRelation ()

To be added.

Remarks

To be added.

Evaluate Method

public abstract bool Evaluate (SemWeb.Resource[] args, ref SemWeb.Resource object)

To be added.

Parameters

args
To be added.
object
To be added.

Returns

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Inference/RDFS.html0000644000175000017500000004067110774502134021276 0ustar meebeymeebey SemWeb.Inference.RDFS

A RDFS inferencing engine.

public class RDFS : Reasoner


Remarks

This class is an instance of the SemWeb.Inference.Reasoner class. To use a Reasoner, you add it to a Store with SemWeb.Store.AddReasoner(SemWeb.Inference.Reasoner). Subsequently, calls to Select and Query on the Store will be processed by the reasoner, and so will provide the entailments given by the reasoner directly.

The RDFS class loads in a schema and scans for rdf:subClassOf, rdf:subPropertyOf, rdf:domain, and rdf:range relations in the schema to establish the class and property hierarchies.

Entailments are queried by calls to Select on the Store that you have added the reasoner to.

Normally a reasoning engine is applied to a SemWeb.Store using SemWeb.Store.AddReasoner(SemWeb.Inference.Reasoner).

When all of the fields in the statement are non-null, the following reasoning is applied:

Calling Select(X rdf:type Y), i.e. asking whether X is typed Y, sends the statement back if the entity is marked as being a type of any subclass of Y, or if X is found in the domain or range of a predicate whose domain or range type is Y.

When checking if X is a subclass or subproperty of Y with a call to Select(X rdf:subClassOf/rdf:subPropertyOf Y), the statement is sent back if Y is in the transitive closure of rdf:subClassOf or rdf:subPropertyOf for X, which was already loaded into memory when the schema information was loaded.

When one or more of the fields in the statement is null, then following reasoning is applied:

When asking for the subclasses, superclasses, subproperties, or superproperties using Select(X rdfs:subClass/PropertyOf null) or Select(null rdfs:subClass/PropertyOf Y), the transitive closure is returned.

Asking for all entities with a given type using Select(null rdf:type Y) returns all entities marked as being typed as Y or any of its subclasses. Domains and ranges of properties are not used in this case because it would require selecting for all occurrences of all properties with domains and ranges, which isn't scalable. (This will probably be enable-able in the future.) When the type of an entity is requested with a call to Select(X rdf:type null), the type found for X in the underlying data source is returned and all of its superclasses, and if X is found in the domain or range of any predicates whose domain or range is given in the schema, the domain or range is returned as well.

For queries Select(X P Y), where X and Y may be null, statements of the form U P V are returned if there is a statement U Q V in the underlying data source where Q is a subproperty of P. (If X is not null, U=X; similarly for Y and V.) Note that the returned statements all contain P as the predicate, the property actually queried on, and not the subproperties which were found in the underlying data source.

For all other calls, the arguments are passed down to the underlying Select method of the data source without any RDFS processing.

Below is an example of using this class.

C# Example
// This example demonstrates basic RDFS reasoning.

using System;
using System.IO;

using SemWeb;
using SemWeb.Inference;

public class EulerTest {

	public static void Main() {
		// Create the instance data
		
		MemoryStore dataModel = new MemoryStore();
		
		BNode me = new BNode("me");
		BNode you = new BNode("you");
		
		Entity rdfType = "http://www.w3.org/1999/02/22-rdf-syntax-ns#type";
		Entity rdfsLabel= "http://www.w3.org/2000/01/rdf-schema#label";
		Entity foafPerson = "http://xmlns.com/foaf/0.1/Person";
		Entity foafAgent = "http://xmlns.com/foaf/0.1/Agent";
		Entity foafName = "http://xmlns.com/foaf/0.1/name";
		
		dataModel.Add(new Statement(me, rdfType, foafPerson));
		dataModel.Add(new Statement(you, rdfType, foafPerson));
		dataModel.Add(new Statement(me, foafName, (Literal)"John Doe"));
		dataModel.Add(new Statement(you, foafName, (Literal)"Sam Smith"));
		
		// Create the RDFS engine and apply it to the data model.
		
		RDFS engine = new RDFS();
		engine.LoadSchema(RdfReader.LoadFromUri(new Uri("http://xmlns.com/foaf/0.1/index.rdf")));
		
		dataModel.AddReasoner(engine);
		
		// Query the data model
		
		// Ask for who are typed as Agents.  Note that the people are
		// typed as foaf:Person, and the schema asserts that foaf:Person
		// is a subclass of foaf:Agent.
		Console.WriteLine("Who are Agents?");
		foreach (Entity r in dataModel.SelectSubjects(rdfType, foafAgent))
			Console.WriteLine("\t" + r);
		
		// Ask for the rdfs:labels of everyone.  Note that the data model
		// has foaf:names for the people, and the schema asserts that
		// foaf:name is a subproperty of rdfs:label.
		Console.WriteLine("People's labels:");
		foreach (Statement s in dataModel.Select(new Statement(null, rdfsLabel, null)))
			Console.WriteLine("\t" + s);
	}

}
  

Members

See Also: Inherited members from Reasoner.

Constructors

RDFS ()
To be added.
Creates a new RDFS reasoner with the provided schema.

Properties

Distinct [read-only]
abstract
bool . To be added. (Inherited from Reasoner.)
Schema [read-only]
SemWeb.StatementSink . A StatementSink representing the schema used by the inferencer.

Methods

Member Details

RDFS Constructor

public RDFS (SemWeb.StatementSource schema)

Creates a new RDFS reasoner with the provided schema.

Parameters

schema
The source of schema information.

Remarks

schema is scanned for RDFS schema statements.

LoadSchema Method

public void LoadSchema (SemWeb.StatementSource source)

Adds schema information to the inferencer.

Parameters

source
A source of RDFS schema information.

Remarks

The source will be scanned for schema information. If the data source implements SemWeb.SelectableSource, the source will be selected just for the relevant RDFS predicates. Otherwise, the entire source will be scanned.

Schema Property

public SemWeb.StatementSink Schema { get; }

A StatementSink representing the schema used by the inferencer.

Value

A StatementSink that statements added to will contribute to the schema used by the inferencer.

Remarks

Add statements to the value of this property to add schema information to the inferencer.

RDFS Constructor

public RDFS ()

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Inference/Euler.html0000644000175000017500000003243510774502134021613 0ustar meebeymeebey SemWeb.Inference.Euler

Implements a backward-chaining reasoner with Euler path detection based on the Euler library by Jos de Roo.

public class Euler : Reasoner


Remarks

This class is based on the JavaScript version of the Euler library at http://www.agfa.com/w3c/euler/.

This class is an instance of the SemWeb.Inference.Reasoner class. To use a Reasoner, you add it to a Store with SemWeb.Store.AddReasoner(SemWeb.Inference.Reasoner). Subsequently, calls to Select and Query on the Store will be processed by the reasoner, and so will provide the entailments given by the reasoner directly.

The following example shows how to use this class to reason about transitive relations.

C# Example
// This example demonstrates general reasoning with
// the Euler engine based on Jos De Roo's Euler proof
// mechanism.  The example is based on the "graph"
// example from Euler.

using System;
using System.IO;

using SemWeb;
using SemWeb.Inference;

public class EulerTest {

	public static void Main() {
		// Create the instance data
		
		MemoryStore dataModel = new MemoryStore();
		
		BNode paris = new BNode("paris");
		BNode orleans = new BNode("orleans");
		BNode chartres = new BNode("chartres");
		BNode amiens = new BNode("amiens");
		BNode blois = new BNode("blois");
		BNode bourges = new BNode("bourges");
		BNode tours = new BNode("tours");
		BNode lemans = new BNode("lemans");
		BNode angers = new BNode("angers");
		BNode nantes = new BNode("nantes");
	
		Entity oneway = new Entity("http://www.agfa.com/w3c/euler/graph.axiom#oneway");
		Entity path = new Entity("http://www.agfa.com/w3c/euler/graph.axiom#path");
		
		dataModel.Add(new Statement(paris, oneway, orleans));
		dataModel.Add(new Statement(paris, oneway, chartres));
		dataModel.Add(new Statement(paris, oneway, amiens));
		dataModel.Add(new Statement(orleans, oneway, blois));
		dataModel.Add(new Statement(orleans, oneway, bourges));
		dataModel.Add(new Statement(blois, oneway, tours));
		dataModel.Add(new Statement(chartres, oneway, lemans));
		dataModel.Add(new Statement(lemans, oneway, angers));
		dataModel.Add(new Statement(lemans, oneway, tours));
		dataModel.Add(new Statement(angers, oneway, nantes));
		
		// Create the inference rules by reading them from a N3 string.
		
		string rules =
			"@prefix : <http://www.agfa.com/w3c/euler/graph.axiom#>.\n" +
			"\n" +
			"{ ?a :oneway ?b } => { ?a :path ?b } .\n" +
			"{ ?a :path ?b . ?b :path ?c . } => { ?a :path ?c } .\n";
		
		// Create our question in the form of a statement to test.
		
		Statement question = new Statement(paris, path, nantes);
		
		// Create the Euler engine
		
		Euler engine = new Euler(new N3Reader(new StringReader(rules)));
		
		// First Method of Inference:
		// Ask the engine whether there is a path from paris to nantes.
		// The Prove method will return a list of proofs, or an empty
		// array if it could not find a proof.
		
		foreach (Proof p in engine.Prove(dataModel, new Statement[] { question })) {
			Console.WriteLine(p.ToString());
		}
		
		// Second Method of Inference:
		// Apply the engine to the data model and then use the data
		// model's Contains method to see if the statement is "in"
		// the model + reasoning.
		
		dataModel.AddReasoner(engine);
		
		Console.WriteLine("Euler Says the Question is: " + dataModel.Contains(question));
		
	}
}

Members

See Also: Inherited members from Reasoner.

Constructors

Constructs a new Euler inference engine with the inference rules provided in the given statement stream.

Properties

Distinct [read-only]
abstract
bool . To be added. (Inherited from Reasoner.)

Methods

Member Details

Euler Constructor

public Euler (SemWeb.StatementSource rules)

Constructs a new Euler inference engine with the inference rules provided in the given statement stream.

Parameters

rules
A source of inference statements.

Remarks

The source of inference statements usually comes from an N3 file with rules of the form "{ . . . antecedent statements . . . } => { . . . consequent statements . . . }", with variables such as "?var1" used in both parts. The "=>" predicate is shorthand for the URI http://www.w3.org/2000/10/swap/log#implies.

Prove Method

public Proof[] Prove (SemWeb.SelectableSource world, SemWeb.Statement[] goal)

To be added.

Parameters

world
To be added.
goal
To be added.

Returns

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Inference/ProofStep.html0000644000175000017500000001447610774502134022465 0ustar meebeymeebey SemWeb.Inference.ProofStep

To be added.

public class ProofStep


Remarks

To be added.

Members

See Also: Inherited members from object.

Constructors

To be added.

Fields

Rule
readonly
Rule . To be added.
Substitutions
readonly
IDictionary . To be added.

Member Details

ProofStep Constructor

public ProofStep (Rule rule, IDictionary substitutions)

To be added.

Parameters

rule
To be added.
substitutions
To be added.

Remarks

To be added.

Rule Field

public readonly Rule Rule

To be added.

Remarks

To be added.

Substitutions Field

public readonly IDictionary Substitutions

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Inference/SimpleEntailment.html0000644000175000017500000001630710774502134024011 0ustar meebeymeebey SemWeb.Inference.SimpleEntailment
SimpleEntailment Class

To be added.

public class SimpleEntailment : Reasoner


Remarks

To be added.

Members

See Also: Inherited members from Reasoner.

Constructors

To be added.

Properties

Distinct [read-only]
abstract
bool . To be added. (Inherited from Reasoner.)

Methods

Member Details

SimpleEntailment Constructor

public SimpleEntailment ()

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Inference/Rule.html0000644000175000017500000001407310774502134021444 0ustar meebeymeebey SemWeb.Inference.Rule

To be added.

public class Rule


Remarks

To be added.

Members

See Also: Inherited members from object.

Constructors

Fields

Antecedent
readonly
SemWeb.Statement[]. To be added.
Consequent
readonly
SemWeb.Statement[]. To be added.

Member Details

Rule Constructor

public Rule (SemWeb.Statement[] antecedent, SemWeb.Statement[] consequent)

To be added.

Parameters

antecedent
To be added.
consequent
To be added.

Remarks

To be added.

Antecedent Field

public readonly SemWeb.Statement[] Antecedent

To be added.

Remarks

To be added.

Consequent Field

public readonly SemWeb.Statement[] Consequent

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Util.Bind/0000755000175000017500000000000010774502134017534 5ustar meebeymeebeysemweb-1.05+dfsg/apidocs/SemWeb.Util.Bind/index.html0000644000175000017500000000461710774502134021541 0ustar meebeymeebey SemWeb: SemWeb.Util.Bind
SemWeb.Util.Bind Namespace

Namespace

To be added.

Type Description
Any To be added.

semweb-1.05+dfsg/apidocs/SemWeb.Util.Bind/Any.html0000644000175000017500000003442710774502134021163 0ustar meebeymeebey SemWeb.Util.Bind.Any

To be added.

public class Any


Remarks

To be added.

Members

See Also: Inherited members from object.

Constructors

To be added.

Properties

Entity [read-only]
SemWeb.Entity . To be added.
Model [read-only]
SemWeb.Store . To be added.
Uri [read-only]
string . To be added.

Protected Methods

Member Details

Any Constructor

public Any (SemWeb.Entity entity, SemWeb.Store model)

To be added.

Parameters

entity
To be added.
model
To be added.

Remarks

To be added.

AddValue Method

protected void AddValue (SemWeb.Entity predicate, object value, bool forward)

To be added.

Parameters

predicate
To be added.
value
To be added.
forward
To be added.

Remarks

To be added.

RemoveValue Method

protected void RemoveValue (SemWeb.Entity predicate, object value, bool forward)

To be added.

Parameters

predicate
To be added.
value
To be added.
forward
To be added.

Remarks

To be added.

SetFuncProperty Method

protected void SetFuncProperty (SemWeb.Entity predicate, object value, bool forward)

To be added.

Parameters

predicate
To be added.
value
To be added.
forward
To be added.

Remarks

To be added.

SetNonFuncProperty Method

protected void SetNonFuncProperty (SemWeb.Entity predicate, object[] values, bool forward)

To be added.

Parameters

predicate
To be added.
values
To be added.
forward
To be added.

Remarks

To be added.

Entity Property

public SemWeb.Entity Entity { get; }

To be added.

Value

To be added.

Remarks

To be added.

Model Property

public SemWeb.Store Model { get; }

To be added.

Value

To be added.

Remarks

To be added.

Uri Property

public string Uri { get; }

To be added.

Value

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Remote/0000755000175000017500000000000010774502134017177 5ustar meebeymeebeysemweb-1.05+dfsg/apidocs/SemWeb.Remote/index.html0000644000175000017500000000525010774502134021176 0ustar meebeymeebey SemWeb: SemWeb.Remote
SemWeb.Remote Namespace

Namespace

To be added.

Type Description
SparqlHttpSource This class is used to access data remotely via the SPARQL Protocol.
SparqlSource An interface representing a SPARQL endpoint.

semweb-1.05+dfsg/apidocs/SemWeb.Remote/SparqlHttpSource.html0000644000175000017500000006356710774502134023371 0ustar meebeymeebey SemWeb.Remote.SparqlHttpSource
SparqlHttpSource Class

This class is used to access data remotely via the SPARQL Protocol.

public class SparqlHttpSource : SemWeb.QueryableSource, SparqlSource


Remarks

The SparqlHttpSource accesses remote data using the SPARQL Protocol over HTTP.

SPARQL has some serious limitations regarding blank nodes. Critically, a blank node returned by a SPARQL query cannot be referenced in future queries. As a result, blank nodes returned by calls to this source cannot be used in future select calls to this source.

Members

See Also: Inherited members from object.

Constructors

Creates a new SPARQL data source ready to connect to the SPARQL server at the given URL.

Properties

Distinct [read-only]
bool . To be added.

Methods

Member Details

SparqlHttpSource Constructor

public SparqlHttpSource (string url)

Creates a new SPARQL data source ready to connect to the SPARQL server at the given URL.

Parameters

url
The URL to a SPARQL Protocol server.

Remarks

A new HTTP connection is created on each call to a method in this class.

Contains Method

public bool Contains (SemWeb.Statement template)

To be added.

Parameters

template
To be added.

Returns

To be added.

Remarks

To be added.

Select Method

public void Select (SemWeb.StatementSink sink)

To be added.

Parameters

sink
To be added.

Remarks

To be added.

Select Method

public void Select (SemWeb.Statement template, SemWeb.StatementSink sink)

To be added.

Parameters

template
To be added.
sink
To be added.

Remarks

To be added.

Select Method

public void Select (SemWeb.SelectFilter filter, SemWeb.StatementSink sink)

To be added.

Parameters

filter
To be added.
sink
To be added.

Remarks

To be added.

Distinct Property

public bool Distinct { get; }

To be added.

Value

To be added.

Remarks

To be added.

Contains Method

public bool Contains (SemWeb.Resource resource)

To be added.

Parameters

resource
To be added.

Returns

To be added.

Remarks

To be added.

MetaQuery Method

To be added.

Parameters

graph
To be added.
options
To be added.

Returns

To be added.

Remarks

To be added.

Query Method

To be added.

Parameters

graph
To be added.
options
To be added.
sink
To be added.

Remarks

To be added.

RunSparqlQuery Method

public void RunSparqlQuery (string sparqlQuery, SemWeb.Query.QueryResultSink selectResults)

To be added.

Parameters

sparqlQuery
To be added.
selectResults
To be added.

Remarks

To be added.

RunSparqlQuery Method

public void RunSparqlQuery (string sparqlQuery, SemWeb.StatementSink statementResults)

To be added.

Parameters

sparqlQuery
To be added.
statementResults
To be added.

Remarks

To be added.

RunSparqlQuery Method

public void RunSparqlQuery (string sparqlQuery, System.IO.TextWriter output)

To be added.

Parameters

sparqlQuery
To be added.
output
To be added.

Remarks

To be added.

ParseSparqlResponse Method

public static void ParseSparqlResponse (System.IO.Stream sparqlResponse, SemWeb.Query.QueryResultSink queryResults)

To be added.

Parameters

sparqlResponse
To be added.
queryResults
To be added.

Remarks

To be added.

ParseSparqlResponse Method

public static void ParseSparqlResponse (System.IO.Stream sparqlResponse, out bool askResult)

To be added.

Parameters

sparqlResponse
To be added.
askResult
To be added.

Remarks

To be added.

RunSparqlQuery Method

public void RunSparqlQuery (string sparqlQuery, out bool askResult)

To be added.

Parameters

sparqlQuery
To be added.
askResult
To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Remote/SparqlSource.html0000644000175000017500000002423410774502134022515 0ustar meebeymeebey SemWeb.Remote.SparqlSource
SparqlSource Interface

An interface representing a SPARQL endpoint.

public interface SparqlSource


Remarks

This interface is implemented by classes that support methods for accessing a SPARQL endpoint.

Members

Methods

RunSparqlQuery (string, SemWeb.Query.QueryResultSink)
Runs a SPARQL SELECT query and returns the results into a QueryResultSink.
RunSparqlQuery (string, SemWeb.StatementSink)
Runs a SPARQL CONSTRUCT or DESCRIBE query and returns the resulting statements into a StatementSink.
RunSparqlQuery (string, System.IO.TextWriter)
Runs a SPARQL query of any type and sends the output into a TextWriter.
RunSparqlQuery (string, out bool)
Runs a SPARQL ASK query and returns the boolean result.

Member Details

RunSparqlQuery Method

public void RunSparqlQuery (string sparqlQuery, SemWeb.Query.QueryResultSink selectResults)

Runs a SPARQL SELECT query and returns the results into a QueryResultSink.

Parameters

sparqlQuery
A SPARQL query.
selectResults
A QueryResultSink into which the resulting variable bindings are streamed.

Remarks

Any exception may be thrown by this method depending on the implementation.

RunSparqlQuery Method

public void RunSparqlQuery (string sparqlQuery, SemWeb.StatementSink statementResults)

Runs a SPARQL CONSTRUCT or DESCRIBE query and returns the resulting statements into a StatementSink.

Parameters

sparqlQuery
A SPARQL query.
statementResults
A StatementSink into which the statements that result from the query are streamed.

Remarks

Any exception may be thrown by this method depending on the implementation.

RunSparqlQuery Method

public void RunSparqlQuery (string sparqlQuery, System.IO.TextWriter output)

Runs a SPARQL query of any type and sends the output into a TextWriter.

Parameters

sparqlQuery
A SPARQL query.
output
A TextWriter to which the result of the query is written.

Remarks

Any exception may be thrown by this method depending on the implementation.

RunSparqlQuery Method

public void RunSparqlQuery (string sparqlQuery, out bool askResult)

Runs a SPARQL ASK query and returns the boolean result.

Parameters

sparqlQuery
A SPARQL query.
askResult
The result of the query is set into this out parameter on completion of the method.

Remarks

Any exception may be thrown by this method depending on the implementation.


semweb-1.05+dfsg/apidocs/SemWeb.Inference.Relations/0000755000175000017500000000000010774502134021601 5ustar meebeymeebeysemweb-1.05+dfsg/apidocs/SemWeb.Inference.Relations/MathCosRelation.html0000644000175000017500000001626610774502134025536 0ustar meebeymeebey SemWeb.Inference.Relations.MathCosRelation

To be added.

public class MathCosRelation : MathUnaryRelation


Remarks

To be added.

Members

See Also: Inherited members from MathUnaryRelation.

Constructors

To be added.

Properties

Uri [read-only]
abstract
string . To be added. (Inherited from SemWeb.Query.RdfFunction.)

Methods

abstract Evaluate (SemWeb.Resource[]) : SemWeb.Resource
To be added. (Inherited from SemWeb.Query.RdfFunction.)
abstract Evaluate (SemWeb.Resource[], ref SemWeb.Resource) : bool
To be added. (Inherited from SemWeb.Inference.RdfRelation.)

Protected Methods

abstract EvaluateForward (decimal) : decimal
To be added. (Inherited from MathUnaryRelation.)
abstract EvaluateReverse (decimal) : decimal
To be added. (Inherited from MathUnaryRelation.)

Member Details

MathCosRelation Constructor

public MathCosRelation ()

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Inference.Relations/MathSinhRelation.html0000644000175000017500000001627610774502134025714 0ustar meebeymeebey SemWeb.Inference.Relations.MathSinhRelation
MathSinhRelation Class

To be added.

public class MathSinhRelation : MathUnaryRelation


Remarks

To be added.

Members

See Also: Inherited members from MathUnaryRelation.

Constructors

To be added.

Properties

Uri [read-only]
abstract
string . To be added. (Inherited from SemWeb.Query.RdfFunction.)

Methods

abstract Evaluate (SemWeb.Resource[]) : SemWeb.Resource
To be added. (Inherited from SemWeb.Query.RdfFunction.)
abstract Evaluate (SemWeb.Resource[], ref SemWeb.Resource) : bool
To be added. (Inherited from SemWeb.Inference.RdfRelation.)

Protected Methods

abstract EvaluateForward (decimal) : decimal
To be added. (Inherited from MathUnaryRelation.)
abstract EvaluateReverse (decimal) : decimal
To be added. (Inherited from MathUnaryRelation.)

Member Details

MathSinhRelation Constructor

public MathSinhRelation ()

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Inference.Relations/MathTanRelation.html0000644000175000017500000001626610774502134025534 0ustar meebeymeebey SemWeb.Inference.Relations.MathTanRelation

To be added.

public class MathTanRelation : MathUnaryRelation


Remarks

To be added.

Members

See Also: Inherited members from MathUnaryRelation.

Constructors

To be added.

Properties

Uri [read-only]
abstract
string . To be added. (Inherited from SemWeb.Query.RdfFunction.)

Methods

abstract Evaluate (SemWeb.Resource[]) : SemWeb.Resource
To be added. (Inherited from SemWeb.Query.RdfFunction.)
abstract Evaluate (SemWeb.Resource[], ref SemWeb.Resource) : bool
To be added. (Inherited from SemWeb.Inference.RdfRelation.)

Protected Methods

abstract EvaluateForward (decimal) : decimal
To be added. (Inherited from MathUnaryRelation.)
abstract EvaluateReverse (decimal) : decimal
To be added. (Inherited from MathUnaryRelation.)

Member Details

MathTanRelation Constructor

public MathTanRelation ()

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Inference.Relations/MathTanhRelation.html0000644000175000017500000001627610774502134025705 0ustar meebeymeebey SemWeb.Inference.Relations.MathTanhRelation
MathTanhRelation Class

To be added.

public class MathTanhRelation : MathUnaryRelation


Remarks

To be added.

Members

See Also: Inherited members from MathUnaryRelation.

Constructors

To be added.

Properties

Uri [read-only]
abstract
string . To be added. (Inherited from SemWeb.Query.RdfFunction.)

Methods

abstract Evaluate (SemWeb.Resource[]) : SemWeb.Resource
To be added. (Inherited from SemWeb.Query.RdfFunction.)
abstract Evaluate (SemWeb.Resource[], ref SemWeb.Resource) : bool
To be added. (Inherited from SemWeb.Inference.RdfRelation.)

Protected Methods

abstract EvaluateForward (decimal) : decimal
To be added. (Inherited from MathUnaryRelation.)
abstract EvaluateReverse (decimal) : decimal
To be added. (Inherited from MathUnaryRelation.)

Member Details

MathTanhRelation Constructor

public MathTanhRelation ()

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Inference.Relations/MathEqualToRelation.html0000644000175000017500000001632610774502134026361 0ustar meebeymeebey SemWeb.Inference.Relations.MathEqualToRelation
MathEqualToRelation Class

To be added.

public class MathEqualToRelation : MathUnaryRelation


Remarks

To be added.

Members

See Also: Inherited members from MathUnaryRelation.

Constructors

To be added.

Properties

Uri [read-only]
abstract
string . To be added. (Inherited from SemWeb.Query.RdfFunction.)

Methods

abstract Evaluate (SemWeb.Resource[]) : SemWeb.Resource
To be added. (Inherited from SemWeb.Query.RdfFunction.)
abstract Evaluate (SemWeb.Resource[], ref SemWeb.Resource) : bool
To be added. (Inherited from SemWeb.Inference.RdfRelation.)

Protected Methods

abstract EvaluateForward (decimal) : decimal
To be added. (Inherited from MathUnaryRelation.)
abstract EvaluateReverse (decimal) : decimal
To be added. (Inherited from MathUnaryRelation.)

Member Details

MathEqualToRelation Constructor

public MathEqualToRelation ()

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Inference.Relations/index.html0000644000175000017500000001367710774502134023614 0ustar meebeymeebey SemWeb: SemWeb.Inference.Relations
SemWeb.Inference.Relations Namespace
semweb-1.05+dfsg/apidocs/SemWeb.Inference.Relations/MathUnaryRelation.html0000644000175000017500000002156010774502134026101 0ustar meebeymeebey SemWeb.Inference.Relations.MathUnaryRelation
MathUnaryRelation Class

To be added.

public abstract class MathUnaryRelation : SemWeb.Inference.RdfRelation


Remarks

To be added.

Members

See Also: Inherited members from SemWeb.Inference.RdfRelation.

Protected Constructors

To be added.

Properties

Uri [read-only]
abstract
string . To be added. (Inherited from SemWeb.Query.RdfFunction.)

Methods

abstract Evaluate (SemWeb.Resource[]) : SemWeb.Resource
To be added. (Inherited from SemWeb.Query.RdfFunction.)
abstract Evaluate (SemWeb.Resource[], ref SemWeb.Resource) : bool
To be added. (Inherited from SemWeb.Inference.RdfRelation.)

Protected Methods

abstract EvaluateForward (decimal) : decimal
To be added.
abstract EvaluateReverse (decimal) : decimal
To be added.

Member Details

MathUnaryRelation Constructor

protected MathUnaryRelation ()

To be added.

Remarks

To be added.

EvaluateForward Method

protected abstract decimal EvaluateForward (decimal left)

To be added.

Parameters

left
To be added.

Returns

To be added.

Remarks

To be added.

EvaluateReverse Method

protected abstract decimal EvaluateReverse (decimal right)

To be added.

Parameters

right
To be added.

Returns

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Inference.Relations/MathPairRelation.html0000644000175000017500000001724010774502134025676 0ustar meebeymeebey SemWeb.Inference.Relations.MathPairRelation
MathPairRelation Class

To be added.

public abstract class MathPairRelation : SemWeb.Inference.RdfRelation


Remarks

To be added.

Members

See Also: Inherited members from SemWeb.Inference.RdfRelation.

Protected Constructors

To be added.

Properties

Uri [read-only]
abstract
string . To be added. (Inherited from SemWeb.Query.RdfFunction.)

Methods

abstract Evaluate (SemWeb.Resource[]) : SemWeb.Resource
To be added. (Inherited from SemWeb.Query.RdfFunction.)
abstract Evaluate (SemWeb.Resource[], ref SemWeb.Resource) : bool
To be added. (Inherited from SemWeb.Inference.RdfRelation.)

Protected Methods

abstract Evaluate (decimal, decimal) : decimal
To be added.

Member Details

MathPairRelation Constructor

protected MathPairRelation ()

To be added.

Remarks

To be added.

Evaluate Method

protected abstract decimal Evaluate (decimal left, decimal right)

To be added.

Parameters

left
To be added.
right
To be added.

Returns

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Inference.Relations/MathDegreesRelation.html0000644000175000017500000001632610774502134026365 0ustar meebeymeebey SemWeb.Inference.Relations.MathDegreesRelation
MathDegreesRelation Class

To be added.

public class MathDegreesRelation : MathUnaryRelation


Remarks

To be added.

Members

See Also: Inherited members from MathUnaryRelation.

Constructors

To be added.

Properties

Uri [read-only]
abstract
string . To be added. (Inherited from SemWeb.Query.RdfFunction.)

Methods

abstract Evaluate (SemWeb.Resource[]) : SemWeb.Resource
To be added. (Inherited from SemWeb.Query.RdfFunction.)
abstract Evaluate (SemWeb.Resource[], ref SemWeb.Resource) : bool
To be added. (Inherited from SemWeb.Inference.RdfRelation.)

Protected Methods

abstract EvaluateForward (decimal) : decimal
To be added. (Inherited from MathUnaryRelation.)
abstract EvaluateReverse (decimal) : decimal
To be added. (Inherited from MathUnaryRelation.)

Member Details

MathDegreesRelation Constructor

public MathDegreesRelation ()

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Inference.Relations/MathProductRelation.html0000644000175000017500000002076210774502134026426 0ustar meebeymeebey SemWeb.Inference.Relations.MathProductRelation
MathProductRelation Class

To be added.

public class MathProductRelation : MathListRelation


Remarks

To be added.

Members

See Also: Inherited members from MathListRelation.

Constructors

To be added.

Properties

Uri [read-only]
abstract
string . To be added. (Inherited from SemWeb.Query.RdfFunction.)

Protected Properties

InitialValue [read-only]
override
decimal . To be added.
InitialValue [read-only]
abstract
decimal . To be added. (Inherited from MathListRelation.)

Methods

abstract Evaluate (SemWeb.Resource[]) : SemWeb.Resource
To be added. (Inherited from SemWeb.Query.RdfFunction.)
abstract Evaluate (SemWeb.Resource[], ref SemWeb.Resource) : bool
To be added. (Inherited from SemWeb.Inference.RdfRelation.)

Protected Methods

abstract Combine (decimal, decimal) : decimal
To be added. (Inherited from MathListRelation.)

Member Details

MathProductRelation Constructor

public MathProductRelation ()

To be added.

Remarks

To be added.

InitialValue Property

protected override decimal InitialValue { get; }

To be added.

Value

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Inference.Relations/MathNegationRelation.html0000644000175000017500000001633610774502134026554 0ustar meebeymeebey SemWeb.Inference.Relations.MathNegationRelation
MathNegationRelation Class

To be added.

public class MathNegationRelation : MathUnaryRelation


Remarks

To be added.

Members

See Also: Inherited members from MathUnaryRelation.

Constructors

To be added.

Properties

Uri [read-only]
abstract
string . To be added. (Inherited from SemWeb.Query.RdfFunction.)

Methods

abstract Evaluate (SemWeb.Resource[]) : SemWeb.Resource
To be added. (Inherited from SemWeb.Query.RdfFunction.)
abstract Evaluate (SemWeb.Resource[], ref SemWeb.Resource) : bool
To be added. (Inherited from SemWeb.Inference.RdfRelation.)

Protected Methods

abstract EvaluateForward (decimal) : decimal
To be added. (Inherited from MathUnaryRelation.)
abstract EvaluateReverse (decimal) : decimal
To be added. (Inherited from MathUnaryRelation.)

Member Details

MathNegationRelation Constructor

public MathNegationRelation ()

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Inference.Relations/MathSumRelation.html0000644000175000017500000002071210774502134025545 0ustar meebeymeebey SemWeb.Inference.Relations.MathSumRelation

To be added.

public class MathSumRelation : MathListRelation


Remarks

To be added.

Members

See Also: Inherited members from MathListRelation.

Constructors

To be added.

Properties

Uri [read-only]
abstract
string . To be added. (Inherited from SemWeb.Query.RdfFunction.)

Protected Properties

InitialValue [read-only]
override
decimal . To be added.
InitialValue [read-only]
abstract
decimal . To be added. (Inherited from MathListRelation.)

Methods

abstract Evaluate (SemWeb.Resource[]) : SemWeb.Resource
To be added. (Inherited from SemWeb.Query.RdfFunction.)
abstract Evaluate (SemWeb.Resource[], ref SemWeb.Resource) : bool
To be added. (Inherited from SemWeb.Inference.RdfRelation.)

Protected Methods

abstract Combine (decimal, decimal) : decimal
To be added. (Inherited from MathListRelation.)

Member Details

MathSumRelation Constructor

public MathSumRelation ()

To be added.

Remarks

To be added.

InitialValue Property

protected override decimal InitialValue { get; }

To be added.

Value

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Inference.Relations/MathAbsoluteValueRelation.html0000644000175000017500000001640610774502134027561 0ustar meebeymeebey SemWeb.Inference.Relations.MathAbsoluteValueRelation
MathAbsoluteValueRelation Class

To be added.

public class MathAbsoluteValueRelation : MathUnaryRelation


Remarks

To be added.

Members

See Also: Inherited members from MathUnaryRelation.

Constructors

To be added.

Properties

Uri [read-only]
abstract
string . To be added. (Inherited from SemWeb.Query.RdfFunction.)

Methods

abstract Evaluate (SemWeb.Resource[]) : SemWeb.Resource
To be added. (Inherited from SemWeb.Query.RdfFunction.)
abstract Evaluate (SemWeb.Resource[], ref SemWeb.Resource) : bool
To be added. (Inherited from SemWeb.Inference.RdfRelation.)

Protected Methods

abstract EvaluateForward (decimal) : decimal
To be added. (Inherited from MathUnaryRelation.)
abstract EvaluateReverse (decimal) : decimal
To be added. (Inherited from MathUnaryRelation.)

Member Details

MathAbsoluteValueRelation Constructor

public MathAbsoluteValueRelation ()

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Inference.Relations/MathSinRelation.html0000644000175000017500000001626610774502134025543 0ustar meebeymeebey SemWeb.Inference.Relations.MathSinRelation

To be added.

public class MathSinRelation : MathUnaryRelation


Remarks

To be added.

Members

See Also: Inherited members from MathUnaryRelation.

Constructors

To be added.

Properties

Uri [read-only]
abstract
string . To be added. (Inherited from SemWeb.Query.RdfFunction.)

Methods

abstract Evaluate (SemWeb.Resource[]) : SemWeb.Resource
To be added. (Inherited from SemWeb.Query.RdfFunction.)
abstract Evaluate (SemWeb.Resource[], ref SemWeb.Resource) : bool
To be added. (Inherited from SemWeb.Inference.RdfRelation.)

Protected Methods

abstract EvaluateForward (decimal) : decimal
To be added. (Inherited from MathUnaryRelation.)
abstract EvaluateReverse (decimal) : decimal
To be added. (Inherited from MathUnaryRelation.)

Member Details

MathSinRelation Constructor

public MathSinRelation ()

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Inference.Relations/MathRemainderRelation.html0000644000175000017500000001524210774502134026711 0ustar meebeymeebey SemWeb.Inference.Relations.MathRemainderRelation
MathRemainderRelation Class

To be added.

public class MathRemainderRelation : MathPairRelation


Remarks

To be added.

Members

See Also: Inherited members from MathPairRelation.

Constructors

To be added.

Properties

Uri [read-only]
abstract
string . To be added. (Inherited from SemWeb.Query.RdfFunction.)

Methods

abstract Evaluate (SemWeb.Resource[]) : SemWeb.Resource
To be added. (Inherited from SemWeb.Query.RdfFunction.)
abstract Evaluate (SemWeb.Resource[], ref SemWeb.Resource) : bool
To be added. (Inherited from SemWeb.Inference.RdfRelation.)

Protected Methods

abstract Evaluate (decimal, decimal) : decimal
To be added. (Inherited from MathPairRelation.)

Member Details

MathRemainderRelation Constructor

public MathRemainderRelation ()

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Inference.Relations/MathRoundedRelation.html0000644000175000017500000001632610774502134026407 0ustar meebeymeebey SemWeb.Inference.Relations.MathRoundedRelation
MathRoundedRelation Class

To be added.

public class MathRoundedRelation : MathUnaryRelation


Remarks

To be added.

Members

See Also: Inherited members from MathUnaryRelation.

Constructors

To be added.

Properties

Uri [read-only]
abstract
string . To be added. (Inherited from SemWeb.Query.RdfFunction.)

Methods

abstract Evaluate (SemWeb.Resource[]) : SemWeb.Resource
To be added. (Inherited from SemWeb.Query.RdfFunction.)
abstract Evaluate (SemWeb.Resource[], ref SemWeb.Resource) : bool
To be added. (Inherited from SemWeb.Inference.RdfRelation.)

Protected Methods

abstract EvaluateForward (decimal) : decimal
To be added. (Inherited from MathUnaryRelation.)
abstract EvaluateReverse (decimal) : decimal
To be added. (Inherited from MathUnaryRelation.)

Member Details

MathRoundedRelation Constructor

public MathRoundedRelation ()

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Inference.Relations/MathListRelation.html0000644000175000017500000002161110774502134025713 0ustar meebeymeebey SemWeb.Inference.Relations.MathListRelation
MathListRelation Class

To be added.

public abstract class MathListRelation : SemWeb.Inference.RdfRelation


Remarks

To be added.

Members

See Also: Inherited members from SemWeb.Inference.RdfRelation.

Protected Constructors

To be added.

Properties

Uri [read-only]
abstract
string . To be added. (Inherited from SemWeb.Query.RdfFunction.)

Protected Properties

InitialValue [read-only]
abstract
decimal . To be added.

Methods

abstract Evaluate (SemWeb.Resource[]) : SemWeb.Resource
To be added. (Inherited from SemWeb.Query.RdfFunction.)
abstract Evaluate (SemWeb.Resource[], ref SemWeb.Resource) : bool
To be added. (Inherited from SemWeb.Inference.RdfRelation.)

Protected Methods

abstract Combine (decimal, decimal) : decimal
To be added.

Member Details

MathListRelation Constructor

protected MathListRelation ()

To be added.

Remarks

To be added.

Combine Method

protected abstract decimal Combine (decimal left, decimal right)

To be added.

Parameters

left
To be added.
right
To be added.

Returns

To be added.

Remarks

To be added.

InitialValue Property

protected abstract decimal InitialValue { get; }

To be added.

Value

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Inference.Relations/MathIntegerQuotientRelation.html0000644000175000017500000001532210774502134030130 0ustar meebeymeebey SemWeb.Inference.Relations.MathIntegerQuotientRelation
MathIntegerQuotientRelation Class

To be added.

public class MathIntegerQuotientRelation : MathPairRelation


Remarks

To be added.

Members

See Also: Inherited members from MathPairRelation.

Constructors

Properties

Uri [read-only]
abstract
string . To be added. (Inherited from SemWeb.Query.RdfFunction.)

Methods

abstract Evaluate (SemWeb.Resource[]) : SemWeb.Resource
To be added. (Inherited from SemWeb.Query.RdfFunction.)
abstract Evaluate (SemWeb.Resource[], ref SemWeb.Resource) : bool
To be added. (Inherited from SemWeb.Inference.RdfRelation.)

Protected Methods

abstract Evaluate (decimal, decimal) : decimal
To be added. (Inherited from MathPairRelation.)

Member Details

MathIntegerQuotientRelation Constructor

public MathIntegerQuotientRelation ()

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Inference.Relations/MathQuotientRelation.html0000644000175000017500000001523210774502134026612 0ustar meebeymeebey SemWeb.Inference.Relations.MathQuotientRelation
MathQuotientRelation Class

To be added.

public class MathQuotientRelation : MathPairRelation


Remarks

To be added.

Members

See Also: Inherited members from MathPairRelation.

Constructors

To be added.

Properties

Uri [read-only]
abstract
string . To be added. (Inherited from SemWeb.Query.RdfFunction.)

Methods

abstract Evaluate (SemWeb.Resource[]) : SemWeb.Resource
To be added. (Inherited from SemWeb.Query.RdfFunction.)
abstract Evaluate (SemWeb.Resource[], ref SemWeb.Resource) : bool
To be added. (Inherited from SemWeb.Inference.RdfRelation.)

Protected Methods

abstract Evaluate (decimal, decimal) : decimal
To be added. (Inherited from MathPairRelation.)

Member Details

MathQuotientRelation Constructor

public MathQuotientRelation ()

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Inference.Relations/MathExponentiationRelation.html0000644000175000017500000001531210774502134030005 0ustar meebeymeebey SemWeb.Inference.Relations.MathExponentiationRelation
MathExponentiationRelation Class

To be added.

public class MathExponentiationRelation : MathPairRelation


Remarks

To be added.

Members

See Also: Inherited members from MathPairRelation.

Constructors

Properties

Uri [read-only]
abstract
string . To be added. (Inherited from SemWeb.Query.RdfFunction.)

Methods

abstract Evaluate (SemWeb.Resource[]) : SemWeb.Resource
To be added. (Inherited from SemWeb.Query.RdfFunction.)
abstract Evaluate (SemWeb.Resource[], ref SemWeb.Resource) : bool
To be added. (Inherited from SemWeb.Inference.RdfRelation.)

Protected Methods

abstract Evaluate (decimal, decimal) : decimal
To be added. (Inherited from MathPairRelation.)

Member Details

MathExponentiationRelation Constructor

public MathExponentiationRelation ()

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Inference.Relations/MathDifferenceRelation.html0000644000175000017500000001525210774502134027036 0ustar meebeymeebey SemWeb.Inference.Relations.MathDifferenceRelation
MathDifferenceRelation Class

To be added.

public class MathDifferenceRelation : MathPairRelation


Remarks

To be added.

Members

See Also: Inherited members from MathPairRelation.

Constructors

To be added.

Properties

Uri [read-only]
abstract
string . To be added. (Inherited from SemWeb.Query.RdfFunction.)

Methods

abstract Evaluate (SemWeb.Resource[]) : SemWeb.Resource
To be added. (Inherited from SemWeb.Query.RdfFunction.)
abstract Evaluate (SemWeb.Resource[], ref SemWeb.Resource) : bool
To be added. (Inherited from SemWeb.Inference.RdfRelation.)

Protected Methods

abstract Evaluate (decimal, decimal) : decimal
To be added. (Inherited from MathPairRelation.)

Member Details

MathDifferenceRelation Constructor

public MathDifferenceRelation ()

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Inference.Relations/MathAtan2Relation.html0000644000175000017500000001520210774502134025744 0ustar meebeymeebey SemWeb.Inference.Relations.MathAtan2Relation
MathAtan2Relation Class

To be added.

public class MathAtan2Relation : MathPairRelation


Remarks

To be added.

Members

See Also: Inherited members from MathPairRelation.

Constructors

To be added.

Properties

Uri [read-only]
abstract
string . To be added. (Inherited from SemWeb.Query.RdfFunction.)

Methods

abstract Evaluate (SemWeb.Resource[]) : SemWeb.Resource
To be added. (Inherited from SemWeb.Query.RdfFunction.)
abstract Evaluate (SemWeb.Resource[], ref SemWeb.Resource) : bool
To be added. (Inherited from SemWeb.Inference.RdfRelation.)

Protected Methods

abstract Evaluate (decimal, decimal) : decimal
To be added. (Inherited from MathPairRelation.)

Member Details

MathAtan2Relation Constructor

public MathAtan2Relation ()

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Filters/0000755000175000017500000000000010774502134017354 5ustar meebeymeebeysemweb-1.05+dfsg/apidocs/SemWeb.Filters/index.html0000644000175000017500000000732110774502134021354 0ustar meebeymeebey SemWeb: SemWeb.Filters
SemWeb.Filters Namespace

Namespace

To be added.

Type Description
DateTimeCompareFilter To be added.
FilterSink To be added.
NumericCompareFilter To be added.
StringCompareFilter To be added.
StringContainsFilter To be added.
StringEndsWithFilter To be added.
StringStartsWithFilter To be added.
TimeSpanCompareFilter To be added.

semweb-1.05+dfsg/apidocs/SemWeb.Filters/StringCompareFilter.html0000644000175000017500000001634510774502134024176 0ustar meebeymeebey SemWeb.Filters.StringCompareFilter
StringCompareFilter Class

To be added.

public class StringCompareFilter : SemWeb.LiteralFilter


Remarks

To be added.

Members

See Also: Inherited members from SemWeb.LiteralFilter.

Constructors

Fields

Pattern
readonly
string . To be added.
Type
readonly
SemWeb.LiteralFilter.CompType . To be added.

Methods

abstract Filter (SemWeb.Literal, SemWeb.SelectableSource) : bool
Filters a literal value. (Inherited from SemWeb.LiteralFilter.)

Member Details

StringCompareFilter Constructor

public StringCompareFilter (string pattern, SemWeb.LiteralFilter.CompType type)

To be added.

Parameters

pattern
To be added.
type
To be added.

Remarks

To be added.

Pattern Field

public readonly string Pattern

To be added.

Remarks

To be added.

Type Field

public readonly SemWeb.LiteralFilter.CompType Type

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Filters/StringStartsWithFilter.html0000644000175000017500000001401010774502134024707 0ustar meebeymeebey SemWeb.Filters.StringStartsWithFilter
StringStartsWithFilter Class

To be added.

public class StringStartsWithFilter : SemWeb.LiteralFilter


Remarks

To be added.

Members

See Also: Inherited members from SemWeb.LiteralFilter.

Constructors

Fields

Pattern
readonly
string . To be added.

Methods

abstract Filter (SemWeb.Literal, SemWeb.SelectableSource) : bool
Filters a literal value. (Inherited from SemWeb.LiteralFilter.)

Member Details

StringStartsWithFilter Constructor

public StringStartsWithFilter (string pattern)

To be added.

Parameters

pattern
To be added.

Remarks

To be added.

Pattern Field

public readonly string Pattern

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Filters/StringEndsWithFilter.html0000644000175000017500000001376410774502134024337 0ustar meebeymeebey SemWeb.Filters.StringEndsWithFilter
StringEndsWithFilter Class

To be added.

public class StringEndsWithFilter : SemWeb.LiteralFilter


Remarks

To be added.

Members

See Also: Inherited members from SemWeb.LiteralFilter.

Constructors

Fields

Pattern
readonly
string . To be added.

Methods

abstract Filter (SemWeb.Literal, SemWeb.SelectableSource) : bool
Filters a literal value. (Inherited from SemWeb.LiteralFilter.)

Member Details

StringEndsWithFilter Constructor

public StringEndsWithFilter (string pattern)

To be added.

Parameters

pattern
To be added.

Remarks

To be added.

Pattern Field

public readonly string Pattern

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Filters/DateTimeCompareFilter.html0000644000175000017500000001641110774502134024416 0ustar meebeymeebey SemWeb.Filters.DateTimeCompareFilter
DateTimeCompareFilter Class

To be added.

public class DateTimeCompareFilter : SemWeb.LiteralFilter


Remarks

To be added.

Members

See Also: Inherited members from SemWeb.LiteralFilter.

Constructors

Fields

Type
readonly
SemWeb.LiteralFilter.CompType . To be added.
Value
readonly
DateTime . To be added.

Methods

abstract Filter (SemWeb.Literal, SemWeb.SelectableSource) : bool
Filters a literal value. (Inherited from SemWeb.LiteralFilter.)

Member Details

DateTimeCompareFilter Constructor

public DateTimeCompareFilter (DateTime datetime, SemWeb.LiteralFilter.CompType type)

To be added.

Parameters

datetime
To be added.
type
To be added.

Remarks

To be added.

Value Field

public readonly DateTime Value

To be added.

Remarks

To be added.

Type Field

public readonly SemWeb.LiteralFilter.CompType Type

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Filters/FilterSink.html0000644000175000017500000001415010774502134022315 0ustar meebeymeebey SemWeb.Filters.FilterSink
FilterSink Class

To be added.

public class FilterSink : SemWeb.StatementSink


Remarks

To be added.

Members

See Also: Inherited members from object.

Constructors

Methods

Add (SemWeb.Statement) : bool
To be added.

Member Details

FilterSink Constructor

public FilterSink (SemWeb.LiteralFilter[] filters, SemWeb.StatementSink sink, SemWeb.SelectableSource model)

To be added.

Parameters

filters
To be added.
sink
To be added.
model
To be added.

Remarks

To be added.

Add Method

public bool Add (SemWeb.Statement s)

To be added.

Parameters

s
To be added.

Returns

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Filters/NumericCompareFilter.html0000644000175000017500000001636410774502134024333 0ustar meebeymeebey SemWeb.Filters.NumericCompareFilter
NumericCompareFilter Class

To be added.

public class NumericCompareFilter : SemWeb.LiteralFilter


Remarks

To be added.

Members

See Also: Inherited members from SemWeb.LiteralFilter.

Constructors

Fields

Number
readonly
decimal . To be added.
Type
readonly
SemWeb.LiteralFilter.CompType . To be added.

Methods

abstract Filter (SemWeb.Literal, SemWeb.SelectableSource) : bool
Filters a literal value. (Inherited from SemWeb.LiteralFilter.)

Member Details

NumericCompareFilter Constructor

public NumericCompareFilter (decimal number, SemWeb.LiteralFilter.CompType type)

To be added.

Parameters

number
To be added.
type
To be added.

Remarks

To be added.

Number Field

public readonly decimal Number

To be added.

Remarks

To be added.

Type Field

public readonly SemWeb.LiteralFilter.CompType Type

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Filters/StringContainsFilter.html0000644000175000017500000001376410774502134024370 0ustar meebeymeebey SemWeb.Filters.StringContainsFilter
StringContainsFilter Class

To be added.

public class StringContainsFilter : SemWeb.LiteralFilter


Remarks

To be added.

Members

See Also: Inherited members from SemWeb.LiteralFilter.

Constructors

Fields

Pattern
readonly
string . To be added.

Methods

abstract Filter (SemWeb.Literal, SemWeb.SelectableSource) : bool
Filters a literal value. (Inherited from SemWeb.LiteralFilter.)

Member Details

StringContainsFilter Constructor

public StringContainsFilter (string pattern)

To be added.

Parameters

pattern
To be added.

Remarks

To be added.

Pattern Field

public readonly string Pattern

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Filters/TimeSpanCompareFilter.html0000644000175000017500000001641110774502134024442 0ustar meebeymeebey SemWeb.Filters.TimeSpanCompareFilter
TimeSpanCompareFilter Class

To be added.

public class TimeSpanCompareFilter : SemWeb.LiteralFilter


Remarks

To be added.

Members

See Also: Inherited members from SemWeb.LiteralFilter.

Constructors

Fields

Type
readonly
SemWeb.LiteralFilter.CompType . To be added.
Value
readonly
TimeSpan . To be added.

Methods

abstract Filter (SemWeb.Literal, SemWeb.SelectableSource) : bool
Filters a literal value. (Inherited from SemWeb.LiteralFilter.)

Member Details

TimeSpanCompareFilter Constructor

public TimeSpanCompareFilter (TimeSpan timespan, SemWeb.LiteralFilter.CompType type)

To be added.

Parameters

timespan
To be added.
type
To be added.

Remarks

To be added.

Value Field

public readonly TimeSpan Value

To be added.

Remarks

To be added.

Type Field

public readonly SemWeb.LiteralFilter.CompType Type

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Algos/0000755000175000017500000000000010774502134017011 5ustar meebeymeebeysemweb-1.05+dfsg/apidocs/SemWeb.Algos/MSG+Graph.html0000644000175000017500000002132410774502134021364 0ustar meebeymeebey SemWeb.Algos.MSG.Graph
MSG.Graph Class

To be added.

public class MSG.Graph : SemWeb.StatementSource


Remarks

To be added.

Members

See Also: Inherited members from object.

Properties

Distinct [read-only]
bool . To be added.

Methods

Contains (SemWeb.Entity) : bool
To be added.
GetBNodes () : ICollection
To be added.
static LoadGraphs (MSG.Graph[])
To be added.
Select (SemWeb.StatementSink)
To be added.

Member Details

Contains Method

public bool Contains (SemWeb.Entity e)

To be added.

Parameters

e
To be added.

Returns

To be added.

Remarks

To be added.

GetBNodes Method

public ICollection GetBNodes ()

To be added.

Returns

To be added.

Remarks

To be added.

Select Method

public void Select (SemWeb.StatementSink s)

To be added.

Parameters

s
To be added.

Remarks

To be added.

LoadGraphs Method

public static void LoadGraphs (MSG.Graph[] graphs)

To be added.

Parameters

graphs
To be added.

Remarks

To be added.

Distinct Property

public bool Distinct { get; }

To be added.

Value

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Algos/index.html0000644000175000017500000000622410774502134021012 0ustar meebeymeebey SemWeb: SemWeb.Algos
SemWeb.Algos Namespace

Namespace

This namespace contains several experimental algorithms over RDF graphs. The classes are undocumented for now.

Type Description
Connectivity To be added.
Lean To be added.
MSG To be added.
MSG.Graph To be added.
SubgraphIterator To be added.

semweb-1.05+dfsg/apidocs/SemWeb.Algos/SubgraphIterator.html0000644000175000017500000001223510774502134023167 0ustar meebeymeebey SemWeb.Algos.SubgraphIterator
SubgraphIterator Class

To be added.

public class SubgraphIterator


Remarks

To be added.

Members

See Also: Inherited members from object.

Constructors

Methods

Next () : bool[]
To be added.

Member Details

SubgraphIterator Constructor

public SubgraphIterator (Boolean[,] connectivity)

To be added.

Parameters

connectivity
To be added.

Remarks

To be added.

Next Method

public bool[] Next ()

To be added.

Returns

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Algos/Lean.html0000644000175000017500000001753210774502134020566 0ustar meebeymeebey SemWeb.Algos.Lean

To be added.

public class Lean


Remarks

To be added.

Members

See Also: Inherited members from object.

Constructors

Lean ()
To be added.

Methods

Member Details

MakeLean Method

public static void MakeLean (SemWeb.Store store)

To be added.

Parameters

store
To be added.

Remarks

To be added.

MakeLean Method

public static void MakeLean (SemWeb.Store store, SemWeb.SelectableSource relativeTo)

To be added.

Parameters

store
To be added.
relativeTo
To be added.

Remarks

To be added.

MakeLean Method

public static void MakeLean (SemWeb.Store store, SemWeb.SelectableSource relativeTo, SemWeb.StatementSink removed)

To be added.

Parameters

store
To be added.
relativeTo
To be added.
removed
To be added.

Remarks

To be added.

Lean Constructor

public Lean ()

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Algos/Connectivity.html0000644000175000017500000001315310774502134022360 0ustar meebeymeebey SemWeb.Algos.Connectivity
Connectivity Class

To be added.

public class Connectivity


Remarks

To be added.

Members

See Also: Inherited members from object.

Constructors

To be added.

Methods

static Build (SemWeb.StatementSource, out Boolean[,], Hashtable)
To be added.

Member Details

Build Method

public static void Build (SemWeb.StatementSource graph, out Boolean[,] connectivity, Hashtable indexes)

To be added.

Parameters

graph
To be added.
connectivity
To be added.
indexes
To be added.

Remarks

To be added.

Connectivity Constructor

public Connectivity ()

To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Algos/MSG.html0000644000175000017500000002077410774502134020337 0ustar meebeymeebey SemWeb.Algos.MSG

To be added.

public class MSG


Remarks

To be added.

Members

See Also: Inherited members from object.

Constructors

MSG ()
To be added.

Methods

Member Details

FindMSG Method

public static SemWeb.MemoryStore FindMSG (SemWeb.SelectableSource store, SemWeb.Entity node)

To be added.

Parameters

store
To be added.
node
To be added.

Returns

To be added.

Remarks

To be added.

FindMSGs Method

public static MSG.Graph[] FindMSGs (SemWeb.SelectableSource source, bool loadIntoMemory)

To be added.

Parameters

source
To be added.
loadIntoMemory
To be added.

Returns

To be added.

Remarks

To be added.

MSG Constructor

public MSG ()

To be added.

Remarks

To be added.

FindMSG Method

public static void FindMSG (SemWeb.SelectableSource store, SemWeb.Entity node, SemWeb.StatementSink msg)

To be added.

Parameters

store
To be added.
node
To be added.
msg
To be added.

Remarks

To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Reasoning/0000755000175000017500000000000010774502134017671 5ustar meebeymeebeysemweb-1.05+dfsg/apidocs/SemWeb.Reasoning/index.html0000644000175000017500000000405310774502134021670 0ustar meebeymeebey SemWeb: SemWeb.Reasoning
SemWeb.Reasoning Namespace
semweb-1.05+dfsg/apidocs/SemWeb.Reasoning/InferenceStore.html0000644000175000017500000001771010774502134023500 0ustar meebeymeebey SemWeb.InferenceStore
InferenceStore

A store that draws interences using reasoning engines.

public class InferenceStore : Store


Remarks

Reasoning engines are implemented in the SemWeb.Reasoning namespace.

This class overrides the Contains and Select methods to augment the corresponding methods in the underlying data model with inferences.

The underlying data store should not be modified once it is passed to the constructor of InferenceStore.

Members

See Also: Inherited members from Store.

Constructors
Properties
Engine [read-only]
SemWeb.Reasoning.ReasoningEngine . The reasoning engine passed to the constructor.
Source [read-only]
Store . The underlying data model passed to the constructor.
Member Details
Source
public Store Source { get; }

The underlying data model passed to the constructor.

Value
The underlying data model passed to the constructor.
Remarks
None.

Engine
public SemWeb.Reasoning.ReasoningEngine Engine { get; }

The reasoning engine passed to the constructor.

Value
The reasoning engine passed to the constructor.
Remarks
None.

InferenceStore Constructor
public InferenceStore (Store store, SemWeb.Reasoning.ReasoningEngine engine)

To be added.

Parameters
store
To be added.
engine
To be added.
Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Reasoning/RDFSReasoning.html0000644000175000017500000006127410774502134023175 0ustar meebeymeebey SemWeb.Reasoning.RDFSReasoning

To be added.

public class RDFSReasoning : ReasoningEngine


Remarks
To be added.
Members

See Also: Inherited members from ReasoningEngine.

Constructors
To be added.
Fields
rdfProperty
static readonly
SemWeb.Entity . To be added.
rdfsClass
static readonly
SemWeb.Entity . To be added.
rdfsDomain
static readonly
SemWeb.Entity . To be added.
rdfsLiteral
static readonly
SemWeb.Entity . To be added.
rdfsRange
static readonly
SemWeb.Entity . To be added.
rdfsResource
static readonly
SemWeb.Entity . To be added.
rdfsSubClassOf
static readonly
SemWeb.Entity . To be added.
rdfsSubPropertyOf
static readonly
SemWeb.Entity . To be added.
rdfType
static readonly
SemWeb.Entity . To be added.
Methods
Member Details
RDFSReasoning Constructor
public RDFSReasoning ()

To be added.

Remarks
To be added.

rdfType
public static readonly SemWeb.Entity rdfType

To be added.

Remarks
To be added.

rdfsSubClassOf
public static readonly SemWeb.Entity rdfsSubClassOf

To be added.

Remarks
To be added.

rdfsSubPropertyOf
public static readonly SemWeb.Entity rdfsSubPropertyOf

To be added.

Remarks
To be added.

rdfsDomain
public static readonly SemWeb.Entity rdfsDomain

To be added.

Remarks
To be added.

rdfsRange
public static readonly SemWeb.Entity rdfsRange

To be added.

Remarks
To be added.

rdfsResource
public static readonly SemWeb.Entity rdfsResource

To be added.

Remarks
To be added.

rdfsClass
public static readonly SemWeb.Entity rdfsClass

To be added.

Remarks
To be added.

rdfsLiteral
public static readonly SemWeb.Entity rdfsLiteral

To be added.

Remarks
To be added.

getClosure
public ArrayList getClosure (SemWeb.Entity type, SemWeb.Store source, SemWeb.Entity relation, bool inverse)

To be added.

Parameters
type
To be added.
source
To be added.
relation
To be added.
inverse
To be added.
Returns
To be added.
Remarks
To be added.

getSuperTypes
public ArrayList getSuperTypes (SemWeb.Entity type, SemWeb.Store source)

To be added.

Parameters
type
To be added.
source
To be added.
Returns
To be added.
Remarks
To be added.

getSubTypes
public IList getSubTypes (SemWeb.Entity type, SemWeb.Store source)

To be added.

Parameters
type
To be added.
source
To be added.
Returns
To be added.
Remarks
To be added.

getSuperProperties
public ArrayList getSuperProperties (SemWeb.Entity type, SemWeb.Store source)

To be added.

Parameters
type
To be added.
source
To be added.
Returns
To be added.
Remarks
To be added.

getSubProperties
public ArrayList getSubProperties (SemWeb.Entity type, SemWeb.Store source)

To be added.

Parameters
type
To be added.
source
To be added.
Returns
To be added.
Remarks
To be added.

rdfProperty
public static readonly SemWeb.Entity rdfProperty

To be added.

Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Reasoning/ReasoningEngine.html0000644000175000017500000002736010774502134023642 0ustar meebeymeebey SemWeb.Reasoning.ReasoningEngine

To be added.

public abstract class ReasoningEngine


Remarks
To be added.
Members

See Also: Inherited members from object.

Protected Constructors
To be added.
Methods
Member Details
ReasoningEngine Constructor
protected ReasoningEngine ()

To be added.

Remarks
To be added.

IsAsserted
public virtual bool IsAsserted (SemWeb.Statement statement, SemWeb.Store source)

To be added.

Parameters
statement
To be added.
source
To be added.
Returns
To be added.
Remarks
To be added.

FindEntailments
public virtual void FindEntailments (SemWeb.Statement statement, SemWeb.Statement template, SemWeb.StatementSink result, SemWeb.Store source)

To be added.

Parameters
statement
To be added.
template
To be added.
result
To be added.
source
To be added.
Remarks
To be added.

Select
public virtual void Select (SemWeb.Statement statement, SemWeb.StatementSink result, SemWeb.Store source)

To be added.

Parameters
statement
To be added.
result
To be added.
source
To be added.
Remarks
To be added.

SelectFilter
public virtual void SelectFilter (ref SemWeb.Statement statement, SemWeb.Store source)

To be added.

Parameters
statement
To be added.
source
To be added.
Remarks
To be added.


semweb-1.05+dfsg/apidocs/SemWeb.Reasoning/OWLReasoning.html0000644000175000017500000003374310774502134023100 0ustar meebeymeebey SemWeb.Reasoning.OWLReasoning

To be added.

public class OWLReasoning : ReasoningEngine


Remarks
To be added.
Members

See Also: Inherited members from ReasoningEngine.

Constructors
To be added.
Fields
owlFunctional
static readonly
SemWeb.Entity . To be added.
owlInverseFunctional
static readonly
SemWeb.Entity . To be added.
owlInverseOf
static readonly
SemWeb.Entity . To be added.
owlSymmetric
static readonly
SemWeb.Entity . To be added.
owlTransitive
static readonly
SemWeb.Entity . To be added.
rdfType
static readonly
SemWeb.Entity . To be added.
Methods
Member Details
OWLReasoning Constructor
public OWLReasoning ()

To be added.

Remarks
To be added.

rdfType
public static readonly SemWeb.Entity rdfType

To be added.

Remarks
To be added.

owlInverseOf
public static readonly SemWeb.Entity owlInverseOf

To be added.

Remarks
To be added.

owlTransitive
public static readonly SemWeb.Entity owlTransitive

To be added.

Remarks
To be added.

owlSymmetric
public static readonly SemWeb.Entity owlSymmetric

To be added.

Remarks
To be added.

owlFunctional
public static readonly SemWeb.Entity owlFunctional

To be added.

Remarks
To be added.

owlInverseFunctional
public static readonly SemWeb.Entity owlInverseFunctional

To be added.

Remarks
To be added.

TransitiveSelect
public static void TransitiveSelect (SemWeb.Entity subject, SemWeb.Entity start, SemWeb.Entity predicate, bool inverse, SemWeb.Store source, SemWeb.StatementSink result)

To be added.

Parameters
subject
To be added.
start
To be added.
predicate
To be added.
inverse
To be added.
source
To be added.
result
To be added.
Remarks
To be added.


semweb-1.05+dfsg/bin_generics/0000755000175000017500000000000011007370570015565 5ustar meebeymeebeysemweb-1.05+dfsg/README.txt0000644000175000017500000001074610774502134014647 0ustar meebeymeebeySemWeb: A Semantic Web Library for C#/.NET ========================================== By Joshua Tauberer http://razor.occams.info/code/semweb USAGE ----- SemWeb is a library for use in other C# and .NET applications on either Mono or Microsoft's .NET. The library comes as a collection of .NET assemblies. There are two directories for the compiled assemblies: bin: Binaries compiled for .NET 1.1 (no generics). bin_generics: Binaries compiled for .NET 2.0 (generics). Each directory contains the files: SemWeb.dll This is the core library. SemWeb.MySQLStore.dll, SemWeb.PostgreSQLStore.dll, SemWeb.SqliteStore.dll Assemblies providing SQLStore implementations for those RDBMSs. (details to be entered here later) SemWeb.Sparql.dll An assembly providing the SPARQL engine class. It requires the auxiliary assemblies listed next. IKVM.GNU.Classpath.dll, IKVM.Runtime.dll sparql-core.dll Auxiliary assemblies required for SPARQL. rdfstorage.exe A command-line tool for converting files between RDF formats and loading RDF files into databases. rdfquery.exe A command-line tool for running SPARQL and simple graph matching (in N3) queries against a data source. euler.exe A command-line tool for performing general rule-based reasoning. Mono.GetOptions.dll This library from Mono is a dependency of all of the command-line tools listed above. .mdb files are debugging symbol files for Mono. Running under MS .NET, they are useless. Running under Mono, they are optional unless you want debugging info in stack traces. To use any of the .dll assemblies, reference them in your project, and make sure they and any of their dependencies are findable at runtime (which in MS .NET is usually the case if you just reference them). DOCUMENTATION ------------- For more information, view doc/index.html and the API documentation in apidocs/index.html. BUILD INSTRUCTIONS ------------------ Run make if you're in Linux. Nothing complicated here. You'll need Mono installed (and the MySQL/Connector and Sqlite Client DLLs for SQL database support, optionally). It'll build .NET 1.1 binaries to the bin directory and .NET 2.0 binaries with generics to the bin_generics directory. A MonoDevelop solution file (semweb.mds) and a Visual Studio 2005 solution file (SemWeb.sln) are included too. They build .NET 2.0 binaries with generics to the bin_generics directory. If you build the MySQL and SQLite .cs files, you'll need to reference MySQL's MySql.Data.dll and Sqlite Client assemblies (see www.mono-project.com). Otherwise just leave out those .cs files. Put MySql.Data.dll in a "lib" directory within the SemWeb directory. The sources are set up with a conditional compilation flag "DOTNET2" so that the sources can be compiled for both .NET 1.1 and 2.0, taking advantage of generics. LICENSE ------- The source files and binaries are all GPL-compatible. Most of the source files were written by me, some source files were written by or are derived from other work, and the binaries are a mix of the above. So the particular license that applies in each case may be different. However, everything included can be reused under the terms of the GPL (if not something more permissive, depending on what it is). The portions of this library not written by someone else are Copyright 2005-2008 Joshua Tauberer, and are dual-licensed under both the GNU GPL (version 2 or later) and the Creative Commons Attribution License. All source files not listed below were written originally by me. Thus for those source files written by me, you have two license options. The following components of this library are derived from other works: sparql-core.dll is based on the SPARQL Engine by Ryan Levering, which is covered by the GNU LGPL. The original Java JAR was coverted to a .NET assembly using IKVM (see below). Actually, I've made numerous changes to the library so it can take advantage of faster API paths in SemWeb. See: http://sparql.sourceforge.net/ IKVM*.dll are auxiliary assemblies for running the SPARQL engine. IKVM was written by Jeroen Frijters. See http://www.ikvm.net. The IVKM license is the zlib license, which is GPL compatible. Euler.cs is adapted from Jos De Roo's JavaScript Euler inferencing engine. See: http://www.agfa.com/w3c/euler/ The original source code (and thus this derived file) was licensed under the W3C Software License, which is GPL compatible. SQLServerStore.cs was contributed by Khaled Hammouda and is licensed under the GPL. semweb-1.05+dfsg/src/0000755000175000017500000000000010774502134013730 5ustar meebeymeebeysemweb-1.05+dfsg/src/AssemblyInfo.cs0000644000175000017500000000113310774502134016650 0ustar meebeymeebeyusing System.Reflection; using System.Runtime.CompilerServices; [assembly: AssemblyTitle("SemWeb")] [assembly: AssemblyDescription("A library for applications using RDF and the semantic web.")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("")] [assembly: AssemblyCopyright("Copyright (c) 2008 Joshua Tauberer ")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: AssemblyVersion("1.0.5.0")] [assembly: AssemblyDelaySign(false)] [assembly: AssemblyKeyFile("")] [assembly: AssemblyKeyName("")] semweb-1.05+dfsg/src/N3Writer.cs0000644000175000017500000001524210774502134015740 0ustar meebeymeebeyusing System; using System.Collections; using System.IO; using System.Text; using SemWeb; namespace SemWeb { public class N3Writer : RdfWriter, CanForgetBNodes { TextWriter writer; NamespaceManager2 ns = new NamespaceManager2(); bool hasWritten = false; bool closed = false; bool closeStream = false; string lastSubject = null, lastPredicate = null; Hashtable anonNames = new Hashtable(); Hashtable anonNameMap = new Hashtable(); Formats format = Formats.Turtle; private const string xsdInteger = NS.XMLSCHEMA + "integer"; private const string xsdDouble = NS.XMLSCHEMA + "double"; public enum Formats { NTriples, Turtle, Notation3 } public N3Writer(string file) : this(GetWriter(file)) { closeStream = true; } public N3Writer(TextWriter writer) { this.writer = writer; } public override NamespaceManager Namespaces { get { return ns; } } public Formats Format { get { return format; } set { format = value; } } public override void Add(Statement statement) { if (statement.AnyNull) throw new ArgumentNullException(); WriteStatement2(URI(statement.Subject), URI(statement.Predicate), statement.Object is Literal ? Literal((Literal)statement.Object) : URI((Entity)statement.Object)); } public override void Close() { base.Close(); if (closed) return; if (hasWritten) writer.WriteLine("."); closed = true; hasWritten = false; if (closeStream) writer.Close(); else writer.Flush(); } private string Literal(Literal literal) { if (format == Formats.NTriples || literal.DataType == null) return literal.ToString(); if (literal.DataType == xsdInteger) return literal.ParseValue().ToString(); if (literal.DataType == xsdDouble && format == Formats.Notation3) return literal.ParseValue().ToString(); return literal.ToString(); } private string URI(Entity entity) { if (entity is Variable && ((Variable)entity).LocalName != null) return "?" + ((Variable)entity).LocalName; if (entity is BNode) { string name = ((BNode)entity).LocalName; if (name != null && (anonNameMap[name] == null || (BNode)anonNameMap[name] == entity) && !name.StartsWith("bnode")) { return "_:" + name; } else if (anonNames[entity] != null) { return (string)anonNames[entity]; } else { string id = "_:bnode" + anonNames.Count; anonNames[entity] = id; return id; } } string uri = entity.Uri; string effectiveBaseUri = BaseUri == null ? "#" : BaseUri; if (effectiveBaseUri != null && uri.StartsWith(effectiveBaseUri)) { int len = effectiveBaseUri.Length; bool ok = true; for (int i = len; i < uri.Length; i++) { if (!char.IsLetterOrDigit(uri[i])) { ok = false; break; } } if (ok) return ":" + uri.Substring(len); } if (Format == Formats.NTriples) return "<" + Escape(uri) + ">"; string ret = ns.Normalize(uri); if (ret[0] != '<') return ret; return "<" + Escape(uri) + ">"; } private static char HexDigit(char c, int digit) { int n = (((int)c) >> (digit * 4)) & 0xF; if (n <= 9) return (char)('0' + n); else return (char)('A' + (n-10)); } internal static string Escape(string str) { // Check if any escaping is necessary, following the NTriples spec. bool needed = false; for (int i = 0; i < str.Length; i++) { char c = str[i]; if (!((c >= 0x20 && c <= 0x21) || (c >= 0x23 && c <= 0x5B) || (c >= 0x5D && c <= 0x7E))) { needed = true; break; } } if (!needed) return str; StringBuilder b = new StringBuilder(); for (int i = 0; i < str.Length; i++) { char c = str[i]; if ((c >= 0x20 && c <= 0x21) || (c >= 0x23 && c <= 0x5B) || (c >= 0x5D && c <= 0x7E)) { b.Append(c); } else if (c == 0x9) { b.Append("\\t"); } else if (c == 0xA) { b.Append("\\n"); } else if (c == 0xD) { b.Append("\\r"); } else if (c == 0x22) { b.Append("\\\""); } else if (c == 0x5C) { b.Append("\\\\"); } else if (c <= 0x8 || c == 0xB || c == 0xC || (c >= 0xE && c <= 0x1F) || (c >= 0x7F && c <= 0xFFFF)) { b.Append("\\u"); b.Append(HexDigit(c, 3)); b.Append(HexDigit(c, 2)); b.Append(HexDigit(c, 1)); b.Append(HexDigit(c, 0)); /*} else if (c >= 0x10000) { b.Append("\\U"); b.Append(HexDigit(c, 7)); b.Append(HexDigit(c, 6)); b.Append(HexDigit(c, 5)); b.Append(HexDigit(c, 4)); b.Append(HexDigit(c, 3)); b.Append(HexDigit(c, 2)); b.Append(HexDigit(c, 1)); b.Append(HexDigit(c, 0));*/ } } return b.ToString(); } private void WriteStatement2(string subj, string pred, string obj) { closed = false; // Write the prefix directives at the beginning. if (ns.addedPrefixes.Count > 0 && !(Format == Formats.NTriples)) { if (hasWritten) { writer.Write(".\n"); lastSubject = null; lastPredicate = null; hasWritten = false; // really means whether a statement is "open", missing a period } foreach (string prefix in ns.addedPrefixes) { writer.Write("@prefix "); writer.Write(prefix); writer.Write(": <"); writer.Write(ns.GetNamespace(prefix)); writer.Write("> .\n"); } ns.addedPrefixes.Clear(); } // Repeated subject. if (lastSubject != null && lastSubject == subj && !(Format == Formats.NTriples)) { // Repeated predicate too. if (lastPredicate != null && lastPredicate == pred) { writer.Write(",\n\t\t"); WriteThing(obj); // Just a repeated subject. } else { writer.Write(";\n\t"); WriteThing(pred); WriteThing(obj); lastPredicate = pred; } // The subject became the object. Abbreviate with // is...of notation (Notation3 format only). } else if (lastSubject != null && lastSubject == obj && (Format == Formats.Notation3)) { writer.Write(";\n\tis "); WriteThing(pred); writer.Write("of "); WriteThing(subj); lastPredicate = null; // Start a new statement. } else { if (hasWritten) // finish the last statement writer.Write(".\n"); WriteThing(subj); WriteThing(pred); WriteThing(obj); lastSubject = subj; lastPredicate = pred; } hasWritten = true; } private void WriteThing(string text) { writer.Write(text); writer.Write(" "); } private class NamespaceManager2 : NamespaceManager { public ArrayList addedPrefixes = new ArrayList(); public override void AddNamespace(string uri, string prefix) { base.AddNamespace(uri, prefix); addedPrefixes.Add(prefix); } } void CanForgetBNodes.ForgetBNode(BNode bnode) { anonNames.Remove(bnode); anonNameMap.Remove(bnode); } } } semweb-1.05+dfsg/src/RDFS.cs0000644000175000017500000004053210774502134015021 0ustar meebeymeebeyusing System; using System.Collections; using SemWeb; using SemWeb.Stores; using SemWeb.Util; #if !DOTNET2 using ResourceList = System.Collections.ICollection; using VarKnownValuesType = System.Collections.Hashtable; #else using ResourceList = System.Collections.Generic.ICollection; using VarKnownValuesType = System.Collections.Generic.Dictionary>; #endif namespace SemWeb.Inference { public class RDFS : Reasoner { static readonly Entity type = NS.RDF + "type"; static readonly Entity subClassOf = NS.RDFS + "subClassOf"; static readonly Entity subPropertyOf = NS.RDFS + "subPropertyOf"; static readonly Entity domain = NS.RDFS + "domain"; static readonly Entity range = NS.RDFS + "range"; static readonly Entity rdfsresource = NS.RDFS + "Resource"; // Each of these hashtables relates an entity // to a ResSet of other entities, including itself. Hashtable superclasses = new Hashtable(); Hashtable subclasses = new Hashtable(); Hashtable superprops = new Hashtable(); Hashtable subprops = new Hashtable(); // The hashtables relate a property to a ResSet of // its domain and range, and from a type to a ResSet // of properties it is the domain or range of. Hashtable domains = new Hashtable(); Hashtable ranges = new Hashtable(); Hashtable domainof = new Hashtable(); Hashtable rangeof = new Hashtable(); StatementSink schemasink; public RDFS() { schemasink = new SchemaSink(this); } public RDFS(StatementSource schema) : this() { LoadSchema(schema); } public StatementSink Schema { get { return schemasink; } } class SchemaSink : StatementSink { RDFS rdfs; public SchemaSink(RDFS parent) { rdfs = parent; } bool StatementSink.Add(Statement s) { rdfs.AddAxiom(s); return true; } } void AddAxiom(Statement schemastatement) { if (schemastatement.Predicate == subClassOf && schemastatement.Object is Entity) { AddRelation(schemastatement.Subject, (Entity)schemastatement.Object, superclasses, subclasses); AddRelation(schemastatement.Subject, rdfsresource, superclasses, subclasses); AddRelation((Entity)schemastatement.Object, rdfsresource, superclasses, subclasses); } if (schemastatement.Predicate == subPropertyOf && schemastatement.Object is Entity) AddRelation(schemastatement.Subject, (Entity)schemastatement.Object, superprops, subprops); if (schemastatement.Predicate == domain && schemastatement.Object is Entity) { AddRelation(schemastatement.Subject, (Entity)schemastatement.Object, domains, domainof); AddRelation((Entity)schemastatement.Object, rdfsresource, superclasses, subclasses); } if (schemastatement.Predicate == range && schemastatement.Object is Entity) { AddRelation(schemastatement.Subject, (Entity)schemastatement.Object, ranges, rangeof); AddRelation((Entity)schemastatement.Object, rdfsresource, superclasses, subclasses); } } void AddRelation(Entity a, Entity b, Hashtable supers, Hashtable subs) { AddRelation(a, b, supers); AddRelation(b, a, subs); } void AddRelation(Entity a, Entity b, Hashtable h) { ResSet r = (ResSet)h[a]; if (r == null) { r = new ResSet(); h[a] = r; } r.Add(b); } public void LoadSchema(StatementSource source) { if (source is SelectableSource) { ((SelectableSource)source).Select( new SelectFilter( null, new Entity[] { subClassOf, subPropertyOf, domain, range }, null, null), Schema); } else { source.Select(Schema); } } public override bool Distinct { get { return false; } } public override void Select(SelectFilter filter, SelectableSource data, StatementSink sink) { if (filter.Predicates == null || filter.LiteralFilters != null) { data.Select(filter, sink); return; } ResSet remainingPredicates = new ResSet(); Entity[] subjects = filter.Subjects; Entity[] predicates = filter.Predicates; Resource[] objects = filter.Objects; Entity[] metas = filter.Metas; foreach (Entity p in predicates) { if (p == type) { if (objects != null) { // Do the subjects have any of the types listed in the objects, // or what things have those types? // Expand objects by the subclass closure of the objects data.Select(new SelectFilter(subjects, new Entity[] { p }, GetClosure(objects, subclasses, true), metas), sink); // Process domains and ranges. ResSet dom = new ResSet(), ran = new ResSet(); Hashtable domPropToType = new Hashtable(); Hashtable ranPropToType = new Hashtable(); foreach (Entity e in GetClosure(objects, subclasses, true)) { Entity[] dc = GetClosure((ResSet)domainof[e], subprops, true); if (dc != null) foreach (Entity c in dc) { dom.Add(c); AddRelation(c, e, domPropToType); } dc = GetClosure((ResSet)rangeof[e], subprops, true); if (dc != null) foreach (Entity c in dc) { ran.Add(c); AddRelation(c, e, ranPropToType); } } // If it's in the domain of any of these properties, // we know its type. Only do this if subjects are given, // since otherwise we have to select for all of the values // of all of these properties, and that doesn't scale well. if (subjects != null) { if (dom.Count > 0) data.Select(new SelectFilter(subjects, dom.ToEntityArray(), null, metas), new ExpandDomRan(0, domPropToType, sink)); if (ran.Count > 0) data.Select(new SelectFilter(null, ran.ToEntityArray(), subjects, metas), new ExpandDomRan(1, ranPropToType, sink)); } } else if (subjects != null) { // What types do these subjects have? // Expand the resulting types by the closure of their superclasses data.Select(new SelectFilter(subjects, new Entity[] { p }, objects, metas), new Expand(superclasses, sink)); // Use domains and ranges to get type info data.Select(new SelectFilter(subjects, null, null, metas), new Expand3(0, domains, superclasses, sink)); data.Select(new SelectFilter(null, null, subjects, metas), new Expand3(1, ranges, superclasses, sink)); } else { // What has type what? We won't answer that question. data.Select(filter, sink); } } else if ((p == subClassOf || p == subPropertyOf) && (metas == null || metas[0] == Statement.DefaultMeta)) { Hashtable supers = (p == subClassOf) ? superclasses : superprops; Hashtable subs = (p == subClassOf) ? subclasses : subprops; if (subjects != null && objects != null) { // Expand objects by the subs closure of the objects. data.Select(new SelectFilter(subjects, new Entity[] { p }, GetClosure(objects, subs, true), metas), sink); } else if (subjects != null) { // get all of the supers of all of the subjects foreach (Entity s in subjects) foreach (Entity o in GetClosure(s, supers, false)) sink.Add(new Statement(s, p, o)); } else if (objects != null) { // get all of the subs of all of the objects foreach (Resource o in objects) { if (o is Literal) continue; foreach (Entity s in GetClosure((Entity)o, subs, false)) sink.Add(new Statement(s, p, (Entity)o)); } } else { // What is a subclass/property of what? We won't answer that. data.Select(filter, sink); } } else { remainingPredicates.Add(p); } } if (remainingPredicates.Count > 0) { // Also query the subproperties of any property // being queried, but remember which subproperties // came from which superproperties so we can map them // back to the properties actually queried. The closures // contain the queried properties themselves too. ResSet qprops = new ResSet(); Hashtable propfrom = new Hashtable(); foreach (Entity p in remainingPredicates) { foreach (Entity sp in GetClosure(p, subprops, true)) { AddRelation(sp, p, propfrom); qprops.Add(sp); } } //data.Select(subjects, qprops.ToEntityArray(), objects, metas, new LiteralDTMap(ranges, new PredMap(propfrom, sink))); SelectFilter sf = new SelectFilter(subjects, qprops.ToEntityArray(), objects, metas); sf.LiteralFilters = filter.LiteralFilters; sf.Limit = filter.Limit; data.Select(sf, new PredMap(propfrom, sink)); } } static Entity[] GetClosure(Entity start, Hashtable table, bool includeStart) { return GetClosure( new Resource[] { start } , table, includeStart); } static Entity[] GetClosure(ResSet starts, Hashtable table, bool includeStarts) { if (starts == null) return null; return GetClosure(starts.ToArray(), table, includeStarts); } static Entity[] GetClosure(Resource[] starts, Hashtable table, bool includeStarts) { ResSet ret = new ResSet(); ResSet toadd = new ResSet(starts); bool firstRound = true; while (toadd.Count > 0) { ResSet newadd = new ResSet(); foreach (Resource e in toadd) { if (!(e is Entity)) continue; if (ret.Contains(e)) continue; if (!(firstRound && !includeStarts)) ret.Add(e); if (table.ContainsKey(e)) newadd.AddRange((ResSet)table[e]); } toadd.Clear(); toadd.AddRange(newadd); firstRound = false; } return ret.ToEntityArray(); } class Expand : StatementSink { Hashtable table; StatementSink sink; public Expand(Hashtable t, StatementSink s) { table = t; sink = s; } public bool Add(Statement s) { foreach (Entity e in RDFS.GetClosure(new Resource[] { s.Object }, table, true)) if (!sink.Add(new Statement(s.Subject, s.Predicate, e, s.Meta))) return false; return true; } } class ExpandDomRan : StatementSink { int domran; Hashtable map; StatementSink sink; public ExpandDomRan(int dr, Hashtable propToType, StatementSink s) { if (s == null) throw new ArgumentNullException(); domran = dr; map = propToType; sink = s; } public bool Add(Statement s) { if (s.AnyNull) throw new ArgumentNullException(); if (domran == 1 && !(s.Object is Entity)) return true; if (!map.ContainsKey(s.Predicate)) return true; // shouldn't really happen foreach (Entity e in (ResSet)map[s.Predicate]) { Statement s1 = new Statement( domran == 0 ? s.Subject : (Entity)s.Object, type, e, s.Meta); if (!sink.Add(s1)) return false; } return true; } } class Expand3 : StatementSink { int domran; Hashtable table; Hashtable superclasses; StatementSink sink; public Expand3(int dr, Hashtable t, Hashtable sc, StatementSink s) { domran = dr; table = t; superclasses = sc; sink = s; } public bool Add(Statement s) { if (domran == 1 && !(s.Object is Entity)) return true; ResSet rs = (ResSet)table[s.Predicate]; if (rs == null) return true; foreach (Entity e in RDFS.GetClosure(rs, superclasses, true)) { Statement s1 = new Statement( domran == 0 ? s.Subject : (Entity)s.Object, type, e, s.Meta); if (!sink.Add(s1)) return false; } return true; } } class PredMap : StatementSink { Hashtable table; StatementSink sink; public PredMap(Hashtable t, StatementSink s) { table = t; sink = s; } public bool Add(Statement s) { if (table[s.Predicate] == null) { return sink.Add(s); } else { foreach (Entity e in (ResSet)table[s.Predicate]) if (!sink.Add(new Statement(s.Subject, e, s.Object, s.Meta))) return false; } return true; } } class LiteralDTMap : StatementSink { Hashtable ranges; StatementSink sink; public LiteralDTMap(Hashtable t, StatementSink s) { ranges = t; sink = s; } public bool Add(Statement s) { ranges.ToString(); // avoid warning about not using variable if (s.Object is Literal && ((Literal)s.Object).DataType == null) { // TODO: Look at the superproperty closure of the predicate // and apply the first range found to the literal. While // more than one range may apply, we can only assign one. // It would be best to assign the most specific, but we // don't have that info. And, don't ever assign the rdfs:Literal // or rdfs:Resource classes as the data type -- and there may be // others -- that are consistent but just not data types. // Also, assign the most specific data type if we have // the class relations among them. return sink.Add(s); } else { return sink.Add(s); } } } public override SemWeb.Query.MetaQueryResult MetaQuery(Statement[] graph, SemWeb.Query.QueryOptions options, SelectableSource data) { Statement[] graph2; SemWeb.Query.QueryOptions options2; RewriteGraph(graph, options, out graph2, out options2, null); if (!(data is QueryableSource)) return new SimpleEntailment().MetaQuery(graph2, options2, data); else return ((QueryableSource)data).MetaQuery(graph2, options2); } public override void Query(Statement[] graph, SemWeb.Query.QueryOptions options, SelectableSource data, SemWeb.Query.QueryResultSink sink) { Statement[] graph2; SemWeb.Query.QueryOptions options2; RewriteGraph(graph, options, out graph2, out options2, sink); // TODO: Because we add variables to the query when we replace things with closures, // we should filter the query results so we don't pass back the bindings for those // variables to the caller. if (!(data is QueryableSource)) new SimpleEntailment().Query(graph2, options2, data, sink); else ((QueryableSource)data).Query(graph2, options2, sink); } void RewriteGraph(Statement[] graph, SemWeb.Query.QueryOptions options, out Statement[] graph2, out SemWeb.Query.QueryOptions options2, SemWeb.Query.QueryResultSink sink) { graph2 = new Statement[graph.Length]; options2 = new SemWeb.Query.QueryOptions(); options2.DistinguishedVariables = options.DistinguishedVariables; options2.Limit = options.Limit; options2.VariableKnownValues = (options.VariableKnownValues == null ? new VarKnownValuesType() : new VarKnownValuesType(options.VariableKnownValues)); options2.VariableLiteralFilters = options.VariableLiteralFilters; for (int i = 0; i < graph.Length; i++) { graph2[i] = graph[i]; //ResSet subj = GetQueryRes(graph[i], 0, options); ResSet pred = GetQueryRes(graph[i], 1, options); ResSet obj = GetQueryRes(graph[i], 2, options); if (pred.Count == 1 && pred.Contains(type)) { // in an ?x rdf:type ___ query, replace ___ with the subclass closure of ___. if (obj.Count > 0) { Entity[] sc = GetClosure(obj, subclasses, true); if (sc.Length != obj.Count && sink != null) sink.AddComments("Expanding object of " + graph[i] + " with subclass closure to [" + ToString(sc) + "]"); SetQueryRes(ref graph2[i], 2, options2, sc); } } // expand properties into subproperties after the above tests, // because we want to be sure the property was originally // just one of the recognized properties if (pred.Count > 0) { Entity[] pc = GetClosure(pred, subprops, true); SetQueryRes(ref graph2[i], 1, options2, pc); if (pc.Length != pred.Count && sink != null) sink.AddComments("Expanding predicate of " + graph[i] + " with subproperty closure to [" + ToString(pc) + "]"); } } } ResSet GetQueryRes(Statement s, int i, SemWeb.Query.QueryOptions options) { ResSet ret = new ResSet(); Resource r = s.GetComponent(i); if (r == null) return ret; if (!(r is Variable)) ret.Add(r); if (options.VariableKnownValues != null && r is Variable #if !DOTNET2 && options.VariableKnownValues.Contains((Variable)r)) { #else && options.VariableKnownValues.ContainsKey((Variable)r)) { #endif ret.AddRange((ResourceList)options.VariableKnownValues[(Variable)r]); } return ret; } void SetQueryRes(ref Statement s, int i, SemWeb.Query.QueryOptions options, Entity[] values) { // TODO: what if s had originally a variable in position i? if (values.Length == 0) s.SetComponent(i, null); else if (values.Length == 1) s.SetComponent(i, values[0]); else { Variable v = new Variable(); s.SetComponent(i, v); options.VariableKnownValues[v] = values; } } string ToString(Entity[] ents) { string[] names = new string[ents.Length]; for (int i = 0; i < ents.Length; i++) names[i] = ents[i].ToString(); return String.Join(" , ", names); } } } semweb-1.05+dfsg/src/MySQLStore.cs0000644000175000017500000001304510774502134016244 0ustar meebeymeebey//#define CATCHEXCEPTIONS using System; using System.Collections; using System.Data; #if BYTEFX using ByteFX.Data.MySqlClient; #elif CONNECTOR using MySql.Data.MySqlClient; #endif namespace SemWeb.Stores { public class MySQLStore : SQLStore { MySqlConnection connection; string connectionString; Version version; static bool Debug = System.Environment.GetEnvironmentVariable("SEMWEB_DEBUG_MYSQL") != null; static string ImportMode; static bool DoAnalyze; static MySQLStore() { string mode = System.Environment.GetEnvironmentVariable("SEMWEB_MYSQL_IMPORT_MODE"); if (mode != null) { string[] modeinfo = mode.Split(','); ImportMode = modeinfo[0]; if (modeinfo.Length == 2) DoAnalyze = !(modeinfo[1] == "NOANALYZE"); } if (ImportMode == null) ImportMode = "TRANSACTION"; } public MySQLStore(string connectionString, string table) : base(table) { this.connectionString = connectionString; } protected override bool HasUniqueStatementsConstraint { get { return true; } } protected override string InsertIgnoreCommand { get { return "IGNORE"; } } protected override bool SupportsInsertCombined { get { return true; } } protected override bool SupportsSubquery { get { return true; } } protected override bool SupportsViews { get { Open(); return version >= new Version(5,0,1,0); } } protected override int MaximumUriLength { get { Open(); return version >= new Version(4,1,2) ? -1 : 255; } } protected override void CreateNullTest(string column, System.Text.StringBuilder command) { command.Append("ISNULL("); command.Append(column); command.Append(')'); } protected override void CreateLikeTest(string column, string match, int method, System.Text.StringBuilder command) { command.Append(column); command.Append(" LIKE \""); if (method == 1 || method == 2) command.Append("%"); // contains or ends-with EscapedAppend(command, match, false, true); if (method != 2) command.Append("%"); // contains or starts with command.Append("\""); } public override void Close() { base.Close(); if (connection != null) connection.Close(); } private void Open() { if (connection != null) return; MySqlConnection c = new MySqlConnection(connectionString); c.Open(); connection = c; // only set field if open was successful using (IDataReader reader = RunReader("show variables like \"version\"")) { reader.Read(); version = new Version(reader.GetString(1)); } } #if !CATCHEXCEPTIONS protected override void RunCommand(string sql) { Open(); if (Debug) Console.Error.WriteLine(sql); using (MySqlCommand cmd = new MySqlCommand(sql, connection)) { cmd.CommandTimeout = 0; // things like Clear can take a while cmd.ExecuteNonQuery(); } } protected override object RunScalar(string sql) { Open(); using (MySqlCommand cmd = new MySqlCommand(sql, connection)) { object ret = null; using (IDataReader reader = cmd.ExecuteReader()) { if (reader.Read()) { ret = reader[0]; } } if (Debug) Console.Error.WriteLine(sql + " => " + ret); return ret; } } protected override IDataReader RunReader(string sql) { Open(); if (Debug) Console.Error.WriteLine(sql); using (MySqlCommand cmd = new MySqlCommand(sql, connection)) { return cmd.ExecuteReader(); } } #else protected override void RunCommand(string sql) { Open(); try { if (Debug) Console.Error.WriteLine(sql); using (MySqlCommand cmd = new MySqlCommand(sql, connection)) cmd.ExecuteNonQuery(); } catch (Exception e) { Console.WriteLine(sql); throw e; } } protected override object RunScalar(string sql) { Open(); try { using (MySqlCommand cmd = new MySqlCommand(sql, connection)) { object ret = null; using (IDataReader reader = cmd.ExecuteReader()) { if (reader.Read()) { ret = reader[0]; } } if (Debug) Console.Error.WriteLine(sql + " => " + ret); return ret; } } catch (Exception e) { Console.WriteLine(sql); throw e; } } protected override IDataReader RunReader(string sql) { Open(); try { if (Debug) Console.Error.WriteLine(sql); using (MySqlCommand cmd = new MySqlCommand(sql, connection)) { return cmd.ExecuteReader(); } } catch (Exception e) { Console.WriteLine(sql); throw e; } } #endif protected override void BeginTransaction() { if (ImportMode == "DISABLEKEYS") RunCommand("ALTER TABLE " + TableName + "_statements DISABLE KEYS"); else if (ImportMode == "TRANSACTION") RunCommand("BEGIN"); else if (ImportMode == "LOCK") RunCommand("LOCK TABLES " + TableName + "_statements WRITE, " + TableName + "_literals WRITE, " + TableName + "_entities WRITE"); //RunCommand("ALTER TABLE " + TableName + "_entities DELAY_KEY_WRITE=1"); //RunCommand("ALTER TABLE " + TableName + "_literals DELAY_KEY_WRITE=1"); } protected override void EndTransaction() { //RunCommand("ALTER TABLE " + TableName + "_entities DELAY_KEY_WRITE=0"); //RunCommand("ALTER TABLE " + TableName + "_literals DELAY_KEY_WRITE=0"); if (ImportMode == "DISABLEKEYS") RunCommand("ALTER TABLE " + TableName + "_statements ENABLE KEYS"); else if (ImportMode == "TRANSACTION") RunCommand("COMMIT"); else if (ImportMode == "LOCK") RunCommand("UNLOCK TABLES"); RunCommand("ANALYZE TABLE " + TableName + "_entities"); RunCommand("ANALYZE TABLE " + TableName + "_literals"); RunCommand("ANALYZE TABLE " + TableName + "_statements"); } } } semweb-1.05+dfsg/src/LiteralFilters.cs0000644000175000017500000001211610774502134017205 0ustar meebeymeebeyusing System; using System.Collections; namespace SemWeb { using SemWeb.Filters; public abstract class LiteralFilter { public abstract bool Filter(Literal value, SelectableSource targetModel); public static LiteralFilter Create(CompType type, object value) { if (value is string) return new StringCompareFilter((string)value, type); if (value is decimal || value is byte || value is sbyte || value is short || value is ushort || value is int || value is uint || value is long || value is ulong || value is float || value is double) return new NumericCompareFilter(((IConvertible)value).ToDecimal(null), type); if (value is DateTime) return new DateTimeCompareFilter((DateTime)value, type); if (value is TimeSpan) return new TimeSpanCompareFilter((TimeSpan)value, type); throw new ArgumentException("Invalid type: " + value.GetType()); } internal bool CompareFilter(int cmp, CompType type) { switch (type) { case CompType.LT: return cmp < 0; case CompType.LE: return cmp <= 0; case CompType.NE: return cmp != 0; case CompType.EQ: return cmp == 0; case CompType.GT: return cmp > 0; case CompType.GE: return cmp >= 0; default: throw new ArgumentException(type.ToString()); } } public enum CompType { LT, LE, NE, EQ, GT, GE } public static bool MatchesFilters(Resource literal, LiteralFilter[] filters, SelectableSource targetModel) { if (literal is Literal) return MatchesFilters((Literal)literal, filters, targetModel); return false; } private static bool MatchesFilters(Literal literal, LiteralFilter[] filters, SelectableSource targetModel) { foreach (LiteralFilter filter in filters) if (!filter.Filter(literal, targetModel)) return false; return true; } } } namespace SemWeb.Filters { public class FilterSink : StatementSink { LiteralFilter[] filters; StatementSink sink; SelectableSource model; public FilterSink(LiteralFilter[] filters, StatementSink sink, SelectableSource model) { this.filters = filters; this.sink = sink; this.model = model; } public bool Add(Statement s) { if (filters != null && filters.Length > 0 && !LiteralFilter.MatchesFilters(s.Object, filters, model)) return true; return sink.Add(s); } } public class StringCompareFilter : LiteralFilter { public readonly string Pattern; public readonly CompType Type; public StringCompareFilter(string pattern, CompType type) { Pattern = pattern; Type = type; } public override bool Filter(Literal resource, SelectableSource targetModel) { string v = resource.Value; int c = v.CompareTo(Pattern); return CompareFilter(c, Type); } } public class StringContainsFilter : LiteralFilter { public readonly string Pattern; public StringContainsFilter(string pattern) { Pattern = pattern; } public override bool Filter(Literal resource, SelectableSource targetModel) { string v = resource.Value; return v.IndexOf(Pattern) != -1; } } public class StringStartsWithFilter : LiteralFilter { public readonly string Pattern; public StringStartsWithFilter(string pattern) { Pattern = pattern; } public override bool Filter(Literal resource, SelectableSource targetModel) { string v = resource.Value; return v.StartsWith(Pattern); } } public class StringEndsWithFilter : LiteralFilter { public readonly string Pattern; public StringEndsWithFilter(string pattern) { Pattern = pattern; } public override bool Filter(Literal resource, SelectableSource targetModel) { string v = resource.Value; return v.EndsWith(Pattern); } } public class NumericCompareFilter : LiteralFilter { public readonly Decimal Number; public readonly CompType Type; public NumericCompareFilter(Decimal number, CompType type) { Number = number; Type = type; } public override bool Filter(Literal resource, SelectableSource targetModel) { string v = resource.Value; try { Decimal i = Decimal.Parse(v); int c = i.CompareTo(Number); return CompareFilter(c, Type); } catch (Exception) { return false; } } } public class DateTimeCompareFilter : LiteralFilter { public readonly DateTime Value; public readonly CompType Type; public DateTimeCompareFilter(DateTime datetime, CompType type) { Value = datetime; Type = type; } public override bool Filter(Literal resource, SelectableSource targetModel) { string v = resource.Value; try { DateTime i = DateTime.Parse(v); int c = i.CompareTo(Value); return CompareFilter(c, Type); } catch (Exception) { return false; } } } public class TimeSpanCompareFilter : LiteralFilter { public readonly TimeSpan Value; public readonly CompType Type; public TimeSpanCompareFilter(TimeSpan timespan, CompType type) { Value = timespan; Type = type; } public override bool Filter(Literal resource, SelectableSource targetModel) { string v = resource.Value; try { TimeSpan i = TimeSpan.Parse(v); int c = i.CompareTo(Value); return CompareFilter(c, Type); } catch (Exception) { return false; } } } } semweb-1.05+dfsg/src/Resource.cs0000644000175000017500000007113010774502134016050 0ustar meebeymeebeyusing System; using System.Collections; using System.Xml; namespace SemWeb { public abstract class Resource : IComparable #if DOTNET2 , IComparable #endif { internal object ekKey, ekValue; internal ArrayList extraKeys; internal class ExtraKey { public object Key; public object Value; public ExtraKey(object k, object v) { Key = k; Value = v; } } public abstract string Uri { get; } internal Resource() { } // These gets rid of the warning about overring ==, !=. // Since Entity and Literal override these, we're ok. public override bool Equals(object other) { return base.Equals(other); } public override int GetHashCode() { return base.GetHashCode(); } public static bool operator ==(Resource a, Resource b) { if ((object)a == null && (object)b == null) return true; if ((object)a == null || (object)b == null) return false; return a.Equals(b); } public static bool operator !=(Resource a, Resource b) { return !(a == b); } public object GetResourceKey(object key) { if (ekKey == key) return ekValue; if (extraKeys == null) return null; for (int i = 0; i < extraKeys.Count; i++) { Resource.ExtraKey ekey = (Resource.ExtraKey)extraKeys[i]; if (ekey.Key == key) return ekey.Value; } return null; } public void SetResourceKey(object key, object value) { if (ekKey == null || ekKey == key) { ekKey = key; ekValue = value; return; } if (this is BNode) throw new InvalidOperationException("Only one resource key can be set for a BNode."); if (extraKeys == null) extraKeys = new ArrayList(); foreach (Resource.ExtraKey ekey in extraKeys) if (ekey.Key == key) { ekey.Value = value; return; } Resource.ExtraKey k = new Resource.ExtraKey(key, value); extraKeys.Add(k); } #if DOTNET2 int IComparable.CompareTo(object other) { return CompareTo((Resource)other); } public int CompareTo(Resource other) { #else public int CompareTo(object other) { #endif // We'll make an ordering over resources. // First named entities, then bnodes, then literals. // Named entities are sorted by URI. // Bnodes by hashcode. // Literals by their value, language, datatype. Resource r = (Resource)other; if (Uri != null && r.Uri == null) return -1; if (Uri == null && r.Uri != null) return 1; if (this is BNode && r is Literal) return -1; if (this is Literal && r is BNode) return 1; if (Uri != null) return String.Compare(Uri, r.Uri, false, System.Globalization.CultureInfo.InvariantCulture); if (this is BNode) { BNode me = (BNode)this, o = (BNode)other; if (me.LocalName != null || o.LocalName != null) { if (me.LocalName == null) return -1; if (o.LocalName == null) return -1; int x = String.Compare(me.LocalName, o.LocalName, false, System.Globalization.CultureInfo.InvariantCulture); if (x != 0) return x; } return GetHashCode().CompareTo(r.GetHashCode()); } if (this is Literal) { int x = String.Compare(((Literal)this).Value, ((Literal)r).Value, false, System.Globalization.CultureInfo.InvariantCulture); if (x != 0) return x; x = String.Compare(((Literal)this).Language, ((Literal)r).Language, false, System.Globalization.CultureInfo.InvariantCulture); if (x != 0) return x; x = String.Compare(((Literal)this).DataType, ((Literal)r).DataType, false, System.Globalization.CultureInfo.InvariantCulture); return x; } return 0; // unreachable } } public class Entity : Resource { private string uri; public Entity(string uri) { if (uri == null) throw new ArgumentNullException("To construct entities with no URI, use the BNode class."); if (uri.Length == 0) throw new ArgumentException("uri cannot be the empty string"); this.uri = uri; } // For the BNode constructor only. internal Entity() { } public override string Uri { get { return uri; } } public static implicit operator Entity(string uri) { return new Entity(uri); } public override int GetHashCode() { if (uri == null) return base.GetHashCode(); // this is called from BNode.GetHashCode(). return uri.GetHashCode(); } public override bool Equals(object other) { if (!(other is Resource)) return false; if (object.ReferenceEquals(this, other)) return true; return ((Resource)other).Uri != null && ((Resource)other).Uri == Uri; } // Although these do the same as Resource's operator overloads, // having these plus the implict string conversion allows // these operators to work with entities and strings. public static bool operator ==(Entity a, Entity b) { if ((object)a == null && (object)b == null) return true; if ((object)a == null || (object)b == null) return false; return a.Equals(b); } public static bool operator !=(Entity a, Entity b) { return !(a == b); } public override string ToString() { return "<" + Uri + ">"; } public static string ValidateUri(string uri) { // Validates the uri as an RDF IRI Reference, // i.e. an absolute URI with optional fragment, // based on the RDF Concepts document and RFC 3987 // (and RFCs recursively referenced therein). // From the IRI RFC 3987, we are accepting: // // scheme ":" ihier-part [ "?" iquery ] [ "#" ifragment ] // // scheme = ALPHA *( ALPHA | DIGIT | "+" | "-" | "." ) // ihier-part = "//" iauthority ipath-abempty | ipath-absolute | ipath-rootless | ipath-empty // iauthority = [ iuserinfo "@" ] ihost [ ":" port ] // iuserinfo = *( iunreserved / pct-encoded / sub-delims / ":" ) // ihost = IP-literal / IPv4address / ireg-name // port = *DIGIT // IP-literal = "[" ( IPv6address / IPvFuture ) "]" // IPv4address = dec-octet "." dec-octet "." dec-octet "." dec-octet // ipath-absolute = "/" [ isegment-nz *( "/" isegment ) ] // ipath-rootless = isegment-nz *( "/" isegment ) // isegment = *ipchar // isegment-nz = 1*ipchar // ipath-empty = (nothing) // iquery = *( ipchar | iprivate | "/" | "?" ) // ifragment = *( ipchar | "/" | "?" ) // ipchar = iunreserved | pct-encoded | sub-delims | ":" | "@" // iunreserved = ALPHA | DIGIT | "-" | "." | "_" | "~" | ucschar // pct-encoded = "%" HEXDIG HEXDIG // sub-delims = "!" | "$" | "&" | "'" | "(" | ")" | "*" | "+" | "," | ";" | "=" // iprivate = %xE000-F8FF | %xF0000-FFFFD | %x100000-10FFFD // ALPHA = %x41-5A | %x61-7A ; A-Z / a-z // DIGIT = %x30-39 ; 0-9 // HEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F" char state = 's'; foreach (char c in uri) { // From 'RDF Concepts' section 6.4, // a URI cannot contain control characters (#x00-#x1F, #x7F-#x9F) if (c <= 0x1F || (c >= 0x7F && c <= 0x9F)) return "The control character '" + c + "' (" + ((int)c).ToString("x") + ") is not allowed."; switch (state) { // scheme = ALPHA *( ALPHA | DIGIT | "+" | "-" | "." ) // The scheme is terminated by a colon after the first character. case 's': // first character in scheme if (!ValidateUriIsAlpha(c)) return "The character '" + c + "' (" + ((int)c).ToString("x") + ") is not allowed as the first character in a URI, which is the start of the scheme."; state = 'S'; break; case 'S': // non-first character in scheme if (c == ':') // transition to ihier-part state = 'H'; else if (!ValidateUriIsAlpha(c) && !ValidateUriIsDigit(c) && c != '+' && c != '-' && c != '.') return "The character '" + c + "' (" + ((int)c).ToString("x") + ") is not allowed in the scheme portion of the URI."; break; // ihier-part = "//" iauthority ipath-abempty | ipath-absolute | ipath-rootless | ipath-empty case 'H': // start of ihier-part (just read the colon) if (c == '/') // either start of //+iauthority+ipath-abempty or ipath-absolute state = '/'; else if (c == '?') // empty ihier-part, start of query state = 'q'; else if (c == '#') // empty ihier-part, start of fragment state = 'f'; else { // This is the first character of ipath-rootless, which must be an ipchar if (!ValidateUriIsIpchar(c)) return "The character '" + c + "' (" + ((int)c).ToString("x") + ") is not allowed at the start of the (rootless) path portion of the URI."; state = 'r'; } break; case '/': // either 2nd slash of //+iauthority+ipath-abempty or 1st character past slash in ipath-absolute if (c == '/') state = 'a'; // iauthority, to lead into ipath-abempty else if (!ValidateUriIsIpchar(c)) return "The character '" + c + "' (" + ((int)c).ToString("x") + ") is not allowed at the start of the (absolute without authority) path portion of the URI."; // For the rest of ipath-absolute, we go to state r. state = 'r'; break; case 'r': // 2nd character and later of ipath-rootless, or // 3rd character and later of ipath-absolute, or // 2nd character and later of ipath-abempty, // all of which are *( "/" isegment ) and terminate the ihier-part of the URI. if (c == '?') // start of query state = 'q'; else if (c == '#') // start of fragment state = 'f'; else if (c != '/' && !ValidateUriIsIpchar(c)) return "The character '" + c + "' (" + ((int)c).ToString("x") + ") is not allowed in the path portion of the URI."; // stay in this state break; case 'a': // the start of iauthority, which then goes to ipath-abempty, which then terminates the ihier-part // We very loosely check this part because we can't do this easily deterministically. // (For instance, we don't know if we are looking at a username or host until we // find an @ sign or the end.) So we allow any of the allowed characters in // this region, until we can be sure we are moving into ipath-abempty with a // slash, or into the query with a question mark, or fragment with a hash. // None of those three characters can occur in this part (fortunately). if (c == '?') // start of query state = 'q'; else if (c == '#') // start of fragment state = 'f'; else if (c == '/') // start of a non-empty ipath-abempty, which is *( "/" isegment ) state = 'r'; // The allowed characters are: // iauthority: '@' | ':' // iuserinfo: iunreserved / pct-encoded / sub-delims / ':' // ihost: // port: DIGIT // IP-literal: '[' ']' // IPv6address: HEXDIG ':' // IPvFuture: 'v' HEXDIG '.' unreserved subdelims ':' // IPv4address: DIGIT '.' // ireg-name: iunreserved / pct-encoded / sub-delims else if (c != '@' && c != ':' && c != '[' && c != ']' && c != '.' && c != ':' && c != '%' && !ValidateUriIsIUnreserved(c) && !ValidateUriIsSubdelim(c)) return "The character '" + c + "' (" + ((int)c).ToString("x") + ") is not allowed in the authority (user, host, and port) portion of the URI."; // stay in this state break; case 'q': // start of query string // iquery = *( ipchar / iprivate / "/" / "?" ) if (c == '#') // start of fragment state = 'f'; else if (c != '/' && c != '?' && !ValidateUriIsIpchar(c) && !ValidateUriIsIPrivate(c)) return "The character '" + c + "' (" + ((int)c).ToString("x") + ") is not allowed in the query string portion of the URI."; // stay in this state break; case 'f': // start of fragment // ifragment = *( ipchar / "/" / "?" ) if (c != '/' && c != '?' && !ValidateUriIsIpchar(c)) return "The character '" + c + "' (" + ((int)c).ToString("x") + ") is not allowed in the fragment portion of the URI."; // stay in this state break; } } // Which state did we end up in? If we end in some states, we didn't finish the URI. switch (state) { case 's': // first character in scheme: the URI was empty return "The URI is empty."; case 'S': // non-first character in scheme return "The URI must start with a scheme name (e.g. \"http:\")."; case 'H': // start of ihier-part return "After the scheme (e.g. \"http:\"), something must follow, such as double-slashes."; case '/': // just read first slash of "//" or the starting slash in a path case 'r': // various // no problem: we can end here break; case 'a': // just read second slash starting the authority part return "After the double-slashes, a host name (or a user-plus-@-sign) must follow."; case 'q': // start of query case 'f': // start of fragment // no problem: we can have empty query strings and fragments break; } // This is an OK IRI. return null; } private static bool ValidateUriIsAlpha(char c) { return (c >= 0x41 && c <= 0x5A) || (c >= 0x61 && c <= 0x7A); } private static bool ValidateUriIsDigit(char c) { return c >= 0x30 && c <= 0x39; } internal static bool ValidateUriIsIUnreserved(char c) { return ValidateUriIsAlpha(c) || ValidateUriIsDigit(c) || c == '-' || c == '.' || c == '_' || c == '~' || (c >= 0xA0 && c <= 0xD7FF) || (c >= 0xF900 && c <= 0xFDCF) || (c >= 0xFDF0 && c <= 0xFFEF); // ucschar } private static bool ValidateUriIsSubdelim(char c) { return c == '!' || c == '$' || c == '&' || c == '\'' || c == '(' || c == ')' || c == '*' || c == '+' || c == ',' || c == ';' || c == '='; } private static bool ValidateUriIsIpchar(char c) { // also could be pct-encoded char, but we don't have look-ahead so we just // check the percent -- the rest will be OK because the HEXDIG chars could appear alone return ValidateUriIsIUnreserved(c) || ValidateUriIsSubdelim(c) || c == ':' || c == '@' || c == '%'; } private static bool ValidateUriIsIPrivate(char c) { return c >= 0xE000 && c <= 0xF8FF; } } public class BNode : Entity { string localname; public BNode() { } public BNode(string localName) { localname = localName; if (localname != null && localname.Length == 0) throw new ArgumentException("localname cannot be the empty string"); } public string LocalName { get { return localname; } } public override int GetHashCode() { if (ekKey != null) return ekKey.GetHashCode() ^ ekValue.GetHashCode(); // If there's no ExtraKeys info, then this // object is only equal to itself. It's then safe // to use object.GetHashCode(). return base.GetHashCode(); } public override bool Equals(object other) { if (object.ReferenceEquals(this, other)) return true; if (!(other is BNode)) return false; object okKey = ((Resource)other).ekKey; object okValue = ((Resource)other).ekValue; return (ekKey != null && okKey != null) && (ekKey == okKey) && ekValue.Equals(okValue); } public override string ToString() { if (LocalName != null) return "_:" + LocalName; else return "_:bnode" + Math.Abs(GetHashCode()); } } public class Variable : BNode { public Variable() : base() { } public Variable(string variableName) : base(variableName) { } public override string ToString() { if (LocalName != null) return "?" + LocalName; else return "?var" + Math.Abs(GetHashCode()); } } public sealed class Literal : Resource { private string value, lang, type; public Literal(string value) : this(value, null, null) { } public Literal(string value, string language, string dataType) { if (value == null) throw new ArgumentNullException("value"); this.value = value; this.lang = language; this.type = dataType; if (language != null && language.Length == 0) throw new ArgumentException("language cannot be the empty string"); if (dataType != null && dataType.Length == 0) throw new ArgumentException("dataType cannot be the empty string"); } public static explicit operator Literal(string value) { return new Literal(value); } public override string Uri { get { return null; } } public string Value { get { return value; } } public string Language { get { return lang; } } public string DataType { get { return type; } } public override bool Equals(object other) { if (other == null) return false; if (!(other is Literal)) return false; Literal literal = (Literal)other; if (Value != literal.Value) return false; if (different(Language, literal.Language)) return false; if (different(DataType, literal.DataType)) return false; return true; } private bool different(string a, string b) { if ((object)a == (object)b) return false; if (a == null || b == null) return true; return a != b; } public override int GetHashCode() { return Value.GetHashCode(); } public override string ToString() { System.Text.StringBuilder ret = new System.Text.StringBuilder(); ret.Append('"'); ret.Append(N3Writer.Escape(Value)); ret.Append('"'); if (Language != null) { ret.Append('@'); ret.Append(N3Writer.Escape(Language)); } if (DataType != null) { ret.Append("^^<"); ret.Append(N3Writer.Escape(DataType)); ret.Append(">"); } return ret.ToString(); } public static Literal Parse(string literal, NamespaceManager namespaces) { if (literal.Length < 2 || literal[0] != '\"') throw new FormatException("Literal value must start with a quote."); int quote = literal.LastIndexOf('"'); if (quote <= 0) throw new FormatException("Literal value must have an end quote (" + literal + ")"); string value = literal.Substring(1, quote-1); literal = literal.Substring(quote+1); value = value.Replace("\\\"", "\""); value = value.Replace("\\\\", "\\"); string lang = null; string datatype = null; if (literal.Length >= 2 && literal[0] == '@') { int type = literal.IndexOf("^^"); if (type == -1) lang = literal.Substring(1); else { lang = literal.Substring(1, type); literal = literal.Substring(type); } } if (literal.StartsWith("^^")) { if (literal.StartsWith("^^<") && literal.EndsWith(">")) { datatype = literal.Substring(3, literal.Length-4); } else { if (namespaces == null) throw new ArgumentException("No NamespaceManager was given to resolve the QName in the literal string."); datatype = namespaces.Resolve(literal.Substring(2)); } } return new Literal(value, lang, datatype); } public object ParseValue() { string dt = DataType; if (dt == null || !dt.StartsWith(NS.XMLSCHEMA)) return Value; dt = dt.Substring(NS.XMLSCHEMA.Length); if (dt == "string" || dt == "normalizedString" || dt == "anyURI") return Value; if (dt == "boolean") return XmlConvert.ToBoolean(Value); if (dt == "decimal" || dt == "integer" || dt == "nonPositiveInteger" || dt == "negativeInteger" || dt == "nonNegativeInteger" || dt == "positiveInteger") return XmlConvert.ToDecimal(Value); if (dt == "float") return XmlConvert.ToSingle(Value); if (dt == "double") return XmlConvert.ToDouble(Value); if (dt == "duration") return XmlConvert.ToTimeSpan(Value); #if !DOTNET2 if (dt == "dateTime" || dt == "time" || dt == "date") return XmlConvert.ToDateTime(Value); #else if (dt == "dateTime" || dt == "time" || dt == "date") return XmlConvert.ToDateTime(Value, XmlDateTimeSerializationMode.Utc); #endif if (dt == "long") return XmlConvert.ToInt64(Value); if (dt == "int") return XmlConvert.ToInt32(Value); if (dt == "short") return XmlConvert.ToInt16(Value); if (dt == "byte") return XmlConvert.ToSByte(Value); if (dt == "unsignedLong") return XmlConvert.ToUInt64(Value); if (dt == "unsignedInt") return XmlConvert.ToUInt32(Value); if (dt == "unsignedShort") return XmlConvert.ToUInt16(Value); if (dt == "unsignedByte") return XmlConvert.ToByte(Value); return Value; } public Literal Normalize() { if (DataType == null) return this; return new Literal(ParseValue().ToString(), Language, DataType); } public static Literal FromValue(float value) { return new Literal(value.ToString(), null, NS.XMLSCHEMA + "float"); } public static Literal FromValue(double value) { return new Literal(value.ToString(), null, NS.XMLSCHEMA + "double"); } public static Literal FromValue(byte value) { if (value <= 127) return new Literal(value.ToString(), null, NS.XMLSCHEMA + "byte"); else return new Literal(value.ToString(), null, NS.XMLSCHEMA + "unsignedByte"); } public static Literal FromValue(short value) { return new Literal(value.ToString(), null, NS.XMLSCHEMA + "short"); } public static Literal FromValue(int value) { return new Literal(value.ToString(), null, NS.XMLSCHEMA + "int"); } public static Literal FromValue(long value) { return new Literal(value.ToString(), null, NS.XMLSCHEMA + "long"); } public static Literal FromValue(sbyte value) { return new Literal(value.ToString(), null, NS.XMLSCHEMA + "byte"); } public static Literal FromValue(ushort value) { return new Literal(value.ToString(), null, NS.XMLSCHEMA + "unsignedShort"); } public static Literal FromValue(uint value) { return new Literal(value.ToString(), null, NS.XMLSCHEMA + "unsignedInt"); } public static Literal FromValue(ulong value) { return new Literal(value.ToString(), null, NS.XMLSCHEMA + "unsignedLong"); } public static Literal FromValue(Decimal value) { return new Literal(value.ToString(), null, NS.XMLSCHEMA + "decimal"); } public static Literal FromValue(bool value) { return new Literal(value ? "true" : "false", null, NS.XMLSCHEMA + "boolean"); } public static Literal FromValue(string value) { return new Literal(value, null, NS.XMLSCHEMA + "string"); } public static Literal FromValue(Uri value) { return new Literal(value.ToString(), null, NS.XMLSCHEMA + "anyURI"); } public static Literal FromValue(DateTime value) { return FromValue(value, true, false); } public static Literal FromValue(DateTime value, bool withTime, bool isLocalTime) { if (withTime && isLocalTime) return new Literal(value.ToString("yyyy-MM-ddTHH\\:mm\\:ss.FFFFFFF0zzz"), null, NS.XMLSCHEMA + "dateTime"); else if (withTime) return new Literal(value.ToString("yyyy-MM-ddTHH\\:mm\\:ss.FFFFFFF0"), null, NS.XMLSCHEMA + "dateTime"); else return new Literal(value.ToString("yyyy-MM-dd"), null, NS.XMLSCHEMA + "date"); } public static Literal FromValue(TimeSpan value) { return FromValue(value, false, false); } public static Literal FromValue(TimeSpan value, bool asTime, bool isLocalTime) { if (!asTime) { string ret = (value.Ticks >= 0 ? "P" : "-P"); if (value.Days != 0) { ret += value.Days + "D"; if (value.Hours != 0 || value.Minutes != 0 || value.Seconds != 0 || value.Milliseconds != 0) ret += "T"; } if (value.Hours != 0) ret += value.Hours + "H"; if (value.Minutes != 0) ret += value.Minutes + "M"; if (value.Seconds != 0 || value.Milliseconds != 0) ret += (value.Seconds + value.Milliseconds/1000) + "S"; return new Literal(ret, null, NS.XMLSCHEMA + "duration"); } else if (isLocalTime) { return new Literal((DateTime.Today + value).ToString("HH\\:mm\\:ss.FFFFFFF0zzz"), null, NS.XMLSCHEMA + "time"); } else { return new Literal((DateTime.Today + value).ToString("HH\\:mm\\:ss.FFFFFFF0"), null, NS.XMLSCHEMA + "time"); } } } /* public abstract class LiteralFilter : Resource { public LiteralFilter() : base(null) { } public override string Uri { get { return null; } } public abstract bool Matches(Literal literal); } public interface SQLLiteralFilter { string GetSQLFunction(); } public class LiteralNumericComparison : LiteralFilter, SQLLiteralFilter { double value; Op comparison; public LiteralNumericComparison(double value, Op comparison) { this.value = value; this.comparison = comparison; } public enum Op { Equal, NotEqual, GreaterThan, GreaterThanOrEqual, LessThan, LessThanOrEqual, } public override bool Matches(Literal literal) { double v; if (!double.TryParse(literal.Value, System.Globalization.NumberStyles.Any, null, out v)) return false; switch (comparison) { case Op.Equal: return v == value; case Op.NotEqual: return v != value; case Op.GreaterThan: return v > value; case Op.GreaterThanOrEqual: return v >= value; case Op.LessThan: return v < value; case Op.LessThanOrEqual: return v <= value; default: return false; } } public string GetSQLFunction() { switch (comparison) { case Op.Equal: return "literal = " + value; case Op.NotEqual: return "literal != " + value; case Op.GreaterThan: return "literal > " + value; case Op.GreaterThanOrEqual: return "literal >= " + value; case Op.LessThan: return "literal < " + value; case Op.LessThanOrEqual: return "literal <= " + value; default: return null; } } } public class LiteralStringComparison : LiteralFilter, SQLLiteralFilter { string value; Op comparison; public LiteralStringComparison(string value, Op comparison) { this.value = value; this.comparison = comparison; } public enum Op { Equal, NotEqual, GreaterThan, GreaterThanOrEqual, LessThan, LessThanOrEqual, } public override bool Matches(Literal literal) { string v = literal.Value; switch (comparison) { case Op.Equal: return v == value; case Op.NotEqual: return v != value; case Op.GreaterThan: return v.CompareTo(value) > 0; case Op.GreaterThanOrEqual: return v.CompareTo(value) >= 0; case Op.LessThan: return v.CompareTo(value) < 0; case Op.LessThanOrEqual: return v.CompareTo(value) <= 0; default: return false; } } public string GetSQLFunction() { switch (comparison) { case Op.Equal: return "literal = " + value; case Op.NotEqual: return "literal != " + value; case Op.GreaterThan: return "literal > " + value; case Op.GreaterThanOrEqual: return "literal >= " + value; case Op.LessThan: return "literal < " + value; case Op.LessThanOrEqual: return "literal <= " + value; default: return null; } } } */ } namespace SemWeb.Util.Bind { public class Any { Entity ent; Store model; public Any(Entity entity, Store model) { this.ent = entity; this.model = model; } public Entity Entity { get { return ent; } } public Store Model { get { return model; } } public string Uri { get { return ent.Uri; } } private Resource toRes(object value) { if (value == null) return null; if (value is Resource) return (Resource)value; // shouldn't happen if (value is string) return new Literal((string)value); if (value is Any) return ((Any)value).ent; throw new ArgumentException("value is not of a recognized type"); } protected void AddValue(Entity predicate, object value, bool forward) { if (value == null) throw new ArgumentNullException("value"); Resource v = toRes(value); if (!forward && !(v is Entity)) throw new ArgumentException("Cannot set this property to a literal value."); Statement add = new Statement(ent, predicate, v); if (!forward) add = add.Invert(); model.Add(add); } protected void RemoveValue(Entity predicate, object value, bool forward) { if (value == null) throw new ArgumentNullException("value"); Resource v = toRes(value); if (!forward && !(v is Entity)) throw new ArgumentException("Cannot set this property to a literal value."); Statement rem = new Statement(ent, predicate, v); if (!forward) rem = rem.Invert(); model.Remove(rem); } protected void SetFuncProperty(Entity predicate, object value, bool forward) { Resource v = toRes(value); Statement search = new Statement(ent, predicate, null); Statement replace = new Statement(ent, predicate, v); if (!forward) { if (v != null && !(v is Entity)) throw new ArgumentException("Cannot set this property to a literal value."); search = search.Invert(); replace = replace.Invert(); } if (v != null) { foreach (Statement s in model.Select(search)) { model.Replace(s, replace); return; } model.Add(replace); } else { model.Remove(search); } } protected void SetNonFuncProperty(Entity predicate, object[] values, bool forward) { Statement search = new Statement(ent, predicate, null); if (!forward) search = search.Invert(); model.Remove(search); if (values != null) { foreach (object value in values) { Resource v = toRes(value); if (v == null) throw new ArgumentNullException("element of values array"); if (!forward && !(v is Entity)) throw new ArgumentException("Cannot set this property to a literal value."); Statement add = new Statement(ent, predicate, v); if (!forward) add = add.Invert(); model.Add(add); } } } } } semweb-1.05+dfsg/src/NamespaceManager.cs0000644000175000017500000001072710774502134017455 0ustar meebeymeebeyusing System; using System.Collections; namespace SemWeb { internal class NS { public const string RDF = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"; public const string RDFS = "http://www.w3.org/2000/01/rdf-schema#"; public const string XMLSCHEMA = "http://www.w3.org/2001/XMLSchema#"; /*Entity entRDFTYPE = "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"; Entity entRDFFIRST = "http://www.w3.org/1999/02/22-rdf-syntax-ns#first"; Entity entRDFREST = "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"; Entity entRDFNIL = "http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"; Entity entOWLSAMEAS = "http://www.w3.org/2002/07/owl#sameAs"; Entity entLOGIMPLIES = "http://www.w3.org/2000/10/swap/log#implies";*/ } public class NamespaceManager { NamespaceManager parent; Hashtable atob = new Hashtable(); Hashtable btoa = new Hashtable(); public NamespaceManager() : this (null) { } public NamespaceManager(NamespaceManager parent) { this.parent = parent; } public virtual void AddNamespace(string uri, string prefix) { atob[uri] = prefix; btoa[prefix] = uri; } public void AddFrom(NamespaceManager nsmgr) { foreach (string uri in nsmgr.GetNamespaces()) AddNamespace(uri, nsmgr.GetPrefix(uri)); } public virtual string GetNamespace(string prefix) { string ret = (string)btoa[prefix]; if (ret != null) return ret; if (parent != null) return parent.GetNamespace(prefix); return null; } public virtual string GetPrefix(string uri) { string ret = (string)atob[uri]; if (ret != null) return ret; if (parent != null) return parent.GetPrefix(uri); return null; } public bool Normalize(string uri, out string prefix, out string localname) { int hash = uri.LastIndexOf('#'); if (hash > 0) { prefix = GetPrefix(uri.Substring(0, hash+1)); if (prefix != null) { localname = uri.Substring(hash+1); return true; } } hash = uri.LastIndexOf('/'); if (hash > 0) { prefix = GetPrefix(uri.Substring(0, hash+1)); if (prefix != null) { localname = uri.Substring(hash+1); return true; } } prefix = null; localname = null; return false; } public string Normalize(string uri) { string prefix, localname; if (Normalize(uri, out prefix, out localname)) { bool ok = true; if (localname.Length == 0) ok = false; else if (!char.IsLetter(localname[0]) && localname[0] != '_') ok = false; foreach (char c in localname) if (!char.IsLetterOrDigit(c) && c != '-' && c != '_') ok = false; if (ok) return prefix + ":" + localname; } return "<" + uri + ">"; } public string Resolve(string qname) { int colon = qname.IndexOf(':'); if (colon == -1) throw new ArgumentException("Invalid qualified name."); string prefix = qname.Substring(0, colon); string ns = GetNamespace(prefix); if (ns == null) throw new ArgumentException("The prefix " + prefix + " is not declared."); return ns + qname.Substring(colon+1); } public ICollection GetNamespaces() { if (parent == null) return atob.Keys; ArrayList items = new ArrayList(atob.Keys); foreach (string ns in parent.GetNamespaces()) if (!items.Contains(ns)) items.Add(ns); return items; } public ICollection GetPrefixes() { if (parent == null) return atob.Values; ArrayList items = new ArrayList(atob.Values); foreach (string ns in parent.GetPrefixes()) if (!items.Contains(ns)) items.Add(ns); return items; } } } namespace SemWeb.IO { using SemWeb; internal class AutoPrefixNamespaceManager : NamespaceManager { int counter = 0; public AutoPrefixNamespaceManager() : this (null) { } public AutoPrefixNamespaceManager(NamespaceManager parent) : base(parent) { } public override string GetPrefix(string uri) { string ret = base.GetPrefix(uri); if (ret != null) return ret; if (uri == "http://www.w3.org/1999/02/22-rdf-syntax-ns#" && GetNamespace("rdf") == null) ret = "rdf"; else if (uri == "http://www.w3.org/2000/01/rdf-schema#" && GetNamespace("rdfs") == null) ret = "rdfs"; else if (uri == "http://www.w3.org/2002/07/owl#" && GetNamespace("owl") == null) ret = "owl"; else if (uri == "http://purl.org/dc/elements/1.1/" && GetNamespace("dc") == null) ret = "dc"; else if (uri == "http://xmlns.com/foaf/0.1/" && GetNamespace("foaf") == null) ret = "foaf"; else ret = "autons" + (counter++); AddNamespace(uri, ret); return ret; } } } semweb-1.05+dfsg/src/SQLStore2.cs0000644000175000017500000007452710774502134016034 0ustar meebeymeebey/** * SQLStore2.cs: An abstract implementation of an RDF triple store * using an SQL-based backend. This is the second version of SQLStore. * * The SQLStore creates two tables to store its data, each prefixed * with a user-provided name (here "PREFIX"). The tables are * organized as follows: * table columns * PREFIX_statements subject, predicate, object, meta: all 28byte binary hashes * PREFIX_values id (28byte binary hash), type (byte), value (binary string), * language (short binary string), datatype (binary string) * * Every resource is identified by the hash of its value. Entities (named * nodes) are hashed on their URI. Literal values are hashed on their * N3 representation, including surrounding quotes, the language, and * datatype (if present), so that the space of URI and literal hashes * don't clash. Blank nodes are hashed on a GUID assigned to them. * A special hash value is reserved for the global Statement.DefaultMeta * value. * * The statements table stores each triple (or quad) as a row. * * The values table maps the hash values back to the content of the node. * The type column in the values table is 1 for named nodes, 2 for blank * nodes, and 3 for literals. For named nodes, the value column contains * the node's URI and the other columns are left null. For blank nodes, * the value column contains a GUID assigned to the node. For literals, * the value, language, and datatype columns are used in the obvious way. * * Type 0 in the values table is reserved for extra-modal data, such * as metadata about the store itself. * * Some instances of this class will add a UNIQUE contraint over all of * the columns in the statements table, ensuring that the triple store * is a set of statements, and not a multiset. If this is in place, * the Distinct property will be true. * * A UNIQUE constraint is always enforced over the id column in the * values table. */ using System; using System.Collections; using System.Collections.Specialized; using System.Data; using System.IO; using System.Security.Cryptography; using System.Text; using SemWeb.Util; namespace SemWeb.Stores { public class SQLStore2 : SelectableSource, StatementSink, IDisposable { // Table initialization, etc. // -------------------------- // This is a version number representing the current 'schema' implemented // by this class in case of future updates. int dbformat = 0; string prefix; // the table prefix, i.e. prefix_statements, prefix_values ConnectionManager connection; // 'guid' is a GUID assigned to this store. It is created the // first time the SQL table structure is made and is saved in // the info block of the literal with ID zero. string guid; // this flag tracks the first access to the backend, when it // creates tables and indexes if necessary bool firstUse = true; // Other Flags // ----------- // Debugging flags from environment variables. static bool Debug = System.Environment.GetEnvironmentVariable("SEMWEB_DEBUG_SQL") != null; static bool DebugLogSpeed = System.Environment.GetEnvironmentVariable("SEMWEB_DEBUG_SQL_LOG_SPEED") != null; // Our SHA1 object which we use to create hashes of literal values. SHA1 sha = SHA1.Create(); // Some helpers. const string rdfs_member = NS.RDFS + "member"; const string rdf_li = NS.RDF + "_"; const string DEFAULT_META_KEY = "http://razor.occams.info/code/semweb/2007/SQLStore2/DefaultMeta"; const string MAIN_METADATA_KEY = "AAAAAAAAAAAAAAAAAAAAAAAAAAAA"; public abstract class ConnectionManager { public virtual void OpenConnection() { } public virtual void CloseConnection() { } public virtual void CreateTables(String prefix) { TryRunCommand("CREATE TABLE " + prefix + "_statements (subject BINARY(28) NOT NULL, predicate BINARY(28) NOT NULL, object BINARY(28) NOT NULL, meta BINARY(28) NOT NULL);"); TryRunCommand("CREATE TABLE " + prefix + "_values (type INT NOT NULL, id BINARY(28) NOT NULL, value BLOB NOT NULL, language TEXT, datatype TEXT);"); } public virtual void CreateIndexes(String prefix) { RunCommand("CREATE UNIQUE INDEX full_index ON " + prefix + "_statements(subject, predicate, object, meta);"); RunCommand("CREATE INDEX predicate_index ON " + prefix + "_statements(predicate, object);"); RunCommand("CREATE INDEX object_index ON " + prefix + "_statements(object);"); RunCommand("CREATE INDEX meta_index ON " + prefix + "_statements(meta);"); RunCommand("CREATE UNIQUE INDEX hash_index ON " + prefix + "_values(id);"); } public abstract void RunCommand(string sql); public abstract object RunScalar(string sql); public abstract IDataReader RunReader(string sql); private void TryRunCommand(string sql) { try { RunCommand(sql); } catch (Exception e) { if (Debug) Console.Error.WriteLine(e); } } public virtual void BeginTransaction() { } public virtual void EndTransaction() { } public virtual bool AreStatementsUnique { get { return true; } } public virtual String StatementInsertKeywords { get { return ""; } } public virtual String ValueInsertKeywords { get { return ""; } } public virtual bool SupportsInsertCombined { get { return false; } } public abstract void CreateNullTest(string column, System.Text.StringBuilder command); public abstract void CreatePrefixTest(string column, string prefix, System.Text.StringBuilder command); public virtual bool CreateEntityPrefixTest(string column, string prefix, String tableprefix, System.Text.StringBuilder command) { command.Append('('); command.Append(column); command.Append(" IN (SELECT id from "); command.Append(tableprefix); command.Append("_values WHERE type = 1 and "); CreatePrefixTest("value", prefix, command); command.Append("))"); return true; } } public SQLStore2(string prefix, ConnectionManager connection) { this.prefix = prefix; this.connection = connection; } protected string TableName { get { return prefix; } } // If this is the first use, initialize the table and index structures. // CreateTable() will create tables if they don't already exist. // CreateIndexes() will only be run if this is a new database, so that // the user may customize the indexes after the table is first created // without SemWeb adding its own indexes the next time again. private void Init() { if (!firstUse) return; firstUse = false; connection.OpenConnection(); connection.CreateTables(prefix); if (CreateVersion()) // tests if this is a new table connection.CreateIndexes(prefix); } // Creates the info block in the literal row with ID zero. Returns true // if it created a new info block (i.e. this is a new database). private bool CreateVersion() { string verdatastr = RunScalarString("SELECT value FROM " + prefix + "_values WHERE type = 0 and id = '" + MAIN_METADATA_KEY + "'"); bool isNew = (verdatastr == null); NameValueCollection verdata = ParseVersionInfo(verdatastr); if (verdatastr != null && verdata["ver"] == null) throw new InvalidOperationException("The SQLStore adapter in this version of SemWeb cannot read databases created in previous versions."); verdata["ver"] = dbformat.ToString(); if (verdata["guid"] == null) { guid = Guid.NewGuid().ToString("N"); verdata["guid"] = guid; } else { guid = verdata["guid"]; } string newverdata = SerializeVersionInfo(verdata); if (verdatastr == null) connection.RunCommand("INSERT INTO " + prefix + "_values (type, id, value) VALUES (0,'" + MAIN_METADATA_KEY + "'," + Escape(newverdata, true) + ")"); else if (verdatastr != newverdata) connection.RunCommand("UPDATE " + prefix + "_values SET value = " + Escape(newverdata, true) + " WHERE type = 0 and id = '" + MAIN_METADATA_KEY + "'"); return isNew; } NameValueCollection ParseVersionInfo(string verdata) { NameValueCollection nvc = new NameValueCollection(); if (verdata == null) return nvc; foreach (string s in verdata.Split('\n')) { int c = s.IndexOf(':'); if (c == -1) continue; nvc[s.Substring(0, c)] = s.Substring(c+1); } return nvc; } string SerializeVersionInfo(NameValueCollection verdata) { string ret = ""; foreach (string k in verdata.Keys) ret += k + ":" + verdata[k] + "\n"; return ret; } // Now we get to the Store implementation. // Why do we return true here? public bool Distinct { get { return connection.AreStatementsUnique; } } public int StatementCount { get { Init(); return RunScalarInt("select count(*) from " + prefix + "_statements", 0); } } // Implements Store.Clear() by dropping the tables entirely. public void Clear() { // Drop the tables, if they exist. try { connection.RunCommand("DROP TABLE " + prefix + "_statements;"); } catch (Exception) { } try { connection.RunCommand("DROP TABLE " + prefix + "_values;"); } catch (Exception) { } firstUse = true; Init(); } // Computes a hash for a resource used as its key in the database. private string GetHash(Resource resource) { // TODO: Do this with fewer new object creations. string data; if (resource == Statement.DefaultMeta) { data = "X" + DEFAULT_META_KEY; } else if (resource is BNode) { data = "B" + ((BNode)resource).GetGUID().ToString("N"); } else if (resource is Entity) { data = "U" + resource.Uri.ToString(); } else if (resource is Literal) { data = "L" + resource.ToString(); } else { throw new Exception("Not reachable."); } byte[] bytedata = System.Text.Encoding.Unicode.GetBytes(data); byte[] hash = sha.ComputeHash(bytedata); return Convert.ToBase64String(hash); } // Creates the SQL command to add a resource to the _values table. private void AddValue(Resource resource, StringBuilder buffer, bool insertCombined, ref bool firstInsert) { StringBuilder b = buffer; if (!insertCombined) { b.Append("INSERT "); b.Append(connection.ValueInsertKeywords); b.Append(" INTO "); b.Append(prefix); b.Append("_values "); } else { if (!firstInsert) b.Append(','); firstInsert = false; } b.Append('('); b.Append('\''); b.Append(GetHash(resource)); b.Append('\''); b.Append(','); if ((object)resource == (object)Statement.DefaultMeta) { b.Append('2'); b.Append(','); EscapedAppend(b, DEFAULT_META_KEY); } else if (resource is BNode) { BNode bnode = (BNode)resource; b.Append('2'); b.Append(','); EscapedAppend(b, bnode.GetGUID().ToString("N")); } else if (resource is Entity) { b.Append('1'); b.Append(','); EscapedAppend(b, resource.Uri); } else if (resource is Literal) { Literal literal = (Literal)resource; b.Append('3'); b.Append(','); EscapedAppend(b, literal.Value); b.Append(','); if (literal.Language != null) EscapedAppend(b, literal.Language); else b.Append("NULL"); b.Append(','); if (literal.DataType != null) EscapedAppend(b, literal.DataType); else b.Append("NULL"); } b.Append(')'); if (!insertCombined) b.Append(';'); } // Adds the value immediately to the values table. private void AddValue(Resource resource) { bool fi = false; StringBuilder cmd = new StringBuilder(); AddValue(resource, cmd, false, ref fi); connection.RunCommand(cmd.ToString()); } // Adds a statement to the store. bool StatementSink.Add(Statement statement) { Add(statement); return true; } public void Add(Statement statement) { if (statement.AnyNull) throw new ArgumentNullException(); Init(); AddValue(statement.Subject); AddValue(statement.Predicate); AddValue(statement.Object); AddValue(statement.Meta); StringBuilder addBuffer = new StringBuilder(); addBuffer.Append("INSERT "); addBuffer.Append(connection.StatementInsertKeywords); addBuffer.Append(" INTO "); addBuffer.Append(prefix); addBuffer.Append("_statements "); addBuffer.Append('('); addBuffer.Append('\''); addBuffer.Append(GetHash(statement.Subject)); addBuffer.Append('\''); addBuffer.Append(','); addBuffer.Append('\''); addBuffer.Append(GetHash(statement.Predicate)); addBuffer.Append('\''); addBuffer.Append(','); addBuffer.Append('\''); addBuffer.Append(GetHash(statement.Object)); addBuffer.Append('\''); addBuffer.Append(','); addBuffer.Append('\''); addBuffer.Append(GetHash(statement.Meta)); addBuffer.Append('\''); addBuffer.Append("); "); connection.RunCommand(addBuffer.ToString()); } class Importer : StatementSink { readonly SQLStore2 sql; // This is a buffer of statements waiting to be processed. readonly StatementList addStatementBuffer = new StatementList(); // These track the performance of our buffer so we can adjust its size // on the fly to maximize performance. int importAddBufferSize = 200, importAddBufferRotation = 0; TimeSpan importAddBufferTime = TimeSpan.MinValue; public Importer(SQLStore2 parent) { sql = parent; } public bool Add(Statement statement) { addStatementBuffer.Add(statement); RunAddBufferDynamic(); return true; } private void RunAddBufferDynamic() { // This complicated code here adjusts the size of the add // buffer dynamically to maximize performance. int thresh = importAddBufferSize; if (importAddBufferRotation == 1) thresh += 100; // experiment with changing if (importAddBufferRotation == 2) thresh -= 100; // the buffer size if (addStatementBuffer.Count >= thresh) { DateTime start = DateTime.Now; RunAddBuffer(); TimeSpan duration = DateTime.Now - start; if (DebugLogSpeed) Console.Error.WriteLine(thresh + "\t" + thresh/duration.TotalSeconds); // If there was an improvement in speed, per statement, on an // experimental change in buffer size, keep the change. if (importAddBufferRotation != 0 && duration.TotalSeconds/thresh < importAddBufferTime.TotalSeconds/importAddBufferSize && thresh >= 200 && thresh <= 10000) importAddBufferSize = thresh; importAddBufferTime = duration; importAddBufferRotation++; if (importAddBufferRotation == 3) importAddBufferRotation = 0; } } public void RunAddBuffer() { if (addStatementBuffer.Count == 0) return; // TODO: We compute the hash of each resource 2 times. bool insertCombined = sql.connection.SupportsInsertCombined; StringBuilder valueInsertions = new StringBuilder(); StringBuilder statementInsertions = new StringBuilder(); if (insertCombined) valueInsertions.Append("INSERT " + sql.connection.ValueInsertKeywords + " INTO " + sql.prefix + "_values "); if (insertCombined) statementInsertions.Append("INSERT " + sql.connection.StatementInsertKeywords + " INTO " + sql.prefix + "_statements "); bool firstValueInsert = true; // only used if insertCombined is true StatementList statements = addStatementBuffer; for (int i = 0; i < statements.Count; i++) { Statement statement = (Statement)statements[i]; sql.AddValue(statement.Subject, valueInsertions, insertCombined, ref firstValueInsert); sql.AddValue(statement.Predicate, valueInsertions, insertCombined, ref firstValueInsert); sql.AddValue(statement.Object, valueInsertions, insertCombined, ref firstValueInsert); sql.AddValue(statement.Meta, valueInsertions, insertCombined, ref firstValueInsert); if (!insertCombined) statementInsertions.Append("INSERT " + sql.connection.StatementInsertKeywords + " INTO " + sql.prefix + "_statements "); if (i > 0) statementInsertions.Append('('); statementInsertions.Append('('); statementInsertions.Append('\''); statementInsertions.Append(sql.GetHash(statement.Subject)); statementInsertions.Append('\''); statementInsertions.Append(','); statementInsertions.Append('\''); statementInsertions.Append(sql.GetHash(statement.Predicate)); statementInsertions.Append('\''); statementInsertions.Append(','); statementInsertions.Append('\''); statementInsertions.Append(sql.GetHash(statement.Object)); statementInsertions.Append('\''); statementInsertions.Append(','); statementInsertions.Append('\''); statementInsertions.Append(sql.GetHash(statement.Meta)); statementInsertions.Append('\''); if (i == statements.Count-1 || !insertCombined) statementInsertions.Append(");"); else statementInsertions.Append(")"); } addStatementBuffer.Clear(); if (insertCombined) valueInsertions.Append(';'); if (Debug) Console.Error.WriteLine(valueInsertions.ToString()); sql.connection.RunCommand(valueInsertions.ToString()); if (Debug) Console.Error.WriteLine(statementInsertions.ToString()); sql.connection.RunCommand(statementInsertions.ToString()); } } private void WhereItem(string col, Resource[] r, System.Text.StringBuilder cmd, bool and) { if (and) cmd.Append(" and "); cmd.Append('('); cmd.Append(col); cmd.Append(" IN ("); for (int i = 0; i < r.Length; i++) { String hash = GetHash(r[i]); if (i > 0) cmd.Append(','); cmd.Append('\''); cmd.Append(hash); cmd.Append('\''); } cmd.Append(" ))"); // TODO: Special handinlg for rdfs_member /*if (r.Uri != null && r.Uri == rdfs_member) { if (CreateEntityPrefixTest(col, rdf_li, cmd)) return true; }*/ } private bool WhereClause(SelectFilter filter, System.Text.StringBuilder cmd) { if (filter.Subjects == null && filter.Predicates == null && filter.Objects == null && filter.Metas == null) return false; cmd.Append(" WHERE "); if (filter.Subjects != null) WhereItem("subject", filter.Subjects, cmd, false); if (filter.Predicates != null) WhereItem("predicate", filter.Predicates, cmd, filter.Subjects != null); if (filter.Objects != null) WhereItem("object", filter.Objects, cmd, filter.Subjects != null || filter.Predicates != null); if (filter.Metas != null) WhereItem("meta", filter.Metas, cmd, filter.Subjects != null || filter.Predicates != null || filter.Objects != null); return true; } // Some helpers for converting the return of a database query into various C# types private int AsInt(object r) { if (r is int) return (int)r; if (r is uint) return (int)(uint)r; if (r is long) return (int)(long)r; if (r is string) return int.Parse((string)r); throw new ArgumentException(r.ToString()); } private string AsString(object r) { if (r == null) return null; else if (r is System.DBNull) return null; else if (r is string) return (string)r; else if (r is byte[]) return System.Text.Encoding.UTF8.GetString((byte[])r); else throw new FormatException("SQL store returned a literal value as " + r.GetType()); } private static void AppendComma(StringBuilder builder, string text, bool comma) { if (comma) builder.Append(','); builder.Append(text); } /////////////////////////// // QUERYING THE DATABASE // /////////////////////////// public bool Contains(Resource resource) { String hash = GetHash(resource); object ret = connection.RunScalar("SELECT type FROM " + prefix + "_values WHERE hash = '" + hash + "' and refcount > 0"); return ret != null; } public bool Contains(Statement template) { return Store.DefaultContains(this, template); } private struct SelectColumnFilter { public bool Subject, Predicate, Object, Meta; } public void Select(StatementSink result) { Select(Statement.All, result); } public void Select(Statement template, StatementSink result) { if (result == null) throw new ArgumentNullException(); Init(); Select2(new SelectFilter(template), result); } public void Select(SelectFilter filter, StatementSink result) { // We don't want to select on more than say 1000 resources // at a time, so this breaks down the selection into // a union of selections that each select on no more than // 1000 resources. if (result == null) throw new ArgumentNullException(); Init(); foreach (Entity[] s in SplitArray(filter.Subjects)) foreach (Entity[] p in SplitArray(filter.Predicates)) foreach (Resource[] o in SplitArray(filter.Objects)) foreach (Entity[] m in SplitArray(filter.Metas)) { SelectFilter f = new SelectFilter(s, p, o, m); f.LiteralFilters = filter.LiteralFilters; f.Limit = filter.Limit; // TODO: Do the limit better since it should shrink on each iteration. Select2(f, result); } } Resource[][] SplitArray(Resource[] e) { int lim = 1000; if (e == null || e.Length <= lim) { if (e is Entity[]) return new Entity[][] { (Entity[])e }; else return new Resource[][] { e }; } int overflow = e.Length % lim; int n = (e.Length / lim) + ((overflow != 0) ? 1 : 0); Resource[][] ret; if (e is Entity[]) ret = new Entity[n][]; else ret = new Resource[n][]; for (int i = 0; i < n; i++) { int c = lim; if (i == n-1 && overflow != 0) c = overflow; if (e is Entity[]) ret[i] = new Entity[c]; else ret[i] = new Resource[c]; Array.Copy(e, i*lim, ret[i], 0, c); } return ret; } private void Select2(SelectFilter filter, StatementSink result) { // Don't select on columns that we already know from the template. SelectColumnFilter columns = new SelectColumnFilter(); columns.Subject = (filter.Subjects == null) || (filter.Subjects.Length > 1); columns.Predicate = (filter.Predicates == null) || (filter.Predicates.Length > 1); columns.Object = (filter.Objects == null) || (filter.Objects.Length > 1); columns.Meta = (filter.Metas == null) || (filter.Metas.Length > 1);; if (filter.Predicates != null | Array.IndexOf(filter.Predicates, rdfs_member) != 1) columns.Predicate = true; // Have to select something if (!columns.Subject && !columns.Predicate && !columns.Object && !columns.Meta) columns.Subject = true; System.Text.StringBuilder cmd = new System.Text.StringBuilder("SELECT "); if (!connection.AreStatementsUnique) cmd.Append("DISTINCT "); ArrayList cols = new ArrayList(); if (columns.Subject) { cols.Add("sinfo.type"); cols.Add("sinfo.value"); } if (columns.Predicate) { cols.Add("pinfo.type"); cols.Add("pinfo.value"); } if (columns.Object) { cols.Add("oinfo.type"); cols.Add("oinfo.value"); cols.Add("oinfo.language"); cols.Add("oinfo.datatype"); } if (columns.Meta) { cols.Add("minfo.type"); cols.Add("minfo.value"); } cmd.Append(String.Join(", ", (String[])cols.ToArray(typeof(String)))); cmd.Append(" FROM "); cmd.Append(prefix); cmd.Append("_statements AS q"); if (columns.Subject) { cmd.Append(" LEFT JOIN "); cmd.Append(prefix); cmd.Append("_values AS sinfo ON q.subject = sinfo.id"); } if (columns.Predicate) { cmd.Append(" LEFT JOIN "); cmd.Append(prefix); cmd.Append("_values AS pinfo ON q.predicate = pinfo.id"); } if (columns.Object) { cmd.Append(" LEFT JOIN "); cmd.Append(prefix); cmd.Append("_values AS oinfo ON q.object = oinfo.id"); } if (columns.Meta) { cmd.Append(" LEFT JOIN "); cmd.Append(prefix); cmd.Append("_values AS minfo ON q.meta = minfo.id"); } cmd.Append(' '); bool wroteWhere = WhereClause(filter, cmd); // Transform literal filters into SQL. if (filter.LiteralFilters != null) { foreach (LiteralFilter f in filter.LiteralFilters) { string s = FilterToSQL(f, "oinfo.value"); if (s != null) { if (!wroteWhere) { cmd.Append(" WHERE "); wroteWhere = true; } else { cmd.Append(" AND "); } cmd.Append(' '); cmd.Append(s); } } } if (filter.Limit >= 1) { cmd.Append(" LIMIT "); cmd.Append(filter.Limit); } cmd.Append(';'); if (Debug) { string cmd2 = cmd.ToString(); //if (cmd2.Length > 80) cmd2 = cmd2.Substring(0, 80); Console.Error.WriteLine(cmd2); } using (IDataReader reader = connection.RunReader(cmd.ToString())) { while (reader.Read()) { Entity s = columns.Subject ? null : filter.Subjects[0]; Entity p = columns.Predicate ? null : filter.Predicates[0]; Resource o = columns.Object ? null : filter.Objects[0]; Entity m = columns.Meta ? null : filter.Metas[0]; int col = 0; if (columns.Subject) { s = SelectEntity(reader.GetInt32(col++), reader.GetString(col++)); } if (columns.Predicate) { p = SelectEntity(reader.GetInt32(col++), reader.GetString(col++)); } if (columns.Object) { o = SelectResource(reader.GetInt32(col++), reader.GetString(col++), reader.GetString(col++), reader.GetString(col++)); } if (columns.Meta) { m = SelectEntity(reader.GetInt32(col++), reader.GetString(col++)); } if (filter.LiteralFilters != null && !LiteralFilter.MatchesFilters(o, filter.LiteralFilters, this)) continue; bool ret = result.Add(new Statement(s, p, o, m)); if (!ret) break; } } } private Entity SelectEntity(int type, string value) { switch (type) { case 1: return new Entity(value); case 2: if (value == DEFAULT_META_KEY) return Statement.DefaultMeta; BNode b = new BNode(); b.SetGUID(new Guid(value)); return b; } throw new Exception(); //unreachable } private Resource SelectResource(int type, string value, string language, string datatype) { switch (type) { case 1: case 2: return SelectEntity(type,value); case 3: return new Literal(value, language, datatype); } throw new Exception(); //unreachable } private string CreatePrefixTest(string column, string match) { StringBuilder s = new StringBuilder(); connection.CreatePrefixTest(column, match, s); return s.ToString(); } private string FilterToSQL(LiteralFilter filter, string col) { if (filter is SemWeb.Filters.StringCompareFilter) { SemWeb.Filters.StringCompareFilter f = (SemWeb.Filters.StringCompareFilter)filter; return col + FilterOpToSQL(f.Type) + Escape(f.Pattern, true); } /*if (filter is SemWeb.Filters.StringContainsFilter) { SemWeb.Filters.StringContainsFilter f = (SemWeb.Filters.StringContainsFilter)filter; return CreateLikeTest(col, f.Pattern, 1); // 1=contains }*/ if (filter is SemWeb.Filters.StringStartsWithFilter) { SemWeb.Filters.StringStartsWithFilter f = (SemWeb.Filters.StringStartsWithFilter)filter; return CreatePrefixTest(col, f.Pattern); // 0=starts-with } if (filter is SemWeb.Filters.NumericCompareFilter) { SemWeb.Filters.NumericCompareFilter f = (SemWeb.Filters.NumericCompareFilter)filter; return col + FilterOpToSQL(f.Type) + f.Number; } return null; } private string FilterOpToSQL(LiteralFilter.CompType op) { switch (op) { case LiteralFilter.CompType.LT: return " < "; case LiteralFilter.CompType.LE: return " <= "; case LiteralFilter.CompType.NE: return " <> "; case LiteralFilter.CompType.EQ: return " = "; case LiteralFilter.CompType.GT: return " > "; case LiteralFilter.CompType.GE: return " >= "; default: throw new ArgumentException(op.ToString()); } } private string Escape(string str, bool quotes) { if (str == null) return "NULL"; StringBuilder b = new StringBuilder(); EscapedAppend(b, str, quotes, false); return b.ToString(); } protected void EscapedAppend(StringBuilder b, string str) { EscapedAppend(b, str, true, false); } protected virtual void EscapedAppend(StringBuilder b, string str, bool quotes, bool forLike) { if (quotes) b.Append('\''); for (int i = 0; i < str.Length; i++) { char c = str[i]; switch (c) { case '\n': b.Append("\\n"); break; case '\\': case '\"': case '*': b.Append('\\'); b.Append(c); break; case '%': case '_': if (forLike) b.Append('\\'); b.Append(c); break; default: b.Append(c); break; } } if (quotes) b.Append('\''); } public void Import(StatementSource source) { if (source == null) throw new ArgumentNullException(); Init(); connection.BeginTransaction(); Importer imp = new Importer(this); try { source.Select(imp); } finally { imp.RunAddBuffer(); connection.EndTransaction(); } } public void Replace(Entity a, Entity b) { Init(); AddValue(b); foreach (string col in new string[] { "subject", "predicate", "object", "meta" }) { StringBuilder cmd = new StringBuilder(); cmd.Append("UPDATE "); cmd.Append(prefix); cmd.Append("_statements SET "); cmd.Append(col); cmd.Append('='); cmd.Append('\''); cmd.Append(GetHash(b)); cmd.Append('\''); WhereItem(col, new Resource[] { a }, cmd, false); cmd.Append(';'); connection.RunCommand(cmd.ToString()); } } public void Replace(Statement find, Statement replacement) { if (find.AnyNull) throw new ArgumentNullException("find"); if (replacement.AnyNull) throw new ArgumentNullException("replacement"); if (find == replacement) return; Init(); AddValue(replacement.Subject); AddValue(replacement.Predicate); AddValue(replacement.Object); AddValue(replacement.Meta); StringBuilder cmd = new StringBuilder(); cmd.Append("UPDATE "); cmd.Append(prefix); cmd.Append("_statements SET subject='"); cmd.Append(GetHash(replacement.Subject)); cmd.Append("', predicate='"); cmd.Append(GetHash(replacement.Predicate)); cmd.Append("', object='"); cmd.Append(GetHash(replacement.Object)); cmd.Append("', meta='"); cmd.Append(GetHash(replacement.Meta)); cmd.Append("' "); WhereClause(new SelectFilter(find), cmd); connection.RunCommand(cmd.ToString()); } private int RunScalarInt(string sql, int def) { object ret = connection.RunScalar(sql); if (ret == null) return def; if (ret is int) return (int)ret; try { return int.Parse(ret.ToString()); } catch (FormatException) { return def; } } private string RunScalarString(string sql) { object ret = connection.RunScalar(sql); if (ret == null) return null; if (ret is string) return (string)ret; if (ret is byte[]) return System.Text.Encoding.UTF8.GetString((byte[])ret); throw new FormatException("SQL store returned a literal value as " + ret); } void IDisposable.Dispose() { Close(); } public void Close() { connection.CloseConnection(); } } } semweb-1.05+dfsg/src/SpecialRelations.cs0000644000175000017500000002641610774502134017531 0ustar meebeymeebeyusing System; using SemWeb; namespace SemWeb.Inference { public abstract class RdfRelation : SemWeb.Query.RdfFunction { public override Resource Evaluate (Resource[] args) { Resource r = null; if (Evaluate(args, ref r)) return r; return null; } public abstract bool Evaluate(Resource[] args, ref Resource @object); } namespace Relations { internal abstract class MathUnaryRelation : RdfRelation { protected abstract Decimal EvaluateForward(Decimal left); protected abstract Decimal EvaluateReverse(Decimal right); public override bool Evaluate(Resource[] args, ref Resource @object) { if (args.Length != 1) return false; if (args[0] == null && @object == null) return false; if ((args[0] != null && !(args[0] is Literal)) || (@object != null && !(@object is Literal))) return false; try { if (args[0] == null) { Decimal right = (Decimal)Convert.ChangeType( ((Literal)@object).ParseValue() , typeof(Decimal) ); Decimal left = EvaluateReverse(right); if (left == Decimal.MinValue) return false; args[0] = Literal.FromValue(left); return true; } else { Decimal left = (Decimal)Convert.ChangeType( ((Literal)args[0]).ParseValue() , typeof(Decimal) ); Decimal right = EvaluateForward(left); if (@object == null) { @object = Literal.FromValue(right); return true; } else { Decimal right2 = (Decimal)Convert.ChangeType( ((Literal)@object).ParseValue() , typeof(Decimal) ); return right == right2; } } } catch (FormatException) { return false; } } } internal class MathAbsoluteValueRelation : MathUnaryRelation { public override string Uri { get { return "http://www.w3.org/2000/10/swap/math#absoluteValue"; } } protected override Decimal EvaluateForward(Decimal left) { return left >= 0 ? left : -left; } protected override Decimal EvaluateReverse(Decimal right) { return Decimal.MinValue; } } internal class MathCosRelation : MathUnaryRelation { public override string Uri { get { return "http://www.w3.org/2000/10/swap/math#cos"; } } protected override Decimal EvaluateForward(Decimal left) { return (Decimal)Math.Cos((double)left); } protected override Decimal EvaluateReverse(Decimal right) { return (Decimal)Math.Acos((double)right); } } internal class MathDegreesRelation : MathUnaryRelation { public override string Uri { get { return "http://www.w3.org/2000/10/swap/math#degrees"; } } protected override Decimal EvaluateForward(Decimal left) { return (Decimal)((double)left * Math.PI / 180.0); } protected override Decimal EvaluateReverse(Decimal right) { return (Decimal)((double)right * 180.0 / Math.PI); } } internal class MathEqualToRelation : MathUnaryRelation { public override string Uri { get { return "http://www.w3.org/2000/10/swap/math#equalTo"; } } protected override Decimal EvaluateForward(Decimal left) { return left; } protected override Decimal EvaluateReverse(Decimal right) { return right; } } internal class MathNegationRelation : MathUnaryRelation { public override string Uri { get { return "http://www.w3.org/2000/10/swap/math#negation"; } } protected override Decimal EvaluateForward(Decimal left) { return -left; } protected override Decimal EvaluateReverse(Decimal right) { return -right; } } internal class MathRoundedRelation : MathUnaryRelation { public override string Uri { get { return "http://www.w3.org/2000/10/swap/math#rounded"; } } protected override Decimal EvaluateForward(Decimal left) { return Decimal.Floor(left); } protected override Decimal EvaluateReverse(Decimal right) { return Decimal.MinValue; } } internal class MathSinRelation : MathUnaryRelation { public override string Uri { get { return "http://www.w3.org/2000/10/swap/math#sin"; } } protected override Decimal EvaluateForward(Decimal left) { return (Decimal)Math.Sin((double)left); } protected override Decimal EvaluateReverse(Decimal right) { return (Decimal)Math.Asin((double)right); } } internal class MathSinhRelation : MathUnaryRelation { public override string Uri { get { return "http://www.w3.org/2000/10/swap/math#sinh"; } } protected override Decimal EvaluateForward(Decimal left) { return (Decimal)Math.Sinh((double)left); } protected override Decimal EvaluateReverse(Decimal right) { return Decimal.MinValue; } } internal class MathTanRelation : MathUnaryRelation { public override string Uri { get { return "http://www.w3.org/2000/10/swap/math#tan"; } } protected override Decimal EvaluateForward(Decimal left) { return (Decimal)Math.Tan((double)left); } protected override Decimal EvaluateReverse(Decimal right) { return (Decimal)Math.Atan((double)right); } } internal class MathTanhRelation : MathUnaryRelation { public override string Uri { get { return "http://www.w3.org/2000/10/swap/math#tanh"; } } protected override Decimal EvaluateForward(Decimal left) { return (Decimal)Math.Tanh((double)left); } protected override Decimal EvaluateReverse(Decimal right) { return Decimal.MinValue; } } internal abstract class MathPairRelation : RdfRelation { protected abstract Decimal Evaluate(Decimal left, Decimal right); public override bool Evaluate(Resource[] args, ref Resource @object) { if (args.Length != 2) return false; if (args[0] == null || !(args[0] is Literal)) return false; if (args[1] == null || !(args[1] is Literal)) return false; try { Decimal left = (Decimal)Convert.ChangeType( ((Literal)args[0]).ParseValue() , typeof(Decimal) ); Decimal right = (Decimal)Convert.ChangeType( ((Literal)args[1]).ParseValue() , typeof(Decimal) ); Resource newvalue = Literal.FromValue(Evaluate(left, right)); if (@object == null) { @object = newvalue; return true; } else { return @object.Equals(newvalue); } } catch (FormatException) { return false; } } } internal class MathAtan2Relation : MathPairRelation { public override string Uri { get { return "http://www.w3.org/2000/10/swap/math#atan2"; } } protected override Decimal Evaluate(Decimal left, Decimal right) { return (Decimal)Math.Atan2((double)left, (double)right); } } internal class MathDifferenceRelation : MathPairRelation { public override string Uri { get { return "http://www.w3.org/2000/10/swap/math#difference"; } } protected override Decimal Evaluate(Decimal left, Decimal right) { return left - right; } } internal class MathExponentiationRelation : MathPairRelation { public override string Uri { get { return "http://www.w3.org/2000/10/swap/math#exponentiation"; } } protected override Decimal Evaluate(Decimal left, Decimal right) { return (Decimal)Math.Pow((double)left, (double)right); } } internal class MathIntegerQuotientRelation : MathPairRelation { public override string Uri { get { return "http://www.w3.org/2000/10/swap/math#integerQuotient"; } } protected override Decimal Evaluate(Decimal left, Decimal right) { return Decimal.Floor((left / right)); } } internal class MathQuotientRelation : MathPairRelation { public override string Uri { get { return "http://www.w3.org/2000/10/swap/math#quotient"; } } protected override Decimal Evaluate(Decimal left, Decimal right) { return left / right; } } internal class MathRemainderRelation : MathPairRelation { public override string Uri { get { return "http://www.w3.org/2000/10/swap/math#remainder"; } } protected override Decimal Evaluate(Decimal left, Decimal right) { return left % right; } } internal abstract class MathListRelation : RdfRelation { protected abstract Decimal InitialValue { get; } protected abstract Decimal Combine(Decimal left, Decimal right); public override bool Evaluate(Resource[] args, ref Resource @object) { Decimal sum = InitialValue; foreach (Resource r in args) { if (r == null) return false; if (!(r is Literal)) return false; try { Decimal v = (Decimal)Convert.ChangeType( ((Literal)r).ParseValue() , typeof(Decimal) ); sum = Combine(sum, v); } catch (FormatException) { return false; } } Resource newvalue = Literal.FromValue(sum); if (@object == null) { @object = newvalue; return true; } else { return @object.Equals(newvalue); } } } internal class MathSumRelation : MathListRelation { public override string Uri { get { return "http://www.w3.org/2000/10/swap/math#sum"; } } protected override Decimal InitialValue { get { return Decimal.Zero; } } protected override Decimal Combine(Decimal left, Decimal right) { return left + right; } } internal class MathProductRelation : MathListRelation { public override string Uri { get { return "http://www.w3.org/2000/10/swap/math#product"; } } protected override Decimal InitialValue { get { return Decimal.One; } } protected override Decimal Combine(Decimal left, Decimal right) { return left * right; } } internal abstract class MathComparisonRelation : RdfRelation { public override Resource Evaluate (Resource[] args) { if (args.Length != 2) throw new InvalidOperationException("This relation takes two arguments."); Resource left = args[0]; Resource right = args[1]; bool result = Evaluate(new Resource[] { left }, ref right); return Literal.FromValue(result); } public abstract bool Evaluate(Decimal left, Decimal right); public override bool Evaluate(Resource[] args, ref Resource @object) { if (args.Length != 1) return false; if (args[0] == null || @object == null) return false; if (!(args[0] is Literal) || !(@object is Literal)) return false; try { Decimal left = (Decimal)Convert.ChangeType( ((Literal)args[0]).ParseValue() , typeof(Decimal) ); Decimal right = (Decimal)Convert.ChangeType( ((Literal)@object).ParseValue() , typeof(Decimal) ); return Evaluate(left, right); } catch (FormatException) { return false; } } } internal class MathGreaterThanRelation : MathComparisonRelation { public override string Uri { get { return "http://www.w3.org/2000/10/swap/math#greaterThan"; } } public override bool Evaluate(Decimal left, Decimal right) { return left > right; } } internal class MathLessThanRelation : MathComparisonRelation { public override string Uri { get { return "http://www.w3.org/2000/10/swap/math#lessThan"; } } public override bool Evaluate(Decimal left, Decimal right) { return left < right; } } internal class MathNotGreaterThanRelation : MathComparisonRelation { public override string Uri { get { return "http://www.w3.org/2000/10/swap/math#notGreaterThan"; } } public override bool Evaluate(Decimal left, Decimal right) { return !(left > right); } } internal class MathNotLessThanRelation : MathComparisonRelation { // NOTE: The schema lists this as "notlessThan" with a lowercase // L! I've put it in here with a capital L. public override string Uri { get { return "http://www.w3.org/2000/10/swap/math#notLessThan"; } } public override bool Evaluate(Decimal left, Decimal right) { return !(left < right); } } internal class MathNotEqualToRelation : MathComparisonRelation { public override string Uri { get { return "http://www.w3.org/2000/10/swap/math#notEqualTo"; } } public override bool Evaluate(Decimal left, Decimal right) { return !(left == right); } } } } semweb-1.05+dfsg/src/Util.cs0000644000175000017500000004344110774502134015202 0ustar meebeymeebeyusing System; using System.Collections; using SemWeb; namespace SemWeb.Util { internal class ResSet : ICollection { Hashtable items = new Hashtable(); ICollection keys; public ResSet() { } #if !DOTNET2 public ResSet(ICollection items) { #else public ResSet(System.Collections.Generic.ICollection items) { #endif AddRange(items); } #if DOTNET2 // this is for some call in SQLStore; it seems to having a generics casting issue that I don't know if it's a mono bug or what... internal ResSet(System.Collections.Generic.ICollection items) { if (items == null) return; foreach (Resource r in items) Add(r); } #endif private ResSet(Hashtable items) { this.items = items; } public void Add(Resource res) { items[res] = items; keys = null; } #if !DOTNET2 public void AddRange(ICollection items) { #else public void AddRange(System.Collections.Generic.ICollection items) where T : Resource { #endif if (items == null) return; foreach (Resource r in items) Add(r); } public void Remove(Resource res) { items.Remove(res); keys = null; } public bool Contains(Resource res) { return items.ContainsKey(res); } public ICollection Items { get { if (keys == null) keys = items.Keys; return keys; } } public void AddRange(ResSet set) { if (set == null) return; foreach (Resource r in set.Items) { Add(r); } } public void Clear() { items.Clear(); keys = null; } public ResSet Clone() { return new ResSet((Hashtable)items.Clone()); } public int Count { get { return items.Count; } } public IEnumerator GetEnumerator() { return items.Keys.GetEnumerator(); } bool ICollection.IsSynchronized { get { return false; } } object ICollection.SyncRoot { get { return null; } } public void CopyTo(System.Array array, int index) { foreach (Resource r in this) array.SetValue(r, index++); } public Resource[] ToArray() { Resource[] ret = new Resource[Count]; CopyTo(ret, 0); return ret; } public Entity[] ToEntityArray() { Entity[] ret = new Entity[Count]; CopyTo(ret, 0); return ret; } public void RetainAll(ResSet set) { foreach (Resource r in new ArrayList(this)) if (!set.Contains(r)) Remove(r); } /*Hashtable Intersect(Hashtable x, Hashtable y) { Hashtable a, b; if (x.Count < y.Count) { a = x; b = y; } else { b = x; a = y; } Hashtable c = new Hashtable(); foreach (Resource r in a) if (b.ContainsKey(r)) c[r] = c; return c; }*/ } public class DistinctStatementsSink : StatementSink { StatementSink sink; StatementMap hash; bool resetMeta; public DistinctStatementsSink(StatementSink sink, bool resetMeta) { this.sink = sink; hash = new StatementMap(); this.resetMeta = resetMeta; } public bool Add(Statement s) { if (resetMeta) s.Meta = Statement.DefaultMeta; if (hash.ContainsKey(s)) return true; hash[s] = hash; return sink.Add(s); } } public class StatementList : ICollection { private const int DefaultInitialCapacity = 0x10; private int _size; private Statement[] _items; public StatementList() { _items = new Statement[DefaultInitialCapacity]; } public StatementList(Statement[] statements) { _items = (Statement[])statements.Clone(); _size = _items.Length; } public Statement this[int index] { get { return _items[index]; } set { _items[index] = value; } } public int Count { get { return _size; } } private void EnsureCapacity(int count) { if (count <= _items.Length) return; int newLength; Statement[] newData; newLength = _items.Length << 1; if (newLength == 0) newLength = DefaultInitialCapacity; while (newLength < count) newLength <<= 1; newData = new Statement[newLength]; Array.Copy(_items, 0, newData, 0, _items.Length); _items = newData; } private void Shift(int index, int count) { if (count > 0) { if (_size + count > _items.Length) { int newLength; Statement[] newData; newLength = (_items.Length > 0) ? _items.Length << 1 : 1; while (newLength < _size + count) newLength <<= 1; newData = new Statement[newLength]; Array.Copy(_items, 0, newData, 0, index); Array.Copy(_items, index, newData, index + count, _size - index); _items = newData; } else { Array.Copy(_items, index, _items, index + count, _size - index); } } else if (count < 0) { int x = index - count ; Array.Copy(_items, x, _items, index, _size - x); } } public int Add(Statement value) { if (_items.Length <= _size /* same as _items.Length < _size + 1) */) EnsureCapacity(_size + 1); _items[_size] = value; return _size++; } public void Remove(Statement s) { if (_size == 0) return; int index = Array.IndexOf(_items, s, 0, _size); if (index < 0) return; RemoveAt(index); } public virtual void Clear() { Array.Clear(_items, 0, _size); _size = 0; } public virtual void RemoveAt(int index) { if (index < 0 || index >= _size) throw new ArgumentOutOfRangeException("index", index, "Less than 0 or more than list count."); Shift(index, -1); _size--; } public void Reverse() { for (int i = 0; i <= Count / 2; i++) { Statement t = this[i]; this[i] = this[Count-i-1]; this[Count-i-1] = t; } } public Statement[] ToArray() { Statement[] ret = new Statement[_size]; Array.Copy(_items, ret, _size); return ret; } internal Statement[] ToArray(Type t) { return ToArray(); } public static implicit operator Statement[](StatementList list) { return list.ToArray(); } public IEnumerator GetEnumerator() { return new Enumer(this); } public void CopyTo(Array dest, int start) { _items.CopyTo(dest, start); } public object SyncRoot { get { return null; } } public bool IsSynchronized { get { return false; } } public void Sort() { Array.Sort(_items, 0, _size); } class Enumer : IEnumerator { StatementList list; int index; public Enumer(StatementList list) { this.list = list; index = -1; } public void Reset() { index = -1; } public bool MoveNext() { if (index == list.Count - 1) return false; index++; return true; } public object Current { get { return list[index]; } } } } // This is based on Mono's Hashtable implementation: // Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com) public class StatementMap { struct Slot { internal bool used, removed; internal Statement key; internal Object value; internal int hashMix; } const int CHAIN_MARKER = ~Int32.MaxValue; private readonly static string xstr = "Hashtable.Enumerator: snapshot out of sync."; private int inUse; private int modificationCount; private float loadFactor; private Slot [] table; private int threshold; private StatementList hashKeys; private HashValues hashValues; private static readonly int [] primeTbl = { 11, 19, 37, 73, 109, 163, 251, 367, 557, 823, 1237, 1861, 2777, 4177, 6247, 9371, 14057, 21089, 31627, 47431, 71143, 106721, 160073, 240101, 360163, 540217, 810343, 1215497, 1823231, 2734867, 4102283, 6153409, 9230113, 13845163 }; public StatementMap () : this (0, 1.0f) {} public StatementMap (int capacity, float loadFactor) { if (capacity<0) throw new ArgumentOutOfRangeException ("capacity", "negative capacity"); if (loadFactor < 0.1f || loadFactor > 1.0f || Single.IsNaN (loadFactor)) throw new ArgumentOutOfRangeException ("loadFactor", "load factor"); if (capacity == 0) ++capacity; this.loadFactor = 0.75f*loadFactor; double tableSize = capacity / this.loadFactor; if (tableSize > Int32.MaxValue) throw new ArgumentException ("Size is too big"); int size = (int) tableSize; size = ToPrime (size); this.SetTable (new Slot [size]); this.inUse = 0; this.modificationCount = 0; } public int Count { get { return inUse; } } public StatementList Keys { get { if (this.hashKeys == null) { this.hashKeys = new StatementList (); Enumerator e = new Enumerator(this); while (e.MoveNext()) hashKeys.Add(e.Key); } return this.hashKeys; } } public IEnumerable Values { get { if (this.hashValues == null) this.hashValues = new HashValues (this); return this.hashValues; } } public Object this [Statement key] { get { Slot [] table = this.table; uint size = (uint) table.Length; int h = key.GetHashCode() & Int32.MaxValue; uint indx = (uint)h; uint step = (uint) ((h >> 5)+1) % (size-1)+1; for (uint i = size; i > 0; i--) { indx %= size; Slot entry = table [indx]; if (!entry.used) break; Statement k = entry.key; if ((entry.hashMix & Int32.MaxValue) == h && k == key) { return entry.value; } if ((entry.hashMix & CHAIN_MARKER) == 0) break; indx += step; } return null; } set { PutImpl (key, value, true); } } public virtual void Clear () { for (int i = 0;i= 0); } public virtual void Remove (Statement key) { int i = Find (key); if (i >= 0) { Slot [] table = this.table; int h = table [i].hashMix; h &= CHAIN_MARKER; table [i].hashMix = h; table [i].key = Statement.All; if (h != 0) table [i].removed = true; else table [i].used = false; table [i].value = null; --inUse; ++modificationCount; } } private void AdjustThreshold () { int size = table.Length; threshold = (int) (size*loadFactor); if (this.threshold >= size) threshold = size-1; } private void SetTable (Slot [] table) { if (table == null) throw new ArgumentNullException ("table"); this.table = table; AdjustThreshold (); } private int Find (Statement key) { Slot [] table = this.table; uint size = (uint) table.Length; int h = key.GetHashCode() & Int32.MaxValue; uint indx = (uint)h; uint step = (uint) ((h >> 5)+1) % (size-1)+1; for (uint i = size; i > 0; i--) { indx %= size; Slot entry = table [indx]; if (!entry.used) break; Statement k = entry.key; if ((entry.hashMix & Int32.MaxValue) == h && k == key) { return (int) indx; } if ((entry.hashMix & CHAIN_MARKER) == 0) break; indx += step; } return -1; } private void Rehash () { int oldSize = this.table.Length; // From the SDK docs: // Hashtable is automatically increased // to the smallest prime number that is larger // than twice the current number of Hashtable buckets uint newSize = (uint)ToPrime ((oldSize<<1)|1); Slot [] newTable = new Slot [newSize]; Slot [] table = this.table; for (int i = 0;i>5)+1)% (newSize-1)+1; for (uint j = spot%newSize;;spot+= step, j = spot%newSize) { // No check for KeyMarker.Removed here, // because the table is just allocated. if (!newTable [j].used) { newTable [j].used = s.used; newTable [j].removed = s.removed; newTable [j].key = s.key; newTable [j].value = s.value; newTable [j].hashMix |= h; break; } else { newTable [j].hashMix |= CHAIN_MARKER; } } } } ++this.modificationCount; this.SetTable (newTable); } private void PutImpl (Statement key, Object value, bool overwrite) { uint size = (uint)this.table.Length; if (this.inUse >= this.threshold) { this.Rehash (); size = (uint)this.table.Length; } int h = key.GetHashCode() & Int32.MaxValue; uint spot = (uint)h; uint step = (uint) ((spot>>5)+1)% (size-1)+1; Slot [] table = this.table; Slot entry; int freeIndx = -1; for (int i = 0; i < size; i++) { int indx = (int) (spot % size); entry = table [indx]; if (freeIndx == -1 && entry.removed && (entry.hashMix & CHAIN_MARKER) != 0) freeIndx = indx; if (!entry.used || (entry.removed && (entry.hashMix & CHAIN_MARKER) == 0)) { if (freeIndx == -1) freeIndx = indx; break; } if ((entry.hashMix & Int32.MaxValue) == h && key == entry.key) { if (overwrite) { table [indx].value = value; ++this.modificationCount; } else { // Handle Add (): // An entry with the same key already exists in the Hashtable. throw new ArgumentException ( "Key duplication when adding: " + key); } return; } if (freeIndx == -1) { table [indx].hashMix |= CHAIN_MARKER; } spot+= step; } if (freeIndx!= -1) { table [freeIndx].used = true; table [freeIndx].removed = false; table [freeIndx].key = key; table [freeIndx].value = value; table [freeIndx].hashMix |= h; ++this.inUse; ++this.modificationCount; } } // // Private static methods // internal static bool TestPrime (int x) { if ((x & 1) != 0) { for (int n = 3; n< (int)Math.Sqrt (x); n += 2) { if ((x % n) == 0) return false; } return true; } // There is only one even prime - 2. return (x == 2); } internal static int CalcPrime (int x) { for (int i = (x & (~1))-1; i< Int32.MaxValue; i += 2) { if (TestPrime (i)) return i; } return x; } internal static int ToPrime (int x) { for (int i = 0; i < primeTbl.Length; i++) { if (x <= primeTbl [i]) return primeTbl [i]; } return CalcPrime (x); } private sealed class Enumerator : IEnumerator { private StatementMap host; private int stamp; private int pos; private int size; private bool hasCurrentKey; private Statement currentKey; private Object currentValue; public Enumerator (StatementMap host) { this.host = host; stamp = host.modificationCount; size = host.table.Length; Reset (); } private void FailFast () { if (host.modificationCount != stamp) { throw new InvalidOperationException (xstr); } } public void Reset () { FailFast (); pos = -1; hasCurrentKey = false; currentKey = Statement.All; currentValue = null; } public bool MoveNext () { FailFast (); if (pos < size) { while (++pos < size) { Slot entry = host.table [pos]; if (entry.used && !entry.removed) { currentKey = entry.key; currentValue = entry.value; return true; } } } hasCurrentKey = false; currentKey = Statement.All; currentValue = null; return false; } public DictionaryEntry Entry { get { if (!hasCurrentKey) throw new InvalidOperationException (); FailFast (); return new DictionaryEntry (currentKey, currentValue); } } public Statement Key { get { if (!hasCurrentKey) throw new InvalidOperationException (); FailFast (); return currentKey; } } public Object Value { get { if (!hasCurrentKey) throw new InvalidOperationException (); FailFast (); return currentValue; } } public Object Current { get { if (!hasCurrentKey) throw new InvalidOperationException (); return currentValue; } } } private class HashValues : IEnumerable { private StatementMap host; public HashValues (StatementMap host) { if (host == null) throw new ArgumentNullException (); this.host = host; } public virtual IEnumerator GetEnumerator () { return new Enumerator (host); } } } internal class MultiMap { Hashtable items = new Hashtable(); public MultiMap() { } public void Put(object key, object value) { object entry = items[key]; if (entry == null) { items[key] = value; } else if (entry is ArrayList) { ((ArrayList)entry).Add(value); } else { ArrayList list = new ArrayList(); list.Add(entry); list.Add(value); items[key] = list; } } public void Clear() { items.Clear(); } public IList Get(object key) { object ret = items[key]; if (ret == null) return null; if (ret is ArrayList) return (ArrayList)ret; ArrayList list = new ArrayList(); list.Add(ret); return list; } public IEnumerable Keys { get { return items.Keys; } } } internal class Permutation { int[] state; int[] max; public Permutation(int n) : this(n, 2) { } public Permutation(int n, int e) { state = new int[n]; max = new int[n]; for (int i = 0; i < n; i++) max[i] = e; } public Permutation(int[] choices) { state = new int[choices.Length]; max = choices; } public int[] Next() { if (state == null) return null; int[] ret = (int[])state.Clone(); state[0]++; for (int i = 0; i < max.Length; i++) { // use max.Length because state becomes null if (state[i] < max[i]) break; state[i] = 0; if (i == state.Length-1) // done the next time around state = null; else // carry state[i+1]++; } return ret; } public void Reset() { state = new int[state.Length]; } } } semweb-1.05+dfsg/src/N3Reader.cs0000644000175000017500000006073610774502134015676 0ustar meebeymeebeyusing System; using System.Collections; using System.IO; using System.Text; using SemWeb; using SemWeb.Util; namespace SemWeb { public class N3Reader : RdfReader { Resource PrefixResource = new Literal("@prefix"); Resource KeywordsResource = new Literal("@keywords"); Resource BaseResource = new Literal("@base"); TextReader sourcestream; NamespaceManager namespaces = new NamespaceManager(); Entity entRDFTYPE = "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"; Entity entRDFFIRST = "http://www.w3.org/1999/02/22-rdf-syntax-ns#first"; Entity entRDFREST = "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"; Entity entRDFNIL = "http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"; //Entity entOWLSAMEAS = "http://www.w3.org/2002/07/owl#sameAs"; Entity entDAMLEQUIV = "http://www.daml.org/2000/12/daml+oil#equivalentTo"; Entity entLOGIMPLIES = "http://www.w3.org/2000/10/swap/log#implies"; Entity entGRAPHCONTAINS = "http://razor.occams.info/code/semweb/internaluris/graphContains"; public N3Reader(TextReader source) { this.sourcestream = source; } public N3Reader(string sourcefile) { this.sourcestream = GetReader(sourcefile); BaseUri = "file:" + sourcefile + "#"; } private struct ParseContext { public MyReader source; public StatementSink store; public NamespaceManager namespaces; public UriMap namedNode; public Hashtable anonymous; public Hashtable variables; public Entity meta; public bool UsingKeywords; public Hashtable Keywords; public Entity overrideMeta; public Location Location { get { return new Location(source.Line, source.Col); } } } public override void Select(StatementSink store) { ParseContext context = new ParseContext(); context.source = new MyReader(sourcestream); context.store = store; context.namespaces = namespaces; context.namedNode = new UriMap(); context.anonymous = new Hashtable(); context.variables = new Hashtable(); context.meta = Meta; while (ReadStatement(context)) { } } private bool ReadStatement(ParseContext context) { Location loc = context.Location; bool reverse, forgetBNode; Resource subject = ReadResource(context, true, out reverse, out forgetBNode); if (subject == null) return false; if (reverse) OnError("is...of not allowed on a subject", loc); if ((object)subject == (object)PrefixResource) { loc = context.Location; string qname = ReadToken(context.source, context) as string; if (qname == null || !qname.EndsWith(":")) OnError("When using @prefix, the prefix identifier must end with a colon", loc); loc = context.Location; bool fb2; Resource uri = ReadResource(context, false, out reverse, out fb2); if (uri == null) OnError("Expecting a URI", loc); if (reverse) OnError("is...of not allowed here", loc); namespaces.AddNamespace(uri.Uri, qname.Substring(0, qname.Length-1)); loc = context.Location; char punc = ReadPunc(context.source); if (punc != '.') OnError("Expected a period but found '" + punc + "'", loc); return true; } if ((object)subject == (object)KeywordsResource) { context.UsingKeywords = true; context.Keywords = new Hashtable(); while (true) { ReadWhitespace(context.source); if (context.source.Peek() == '.') { context.source.Read(); break; } loc = context.Location; string tok = ReadToken(context.source, context) as string; if (tok == null) OnError("Expecting keyword names", loc); context.Keywords[tok] = tok; } return true; } if ((object)subject == (object)BaseResource) { loc = context.Location; bool fb2; Resource uri = ReadResource(context, false, out reverse, out fb2); if (uri == null || uri.Uri == null) OnError("Expecting a URI", loc); if (reverse) OnError("is...of not allowed here", loc); BaseUri = uri.Uri; loc = context.Location; char punc = ReadPunc(context.source); if (punc != '.') OnError("Expected a period but found '" + punc + "'", loc); return true; } // It's possible to just assert the presence of an entity // by following the entity with a period, or a } to end // a reified context. if (NextPunc(context.source) == '.') { context.source.Read(); if (forgetBNode) DoForget(subject, context); return true; } if (NextPunc(context.source) == '}') { context.source.Read(); if (forgetBNode) DoForget(subject, context); return false; // end of block } // Read the predicates for this subject. char period = ReadPredicates(subject, context); loc = context.Location; if (period != '.' && period != '}') OnError("Expected a period but found '" + period + "'", loc); if (period == '}') return false; if (forgetBNode) DoForget(subject, context); return true; } private char ReadPredicates(Resource subject, ParseContext context) { char punctuation = ';'; while (punctuation == ';') { punctuation = ReadPredicate(subject, context); // if we read a semicolon, we may still be done // if it's followed by a period (end of statement) // or bracket (end of bnode), or brace (end of formula, N3). if (punctuation == ';') { int npunc = NextPunc(context.source); if (npunc == (int)'.' || npunc == (int)']' || npunc == (int)'}') return ReadPunc(context.source); } } return punctuation; } private char ReadPredicate(Resource subject, ParseContext context) { bool reverse, forgetBNode; Location loc = context.Location; Resource predicate = ReadResource(context, false, out reverse, out forgetBNode); if (predicate == null) OnError("Expecting a predicate", loc); if (predicate is Literal) OnError("Predicates cannot be literals", loc); if (predicate == entGRAPHCONTAINS) { context.overrideMeta = subject as Entity; } else { context.overrideMeta = null; } char punctuation = ','; while (punctuation == ',') { ReadObject(subject, (Entity)predicate, context, reverse); loc = context.Location; punctuation = ReadPunc(context.source); } if (punctuation != '.' && punctuation != ';' && punctuation != ']' && punctuation != '}') OnError("Expecting a period, semicolon, comma, close-bracket, or close-brace but found '" + punctuation + "'", loc); if (forgetBNode) DoForget(predicate, context); return punctuation; } private void ReadObject(Resource subject, Entity predicate, ParseContext context, bool reverse) { bool reverse2, forgetBNode; Location loc = context.Location; Resource value = ReadResource(context, false, out reverse2, out forgetBNode); if (value == null) OnError("Expecting a resource or literal object", loc); if (reverse2) OnError("is...of not allowed on objects", loc); loc = context.Location; if (predicate == entGRAPHCONTAINS) { // don't add the statement, it was enough to associate the meta node } else if (!reverse) { if (subject is Literal) OnError("Subjects of statements cannot be literals", loc); Add(context.store, new Statement((Entity)subject, predicate, value, context.meta), loc); } else { if (value is Literal) OnError("A literal cannot be the object of a reverse-predicate statement", loc); Add(context.store, new Statement((Entity)value, predicate, subject, context.meta), loc); } if (forgetBNode) DoForget(value, context); } private void ReadWhitespace(MyReader source) { while (true) { while (char.IsWhiteSpace((char)source.Peek())) source.Read(); if (source.Peek() == '#') { while (true) { int c = source.Read(); if (c == -1 || c == 10 || c == 13) break; } continue; } break; } } private char ReadPunc(MyReader source) { ReadWhitespace(source); int c = source.Read(); if (c == -1) OnError("End of file expecting punctuation", new Location(source.Line, source.Col)); return (char)c; } private int NextPunc(MyReader source) { ReadWhitespace(source); return source.Peek(); } private void ReadEscapedChar(char c, StringBuilder b, MyReader source, Location loc) { if (c == 'n') b.Append('\n'); else if (c == 'r') b.Append('\r'); else if (c == 't') b.Append('\t'); else if (c == '\\') b.Append('\\'); else if (c == '"') b.Append('"'); else if (c == '\'') b.Append('\''); else if (c == 'a') b.Append('\a'); else if (c == 'b') b.Append('\b'); else if (c == 'f') b.Append('\f'); else if (c == 'v') b.Append('\v'); else if (c == '\n') { } else if (c == '\r') { } else if (c == 'u' || c == 'U') { StringBuilder num = new StringBuilder(); if (c == 'u') { num.Append((char)source.Read()); // four hex digits num.Append((char)source.Read()); num.Append((char)source.Read()); num.Append((char)source.Read()); } else { source.Read(); // two zeros source.Read(); num.Append((char)source.Read()); // six hex digits num.Append((char)source.Read()); num.Append((char)source.Read()); num.Append((char)source.Read()); num.Append((char)source.Read()); num.Append((char)source.Read()); } int unicode = int.Parse(num.ToString(), System.Globalization.NumberStyles.AllowHexSpecifier); b.Append((char)unicode); // is this correct? } else if (char.IsDigit((char)c) || c == 'x') OnError("Octal and hex byte-value escapes are deprecated and not supported", loc); else OnError("Unrecognized escape character: " + (char)c, loc); } private StringBuilder readTokenBuffer = new StringBuilder(); private object ReadToken(MyReader source, ParseContext context) { ReadWhitespace(source); Location loc = new Location(source.Line, source.Col); int firstchar = source.Read(); if (firstchar == -1) return ""; StringBuilder b = readTokenBuffer; readTokenBuffer.Length = 0; b.Append((char)firstchar); if (firstchar == '<') { // This is a URI or the <= verb. URIs can be escaped like strings, at least in the NTriples spec. bool escaped = false; while (true) { int c = source.Read(); if (c == -1) OnError("Unexpected end of stream within a token beginning with <", loc); if (b.Length == 2 && c == '=') return "<="; // the <= verb if (escaped) { ReadEscapedChar((char)c, b, source, loc); escaped = false; } else if (c == '\\') { escaped = true; } else { b.Append((char)c); if (c == '>') // end of the URI break; } } } else if (firstchar == '"') { // A string: ("""[^"\\]*(?:(?:\\.|"(?!""))[^"\\]*)*""")|("[^"\\]*(?:\\.[^"\\]*)*") // What kind of crazy regex is this?? b.Length = 0; // get rid of the open quote bool escaped = false; bool triplequoted = false; while (true) { int c = source.Read(); if (c == -1) OnError("Unexpected end of stream within a string", loc); if (b.Length == 0 && c == (int)'"' && source.Peek() == (int)'"') { triplequoted = true; source.Read(); continue; } if (!escaped && c == '\\') escaped = true; else if (escaped) { ReadEscapedChar((char)c, b, source, loc); escaped = false; } else { if (c == '"' && !triplequoted) break; if (c == '"' && source.Peek() == '"' && source.Peek2() == '"' && triplequoted) break; b.Append((char)c); } } if (triplequoted) { // read the extra end quotes source.Read(); source.Read(); } string litvalue = b.ToString(); string litlang = null; string litdt = null; // Strings can be suffixed with @langcode or ^^symbol (but not both?). if (source.Peek() == '@') { source.Read(); b.Length = 0; while (char.IsLetterOrDigit((char)source.Peek()) || source.Peek() == (int)'-') b.Append((char)source.Read()); litlang = b.ToString(); } else if (source.Peek() == '^' && source.Peek2() == '^') { loc = new Location(source.Line, source.Col); source.Read(); source.Read(); litdt = ReadToken(source, context).ToString(); // better be a string URI if (litdt.StartsWith("<") && litdt.EndsWith(">")) litdt = litdt.Substring(1, litdt.Length-2); else if (litdt.IndexOf(":") != -1) { Resource r = ResolveQName(litdt, context, loc); if (r.Uri == null) OnError("A literal datatype cannot be an anonymous entity", loc); litdt = r.Uri; } } return new Literal(litvalue, litlang, litdt); } else if (char.IsLetter((char)firstchar) || firstchar == '?' || firstchar == '@' || firstchar == ':' || firstchar == '_') { // Something starting with @ // A QName: ([a-zA-Z_][a-zA-Z0-9_]*)?:)?([a-zA-Z_][a-zA-Z0-9_]*)? // A variable: \?[a-zA-Z_][a-zA-Z0-9_]* while (true) { int c = source.Peek(); if (c == -1 || (!Entity.ValidateUriIsIUnreserved((char)c) && c != ':') || c == '.') break; b.Append((char)source.Read()); } } else if (char.IsDigit((char)firstchar) || firstchar == '+' || firstchar == '-') { while (true) { int ci = source.Peek(); if (ci == -1) break; if (ci == ']' || ci == ')' || ci == '}') break; // punctuation followed by a space means the punctuation is // punctuation, and not part of this token if (!char.IsDigit((char)ci) && source.Peek2() != -1 && char.IsWhiteSpace((char)source.Peek2())) break; char c = (char)ci; if (char.IsWhiteSpace(c)) break; b.Append((char)source.Read()); } } else if (firstchar == '=') { if (source.Peek() == (int)'>') b.Append((char)source.Read()); if (source.Peek() == (int)':' && source.Peek2() == (int)'>') { // SPECIAL EXTENSION "=:>" b.Append((char)source.Read()); b.Append((char)source.Read()); } } else if (firstchar == '[') { // The start of an anonymous node. } else if (firstchar == '{') { return "{"; } else if (firstchar == '(') { return "("; } else if (firstchar == ')') { return ")"; } else { while (true) { int c = source.Read(); if (c == -1) break; if (char.IsWhiteSpace((char)c)) break; b.Append((char)c); } OnError("Invalid token: " + b.ToString(), loc); } return b.ToString(); } private Resource ReadResource(ParseContext context, bool allowDirective, out bool reverse, out bool forgetBNode) { Location loc = context.Location; Resource res = ReadResource2(context, allowDirective, out reverse, out forgetBNode); ReadWhitespace(context.source); while (context.source.Peek() == '!' || context.source.Peek() == '^' || (context.source.Peek() == '.' && context.source.Peek2() != -1 && char.IsLetter((char)context.source.Peek2())) ) { int pathType = context.source.Read(); bool reverse2, forgetBNode2; loc = context.Location; Resource path = ReadResource2(context, false, out reverse2, out forgetBNode2); if (reverse || reverse2) OnError("is...of is not allowed in path expressions", loc); if (!(path is Entity)) OnError("A path expression cannot be a literal", loc); Entity anon = new BNode(); Statement s; if (pathType == '!' || pathType == '.') { if (!(res is Entity)) OnError("A path expression cannot contain a literal: " + res, loc); s = new Statement((Entity)res, (Entity)path, anon, context.meta); } else { s = new Statement(anon, (Entity)path, res, context.meta); } Add(context.store, s, loc); if (forgetBNode) DoForget(res, context); if (forgetBNode2) DoForget(path, context); res = anon; forgetBNode = true; ReadWhitespace(context.source); } return res; } private Entity GetResource(ParseContext context, string uri) { if (!ReuseEntities) return new Entity(uri); Entity ret = (Entity)context.namedNode[uri]; if (ret != null) return ret; ret = new Entity(uri); context.namedNode[uri] = ret; return ret; } private Resource ResolveQName(string str, ParseContext context, Location loc) { int colon = str.IndexOf(":"); string prefix = str.Substring(0, colon); if (prefix == "_") { Resource ret = (Resource)context.anonymous[str]; if (ret == null) { ret = new BNode(str.Substring(colon+1)); context.anonymous[str] = ret; } return ret; } else if (prefix == "" && context.namespaces.GetNamespace(prefix) == null) { return GetResource(context, (BaseUri == null ? "#" : BaseUri) + str.Substring(colon+1)); } else { string ns = context.namespaces.GetNamespace(prefix); if (ns == null) OnError("Prefix is undefined: " + str, loc); if (prefix != "") Namespaces.AddNamespace(ns, prefix); return GetResource(context, ns + str.Substring(colon+1)); } } private Resource ReadResource2(ParseContext context, bool allowDirective, out bool reverse, out bool forgetBNode) { reverse = false; forgetBNode = false; Location loc = context.Location; object tok = ReadToken(context.source, context); if (tok is Literal) return (Literal)tok; string str = (string)tok; if (str == "") return null; // Directives if (str == "@prefix") { if (allowDirective) return PrefixResource; else OnError("The directive '" + str + "' is not allowed here", loc); } if (str == "@keywords") { if (allowDirective) return KeywordsResource; else OnError("The directive '" + str + "' is not allowed here", loc); } if (str == "@base") { if (allowDirective) return BaseResource; else OnError("The directive '" + str + "' is not allowed here", loc); } // @ Keywords if (context.UsingKeywords && context.Keywords.Contains(str)) str = "@" + str; if (!context.UsingKeywords && ( str == "a" || str == "has" || str == "is")) str = "@" + str; // Standard Keywords // TODO: Turn these off with @keywords if (str == "@a") return entRDFTYPE; if (str == "=") return entDAMLEQUIV; if (str == "=>") return entLOGIMPLIES; if (str == "<=") { reverse = true; return entLOGIMPLIES; } if (str == "=:>") // SPECIAL EXTENSION! return entGRAPHCONTAINS; if (str == "@has") // ignore this token return ReadResource2(context, false, out reverse, out forgetBNode); if (str == "@is") { // Reverse predicate bool reversetemp; Resource pred = ReadResource2(context, false, out reversetemp, out forgetBNode); reverse = true; string of = ReadToken(context.source, context) as string; if (of == null) OnError("End of stream while expecting 'of'", loc); if (of == "@of" || (!context.UsingKeywords && of == "of") || (context.UsingKeywords && context.Keywords.Contains("of") && of == "of")) return pred; OnError("Expecting token 'of' but found '" + of + "'", loc); return null; // unreachable } if (str.StartsWith("@")) OnError("The " + str + " directive is not supported", loc); // URI if (str.StartsWith("<") && str.EndsWith(">")) { string uri = GetAbsoluteUri(BaseUri, str.Substring(1, str.Length-2)); string urierror = Entity.ValidateUri(uri); if (urierror != null) OnWarning(urierror, loc); return GetResource(context, uri); } // VARIABLE if (str[0] == '?') { string name = str.Substring(1); Entity var = (Entity)context.variables[name]; if (var == null) { var = new Variable(name); AddVariable((Variable)var); context.variables[name] = var; } return var; } // QNAME if (str.IndexOf(":") != -1) return ResolveQName(str, context, loc); // ANONYMOUS if (str == "[") { Entity ret = new BNode(); ReadWhitespace(context.source); if (context.source.Peek() != ']') { char bracket = ReadPredicates(ret, context); if (bracket == '.') bracket = ReadPunc(context.source); if (bracket != ']') OnError("Expected a close bracket but found '" + bracket + "'", loc); } else { context.source.Read(); } forgetBNode = true; return ret; } // LIST if (str == "(") { // A list Entity head = null, ent = null; while (true) { bool rev2, fb2; Resource res = ReadResource(context, false, out rev2, out fb2); if (res == null) break; if (ent == null) { ent = new BNode(); head = ent; } else { Entity sub = new BNode(); Add(context.store, new Statement(ent, entRDFREST, sub, context.meta), loc); ent = sub; } Add(context.store, new Statement(ent, entRDFFIRST, res, context.meta), loc); if (fb2) DoForget(res, context); } if (head == null) // No list items. head = entRDFNIL; // according to Turtle spec else Add(context.store, new Statement(ent, entRDFREST, entRDFNIL, context.meta), loc); return head; } if (str == ")") return null; // Should I use a more precise end-of-list return value? // FORMULA if (str == "{") { // ParseContext is a struct, so this gives us a clone. ParseContext newcontext = context; // The formula is denoted by a blank node, unless we set // the override meta flag above. if (context.overrideMeta == null) newcontext.meta = new BNode(); else newcontext.meta = context.overrideMeta; // According to the spec, _:xxx anonymous nodes are // local to the formula. But ?$variables (which aren't // mentioned in the spec) are treated as global names. newcontext.anonymous = new Hashtable(); while (NextPunc(context.source) != '}' && ReadStatement(newcontext)) { } ReadWhitespace(context.source); if (context.source.Peek() == '}') context.source.Read(); return newcontext.meta; } // NUMERIC LITERAL // In Turtle, numbers are restricted to [0-9]+, and are datatyped xsd:integer. double numval; if (double.TryParse(str, System.Globalization.NumberStyles.Any, null, out numval)) { if (numval >= long.MinValue && numval <= long.MaxValue && numval == (double)(long)numval) return new Literal(((long)numval).ToString(), null, NS.XMLSCHEMA + "integer"); else return new Literal(numval.ToString(), null, NS.XMLSCHEMA + "double"); } //BOOLEAN LITERAL if (str == "true" || str == "false") { return new Literal(str,null,NS.XMLSCHEMA+"boolean"); } // If @keywords is used, alphanumerics that aren't keywords // are local names in the default namespace. if (context.UsingKeywords && char.IsLetter(str[0])) { if (BaseUri == null) OnError("The document contains an unqualified name but no BaseUri was specified: \"" + str + "\"", loc); return GetResource(context, BaseUri + str); } // NOTHING MATCHED OnError("Invalid token: " + str, loc); return null; } private void Add(StatementSink store, Statement statement, Location position) { store.Add(statement); } private void OnError(string message, Location position) { throw new ParserException(message + ", line " + position.Line + " col " + position.Col); } private void OnWarning(string message, Location position) { base.OnWarning(message + ", line " + position.Line + " col " + position.Col); } /*private void OnError(string message, Location position, Exception cause) { throw new ParserException(message + ", line " + position.Line + " col " + position.Col, cause); } private void OnWarning(string message, Location position, Exception cause) { OnWarning(message + ", line " + position.Line + " col " + position.Col); }*/ void DoForget(Resource ent, ParseContext context) { CanForgetBNodes x = context.store as CanForgetBNodes; if (x == null) return; x.ForgetBNode((BNode)ent); } } internal class MyReader { TextReader r; public MyReader(TextReader reader) { r = reader; } public int Line = 1; public int Col = 0; int[] peeked = new int[2]; int peekCount = 0; public Location Location { get { return new Location(Line, Col); } } public int Peek() { if (peekCount == 0) { peeked[0] = r.Read(); peekCount = 1; } return peeked[0]; } public int Peek2() { Peek(); if (peekCount == 1) { peeked[1] = r.Read(); peekCount = 2; } return peeked[1]; } public int Read() { int c; if (peekCount > 0) { c = peeked[0]; peeked[0] = peeked[1]; peekCount--; } else { c = r.Read(); } if (c == '\n') { Line++; Col = 0; } else { Col++; } return c; } } internal struct Location { public readonly int Line, Col; public Location(int line, int col) { Line = line; Col = col; } } } semweb-1.05+dfsg/src/SQLStore.cs0000644000175000017500000021234110774502134015736 0ustar meebeymeebey/** * SQLStore.cs: An abstract implementation of an RDF triple store * using an SQL-based backend. This class is extended by the * MySQLStore, SQLiteStore, and PostreSQLStore classes. * * The SQLStore creates three tables to store its data. The tables * are organizes follows: * table columns * PREFIX_entites id (int), value (case-sensitive string) * PREFIX_literals id (int), value (case-sens. string), language (short case-insens. string), datatype (case-sense. string), hash (28byte case-sense string) * PREFIX_statements subject (int), predicate (int), object (int), meta (int), objecttype (tiny int) * * Every resource (named node, bnode, and literal) is given a numeric ID. * Zero is reserved. One is used for the bnode in the static field Statement.DefaultMeta. * The numbers for entities and literals are drawn from the same set of numbers, * so there cannot be an entity and a literal with the same ID. * * The subject, predicate, object, and meta columns in the _statements table * refer to the numeric IDs of resources. objecttype is zero if the object * is an entity (named or blank), otherwise one if it is a literal. Some databases * (i.e. MySQL) add a UNIQUE constraint over the subject, predicate, object, * and meta columns so that the database is guaranteed not to have duplicate * rows. Not all databases will do this, though. * * All literals have a row in the _literals table. The value, language, and * datatype columns have the obvious things. Notably, the datatype column * is a string column, even though you might think of it as an entity that * should be in the entities table. The hash column contains a SHA1 hash * over the three fields and is used to speed up look-ups for literals. It * also is used for creating a UNIQUE index over the table. Because literal * values can be arbitrarily long, creating a fixed-size hash is the only * way to reliably create a UNIQUE constraint over the table. A literal * value is entered into this table at most once. You can't have two rows * that have the exact same value, language, and datatype. * * The _entities table contains all *named* entities. Basically it is just * a mapping between entity IDs in the _statements table and their URIs. * Importantly, bnodes are not represented in this table (it would be a * waste of space since they have nothing to map IDs to). A UNIQUE constraint * is placed over the value column to ensure that a URI ends up in the table * at most once. Because bnodes are not in this table, the only way to * get a list of them is to see what IDs are used in _statements that are * not in this table or in the _literals table. */ using System; using System.Collections; using System.Collections.Specialized; using System.Data; using System.IO; using System.Security.Cryptography; using System.Text; using SemWeb.Util; namespace SemWeb.Stores { public abstract class SQLStore : QueryableSource, StaticSource, ModifiableSource, IDisposable { // Table initialization, etc. // -------------------------- // This is a version number representing the current 'schema' implemented // by this class in case of future updates. int dbformat = 1; // 'table' is the prefix of the tables used by this store, i.e. // {table}_statements, {table}_literals, {table}_entities. This is // set in the constructor. string table; // 'guid' is a GUID assigned to this store. It is created the // first time the SQL table structure is made and is saved in // the info block of the literal with ID zero. string guid; // this flag tracks the first access to the backend, when it // creates tables and indexes if necessary bool firstUse = true; // Importing // ------------ // The SQL store operates in two modes, isImporting == false and // isImporting == true. The first mode is the usual mode, where // calls to Add are executed immediately. The second mode, which // is activated by the Import() method, batches Add calls to make // insertions faster. While importing, no public methods should be // called except by this class itself. bool isImporting = false; // Each time we need to add a resource, we need to find it an ID. // When importing, we track the next ID available in this field // and increment it as necessary. When not importing, we do a // DB query to find the next available ID. int cachedNextId = -1; // These variables hold on to the IDs of literals and entities during // importing. They are periodically cleared. Hashtable entityCache = new Hashtable(); Hashtable literalCache = new Hashtable(); // This is a buffer of statements waiting to be processed. StatementList addStatementBuffer = null; // These track the performance of our buffer so we can adjust its size // on the fly to maximize performance. int importAddBufferSize = 200, importAddBufferRotation = 0; TimeSpan importAddBufferTime = TimeSpan.MinValue; // Other Flags // ----------- // When adding a statement that has a bnode in it (not while importing), // we have to do a two-staged procedure. This holds on to a list of // GUIDs that we've temporarily assigned to bnodes that are cleared // at the end of Add(). ArrayList anonEntityHeldIds = new ArrayList(); // Tracks whether any statements have been removed from the store by this // object. When Close() is called, if true, the entities and literals // tables are cleaned up to remove unreferenced resoures. bool statementsRemoved = false; // Debugging flags from environment variables. static bool Debug = System.Environment.GetEnvironmentVariable("SEMWEB_DEBUG_SQL") != null; static bool DebugLogSpeed = System.Environment.GetEnvironmentVariable("SEMWEB_DEBUG_SQL_LOG_SPEED") != null; static bool NoSQLView = System.Environment.GetEnvironmentVariable("SEMWEB_SQL_NOVIEWS") != null; static string InitCommands = System.Environment.GetEnvironmentVariable("SEMWEB_SQL_INIT_COMMANDS"); // This guy is reused in various calls to avoid allocating a new one of // these all the time. StringBuilder cmdBuffer = new StringBuilder(); // The quote character that surrounds strings in SQL statements. // Initialized in the constructor. char quote; // Ensure that calls to Select() and Query() are synchronized to make these methods thread-safe. object syncroot = new object(); // Our SHA1 object which we use to create hashes of literal values. SHA1 sha = SHA1.Create(); // This class is placed inside entities to cache their numeric IDs. private class ResourceKey { public int ResId; public ResourceKey(int id) { ResId = id; } public override int GetHashCode() { return ResId.GetHashCode(); } public override bool Equals(object other) { return (other is ResourceKey) && ((ResourceKey)other).ResId == ResId; } } // Some helpers. const string rdfs_member = NS.RDFS + "member"; const string rdf_li = NS.RDF + "_"; private static readonly string[] fourcols = new string[] { "subject", "predicate", "object", "meta" }; private static readonly string[] predcol = new string[] { "predicate" }; private static readonly string[] metacol = new string[] { "meta" }; private string INSERT_INTO_LITERALS_VALUES { get { return "INSERT INTO " + table + "_literals VALUES "; } } private string INSERT_INTO_ENTITIES_VALUES { get { return "INSERT INTO " + table + "_entities VALUES "; } } private string INSERT_INTO_STATEMENTS_VALUES { get { return "INSERT " + (HasUniqueStatementsConstraint ? InsertIgnoreCommand : "") + " INTO " + table + "_statements VALUES "; } } // The constructor called by subclasses. protected SQLStore(string table) { this.table = table; quote = GetQuoteChar(); } protected string TableName { get { return table; } } // The next few abstract and virtual methods allow implementors to control // what features the SQLStore takes advantage of and controls the SQL // language use. // See the API docs for more on these. protected abstract bool HasUniqueStatementsConstraint { get; } // may not return true unless INSERT (IGNORE COMMAND) is supported protected abstract string InsertIgnoreCommand { get; } protected abstract bool SupportsInsertCombined { get; } protected abstract bool SupportsSubquery { get; } protected virtual bool SupportsLimitClause { get { return true; } } protected virtual bool SupportsViews { get { return false; } } protected virtual int MaximumUriLength { get { return -1; } } protected abstract void CreateNullTest(string column, System.Text.StringBuilder command); protected abstract void CreateLikeTest(string column, string prefix, int method, System.Text.StringBuilder command); // method: 0 == startswith, 1 == contains, 2 == ends with protected virtual bool CreateEntityPrefixTest(string column, string prefix, System.Text.StringBuilder command) { command.Append('('); command.Append(column); command.Append(" IN (SELECT id from "); command.Append(TableName); command.Append("_entities WHERE "); CreateLikeTest("value", prefix, 0, command); command.Append("))"); return true; } // If this is the first use, initialize the table and index structures. // CreateTable() will create tables if they don't already exist. // CreateIndexes() will only be run if this is a new database, so that // the user may customize the indexes after the table is first created // without SemWeb adding its own indexes the next time again. private void Init() { if (!firstUse) return; firstUse = false; CreateTable(); if (CreateVersion()) // tests if this is a new table CreateIndexes(); if (InitCommands != null) RunCommand(InitCommands); } // Creates the info block in the literal row with ID zero. Returns true // if it created a new info block (i.e. this is a new database). private bool CreateVersion() { string verdatastr = RunScalarString("SELECT value FROM " + table + "_literals WHERE id = 0"); bool isNew = (verdatastr == null); NameValueCollection verdata = ParseVersionInfo(verdatastr); if (verdatastr != null && verdata["ver"] == null) throw new InvalidOperationException("The SQLStore adapter in this version of SemWeb cannot read databases created in previous versions."); verdata["ver"] = dbformat.ToString(); if (verdata["guid"] == null) { guid = Guid.NewGuid().ToString("N"); verdata["guid"] = guid; } else { guid = verdata["guid"]; } string newverdata = SerializeVersionInfo(verdata); if (verdatastr == null) RunCommand("INSERT INTO " + table + "_literals (id, value) VALUES (0, " + Escape(newverdata, true) + ")"); else if (verdatastr != newverdata) RunCommand("UPDATE " + table + "_literals SET value = " + Escape(newverdata, true) + " WHERE id = 0"); return isNew; } NameValueCollection ParseVersionInfo(string verdata) { NameValueCollection nvc = new NameValueCollection(); if (verdata == null) return nvc; foreach (string s in verdata.Split('\n')) { int c = s.IndexOf(':'); if (c == -1) continue; nvc[s.Substring(0, c)] = s.Substring(c+1); } return nvc; } string SerializeVersionInfo(NameValueCollection verdata) { string ret = ""; foreach (string k in verdata.Keys) ret += k + ":" + verdata[k] + "\n"; return ret; } // Now we get to the Store implementation. // Why do we return true here? public bool Distinct { get { return true; } } public int StatementCount { get { Init(); RunAddBuffer(); return RunScalarInt("select count(subject) from " + table + "_statements", 0); } } public string GetStoreGuid() { return guid; } public string GetPersistentBNodeId(BNode node) { ResourceKey rk = (ResourceKey)GetResourceKey(node); if (rk == null) return null; return GetStoreGuid() + ":" + rk.ResId.ToString(); } public BNode GetBNodeFromPersistentId(string persistentId) { try { int colon = persistentId.IndexOf(':'); if (colon == -1) return null; if (GetStoreGuid() != persistentId.Substring(0, colon)) return null; int id = int.Parse(persistentId.Substring(colon+1)); return (BNode)MakeEntity(id, null, null); } catch (Exception) { return null; } } // Returns the next ID available for a resource. If we're importing, // use and increment the cached ID. Otherwise, scan the tables for // the highest ID in use and use that plus one. (We have to scan all // tables because bnode IDs are only in the statements table and // entities and literals may be orphaned so those are only in those tables.) private int NextId() { if (isImporting && cachedNextId != -1) return ++cachedNextId; RunAddBuffer(); // The 0 id is not used. // The 1 id is reserved for Statement.DefaultMeta. int nextid = 2; CheckMax("select max(subject) from " + table + "_statements", ref nextid); CheckMax("select max(predicate) from " + table + "_statements", ref nextid); CheckMax("select max(object) from " + table + "_statements", ref nextid); CheckMax("select max(meta) from " + table + "_statements", ref nextid); CheckMax("select max(id) from " + table + "_literals", ref nextid); CheckMax("select max(id) from " + table + "_entities", ref nextid); cachedNextId = nextid; return nextid; } private void CheckMax(string command, ref int nextid) { int maxid = RunScalarInt(command, 0); if (maxid >= nextid) nextid = maxid + 1; } // Implements Store.Clear() by dropping the tables entirely. public void Clear() { // Drop the tables, if they exist. try { RunCommand("DROP TABLE " + table + "_statements;"); } catch (Exception) { } try { RunCommand("DROP TABLE " + table + "_literals;"); } catch (Exception) { } try { RunCommand("DROP TABLE " + table + "_entities;"); } catch (Exception) { } firstUse = true; Init(); if (addStatementBuffer != null) addStatementBuffer.Clear(); //RunCommand("DELETE FROM " + table + "_statements;"); //RunCommand("DELETE FROM " + table + "_literals;"); //RunCommand("DELETE FROM " + table + "_entities;"); } // Computes a hash for a literal value to put in the hash column of the _literals table. private string GetLiteralHash(Literal literal) { byte[] data = System.Text.Encoding.Unicode.GetBytes(literal.ToString()); byte[] hash = sha.ComputeHash(data); return Convert.ToBase64String(hash); } // Gets the ID of a literal in the database given an actual Literal object. // If create is false, return 0 if no such literal exists in the database. // Otherwise, create a row for the literal if none exists putting the // SQL insertion statement into the buffer argument. // If we're in isImporting mode, we expect that the literal's ID has already // been pre-fetched and put into literalCache (if the literal exists in the DB). private int GetLiteralId(Literal literal, bool create, StringBuilder buffer, bool insertCombined, ref bool firstInsert) { // Returns the literal ID associated with the literal. If a literal // doesn't exist and create is true, a new literal is created, // otherwise 0 is returned. if (isImporting) { object ret = literalCache[literal]; if (ret != null) return (int)ret; } else { StringBuilder b = cmdBuffer; cmdBuffer.Length = 0; b.Append("SELECT "); if (!SupportsLimitClause) b.Append("TOP 1 "); b.Append("id FROM "); b.Append(table); b.Append("_literals WHERE hash ="); b.Append(quote); b.Append(GetLiteralHash(literal)); b.Append(quote); if (SupportsLimitClause) b.Append(" LIMIT 1"); b.Append(';'); object id = RunScalar(b.ToString()); if (id != null) return AsInt(id); } if (create) { int id = AddLiteral(literal, buffer, insertCombined, ref firstInsert); if (isImporting) literalCache[literal] = id; return id; } return 0; } // Creates the SQL command to add a literal to the _literals table. private int AddLiteral(Literal literal, StringBuilder buffer, bool insertCombined, ref bool firstInsert) { int id = NextId(); StringBuilder b; if (buffer != null) { b = buffer; } else { b = cmdBuffer; cmdBuffer.Length = 0; } if (!insertCombined) { b.Append(INSERT_INTO_LITERALS_VALUES); } else { if (!firstInsert) b.Append(','); firstInsert = false; } b.Append('('); b.Append(id); b.Append(','); EscapedAppend(b, literal.Value); b.Append(','); if (literal.Language != null) EscapedAppend(b, literal.Language); else b.Append("NULL"); b.Append(','); if (literal.DataType != null) EscapedAppend(b, literal.DataType); else b.Append("NULL"); b.Append(','); b.Append(quote); b.Append(GetLiteralHash(literal)); b.Append(quote); b.Append(')'); if (!insertCombined) b.Append(';'); if (buffer == null) { if (Debug) Console.Error.WriteLine(b.ToString()); RunCommand(b.ToString()); } return id; } // Gets the ID of an entity in the database given a URI. // If create is false, return 0 if no such entity exists in the database. // Otherwise, create a row for the entity if none exists putting the // SQL insertion statement into the entityInsertBuffer argument. // If we're in isImporting mode, we expect that the entity's ID has already // been pre-fetched and put into entityCache (if the entity exists in the DB). private int GetEntityId(string uri, bool create, StringBuilder entityInsertBuffer, bool insertCombined, bool checkIfExists, ref bool firstInsert) { // Returns the resource ID associated with the URI. If a resource // doesn't exist and create is true, a new resource is created, // otherwise 0 is returned. int id; if (isImporting) { object idobj = entityCache[uri]; if (idobj == null && !create) return 0; if (idobj != null) return (int)idobj; } else if (checkIfExists) { StringBuilder cmd = cmdBuffer; cmdBuffer.Length = 0; cmd.Append("SELECT id FROM "); cmd.Append(table); cmd.Append("_entities WHERE value ="); EscapedAppend(cmd, uri); id = RunScalarInt(cmd.ToString(), 0); if (id != 0 || !create) return id; } // If we got here, no such resource exists and create is true. if (MaximumUriLength != -1 && uri.Length > MaximumUriLength) throw new NotSupportedException("URI exceeds maximum length supported by data store."); id = NextId(); StringBuilder b; if (entityInsertBuffer != null) { b = entityInsertBuffer; } else { b = cmdBuffer; cmdBuffer.Length = 0; } if (!insertCombined) { b.Append(INSERT_INTO_ENTITIES_VALUES); } else { if (!firstInsert) b.Append(','); firstInsert = false; } b.Append('('); b.Append(id); b.Append(','); EscapedAppend(b, uri); b.Append(')'); if (!insertCombined) b.Append(';'); if (entityInsertBuffer == null) RunCommand(b.ToString()); // Add it to the URI map if (isImporting) entityCache[uri] = id; return id; } // Gets the ID of an entity in the database given a URI. // If create is false, return 0 if no such entity exists in the database. // Otherwise, create a row for the entity if none exists. private int GetResourceId(Resource resource, bool create) { bool firstLiteralInsert = true, firstEntityInsert = true; return GetResourceIdBuffer(resource, create, null, null, false, ref firstLiteralInsert, ref firstEntityInsert); } // Gets the ID of an entity or literal in the database given a Resource object. // If create is false, return 0 if no such entity exists in the database. // Otherwise, create a row for the resource if none exists putting the // SQL insertion statements into the literalInsertBuffer and entityInsertBuffer arguments. // If we're in isImporting mode, we expect that the resources's ID has already // been pre-fetched and put into one of the cache variables (if the resource exists in the DB). // If we're trying to get the ID for a bnode (i.e. we want to add it to the database), // if we're isImporting, we know the next ID we can use -- increment and return that. // otherwise we have to create a temporary row in the _entities table to hold onto // the ID just until we add the statement, at which point the row can be removed. private int GetResourceIdBuffer(Resource resource, bool create, StringBuilder literalInsertBuffer, StringBuilder entityInsertBuffer, bool insertCombined, ref bool firstLiteralInsert, ref bool firstEntityInsert) { if (resource == null) return 0; if (resource is Literal) { Literal lit = (Literal)resource; return GetLiteralId(lit, create, literalInsertBuffer, insertCombined, ref firstLiteralInsert); } if (object.ReferenceEquals(resource, Statement.DefaultMeta)) return 1; ResourceKey key = (ResourceKey)GetResourceKey(resource); if (key != null) return key.ResId; int id; if (resource.Uri != null) { id = GetEntityId(resource.Uri, create, entityInsertBuffer, insertCombined, true, ref firstEntityInsert); } else { // This anonymous node didn't come from the database // since it didn't have a resource key. If !create, // then just return 0 to signal the resource doesn't exist. if (!create) return 0; if (isImporting) { // Can just increment the counter. id = NextId(); } else { // We need to reserve an id for this resource so that // this function returns other ids for other anonymous // resources. To do that, we'll insert a record // into the entities table with a GUID for the entity. // Inserting something into the table also gives us // concurrency, I hope. Then, once the resource is // added to the statements table, this row can be // removed. string guid = "semweb-bnode-guid://taubz.for.net,2006/" + Guid.NewGuid().ToString("N"); id = GetEntityId(guid, create, entityInsertBuffer, insertCombined, false, ref firstEntityInsert); anonEntityHeldIds.Add(id); } } if (id != 0) SetResourceKey(resource, new ResourceKey(id)); return id; } // Gets the type of the Resource, 0 for entities; 1 for literals. private int ObjectType(Resource r) { if (r is Literal) return 1; return 0; } // Creates an entity given its ID and its URI, and put it into // the cache argument if the argument is not null. private Entity MakeEntity(int resourceId, string uri, Hashtable cache) { if (resourceId == 0) return null; if (resourceId == 1) return Statement.DefaultMeta; ResourceKey rk = new ResourceKey(resourceId); if (cache != null && cache.ContainsKey(rk)) return (Entity)cache[rk]; Entity ent; if (uri != null) { ent = new Entity(uri); } else { ent = new BNode(); } SetResourceKey(ent, rk); if (cache != null) cache[rk] = ent; return ent; } // Adds a statement to the store. // If we're isImoprting, buffer the statement, and if the buffer is full, // run the buffer. // Otherwise, add it immediately. bool StatementSink.Add(Statement statement) { Add(statement); return true; } public void Add(Statement statement) { if (statement.AnyNull) throw new ArgumentNullException(); if (addStatementBuffer != null) { addStatementBuffer.Add(statement); RunAddBufferDynamic(); return; } Init(); int subj = GetResourceId(statement.Subject, true); int pred = GetResourceId(statement.Predicate, true); int objtype = ObjectType(statement.Object); int obj = GetResourceId(statement.Object, true); int meta = GetResourceId(statement.Meta, true); StringBuilder addBuffer = cmdBuffer; addBuffer.Length = 0; addBuffer.Append(INSERT_INTO_STATEMENTS_VALUES); addBuffer.Append('('); addBuffer.Append(subj); addBuffer.Append(','); addBuffer.Append(pred); addBuffer.Append(','); addBuffer.Append(objtype); addBuffer.Append(','); addBuffer.Append(obj); addBuffer.Append(','); addBuffer.Append(meta); addBuffer.Append("); "); RunCommand(addBuffer.ToString()); // Remove any entries in the entities table // for anonymous nodes. if (anonEntityHeldIds.Count > 0) { addBuffer.Length = 0; addBuffer.Append("DELETE FROM "); addBuffer.Append(table); addBuffer.Append("_entities where id IN ("); bool first = true; foreach (int id in anonEntityHeldIds) { if (!first) addBuffer.Append(','); first = false; addBuffer.Append(id); } addBuffer.Append(')'); RunCommand(addBuffer.ToString()); anonEntityHeldIds.Clear(); } } private void RunAddBufferDynamic() { // This complicated code here adjusts the size of the add // buffer dynamically to maximize performance. int thresh = importAddBufferSize; if (importAddBufferRotation == 1) thresh += 100; // experiment with changing if (importAddBufferRotation == 2) thresh -= 100; // the buffer size if (addStatementBuffer.Count >= thresh) { DateTime start = DateTime.Now; RunAddBuffer(); TimeSpan duration = DateTime.Now - start; if (DebugLogSpeed) Console.Error.WriteLine(thresh + "\t" + thresh/duration.TotalSeconds); // If there was an improvement in speed, per statement, on an // experimental change in buffer size, keep the change. if (importAddBufferRotation != 0 && duration.TotalSeconds/thresh < importAddBufferTime.TotalSeconds/importAddBufferSize && thresh >= 200 && thresh <= 10000) importAddBufferSize = thresh; importAddBufferTime = duration; importAddBufferRotation++; if (importAddBufferRotation == 3) importAddBufferRotation = 0; } } private void RunAddBuffer() { if (addStatementBuffer == null || addStatementBuffer.Count == 0) return; bool insertCombined = SupportsInsertCombined; Init(); // Prevent recursion through NextId=>StatementCount StatementList statements = addStatementBuffer; addStatementBuffer = null; try { // Prefetch the IDs of all entities mentioned in statements. StringBuilder cmd = new StringBuilder(); cmd.Append("SELECT id, value FROM "); cmd.Append(table); cmd.Append("_entities WHERE value IN ("); Hashtable entseen = new Hashtable(); bool hasEnts = false; for (int i = 0; i < statements.Count; i++) { Statement s = (Statement)statements[i]; for (int j = 0; j < 4; j++) { Entity ent = s.GetComponent(j) as Entity; if (ent == null || ent.Uri == null) continue; if (entityCache.ContainsKey(ent.Uri)) continue; if (entseen.ContainsKey(ent.Uri)) continue; if (hasEnts) cmd.Append(" , "); EscapedAppend(cmd, ent.Uri); hasEnts = true; entseen[ent.Uri] = ent.Uri; } } if (hasEnts) { cmd.Append(");"); if (Debug) Console.Error.WriteLine(cmd.ToString()); using (IDataReader reader = RunReader(cmd.ToString())) { while (reader.Read()) { int id = reader.GetInt32(0); string uri = AsString(reader[1]); entityCache[uri] = id; } } } // Prefetch the IDs of all literals mentioned in statements. cmd.Length = 0; cmd.Append("SELECT id, hash FROM "); cmd.Append(table); cmd.Append("_literals WHERE hash IN ("); bool hasLiterals = false; Hashtable litseen = new Hashtable(); for (int i = 0; i < statements.Count; i++) { Statement s = (Statement)statements[i]; Literal lit = s.Object as Literal; if (lit == null) continue; if (literalCache.ContainsKey(lit)) continue; string hash = GetLiteralHash(lit); if (litseen.ContainsKey(hash)) continue; if (hasLiterals) cmd.Append(" , "); cmd.Append(quote); cmd.Append(hash); cmd.Append(quote); hasLiterals = true; litseen[hash] = lit; } if (hasLiterals) { cmd.Append(");"); using (IDataReader reader = RunReader(cmd.ToString())) { while (reader.Read()) { int id = reader.GetInt32(0); string hash = AsString(reader[1]); Literal lit = (Literal)litseen[hash]; literalCache[lit] = id; } } } StringBuilder entityInsertions = new StringBuilder(); StringBuilder literalInsertions = new StringBuilder(); if (insertCombined) entityInsertions.Append(INSERT_INTO_ENTITIES_VALUES); if (insertCombined) literalInsertions.Append(INSERT_INTO_LITERALS_VALUES); int entityInsertionsInitialLength = entityInsertions.Length; int literalInsertionsInitialLength = literalInsertions.Length; bool firstLiteralInsert = true, firstEntityInsert = true; // only used if insertCombined is true cmd = new StringBuilder(); if (insertCombined) cmd.Append(INSERT_INTO_STATEMENTS_VALUES); for (int i = 0; i < statements.Count; i++) { Statement statement = (Statement)statements[i]; int subj = GetResourceIdBuffer(statement.Subject, true, literalInsertions, entityInsertions, insertCombined, ref firstLiteralInsert, ref firstEntityInsert); int pred = GetResourceIdBuffer(statement.Predicate, true, literalInsertions, entityInsertions, insertCombined, ref firstLiteralInsert, ref firstEntityInsert); int objtype = ObjectType(statement.Object); int obj = GetResourceIdBuffer(statement.Object, true, literalInsertions, entityInsertions, insertCombined, ref firstLiteralInsert, ref firstEntityInsert); int meta = GetResourceIdBuffer(statement.Meta, true, literalInsertions, entityInsertions, insertCombined, ref firstLiteralInsert, ref firstEntityInsert); if (!insertCombined) cmd.Append(INSERT_INTO_STATEMENTS_VALUES); cmd.Append('('); cmd.Append(subj); cmd.Append(','); cmd.Append(pred); cmd.Append(','); cmd.Append(objtype); cmd.Append(','); cmd.Append(obj); cmd.Append(','); cmd.Append(meta); if (i == statements.Count-1 || !insertCombined) cmd.Append(");"); else cmd.Append("),"); } if (literalInsertions.Length > literalInsertionsInitialLength) { if (insertCombined) literalInsertions.Append(';'); if (Debug) Console.Error.WriteLine(literalInsertions.ToString()); RunCommand(literalInsertions.ToString()); } if (entityInsertions.Length > entityInsertionsInitialLength) { if (insertCombined) entityInsertions.Append(';'); if (Debug) Console.Error.WriteLine(entityInsertions.ToString()); RunCommand(entityInsertions.ToString()); } if (Debug) Console.Error.WriteLine(cmd.ToString()); RunCommand(cmd.ToString()); } finally { // Clear the array and reuse it. statements.Clear(); addStatementBuffer = statements; entityCache.Clear(); literalCache.Clear(); } } public void Remove(Statement template) { Init(); RunAddBuffer(); System.Text.StringBuilder cmd = new System.Text.StringBuilder("DELETE FROM "); cmd.Append(table); cmd.Append("_statements "); if (!WhereClause(template, cmd)) return; cmd.Append(';'); RunCommand(cmd.ToString()); statementsRemoved = true; } public void RemoveAll(Statement[] templates) { // TODO: Optimize this. foreach (Statement t in templates) Remove(t); } public Entity[] GetEntities() { return GetAllEntities(fourcols); } public Entity[] GetPredicates() { return GetAllEntities(predcol); } public Entity[] GetMetas() { return GetAllEntities(metacol); } private Entity[] GetAllEntities(string[] cols) { RunAddBuffer(); ArrayList ret = new ArrayList(); Hashtable seen = new Hashtable(); foreach (string col in cols) { using (IDataReader reader = RunReader("SELECT " + col + ", value FROM " + table + "_statements LEFT JOIN " + table + "_entities ON " + col + "=id " + (col == "object" ? " WHERE objecttype=0" : "") + " GROUP BY " + col + ";")) { while (reader.Read()) { int id = reader.GetInt32(0); if (id == 1 && col == "meta") continue; // don't return DefaultMeta in meta column. if (seen.ContainsKey(id)) continue; seen[id] = seen; string uri = AsString(reader[1]); ret.Add(MakeEntity(id, uri, null)); } } } return (Entity[])ret.ToArray(typeof(Entity));; } private bool WhereItem(string col, Resource r, System.Text.StringBuilder cmd, bool and) { if (and) cmd.Append(" and "); if (r is MultiRes) { cmd.Append('('); cmd.Append(col); cmd.Append(" IN ("); if (!AppendMultiRes((MultiRes)r, cmd)) return false; cmd.Append(" ))"); } else { if (r.Uri != null && r.Uri == rdfs_member) { if (CreateEntityPrefixTest(col, rdf_li, cmd)) return true; } int id = GetResourceId(r, false); if (id == 0) return false; if (Debug) Console.Error.WriteLine("(" + id + " " + r + ")"); cmd.Append('('); cmd.Append(col); cmd.Append('='); cmd.Append(id); cmd.Append(')'); } return true; } private bool AppendMultiRes(MultiRes r, StringBuilder cmd) { bool first = true; for (int i = 0; i < r.items.Length; i++) { int id = GetResourceId(r.items[i], false); if (id == 0) continue; if (!first) cmd.Append(','); first = false; cmd.Append(id); } if (first) return false; // none are in the store return true; } private bool WhereClause(Statement template, System.Text.StringBuilder cmd) { bool ww; return WhereClause(template.Subject, template.Predicate, template.Object, template.Meta, cmd, out ww); } private bool WhereClause(Resource templateSubject, Resource templatePredicate, Resource templateObject, Resource templateMeta, System.Text.StringBuilder cmd, out bool wroteWhere) { if (templateSubject == null && templatePredicate == null && templateObject == null && templateMeta == null) { wroteWhere = false; return true; } wroteWhere = true; cmd.Append(" WHERE "); if (templateSubject != null) if (!WhereItem("subject", templateSubject, cmd, false)) return false; if (templatePredicate != null) if (!WhereItem("predicate", templatePredicate, cmd, templateSubject != null)) return false; if (templateObject != null) if (!WhereItem("object", templateObject, cmd, templateSubject != null || templatePredicate != null)) return false; if (templateMeta != null) if (!WhereItem("meta", templateMeta, cmd, templateSubject != null || templatePredicate != null || templateObject != null)) return false; return true; } private int AsInt(object r) { if (r is int) return (int)r; if (r is uint) return (int)(uint)r; if (r is long) return (int)(long)r; if (r is string) return int.Parse((string)r); throw new ArgumentException(r.ToString()); } private string AsString(object r) { if (r == null) return null; else if (r is System.DBNull) return null; else if (r is string) return (string)r; else if (r is byte[]) return System.Text.Encoding.UTF8.GetString((byte[])r); else throw new FormatException("SQL store returned a literal value as " + r.GetType()); } private static void AppendComma(StringBuilder builder, string text, bool comma) { if (comma) builder.Append(','); builder.Append(text); } /////////////////////////// // QUERYING THE DATABASE // /////////////////////////// public bool Contains(Resource resource) { return GetResourceId(resource, false) != 0; } public bool Contains(Statement template) { return Store.DefaultContains(this, template); } internal struct SelectColumnFilter { public bool SubjectId, PredicateId, ObjectId, MetaId; public bool SubjectUri, PredicateUri, ObjectData, MetaUri; } private static void SelectFilterColumns(SelectColumnFilter filter, StringBuilder cmd) { bool f = true; if (filter.SubjectId) { cmd.Append("q.subject"); f = false; } if (filter.PredicateId) { AppendComma(cmd, "q.predicate", !f); f = false; } if (filter.ObjectId) { AppendComma(cmd, "q.object", !f); f = false; } if (filter.MetaId) { AppendComma(cmd, "q.meta", !f); f = false; } if (filter.SubjectUri) { AppendComma(cmd, "suri.value", !f); f = false; } if (filter.PredicateUri) { AppendComma(cmd, "puri.value", !f); f = false; } if (filter.ObjectData) { AppendComma(cmd, "q.objecttype, ouri.value, lit.value, lit.language, lit.datatype", !f); f = false; } if (filter.MetaUri) { AppendComma(cmd, "muri.value", !f); f = false; } } private void SelectFilterTables(SelectColumnFilter filter, StringBuilder cmd) { if (filter.SubjectUri) { cmd.Append(" LEFT JOIN "); cmd.Append(table); cmd.Append("_entities AS suri ON q.subject = suri.id"); } if (filter.PredicateUri) { cmd.Append(" LEFT JOIN "); cmd.Append(table); cmd.Append("_entities AS puri ON q.predicate = puri.id"); } if (filter.ObjectData) { cmd.Append(" LEFT JOIN "); cmd.Append(table); cmd.Append("_entities AS ouri ON q.object = ouri.id"); cmd.Append(" LEFT JOIN "); cmd.Append(table); cmd.Append("_literals AS lit ON q.object=lit.id"); } if (filter.MetaUri) { cmd.Append(" LEFT JOIN "); cmd.Append(table); cmd.Append("_entities AS muri ON q.meta = muri.id"); } } public void Select(StatementSink result) { Select(Statement.All, result); } public void Select(SelectFilter filter, StatementSink result) { if (result == null) throw new ArgumentNullException(); foreach (Entity[] s in SplitArray(filter.Subjects)) foreach (Entity[] p in SplitArray(filter.Predicates)) foreach (Resource[] o in SplitArray(filter.Objects)) foreach (Entity[] m in SplitArray(filter.Metas)) { Select( ToMultiRes(s), ToMultiRes(p), ToMultiRes(o), ToMultiRes(m), filter.LiteralFilters, result, filter.Limit); // hmm, repeated } } Resource[][] SplitArray(Resource[] e) { int lim = 1000; if (e == null || e.Length <= lim) { if (e is Entity[]) return new Entity[][] { (Entity[])e }; else return new Resource[][] { e }; } int overflow = e.Length % lim; int n = (e.Length / lim) + ((overflow != 0) ? 1 : 0); Resource[][] ret; if (e is Entity[]) ret = new Entity[n][]; else ret = new Resource[n][]; for (int i = 0; i < n; i++) { int c = lim; if (i == n-1 && overflow != 0) c = overflow; if (e is Entity[]) ret[i] = new Entity[c]; else ret[i] = new Resource[c]; Array.Copy(e, i*lim, ret[i], 0, c); } return ret; } Resource ToMultiRes(Resource[] r) { if (r == null || r.Length == 0) return null; if (r.Length == 1) return r[0]; return new MultiRes(r); } private class MultiRes : Resource { public MultiRes(Resource[] a) { items = a; } public Resource[] items; public override string Uri { get { return null; } } public bool ContainsLiterals() { foreach (Resource r in items) if (r is Literal) return true; return false; } } void CleanMultiRes(MultiRes res) { ArrayList newitems = new ArrayList(); foreach (Resource r in res.items) if ((object)r == (object)Statement.DefaultMeta || GetResourceKey(r) != null) newitems.Add(r); res.items = (Resource[])newitems.ToArray(typeof(Resource)); } void CacheMultiObjects(Hashtable entMap, Resource obj) { if (!(obj is MultiRes)) return; foreach (Resource r in ((MultiRes)obj).items) entMap[GetResourceId(r, false)] = r; } bool isOrContains(Resource r, string uri) { if (r == null) return false; if (r is MultiRes) { foreach (Resource rr in ((MultiRes)r).items) if (isOrContains(rr, uri)) return true; } else { if (r.Uri != null && r.Uri == uri) return true; } return false; } void PrefetchResourceIds(IList resources) { Hashtable seen_e = new Hashtable(); Hashtable seen_l = new Hashtable(); int resStart = 0; while (resStart < resources.Count) { StringBuilder cmd_e = new StringBuilder(); cmd_e.Append("SELECT id, value FROM "); cmd_e.Append(table); cmd_e.Append("_entities WHERE value IN ("); bool hasEnts = false; StringBuilder cmd_l = new StringBuilder(); cmd_l.Append("SELECT id, hash FROM "); cmd_l.Append(table); cmd_l.Append("_literals WHERE hash IN ("); bool hasLiterals = false; int ctr = 0; while (resStart < resources.Count && ctr < 1000) { Resource r = (Resource)resources[resStart++]; if ((object)r == (object)Statement.DefaultMeta || GetResourceKey(r) != null) // no need to prefetch continue; ctr++; if (r.Uri != null) { if (seen_e.ContainsKey(r.Uri)) continue; if (hasEnts) cmd_e.Append(" , "); EscapedAppend(cmd_e, r.Uri); hasEnts = true; seen_e[r.Uri] = r; } Literal lit = r as Literal; if (lit != null) { string hash = GetLiteralHash(lit); if (seen_l.ContainsKey(hash)) continue; if (hasLiterals) cmd_l.Append(" , "); cmd_l.Append(quote); cmd_l.Append(hash); cmd_l.Append(quote); hasLiterals = true; seen_l[hash] = lit; } } if (hasEnts) { cmd_e.Append(");"); if (Debug) Console.Error.WriteLine(cmd_e.ToString()); using (IDataReader reader = RunReader(cmd_e.ToString())) { while (reader.Read()) { int id = reader.GetInt32(0); string uri = AsString(reader[1]); SetResourceKey((Entity)seen_e[uri], new ResourceKey(id)); } } } if (hasLiterals) { cmd_l.Append(");"); using (IDataReader reader = RunReader(cmd_l.ToString())) { while (reader.Read()) { int id = reader.GetInt32(0); string hash = AsString(reader[1]); SetResourceKey((Literal)seen_l[hash], new ResourceKey(id)); } } } } } public void Select(Statement template, StatementSink result) { if (result == null) throw new ArgumentNullException(); Select(template.Subject, template.Predicate, template.Object, template.Meta, null, result, 0); } private void Select(Resource templateSubject, Resource templatePredicate, Resource templateObject, Resource templateMeta, LiteralFilter[] litFilters, StatementSink result, int limit) { if (result == null) throw new ArgumentNullException(); lock (syncroot) { Init(); RunAddBuffer(); // Don't select on columns that we already know from the template. // But grab the URIs and literal values for MultiRes selection. SelectColumnFilter columns = new SelectColumnFilter(); columns.SubjectId = (templateSubject == null) || templateSubject is MultiRes; columns.PredicateId = (templatePredicate == null) || templatePredicate is MultiRes; columns.ObjectId = (templateObject == null) || templateObject is MultiRes; columns.MetaId = (templateMeta == null) || templateMeta is MultiRes; columns.SubjectUri = templateSubject == null; columns.PredicateUri = templatePredicate == null; columns.ObjectData = templateObject == null || (templateObject is MultiRes && ((MultiRes)templateObject).ContainsLiterals()); columns.MetaUri = templateMeta == null; if (isOrContains(templatePredicate, rdfs_member)) { columns.PredicateId = true; columns.PredicateUri = true; } // Meta URIs tend to be repeated a lot, so we don't // want to ever select them from the database. // This preloads them, although it makes the first // select quite slow. /*if (templateMeta == null && SupportsSubquery) { LoadMetaEntities(); columns.MetaUri = false; }*/ // Have to select something if (!columns.SubjectId && !columns.PredicateId && !columns.ObjectId && !columns.MetaId) columns.SubjectId = true; // Pre-cache the IDs of resources in a MultiRes. TODO: Pool these into one array. foreach (Resource r in new Resource[] { templateSubject, templatePredicate, templateObject, templateMeta }) { MultiRes mr = r as MultiRes; if (mr == null) continue; PrefetchResourceIds(mr.items); CleanMultiRes(mr); if (mr.items.Length == 0) // no possible values return; } // SQLite has a problem with LEFT JOIN: When a condition is made on the // first table in the ON clause (q.objecttype=0/1), when it fails, // it excludes the row from the first table, whereas it should only // exclude the results of the join. System.Text.StringBuilder cmd = new System.Text.StringBuilder("SELECT "); if (!SupportsLimitClause && limit >= 1) { cmd.Append("TOP "); cmd.Append(limit); cmd.Append(' '); } if (!HasUniqueStatementsConstraint) cmd.Append("DISTINCT "); SelectFilterColumns(columns, cmd); cmd.Append(" FROM "); cmd.Append(table); cmd.Append("_statements AS q"); SelectFilterTables(columns, cmd); cmd.Append(' '); bool wroteWhere; if (!WhereClause(templateSubject, templatePredicate, templateObject, templateMeta, cmd, out wroteWhere)) return; // Transform literal filters into SQL. if (litFilters != null) { foreach (LiteralFilter f in litFilters) { string s = FilterToSQL(f, "lit.value"); if (s != null) { if (!wroteWhere) { cmd.Append(" WHERE "); wroteWhere = true; } else { cmd.Append(" AND "); } cmd.Append(' '); cmd.Append(s); } } } if (SupportsLimitClause && limit >= 1) { cmd.Append(" LIMIT "); cmd.Append(limit); } cmd.Append(';'); if (Debug) { string cmd2 = cmd.ToString(); //if (cmd2.Length > 80) cmd2 = cmd2.Substring(0, 80); Console.Error.WriteLine(cmd2); } Hashtable entMap = new Hashtable(); // Be sure if a MultiRes is involved we hash the // ids of the entities so we can return them // without creating new ones. CacheMultiObjects(entMap, templateSubject); CacheMultiObjects(entMap, templatePredicate); CacheMultiObjects(entMap, templateObject); CacheMultiObjects(entMap, templateMeta); using (IDataReader reader = RunReader(cmd.ToString())) { while (reader.Read()) { int col = 0; int sid = -1, pid = -1, ot = -1, oid = -1, mid = -1; string suri = null, puri = null, ouri = null, muri = null; string lv = null, ll = null, ld = null; if (columns.SubjectId) { sid = reader.GetInt32(col++); } if (columns.PredicateId) { pid = reader.GetInt32(col++); } if (columns.ObjectId) { oid = reader.GetInt32(col++); } if (columns.MetaId) { mid = reader.GetInt32(col++); } if (columns.SubjectUri) { suri = AsString(reader[col++]); } if (columns.PredicateUri) { puri = AsString(reader[col++]); } if (columns.ObjectData) { ot = reader.GetInt32(col++); ouri = AsString(reader[col++]); lv = AsString(reader[col++]); ll = AsString(reader[col++]); ld = AsString(reader[col++]);} if (columns.MetaUri) { muri = AsString(reader[col++]); } Entity subject = GetSelectedEntity(sid, suri, templateSubject, columns.SubjectId, columns.SubjectUri, entMap); Entity predicate = GetSelectedEntity(pid, puri, templatePredicate, columns.PredicateId, columns.PredicateUri, entMap); Resource objec = GetSelectedResource(oid, ot, ouri, lv, ll, ld, templateObject, columns.ObjectId, columns.ObjectData, entMap); Entity meta = GetSelectedEntity(mid, muri, templateMeta, columns.MetaId, columns.MetaUri, templateMeta != null ? entMap : null); if (litFilters != null && !LiteralFilter.MatchesFilters(objec, litFilters, this)) continue; bool ret = result.Add(new Statement(subject, predicate, objec, meta)); if (!ret) break; } } } // lock } public SemWeb.Query.MetaQueryResult MetaQuery(Statement[] graph, SemWeb.Query.QueryOptions options) { return new SemWeb.Inference.SimpleEntailment().MetaQuery(graph, options, this); } public void Query(Statement[] graph, SemWeb.Query.QueryOptions options, SemWeb.Query.QueryResultSink sink) { if (graph.Length == 0) throw new ArgumentException("graph array must have at least one element"); options = options.Clone(); // because we modify the knownvalues array // Order the variables mentioned in the graph. Variable[] varOrder; ResSet distinguishedVars = null; bool useDistinct = false; { if (options.DistinguishedVariables != null) distinguishedVars = new ResSet(options.DistinguishedVariables); else distinguishedVars = new ResSet(); Hashtable seenvars = new Hashtable(); foreach (Statement filter in graph) { for (int i = 0; i < 4; i++) { Resource r = filter.GetComponent(i); if (r == null) throw new ArgumentException("The graph may not have any null components. Use Variables instead."); if (r is Variable) { if (options.DistinguishedVariables != null) { if (!distinguishedVars.Contains(r)) { // If we are omitting a column from the results because it is // not distinguished, and it's not a meta column, then we'll // use DISTINCT. if (i != 3) useDistinct = true; // Don't put this into seenvars. continue; } } else { distinguishedVars.Add(r); // all variables are distinguished } seenvars[r] = r; } } } varOrder = new Variable[seenvars.Count]; int ctr = 0; foreach (Variable v in seenvars.Keys) varOrder[ctr++] = v; } bool useView = useDistinct && SupportsViews && !NoSQLView; // Set the initial bindings to the result sink sink.Init(varOrder); Hashtable varLitFilters = new Hashtable(); // Prefetch the IDs of all resources mentioned in the graph and in variable known values. // For Resources in the graph that are not in the store, the query immediately fails. { ArrayList graphResources = new ArrayList(); foreach (Statement s in graph) { for (int i = 0; i < 4; i++) { Resource r = s.GetComponent(i); if (!(r is BNode)) // definitely exclude variables, but bnodes are useless too graphResources.Add(r); } } if (options.VariableKnownValues != null) foreach (ICollection values in options.VariableKnownValues.Values) graphResources.AddRange(values); PrefetchResourceIds(graphResources); // Check resources in graph and fail fast if any is not in the store. foreach (Statement s in graph) { for (int i = 0; i < 4; i++) { Resource r = s.GetComponent(i); if (r is Variable) continue; if ((object)r != (object)Statement.DefaultMeta && GetResourceKey(r) == null) { sink.AddComments("Resource " + r + " is not contained in the data model."); sink.Finished(); return; } } } // Check variable known values and remove any values not in the store. // Don't do any fail-fasting here because there might be entries in this // dictionary that aren't even used in this query (yes, poor design). // We check later anyway. if (options.VariableKnownValues != null) { #if !DOTNET2 foreach (Variable v in new ArrayList(options.VariableKnownValues.Keys)) { #else foreach (Variable v in new System.Collections.Generic.List(options.VariableKnownValues.Keys)) { #endif #if !DOTNET2 ArrayList newvalues = new ArrayList(); #else System.Collections.Generic.List newvalues = new System.Collections.Generic.List(); #endif foreach (Resource r in (ICollection)options.VariableKnownValues[v]) { if ((object)r == (object)Statement.DefaultMeta || GetResourceKey(r) != null) newvalues.Add(r); } options.VariableKnownValues[v] = newvalues; } } } // Helpers string[] colnames = { "subject", "predicate", "object", "meta" }; // Lock the store and make sure we are initialized and any pending add's have been committed. lock (syncroot) { Init(); RunAddBuffer(); // Compile the SQL statement. Hashtable varRef_Inner = new Hashtable(); // the column name representing the variable: if we're using VIEWs, then within the VIEW (i.e. name of column in underlying table) Hashtable varRef_Outer = new Hashtable(); // if we're using VIEWs, then the column name representing the variable of the VIEW itself Hashtable varRef2 = new Hashtable(); Hashtable varSelectedLiteral = new Hashtable(); StringBuilder fromClause = new StringBuilder(); StringBuilder whereClause = new StringBuilder(); StringBuilder outerSelectJoins = new StringBuilder(); StringBuilder outerWhereClause = new StringBuilder(); for (int f = 0; f < graph.Length; f++) { // For each filter, we select FROM the statements table with an // alias: q#, where # is the filter's index. if (f > 0) fromClause.Append(','); fromClause.Append(table); fromClause.Append("_statements AS g"); fromClause.Append(f); // For each component of the filter... for (int i = 0; i < 4; i++) { string myRef = "g" + f + "." + colnames[i]; Variable v = graph[f].GetComponent(i) as Variable; if (v != null) { // If the component is a variable, then if this is // the first time we're seeing the variable, we don't // add any restrictions to the WHERE clause, but we // note the variable's "name" in the world of SQL // so we can refer back to it later and we add the // necessary FROM tables so we can get its URI and // literal value if it is a reported variable. // If this isn't the first time, then we add a WHERE restriction so // that the proper columns here and in a previous // filter are forced to have the same value. if (!varRef_Inner.ContainsKey(v)) { varRef_Inner[v] = myRef; varRef_Outer[v] = "v" + Array.IndexOf(varOrder, v); int vIndex = varRef_Inner.Count; varRef2[v] = vIndex; #if !DOTNET2 bool hasLitFilter = (options.VariableLiteralFilters != null && options.VariableLiteralFilters[v] != null); #else bool hasLitFilter = (options.VariableLiteralFilters != null && options.VariableLiteralFilters.ContainsKey(v)); #endif if (distinguishedVars.Contains(v) || hasLitFilter) { StringBuilder joinTarget = fromClause; if (useView) joinTarget = outerSelectJoins; string onRef = (string)(!useView ? varRef_Inner : varRef_Outer)[v]; joinTarget.Append(" LEFT JOIN "); joinTarget.Append(table); joinTarget.Append("_entities AS vent"); joinTarget.Append(vIndex); joinTarget.Append(" ON "); joinTarget.Append(onRef); joinTarget.Append("="); joinTarget.Append("vent" + vIndex + ".id "); varSelectedLiteral[v] = (i == 2); if (i == 2) { // literals cannot be in any other column joinTarget.Append(" LEFT JOIN "); joinTarget.Append(table); joinTarget.Append("_literals AS vlit"); joinTarget.Append(vIndex); joinTarget.Append(" ON "); joinTarget.Append(onRef); joinTarget.Append("="); joinTarget.Append("vlit" + vIndex + ".id "); } } if (options.VariableKnownValues != null) { ICollection values = null; #if DOTNET2 if (options.VariableKnownValues.ContainsKey(v)) #endif values = (ICollection)options.VariableKnownValues[v]; if (values != null) { if (values.Count == 0) { sink.Finished(); return; } Resource r = ToMultiRes((Resource[])new ArrayList(values).ToArray(typeof(Resource))); if (!WhereItem(myRef, r, whereClause, whereClause.Length != 0)) { // We know at this point that the query cannot return any results. sink.Finished(); return; } } } } else { if (whereClause.Length != 0) whereClause.Append(" AND "); whereClause.Append('('); whereClause.Append((string)varRef_Inner[v]); whereClause.Append('='); whereClause.Append(myRef); whereClause.Append(')'); } } else { // If this is not a variable, then it is a resource. if (!WhereItem(myRef, graph[f].GetComponent(i), whereClause, whereClause.Length != 0)) { // We know at this point that the query cannot return any results. sink.Finished(); return; } } } } // graph filter 0...n // Add literal filters to the WHERE clause foreach (Variable v in varOrder) { // Is there a literal value filter? if (options.VariableLiteralFilters == null) continue; #if !DOTNET2 if (options.VariableLiteralFilters[v] == null) continue; #else if (!options.VariableLiteralFilters.ContainsKey(v)) continue; #endif // If this variable was not used in a literal column, then // we cannot filter its value. Really, it will never be a literal. if (!(bool)varSelectedLiteral[v]) continue; foreach (LiteralFilter filter in (ICollection)options.VariableLiteralFilters[v]) { string s = FilterToSQL(filter, "vlit" + (int)varRef2[v] + ".value"); if (s == null) continue; StringBuilder where = whereClause; if (useView) where = outerWhereClause; if (where.Length != 0) where.Append(" AND "); where.Append(s); } } // Put the parts of the SQL statement together StringBuilder cmd = new StringBuilder(); StringBuilder outercmd = new StringBuilder(); string viewname = "queryview" + Math.Abs(GetHashCode()); if (useView) { cmd.Append("DROP VIEW IF EXISTS "); cmd.Append(viewname); cmd.Append("; CREATE VIEW "); cmd.Append(viewname); cmd.Append(" AS "); outercmd.Append("SELECT "); } cmd.Append("SELECT "); if (!SupportsLimitClause && options.Limit > 0) { cmd.Append("TOP "); cmd.Append(options.Limit); cmd.Append(' '); } if (useDistinct) cmd.Append("DISTINCT "); for (int i = 0; i < varOrder.Length; i++) { if (i > 0) cmd.Append(','); cmd.Append((string)varRef_Inner[varOrder[i]]); StringBuilder c = cmd; if (useView) { cmd.Append(" AS "); cmd.Append((string)varRef_Outer[varOrder[i]]); if (i > 0) outercmd.Append(','); outercmd.Append((string)varRef_Outer[varOrder[i]]); c = outercmd; } c.Append(", vent" + (int)varRef2[varOrder[i]] + ".value"); if ((bool)varSelectedLiteral[varOrder[i]]) { c.Append(", vlit" + (int)varRef2[varOrder[i]] + ".value"); c.Append(", vlit" + (int)varRef2[varOrder[i]] + ".language"); c.Append(", vlit" + (int)varRef2[varOrder[i]] + ".datatype"); } } cmd.Append(" FROM "); cmd.Append(fromClause.ToString()); if (whereClause.Length > 0) cmd.Append(" WHERE "); cmd.Append(whereClause.ToString()); if (SupportsLimitClause && options.Limit > 0) { cmd.Append(" LIMIT "); cmd.Append(options.Limit); } cmd.Append(';'); if (useView) { outercmd.Append(" FROM "); outercmd.Append(viewname); outercmd.Append(outerSelectJoins); if (outerWhereClause.Length > 0) outercmd.Append(" WHERE "); outercmd.Append(outerWhereClause.ToString()); } if (Debug) { string cmd2 = cmd.ToString(); //if (cmd2.Length > 80) cmd2 = cmd2.Substring(0, 80); Console.Error.WriteLine(cmd2); if (useView) Console.Error.WriteLine(outercmd.ToString()); } // Execute the query Hashtable entityCache = new Hashtable(); if (useView) { RunCommand(cmd.ToString()); cmd = outercmd; } try { using (IDataReader reader = RunReader(cmd.ToString())) { while (reader.Read()) { Resource[] variableBindings = new Resource[varOrder.Length]; int col = 0; for (int i = 0; i < varOrder.Length; i++) { int id = reader.GetInt32(col++); string uri = AsString(reader[col++]); string litvalue = null, litlanguage = null, litdatatype = null; if ((bool)varSelectedLiteral[varOrder[i]]) { litvalue = AsString(reader[col++]); litlanguage = AsString(reader[col++]); litdatatype = AsString(reader[col++]); } if (litvalue != null) { Literal lit = new Literal(litvalue, litlanguage, litdatatype); variableBindings[i] = lit; ArrayList litFilters = (ArrayList)varLitFilters[varOrder[i]]; if (litFilters != null && !LiteralFilter.MatchesFilters(lit, (LiteralFilter[])litFilters.ToArray(typeof(LiteralFilter)), this)) continue; } else { variableBindings[i] = MakeEntity(id, uri, entityCache); } } if (!sink.Add(new SemWeb.Query.VariableBindings(varOrder, variableBindings))) return; } } } finally { if (useView) RunCommand("DROP VIEW " + viewname); sink.Finished(); } } // lock } Entity GetSelectedEntity(int id, string uri, Resource given, bool idSelected, bool uriSelected, Hashtable entMap) { if (!idSelected) return (Entity)given; if (!uriSelected) { Entity ent = (Entity)entMap[id]; if (ent != null) return ent; // had a URI so was precached, or was otherwise precached else // didn't have a URI return MakeEntity(id, null, entMap); } return MakeEntity(id, uri, entMap); } Resource GetSelectedResource(int id, int type, string uri, string lv, string ll, string ld, Resource given, bool idSelected, bool uriSelected, Hashtable entMap) { if (!idSelected) return (Resource)given; if (!uriSelected) return (Resource)entMap[id]; if (type == 0) return MakeEntity(id, uri, entMap); else return new Literal(lv, ll, ld); } private string CreateLikeTest(string column, string match, int method) { StringBuilder s = new StringBuilder(); CreateLikeTest(column, match, method, s); return s.ToString(); } private string FilterToSQL(LiteralFilter filter, string col) { if (filter is SemWeb.Filters.StringCompareFilter) { SemWeb.Filters.StringCompareFilter f = (SemWeb.Filters.StringCompareFilter)filter; return col + FilterOpToSQL(f.Type) + Escape(f.Pattern, true); } if (filter is SemWeb.Filters.StringContainsFilter) { SemWeb.Filters.StringContainsFilter f = (SemWeb.Filters.StringContainsFilter)filter; return CreateLikeTest(col, f.Pattern, 1); // 1=contains } if (filter is SemWeb.Filters.StringStartsWithFilter) { SemWeb.Filters.StringStartsWithFilter f = (SemWeb.Filters.StringStartsWithFilter)filter; return CreateLikeTest(col, f.Pattern, 0); // 0=starts-with } if (filter is SemWeb.Filters.StringEndsWithFilter) { SemWeb.Filters.StringEndsWithFilter f = (SemWeb.Filters.StringEndsWithFilter)filter; return CreateLikeTest(col, f.Pattern, 2); // 2==ends-with } if (filter is SemWeb.Filters.NumericCompareFilter) { SemWeb.Filters.NumericCompareFilter f = (SemWeb.Filters.NumericCompareFilter)filter; return col + FilterOpToSQL(f.Type) + f.Number; } return null; } private string FilterOpToSQL(LiteralFilter.CompType op) { switch (op) { case LiteralFilter.CompType.LT: return " < "; case LiteralFilter.CompType.LE: return " <= "; case LiteralFilter.CompType.NE: return " <> "; case LiteralFilter.CompType.EQ: return " = "; case LiteralFilter.CompType.GT: return " > "; case LiteralFilter.CompType.GE: return " >= "; default: throw new ArgumentException(op.ToString()); } } private string Escape(string str, bool quotes) { if (str == null) return "NULL"; StringBuilder b = new StringBuilder(); EscapedAppend(b, str, quotes, false); return b.ToString(); } protected void EscapedAppend(StringBuilder b, string str) { EscapedAppend(b, str, true, false); } protected virtual char GetQuoteChar() { return '\"'; } protected virtual void EscapedAppend(StringBuilder b, string str, bool quotes, bool forLike) { if (quotes) b.Append(quote); for (int i = 0; i < str.Length; i++) { char c = str[i]; switch (c) { case '\n': b.Append("\\n"); break; case '\\': case '\"': case '*': case '\'': b.Append('\\'); b.Append(c); break; case '%': case '_': if (forLike) b.Append('\\'); b.Append(c); break; default: b.Append(c); break; } } if (quotes) b.Append(quote); } /*internal static void Escape(StringBuilder b) { b.Replace("\\", "\\\\"); b.Replace("\"", "\\\""); b.Replace("\n", "\\n"); b.Replace("%", "\\%"); b.Replace("*", "\\*"); }*/ public void Import(StatementSource source) { if (source == null) throw new ArgumentNullException(); if (isImporting) throw new InvalidOperationException("Store is already importing."); Init(); RunAddBuffer(); cachedNextId = -1; NextId(); // get this before starting transaction because it relies on indexes which may be disabled addStatementBuffer = new StatementList(); BeginTransaction(); try { isImporting = true; source.Select(this); } finally { RunAddBuffer(); EndTransaction(); addStatementBuffer = null; isImporting = false; entityCache.Clear(); literalCache.Clear(); } } public void Replace(Entity a, Entity b) { Init(); RunAddBuffer(); int id = GetResourceId(b, true); foreach (string col in fourcols) { StringBuilder cmd = new StringBuilder(); cmd.Append("UPDATE "); cmd.Append(table); cmd.Append("_statements SET "); cmd.Append(col); cmd.Append('='); cmd.Append(id); if (!WhereItem(col, a, cmd, false)) return; cmd.Append(';'); RunCommand(cmd.ToString()); } } public void Replace(Statement find, Statement replacement) { if (find.AnyNull) throw new ArgumentNullException("find"); if (replacement.AnyNull) throw new ArgumentNullException("replacement"); if (find == replacement) return; Init(); RunAddBuffer(); int subj = GetResourceId(replacement.Subject, true); int pred = GetResourceId(replacement.Predicate, true); int objtype = ObjectType(replacement.Object); int obj = GetResourceId(replacement.Object, true); int meta = GetResourceId(replacement.Meta, true); StringBuilder cmd = cmdBuffer; cmd.Length = 0; cmd.Append("UPDATE "); cmd.Append(table); cmd.Append("_statements SET subject="); cmd.Append(subj); cmd.Append(", predicate="); cmd.Append(pred); cmd.Append(", objecttype="); cmd.Append(objtype); cmd.Append(", object="); cmd.Append(obj); cmd.Append(", meta="); cmd.Append(meta); cmd.Append(' '); if (!WhereClause(find, cmd)) return; RunCommand(cmd.ToString()); } private object GetResourceKey(Resource resource) { return resource.GetResourceKey(this); } private void SetResourceKey(Resource resource, object value) { resource.SetResourceKey(this, value); } protected abstract void RunCommand(string sql); protected abstract object RunScalar(string sql); protected abstract IDataReader RunReader(string sql); private int RunScalarInt(string sql, int def) { object ret = RunScalar(sql); if (ret == null) return def; if (ret is int) return (int)ret; try { return int.Parse(ret.ToString()); } catch (FormatException) { return def; } } private string RunScalarString(string sql) { object ret = RunScalar(sql); if (ret == null) return null; if (ret is string) return (string)ret; if (ret is byte[]) return System.Text.Encoding.UTF8.GetString((byte[])ret); throw new FormatException("SQL store returned a literal value as " + ret); } void IDisposable.Dispose() { Close(); } public virtual void Close() { if (statementsRemoved) { RunCommand("DELETE FROM " + table + "_literals where (select count(*) from " + table + "_statements where object=id) = 0 and id > 0"); RunCommand("DELETE FROM " + table + "_entities where (select count(*) from " + table + "_statements where subject=id) = 0 and (select count(*) from " + table + "_statements where predicate=id) = 0 and (select count(*) from " + table + "_statements where object=id) = 0 and (select count(*) from " + table + "_statements where meta=id) = 0 ;"); } } protected virtual void CreateTable() { foreach (string cmd in GetCreateTableCommands(table)) { try { RunCommand(cmd); } catch (Exception e) { if (Debug && e.Message.IndexOf("already exists") == -1) Console.Error.WriteLine(e); } } } protected virtual void CreateIndexes() { foreach (string cmd in GetCreateIndexCommands(table)) { try { RunCommand(cmd); } catch (Exception e) { if (Debug) Console.Error.WriteLine(e); } } } protected virtual void BeginTransaction() { } protected virtual void EndTransaction() { } internal static string[] GetCreateTableCommands(string table) { return new string[] { "CREATE TABLE " + table + "_statements" + "(subject int UNSIGNED NOT NULL, predicate int UNSIGNED NOT NULL, objecttype int NOT NULL, object int UNSIGNED NOT NULL, meta int UNSIGNED NOT NULL);", "CREATE TABLE " + table + "_literals" + "(id INT NOT NULL, value BLOB NOT NULL, language TEXT, datatype TEXT, hash BINARY(28), PRIMARY KEY(id));", "CREATE TABLE " + table + "_entities" + "(id INT NOT NULL, value BLOB NOT NULL, PRIMARY KEY(id));" }; } internal static string[] GetCreateIndexCommands(string table) { return new string[] { "CREATE UNIQUE INDEX subject_full_index ON " + table + "_statements(subject, predicate, object, meta, objecttype);", "CREATE INDEX predicate_index ON " + table + "_statements(predicate, object);", "CREATE INDEX object_index ON " + table + "_statements(object);", "CREATE INDEX meta_index ON " + table + "_statements(meta);", "CREATE UNIQUE INDEX literal_index ON " + table + "_literals(hash);", "CREATE INDEX literal_value_index ON " + table + "_literals(value(20));", "CREATE UNIQUE INDEX entity_index ON " + table + "_entities(value(255));" }; } } } semweb-1.05+dfsg/src/SemWeb.Sparql.csproj0000644000175000017500000000556410774502134017607 0ustar meebeymeebey Debug AnyCPU 8.0.50727 2.0 {0338860C-C4DA-4D8D-9610-6BBA2244F748} Library Properties SemWeb.Sparql SemWeb.Sparql true full false bin\Debug\ TRACE;DEBUG;DOTNET2 prompt 4 pdbonly true ..\bin\ TRACE;DOTNET2 prompt 4 False ..\bin\IKVM.GNU.Classpath.dll False ..\bin\IKVM.Runtime.dll False ..\bin\sparql-core.dll {98EA8780-0045-41A4-BAA1-575582B92BCC} SemWeb semweb-1.05+dfsg/src/SQLiteStore.cs0000644000175000017500000001012510774502134016434 0ustar meebeymeebeyusing System; using System.Collections; using System.Text; using System.Data; using Mono.Data.SqliteClient; namespace SemWeb.Stores { public class SqliteStore : SQLStore { string connectionString; SqliteConnection dbcon; bool debug = false; public SqliteStore(string connectionString, string table) : base(table) { this.connectionString = connectionString; dbcon = new SqliteConnection(connectionString); dbcon.Open(); } protected override bool HasUniqueStatementsConstraint { get { return dbcon.Version == 3; } } protected override string InsertIgnoreCommand { get { return "OR IGNORE"; } } protected override bool SupportsInsertCombined { get { return false; } } protected override bool SupportsSubquery { get { return false; } } protected override void CreateNullTest(string column, System.Text.StringBuilder command) { command.Append(column); command.Append(" ISNULL"); } protected override void CreateLikeTest(string column, string match, int method, System.Text.StringBuilder command) { command.Append(column); command.Append(" LIKE '"); if (method == 1 || method == 2) command.Append("%"); // contains or ends-with EscapedAppend(command, match, false, true); if (method != 2) command.Append("%"); // contains or starts-with command.Append("' ESCAPE '\\'"); } protected override void EscapedAppend(StringBuilder b, string str, bool quotes, bool forLike) { if (quotes) b.Append('\''); for (int i = 0; i < str.Length; i++) { char c = str[i]; switch (c) { case '\'': b.Append(c); b.Append(c); break; case '%': case '_': if (forLike) b.Append('\\'); b.Append(c); break; default: b.Append(c); break; } } if (quotes) b.Append('\''); } public override void Close() { dbcon.Close(); } protected override void RunCommand(string sql) { if (debug) Console.Error.WriteLine(sql); IDbCommand dbcmd = dbcon.CreateCommand(); dbcmd.CommandText = sql; dbcmd.ExecuteNonQuery(); dbcmd.Dispose(); } protected override object RunScalar(string sql) { if (debug) Console.Error.Write(sql); IDbCommand dbcmd = dbcon.CreateCommand(); dbcmd.CommandText = sql; object ret = dbcmd.ExecuteScalar(); dbcmd.Dispose(); if (debug) Console.Error.WriteLine(" => " + ret); return ret; } protected override IDataReader RunReader(string sql) { if (debug) Console.Error.WriteLine(sql); IDbCommand dbcmd = dbcon.CreateCommand(); dbcmd.CommandText = sql; IDataReader reader = dbcmd.ExecuteReader(); dbcmd.Dispose(); return reader; } protected override void BeginTransaction() { RunCommand("BEGIN"); RunCommand("DROP INDEX subject_index"); RunCommand("DROP INDEX predicate_index"); RunCommand("DROP INDEX object_index"); RunCommand("DROP INDEX meta_index"); } protected override void EndTransaction() { RunCommand("END"); CreateIndexes(); } protected override void CreateIndexes() { foreach (string cmd in GetCreateIndexCommands(TableName, dbcon.Version)) { try { RunCommand(cmd); } catch (Exception) { // creating an index with the same name as an existing one, even with IF NOT EXISTS, // causes the data adapter to throw an exception. } } } static ArrayList GetCreateIndexCommands(string table, int ver) { ArrayList ret = new ArrayList(); ret.AddRange(new string[] { "CREATE INDEX IF NOT EXISTS subject_index ON " + table + "_statements(subject);", "CREATE INDEX IF NOT EXISTS predicate_index ON " + table + "_statements(predicate);", "CREATE INDEX IF NOT EXISTS object_index ON " + table + "_statements(object);", "CREATE INDEX IF NOT EXISTS meta_index ON " + table + "_statements(meta);", "CREATE UNIQUE INDEX IF NOT EXISTS literal_index ON " + table + "_literals(hash);", "CREATE UNIQUE INDEX IF NOT EXISTS entity_index ON " + table + "_entities(value);" }); if (ver == 3) ret.Add("CREATE UNIQUE INDEX IF NOT EXISTS full_index ON " + table + "_statements(subject,predicate,object,meta);"); return ret; } } } semweb-1.05+dfsg/src/Interfaces.cs0000644000175000017500000000336510774502134016351 0ustar meebeymeebeyusing System; using System.Collections; using System.Data; using SemWeb.Util; namespace SemWeb { public interface StatementSource { bool Distinct { get; } void Select(StatementSink sink); } public interface SelectableSource : StatementSource { bool Contains(Resource resource); bool Contains(Statement template); void Select(Statement template, StatementSink sink); void Select(SelectFilter filter, StatementSink sink); } public interface QueryableSource : SelectableSource { SemWeb.Query.MetaQueryResult MetaQuery(Statement[] graph, SemWeb.Query.QueryOptions options); void Query(Statement[] graph, SemWeb.Query.QueryOptions options, SemWeb.Query.QueryResultSink sink); } public interface StaticSource : SelectableSource { int StatementCount { get; } Entity[] GetEntities(); Entity[] GetPredicates(); Entity[] GetMetas(); string GetPersistentBNodeId(BNode node); BNode GetBNodeFromPersistentId(string persistentId); } public interface StatementSink { bool Add(Statement statement); } public interface ModifiableSource : SelectableSource, StatementSink { void Clear(); void Import(StatementSource source); void Remove(Statement template); void RemoveAll(Statement[] templates); void Replace(Entity find, Entity replacement); void Replace(Statement find, Statement replacement); } internal class StatementCounterSink : StatementSink { int counter = 0; public int StatementCount { get { return counter; } } public bool Add(Statement statement) { counter++; return true; } } internal class StatementExistsSink : StatementSink { bool exists = false; public bool Exists { get { return exists; } } public bool Add(Statement statement) { exists = true; return false; } } }semweb-1.05+dfsg/src/semweb.mdp0000600000175000017500000000755510774502134015720 0ustar meebeymeebey semweb-1.05+dfsg/src/sparql.mdp0000600000175000017500000000440210774502134015724 0ustar meebeymeebey semweb-1.05+dfsg/src/BDBStore.cs0000644000175000017500000001554410774502134015674 0ustar meebeymeebeyusing System; using System.Collections; using System.IO; using BDB; using SemWeb.Util; namespace SemWeb.Stores { public class BDBStore : Store, IDisposable { BDB43.Env env; BDB43 db_id_to_value; BDB43 db_value_to_id; BDB43 db_statements_index; uint lastid = 0; long count = 0; Hashtable importIndexCache = new Hashtable(); public BDBStore(string directory) { if (!Directory.Exists(directory)) Directory.CreateDirectory(directory); env = new BDB43.Env(directory); bool create = true; db_id_to_value = new BDB43("id_to_value", create, DBFormat.Hash, false, env); db_value_to_id = new BDB43("value_to_id", create, DBFormat.Hash, false, env); db_statements_index = new BDB43("statements_index", create, DBFormat.Hash, false, env); db_id_to_value.KeyType = BDB.DataType.UInt; db_id_to_value.ValueType = BDB.DataType.String; db_value_to_id.KeyType = BDB.DataType.String; db_value_to_id.ValueType = BDB.DataType.UInt; db_statements_index.KeyType = BDB.DataType.UInt; db_statements_index.ValueType = BDB.DataType.IntArray; } public void Dispose() { StoreImportIndexCache(); db_id_to_value.Close(); db_value_to_id.Close(); db_statements_index.Close(); env.Dispose(); } public override bool Distinct { get { return false; } } public override int StatementCount { get { return (int)count; } } public override void Clear() { db_id_to_value.Truncate(); db_value_to_id.Truncate(); db_statements_index.Truncate(); } struct Quad { public int S, P, O, M; public static Quad Deserialize(int[] data, int index) { Quad q = new Quad(); q.S = data[index+0]; q.P = data[index+1]; q.O = data[index+2]; q.M = data[index+3]; return q; } public uint this[int index] { get { switch (index) { case 0: return (uint)S; case 1: return (uint)P; case 2: return (uint)O; case 3: return (uint)M; default: throw new ArgumentException(); } } } } Quad QuadFromStatement(Statement s, bool create) { Quad q = new Quad(); q.S = (int)GetResKey(s.Subject, create); q.P = (int)GetResKey(s.Predicate, create); q.O = (int)GetResKey(s.Object, create); q.M = (int)GetResKey(s.Meta, create); return q; } uint GetResKey(Resource r, bool create) { if (r == null) return 0; if ((object)r == (object)Statement.DefaultMeta) return 1; object keyobj = GetResourceKey(r); if (keyobj != null) return (uint)keyobj; uint key = 0; string stringval = null; if (r is Literal) { stringval = "L" + r.ToString(); } else if (r.Uri != null) { stringval = "U" + r.Uri; } if (stringval != null) { keyobj = db_value_to_id.Get(stringval); if (keyobj != null) key = (uint)keyobj; } if (key == 0) { if (!create) return 0; lastid++; key = lastid; SetResourceKey(r, key); if (stringval != null) { db_id_to_value.Put(key, stringval); db_value_to_id.Put(stringval, key); } } return key; } Statement QuadToStatement(Quad q, Hashtable createdResources) { return new Statement( (Entity)GetRes((uint)q.S, createdResources), (Entity)GetRes((uint)q.P, createdResources), GetRes((uint)q.O, createdResources), (Entity)GetRes((uint)q.M, createdResources) ); } Resource GetRes(uint key, Hashtable createdResources) { if (key == 1) return Statement.DefaultMeta; if (createdResources.ContainsKey(key)) return (Resource)createdResources[key]; Resource ret; string stringval = (string)db_id_to_value.Get(key); if (stringval == null) // must be a bnode ret = new BNode(); else if (stringval[0] == 'L') ret = Literal.Parse(stringval.Substring(1), null); else if (stringval[0] == 'U') ret = new Entity(stringval.Substring(1)); else throw new InvalidOperationException(); SetResourceKey(ret, key); createdResources[key] = ret; return ret; } public override void Add(Statement statement) { if (statement.AnyNull) throw new ArgumentNullException(); Quad q = QuadFromStatement(statement, true); for (int i = 0; i < 4; i++) Add(q, i); } void Add(Quad q, int index) { uint resid = q[index]; uint indexid = resid<<2 + index; int[] stmts = null; stmts = (int[])db_statements_index.Get(indexid); if (stmts == null) { stmts = new int[1 + 10*4]; stmts[0] = 0; } if ((stmts[0]+1) * 4 + 1 > stmts.Length) { int[] nstmts = new int[stmts.Length + 4 + stmts.Length/2]; stmts.CopyTo(nstmts, 0); stmts = nstmts; } int idx = 1 + stmts[0] * 4; stmts[0]++; stmts[idx+0] = q.S; stmts[idx+1] = q.P; stmts[idx+2] = q.O; stmts[idx+3] = q.M; db_statements_index.Put(indexid, stmts); count++; } void StoreImportIndexCache() { foreach (DictionaryEntry ent in importIndexCache) db_statements_index.Put(ent.Key, ent.Value); importIndexCache.Clear(); } public override void Select(SelectFilter filter, StatementSink sink) { throw new NotImplementedException(); } public override void Select(Statement template, StatementSink sink) { if (template == Statement.All) throw new NotImplementedException(); else SelectSome(template, sink); } void SelectSome(Statement template, StatementSink sink) { // Get a cursor over the first non-null component of template. int[] stmts; if (template.Subject != null) stmts = GetStatements(template.Subject, 0); else if (template.Predicate != null) stmts = GetStatements(template.Predicate, 1); else if (template.Object != null) stmts = GetStatements(template.Object, 2); else if (template.Meta != null) stmts = GetStatements(template.Meta, 3); else throw new InvalidOperationException(); if (stmts == null) return; Hashtable createdResources = new Hashtable(); for (int i = 0; i < stmts[0]; i++) { Quad q = Quad.Deserialize(stmts, 1 + i*4); Statement s = QuadToStatement(q, createdResources); if (template.Matches(s)) { if (!sink.Add(s)) return; } } } int[] GetStatements(Resource res, int index) { uint resid = GetResKey(res, false); if (resid == 0) return null; uint indexid = resid<<2 + index; return (int[])db_statements_index.Get(indexid); } public override void Remove(Statement statement) { if (statement == Statement.All) { Clear(); return; } throw new NotImplementedException(); } public override Entity[] GetEntities() { throw new NotImplementedException(); } public override Entity[] GetPredicates() { throw new NotImplementedException(); } public override Entity[] GetMetas() { throw new NotImplementedException(); } } } semweb-1.05+dfsg/src/SparqlEngine.cs~0000644000175000017500000012267110774502134017056 0ustar meebeymeebeyusing System; using System.Collections; using System.IO; using SemWeb; using SemWeb.Stores; using name.levering.ryan.sparql.parser; using name.levering.ryan.sparql.parser.model; using name.levering.ryan.sparql.model; using name.levering.ryan.sparql.model.data; using name.levering.ryan.sparql.common; using name.levering.ryan.sparql.common.impl; using name.levering.ryan.sparql.logic.expression; using name.levering.ryan.sparql.logic.function; using SemWebVariable = SemWeb.Variable; using SparqlVariable = name.levering.ryan.sparql.common.Variable; using ExpressionLogic = name.levering.ryan.sparql.model.logic.ExpressionLogic; #if !DOTNET2 using VariableList = System.Collections.ArrayList; using VarKnownValuesType = System.Collections.Hashtable; using VarKnownValuesList = System.Collections.ArrayList; using LitFilterList = System.Collections.ArrayList; using LitFilterMap = System.Collections.Hashtable; #else using VariableList = System.Collections.Generic.List; using VarKnownValuesType = System.Collections.Generic.Dictionary>; using VarKnownValuesList = System.Collections.Generic.List; using LitFilterList = System.Collections.Generic.List; using LitFilterMap = System.Collections.Generic.Dictionary>; #endif namespace SemWeb.Query { public class SparqlEngine : SemWeb.Query.Query { private const string BNodePersistUri = "tag:taubz.for.net,2005:bnode_persist_uri/"; string queryString; name.levering.ryan.sparql.parser.model.QueryNode query; ArrayList extFunctions = new ArrayList(); public bool AllowPersistBNodes = false; string preferredMimeType = null; public enum QueryType { Ask, Construct, Describe, Select } /* CONSTRUCTORS */ public SparqlEngine(TextReader query) : this(query.ReadToEnd()) { } public SparqlEngine(string query) { queryString = query; try { this.query = (name.levering.ryan.sparql.parser.model.QueryNode)SPARQLParser.parse(new java.io.StringReader(query)); if (this.query is SelectQuery) { SelectQuery sq = (SelectQuery)this.query; ReturnLimit = sq.getLimit(); ReturnStart = sq.getOffset(); } } catch (TokenMgrError e) { throw new QueryFormatException("SPARQL syntax error at: " + e.Message); } catch (ParseException e) { throw new QueryFormatException("SPARQL syntax error: " + e.getMessage()); } extFunctions.Add(new TestFunction()); extFunctions.Add(new LCFunction()); extFunctions.Add(new UCFunction()); } /* QUERY TYPE AND OUTPUT CONTROL PROPERTIES */ public QueryType Type { get { if (query is AskQuery) return QueryType.Ask; if (query is ConstructQuery) return QueryType.Construct; if (query is DescribeQuery) return QueryType.Describe; if (query is SelectQuery) return QueryType.Select; throw new NotSupportedException("Query is of an unsupported type."); } } public override string MimeType { get { if (preferredMimeType == null) { if (query is AskQuery) return SparqlXmlQuerySink.MimeType; if (query is ConstructQuery) return "application/rdf+xml"; if (query is DescribeQuery) return "application/rdf+xml"; if (query is SelectQuery) return SparqlXmlQuerySink.MimeType; throw new NotSupportedException("Query is of an unsupported type."); } else { return preferredMimeType; } } set { if ((query is AskQuery || query is SelectQuery) && value != SparqlXmlQuerySink.MimeType) throw new NotSupportedException("That MIME type is not supported for ASK or SELECT queries."); if (query is ConstructQuery || query is DescribeQuery) { // this throws if we don't recognize the type RdfWriter.Create(value, TextWriter.Null); } preferredMimeType = value; } } /* QUERY EXECUTION CONTROL METHODS */ public void AddExternalFunction(RdfFunction function) { extFunctions.Add(function); } public override string GetExplanation() { return query.ToString(); } /* QUERY EXECUTION METHODS */ public override void Run(SelectableSource source, TextWriter output) { if (query is AskQuery) Ask(source, output); else if (query is ConstructQuery) Construct(source, output); else if (query is DescribeQuery) Describe(source, output); else if (query is SelectQuery) Select(source, output); else throw new NotSupportedException("Query is of an unsupported type."); } public bool Ask(SelectableSource source) { if (!(query is AskQuery)) throw new InvalidOperationException("Only ASK queries are supported by this method (" + query.GetType() + ")."); AskQuery q = (AskQuery)query; RdfSourceWrapper sourcewrapper = BindLogic(source); try { return q.execute(sourcewrapper); } catch (name.levering.ryan.sparql.common.QueryException e) { throw new QueryExecutionException("Error executing query: " + e.Message, e); } } public void Ask(SelectableSource source, TextWriter output) { bool result = Ask(source); System.Xml.XmlTextWriter w = new System.Xml.XmlTextWriter(output); w.Formatting = System.Xml.Formatting.Indented; w.WriteStartElement("sparql"); w.WriteAttributeString("xmlns", "http://www.w3.org/2001/sw/DataAccess/rf1/result"); w.WriteStartElement("head"); w.WriteEndElement(); w.WriteStartElement("boolean"); w.WriteString(result ? "true" : "false"); w.WriteEndElement(); w.WriteEndElement(); w.Flush(); } public void Construct(SelectableSource source, StatementSink sink) { if (!(query is ConstructQuery)) throw new InvalidOperationException("Only CONSTRUCT queries are supported by this method (" + query.GetType() + ")."); ConstructQuery q = (ConstructQuery)query; RdfSourceWrapper sourcewrapper = BindLogic(source); try { RdfGraph graph = q.execute(sourcewrapper); WriteGraph(graph, sourcewrapper, sink); } catch (name.levering.ryan.sparql.common.QueryException e) { throw new QueryExecutionException("Error executing query: " + e.Message, e); } } public NamespaceManager GetQueryPrefixes() { NamespaceManager ns = new NamespaceManager(); java.util.Map prefixes = ((QueryData)query).getPrefixExpansions(); for (java.util.Iterator i = prefixes.keySet().iterator(); i.hasNext(); ) { string prefix = (string)i.next(); string uri = prefixes.get(prefix).ToString(); // surrounded in < > uri = uri.Substring(1, uri.Length-2); // not sure how to get this directly ns.AddNamespace(uri, prefix); } return ns; } void WriteGraph(RdfGraph graph, RdfSourceWrapper sourcewrapper, StatementSink sink) { if (sink is RdfWriter) ((RdfWriter)sink).Namespaces.AddFrom(GetQueryPrefixes()); java.util.Iterator iter = graph.iterator(); while (iter.hasNext()) { GraphStatement stmt = (GraphStatement)iter.next(); Statement s; if (stmt is GraphStatementWrapper) { s = ((GraphStatementWrapper)stmt).s; } else { s = new Statement( sourcewrapper.ToEntity(stmt.getSubject()), sourcewrapper.ToEntity(stmt.getPredicate()), sourcewrapper.ToResource(stmt.getObject()), stmt.getGraphName() == null ? Statement.DefaultMeta : sourcewrapper.ToEntity(stmt.getGraphName())); } if (s.AnyNull) continue; // unbound variable, or literal in bad position sink.Add(s); } } public void Construct(SelectableSource source, TextWriter output) { using (RdfWriter w = RdfWriter.Create(MimeType, output)) Construct(source, w); } public void Describe(SelectableSource source, StatementSink sink) { if (!(query is DescribeQuery)) throw new InvalidOperationException("Only DESCRIBE queries are supported by this method (" + query.GetType() + ")."); DescribeQuery q = (DescribeQuery)query; RdfSourceWrapper sourcewrapper = BindLogic(source); try { RdfGraph graph = q.execute(sourcewrapper); WriteGraph(graph, sourcewrapper, sink); } catch (name.levering.ryan.sparql.common.QueryException e) { throw new QueryExecutionException("Error executing query: " + e.Message, e); } } public void Describe(SelectableSource source, TextWriter output) { using (RdfWriter w = RdfWriter.Create(MimeType, output)) Describe(source, w); } public void Select(SelectableSource source, TextWriter output) { Select(source, new SparqlXmlQuerySink(output)); } public void Select(SelectableSource source, QueryResultSink sink) { if (!(query is SelectQuery)) throw new InvalidOperationException("Only SELECT queries are supported by this method (" + query.GetType() + ")."); Run(source, sink); } public override void Run(SelectableSource source, QueryResultSink resultsink) { if (!(query is SelectQuery)) throw new InvalidOperationException("Only SELECT queries are supported by this method (" + query.GetType() + ")."); // Perform the query SelectQuery squery = (SelectQuery)query; RdfSourceWrapper sourcewrapper = BindLogic(source); RdfBindingSet results; try { results = squery.execute(sourcewrapper); } catch (name.levering.ryan.sparql.common.QueryException e) { throw new QueryExecutionException("Error executing query: " + e.Message, e); } // Prepare binding objects java.util.List vars = results.getVariables(); SparqlVariable[] svars = new SparqlVariable[vars.size()]; SemWebVariable[] vars2 = new SemWebVariable[vars.size()]; for (int i = 0; i < svars.Length; i++) { svars[i] = (SparqlVariable)vars.get(i); vars2[i] = new SemWebVariable(svars[i].getName()); } // Initialize the result sink resultsink.Init(vars2); // set distinct and ordered // Set the comments resultsink.AddComments(queryString + "\n"); resultsink.AddComments(sourcewrapper.GetLog()); // Iterate the bindings java.util.Iterator iter = results.iterator(); long ctr = -1, ctr2 = 0; while (iter.hasNext()) { RdfBindingRow row = (RdfBindingRow)iter.next(); // Since SPARQL processing may be lazy-delayed, // add any new comments that might have been logged. resultsink.AddComments(sourcewrapper.GetLog()); ctr++; if (ctr < ReturnStart && ReturnStart != -1) continue; Resource[] bindings = new Resource[vars2.Length]; for (int i = 0; i < bindings.Length; i++) { Resource r = sourcewrapper.ToResource(row.getValue(svars[i])); r = sourcewrapper.Persist(r); bindings[i] = r; } resultsink.AddComments(sourcewrapper.GetLog()); resultsink.Add(new VariableBindings(vars2, bindings)); ctr2++; if (ctr2 >= ReturnLimit && ReturnLimit != -1) break; } resultsink.AddComments(sourcewrapper.GetLog()); // Close the result sink. resultsink.Finished(); } /* INTERNAL METHODS TO CONTROL QUERY EXECUTION */ private RdfSourceWrapper BindLogic(SelectableSource source) { RdfSourceWrapper sourcewrapper = new RdfSourceWrapper(source, QueryMeta, this); MyLogicFactory logic = new MyLogicFactory(); foreach (RdfFunction f in extFunctions) logic.registerExternalFunction( new URIWrapper(f.Uri), new ExtFuncWrapper(sourcewrapper, f)); query.prepare(sourcewrapper, logic); return sourcewrapper; } class MyLogicFactory : name.levering.ryan.sparql.logic.StreamedLogic { public override name.levering.ryan.sparql.model.logic.ConstraintLogic getGroupConstraintLogic(name.levering.ryan.sparql.model.data.GroupConstraintData data) { return new RdfGroupLogic(data, new name.levering.ryan.sparql.logic.streamed.IndexedSetIntersectLogic()); } } class RdfSourceWrapper : AdvancedRdfSource, SPARQLValueFactory { public readonly SelectableSource source; Hashtable bnodes = new Hashtable(); Entity QueryMeta; SparqlEngine sparql; System.Text.StringBuilder log = new System.Text.StringBuilder(); public RdfSourceWrapper(SelectableSource source, Entity meta, SparqlEngine sparql) { this.source = source; QueryMeta = meta; this.sparql = sparql; } public void Log(string message) { log.Append(message); log.Append('\n'); } public string GetLog() { string ret = log.ToString(); log.Length = 0; return ret; } private java.util.Iterator GetIterator(Statement statement, bool defaultGraph, int limit) { return GetIterator(statement.Subject == null ? null : new Entity[] { statement.Subject }, statement.Predicate == null ? null : new Entity[] { statement.Predicate }, statement.Object == null ? null : new Resource[] { statement.Object }, statement.Meta == null ? null : new Entity[] { statement.Meta }, null, defaultGraph, limit); } private java.util.Iterator GetIterator(Entity[] subjects, Entity[] predicates, Resource[] objects, Entity[] metas, object[] litFilters, bool defaultGraph, int limit) { if (subjects == null && predicates == null && objects == null && limit == -1) throw new QueryExecutionException("Query would select all statements in the store."); if (subjects != null) Depersist(subjects); if (predicates != null) Depersist(predicates); if (objects != null) Depersist(objects); if (metas != null) Depersist(metas); if (subjects != null && subjects.Length == 0) return new EmptyIterator(); if (predicates != null && predicates.Length == 0) return new EmptyIterator(); if (objects != null && objects.Length == 0) return new EmptyIterator(); if (metas != null && metas.Length == 0) return new EmptyIterator(); SelectFilter filter = new SelectFilter(subjects, predicates, objects, metas); if (litFilters != null) { filter.LiteralFilters = new LiteralFilter[litFilters.Length]; for (int i = 0; i < litFilters.Length; i++) filter.LiteralFilters[i] = (LiteralFilter)litFilters[i]; } if (limit == 0) filter.Limit = 1; else if (limit > 0) filter.Limit = limit; return new StatementIterator(source, filter, this, defaultGraph && metas == null); } /** * Gets all the statements that come from the default graph and have a * certain subject, predicate, and object. Any of the parameters can be * null, in which case it assumes these are "wildcards" and all statements * that match the remainding parameters will be returned. */ public java.util.Iterator getDefaultStatements (name.levering.ryan.sparql.common.Value subject, name.levering.ryan.sparql.common.URI predicate, name.levering.ryan.sparql.common.Value @object) { return GetIterator( new Statement(ToEntity(subject), ToEntity(predicate), ToResource(@object), QueryMeta), true, -1 ); } public java.util.Iterator getDefaultStatements (name.levering.ryan.sparql.common.Value[] subject, name.levering.ryan.sparql.common.Value[] predicate, name.levering.ryan.sparql.common.Value[] @object, object[] litFilters, int limit) { return GetIterator( ToEntities(subject), ToEntities(predicate), ToResources(@object), QueryMeta == null ? null : new Entity[] { QueryMeta }, litFilters, true, limit ); } /** * Gets all the statements that come from any graph and have a certain * subject, predicate, and object. Any of the parameters can be null, in * which case it assumes these are "wildcards" and all statements that match * the remainding parameters will be returned. * * @param the subj the subject to match statements against * @param pred the predicate to match statements against * @param obj the object to match statements against * @return an Iterator over the matching statements */ public java.util.Iterator getStatements (name.levering.ryan.sparql.common.Value subject, name.levering.ryan.sparql.common.URI predicate, name.levering.ryan.sparql.common.Value @object) { return GetIterator( new Statement(ToEntity(subject), ToEntity(predicate), ToResource(@object), null), false, -1 ); } public java.util.Iterator getStatements (name.levering.ryan.sparql.common.Value[] subject, name.levering.ryan.sparql.common.Value[] predicate, name.levering.ryan.sparql.common.Value[] @object, object[] litFilters, int limit) { return GetIterator( ToEntities(subject), ToEntities(predicate), ToResources(@object), null, litFilters, false, limit ); } /** * Gets all the statements that come from a particular named graph and have * a certain subject, predicate, and object. Any of the parameters can be * null, in which case it assumes these are "wildcards" and all statements * that match the remainding parameters will be returned. */ public java.util.Iterator getStatements (name.levering.ryan.sparql.common.Value subject, name.levering.ryan.sparql.common.URI predicate, name.levering.ryan.sparql.common.Value @object, name.levering.ryan.sparql.common.URI graph) { return GetIterator( new Statement(ToEntity(subject), ToEntity(predicate), ToResource(@object), ToEntity(graph)), false, -1 ); } public java.util.Iterator getStatements (name.levering.ryan.sparql.common.Value[] subject, name.levering.ryan.sparql.common.Value[] predicate, name.levering.ryan.sparql.common.Value[] @object, name.levering.ryan.sparql.common.URI[] graph, object[] litFilters, int limit) { return GetIterator( ToEntities(subject), ToEntities(predicate), ToResources(@object), ToEntities(graph), litFilters, false, limit ); } public name.levering.ryan.sparql.common.SPARQLValueFactory getValueFactory() { return this; } private bool has(Statement statement) { bool ret = source.Contains(statement); Log("CONTAINS: " + statement + " (" + ret + ")"); return ret; } public bool hasDefaultStatement (name.levering.ryan.sparql.common.Value subject, name.levering.ryan.sparql.common.URI @predicate, name.levering.ryan.sparql.common.Value @object) { return has(new Statement(ToEntity(subject), ToEntity(predicate), ToResource(@object), QueryMeta)); } public bool hasStatement (name.levering.ryan.sparql.common.Value subject, name.levering.ryan.sparql.common.URI @predicate, name.levering.ryan.sparql.common.Value @object) { return has(new Statement(ToEntity(subject), ToEntity(predicate), ToResource(@object), null)); } public bool hasStatement (name.levering.ryan.sparql.common.Value subject, name.levering.ryan.sparql.common.URI @predicate, name.levering.ryan.sparql.common.Value @object, name.levering.ryan.sparql.common.URI graph) { return has(new Statement(ToEntity(subject), ToEntity(predicate), ToResource(@object), ToEntity(graph))); } public Entity ToEntity(name.levering.ryan.sparql.common.Value ent) { if (ent == null) return null; if (ent is BNodeWrapper) return ((BNodeWrapper)ent).r; if (ent is URIWrapper) return ((URIWrapper)ent).r; if (ent is name.levering.ryan.sparql.common.BNode) { name.levering.ryan.sparql.common.BNode bnode = (name.levering.ryan.sparql.common.BNode)ent; Entity r = (Entity)bnodes[bnode.getID()]; if (r == null) { r = new BNode(); bnodes[bnode.getID()] = r; } return r; } else if (ent is name.levering.ryan.sparql.common.URI) { name.levering.ryan.sparql.common.URI uri = (name.levering.ryan.sparql.common.URI)ent; return new Entity(uri.getURI()); } else { return null; } } public Resource ToResource(name.levering.ryan.sparql.common.Value value) { if (value == null) return null; if (value is LiteralWrapper) return ((LiteralWrapper)value).r; if (value is name.levering.ryan.sparql.common.Literal) { name.levering.ryan.sparql.common.Literal literal = (name.levering.ryan.sparql.common.Literal)value; return new Literal(literal.getLabel(), literal.getLanguage(), literal.getDatatype() == null ? null : literal.getDatatype().getURI()); } else { return ToEntity(value); } } public Entity[] ToEntities(name.levering.ryan.sparql.common.Value[] ents) { if (ents == null) return null; ArrayList ret = new ArrayList(); for (int i = 0; i < ents.Length; i++) if (!(ents[i] is name.levering.ryan.sparql.common.Literal)) ret.Add( ToEntity(ents[i]) ); return (Entity[])ret.ToArray(typeof(Entity)); } public Resource[] ToResources(name.levering.ryan.sparql.common.Value[] ents) { if (ents == null) return null; Resource[] ret = new Resource[ents.Length]; for (int i = 0; i < ents.Length; i++) ret[i] = ToResource(ents[i]); return ret; } public Resource[] ToResources(name.levering.ryan.sparql.model.logic.ExpressionLogic[] ents, name.levering.ryan.sparql.common.RdfBindingRow binding) { if (ents == null) return null; Resource[] ret = new Resource[ents.Length]; for (int i = 0; i < ents.Length; i++) { if (ents[i] is SparqlVariable) ret[i] = ToResource(binding.getValue((SparqlVariable)ents[i])); else ret[i] = ToResource((name.levering.ryan.sparql.common.Value)ents[i]); } return ret; } public name.levering.ryan.sparql.common.Value createValue(name.levering.ryan.sparql.common.Value value) { throw new NotImplementedException(); } public name.levering.ryan.sparql.common.BNode createBNode(name.levering.ryan.sparql.common.BNode value) { throw new NotImplementedException(); } public name.levering.ryan.sparql.common.Literal createLiteral(name.levering.ryan.sparql.common.Literal value) { throw new NotImplementedException(); } public name.levering.ryan.sparql.common.URI createURI(name.levering.ryan.sparql.common.URI value) { throw new NotImplementedException(); } public name.levering.ryan.sparql.common.BNode createBNode() { return new BNodeWrapper(new BNode()); } public name.levering.ryan.sparql.common.BNode createBNode(string id) { return new BNodeWrapper(new BNode(id)); } public name.levering.ryan.sparql.common.Literal createLiteral(string value, string lang) { return new LiteralWrapper(new Literal(value, lang, null)); } public name.levering.ryan.sparql.common.Literal createLiteral(string value, name.levering.ryan.sparql.common.URI datatype) { return new LiteralWrapper(new Literal(value, null, datatype.getURI())); } public name.levering.ryan.sparql.common.Literal createLiteral(string value) { return new LiteralWrapper(new Literal(value)); } public name.levering.ryan.sparql.common.Literal createLiteral(float value) { return new LiteralWrapper(Literal.FromValue(value)); } public name.levering.ryan.sparql.common.Literal createLiteral(double value) { return new LiteralWrapper(Literal.FromValue(value)); } public name.levering.ryan.sparql.common.Literal createLiteral(byte value) { return new LiteralWrapper(Literal.FromValue(value)); } public name.levering.ryan.sparql.common.Literal createLiteral(short value) { return new LiteralWrapper(Literal.FromValue(value)); } public name.levering.ryan.sparql.common.Literal createLiteral(int value) { return new LiteralWrapper(Literal.FromValue(value)); } public name.levering.ryan.sparql.common.Literal createLiteral(long value) { return new LiteralWrapper(Literal.FromValue(value)); } public name.levering.ryan.sparql.common.Literal createLiteral(bool value) { return new LiteralWrapper(Literal.FromValue(value)); } public name.levering.ryan.sparql.common.URI createURI(string ns, string ln) { return createURI(ns + ln); } public name.levering.ryan.sparql.common.URI createURI(string uri) { return new URIWrapper(new Entity(uri)); } public name.levering.ryan.sparql.common.Statement createStatement (name.levering.ryan.sparql.common.Resource subject, name.levering.ryan.sparql.common.URI @predicate, name.levering.ryan.sparql.common.Value @object) { return new Stmt(subject, predicate, @object); } class Stmt : name.levering.ryan.sparql.common.Statement { name.levering.ryan.sparql.common.Resource subject; name.levering.ryan.sparql.common.URI predicate; name.levering.ryan.sparql.common.Value @object; public Stmt(name.levering.ryan.sparql.common.Resource subject, name.levering.ryan.sparql.common.URI @predicate, name.levering.ryan.sparql.common.Value @object) { this.subject = subject; this.predicate = predicate; this.@object = @object; } public name.levering.ryan.sparql.common.Resource getSubject() { return subject; } public name.levering.ryan.sparql.common.URI getPredicate() { return predicate; } public name.levering.ryan.sparql.common.Value getObject() { return @object; } public bool equals(object other) { name.levering.ryan.sparql.common.Statement s = (name.levering.ryan.sparql.common.Statement)other; return getSubject().Equals(s.getSubject()) && getPredicate().Equals(s.getPredicate()) && getObject().Equals(s.getObject()); } public int hashCode() { return getSubject().GetHashCode(); } } public void Depersist(Resource[] r) { for (int i = 0; i < r.Length; i++) r[i] = Depersist(r[i]); } public Resource Depersist(Resource r) { if (r.Uri == null || !sparql.AllowPersistBNodes) return r; if (!(source is StaticSource)) return r; if (!r.Uri.StartsWith(SparqlEngine.BNodePersistUri)) return r; StaticSource spb = (StaticSource)source; string uri = r.Uri; string id = uri.Substring(SparqlEngine.BNodePersistUri.Length); BNode node = spb.GetBNodeFromPersistentId(id); if (node != null) return node; return r; } public Resource Persist(Resource r) { if (!(r is BNode) || !sparql.AllowPersistBNodes) return r; if (!(source is StaticSource)) return r; StaticSource spb = (StaticSource)source; string id = spb.GetPersistentBNodeId((BNode)r); if (id == null) return r; return new Entity(SparqlEngine.BNodePersistUri + ":" + id); } public static name.levering.ryan.sparql.common.Value Wrap(Resource res, Hashtable cache) { if (cache.ContainsKey(res)) return (name.levering.ryan.sparql.common.Value)cache[res]; name.levering.ryan.sparql.common.Value value = Wrap(res); cache[res] = value; return value; } public static name.levering.ryan.sparql.common.Value Wrap(Resource res) { if (res is Literal) return new LiteralWrapper((Literal)res); else if (res.Uri == null) return new BNodeWrapper((BNode)res); else return new URIWrapper((Entity)res); } } class EmptyIterator : java.util.Iterator { public bool hasNext() { return false; } public object next() { throw new InvalidOperationException(); } public void remove() { throw new InvalidOperationException(); } } class StatementIterator : java.util.Iterator { SelectableSource source; SelectFilter filter; RdfSourceWrapper wrapper; bool wantMetas; Statement[] statements; int curindex = -1; Hashtable cache = new Hashtable(); public StatementIterator(SelectableSource source, SelectFilter filter, RdfSourceWrapper wrapper, bool wantMetas) { this.source = source; this.filter = filter; this.wrapper = wrapper; this.wantMetas = wantMetas; } public bool hasNext() { if (statements == null) { System.DateTime start = System.DateTime.Now; MemoryStore results = new MemoryStore(); StatementSink sink = results; if (!source.Distinct) sink = new SemWeb.Util.DistinctStatementsSink(results, !wantMetas); source.Select(filter, sink); wrapper.Log("SELECT: " + filter + " => " + results.StatementCount + " statements [" + (System.DateTime.Now-start) + "s]"); statements = results.ToArray(); } return curindex + 1 < statements.Length; } public object next() { curindex++; return new GraphStatementWrapper(statements[curindex], cache); } public void remove() { throw new InvalidOperationException(); } } class GraphStatementWrapper : GraphStatement { public readonly Statement s; name.levering.ryan.sparql.common.Value S; name.levering.ryan.sparql.common.URI P; name.levering.ryan.sparql.common.Value O; name.levering.ryan.sparql.common.URI G; public GraphStatementWrapper(Statement statement, Hashtable cache) { s = statement; S = RdfSourceWrapper.Wrap(s.Subject, cache); if (s.Predicate.Uri == null) throw new QueryExecutionException("Statement's predicate is a blank node."); P = RdfSourceWrapper.Wrap(s.Predicate, cache) as name.levering.ryan.sparql.common.URI; O = RdfSourceWrapper.Wrap(s.Object, cache); G = RdfSourceWrapper.Wrap(s.Meta, cache) as name.levering.ryan.sparql.common.URI; } public name.levering.ryan.sparql.common.URI getGraphName() { return G; } public name.levering.ryan.sparql.common.Value getSubject() { return S; } public name.levering.ryan.sparql.common.URI getPredicate() { return P; } public name.levering.ryan.sparql.common.Value getObject() { return O; } } class BNodeWrapper : java.lang.Object, name.levering.ryan.sparql.common.BNode { public BNode r; public BNodeWrapper(BNode res) { r = res; } public string getID() { if (r.LocalName != null) return r.LocalName; return r.GetHashCode().ToString(); } public override bool equals(object other) { if (other is BNodeWrapper) return r.Equals(((BNodeWrapper)other).r); if (other is name.levering.ryan.sparql.common.BNode) return getID().Equals(((name.levering.ryan.sparql.common.BNode)other).getID()); return false; } public override int hashCode() { if (r.LocalName != null) java.lang.String.instancehelper_hashCode(getID()); return r.GetHashCode(); } public object getNative() { return r; } } class URIWrapper : java.lang.Object, name.levering.ryan.sparql.common.URI { public Entity r; int hc; public URIWrapper(Entity res) { r = res; hc = java.lang.String.instancehelper_hashCode(r.Uri); } public string getURI() { return r.Uri; } public override string toString() { return r.Uri; } public override bool equals(object other) { if (other is URIWrapper) return r.Equals(((URIWrapper)other).r); else if (other is name.levering.ryan.sparql.common.URI) return r.Uri == ((name.levering.ryan.sparql.common.URI)other).getURI(); else return false; } public override int hashCode() { return hc; } public object getNative() { return r.Uri; } } class LiteralWrapper : java.lang.Object, name.levering.ryan.sparql.common.Literal { public Literal r; int hc; public LiteralWrapper(Literal res) { r = res; hc = java.lang.String.instancehelper_hashCode(r.Value); } public name.levering.ryan.sparql.common.URI getDatatype() { if (r.DataType == null) return null; return new URIWrapper(r.DataType); } public string getLabel() { return r.Value; } public string getLanguage() { return r.Language; } public override bool equals(object other) { if (other is LiteralWrapper) return r.Equals(((LiteralWrapper)other).r); else if (other is name.levering.ryan.sparql.common.Literal) return r.Equals(GetLiteral((name.levering.ryan.sparql.common.Literal)other)); return false; } public override int hashCode() { return hc; } static Literal GetLiteral(name.levering.ryan.sparql.common.Literal literal) { return new Literal(literal.getLabel(), literal.getLanguage(), literal.getDatatype() == null ? null : literal.getDatatype().getURI()); } public object getNative() { return r; } } class ExtFuncWrapper : name.levering.ryan.sparql.logic.function.ExternalFunctionFactory, name.levering.ryan.sparql.logic.function.ExternalFunction { RdfSourceWrapper source; RdfFunction func; public ExtFuncWrapper(RdfSourceWrapper s, RdfFunction f) { source = s; func = f; } public name.levering.ryan.sparql.logic.function.ExternalFunction create(name.levering.ryan.sparql.model.logic.LogicFactory logicfactory, name.levering.ryan.sparql.common.SPARQLValueFactory valuefactory) { return this; } public name.levering.ryan.sparql.common.Value evaluate(name.levering.ryan.sparql.model.logic.ExpressionLogic[] arguments, name.levering.ryan.sparql.common.RdfBindingRow binding) { try { Resource ret = func.Evaluate(source.ToResources(arguments, binding)); return RdfSourceWrapper.Wrap(ret); } catch (Exception e) { throw new name.levering.ryan.sparql.logic.function.ExternalFunctionException(e); } } } class RdfGroupLogic : name.levering.ryan.sparql.logic.AdvancedGroupConstraintLogic { public RdfGroupLogic(name.levering.ryan.sparql.model.data.GroupConstraintData data, name.levering.ryan.sparql.model.logic.helper.SetIntersectLogic logic) : base(data, logic) { } protected override RdfBindingSet runTripleConstraints(java.util.List tripleConstraints, RdfSource source, java.util.Collection defaultDatasets, java.util.Collection namedDatasets, java.util.Map knownValues, java.util.Map knownFilters, int limit) { RdfSourceWrapper s = (RdfSourceWrapper)source; if (s.source is QueryableSource) { QueryableSource qs = (QueryableSource)s.source; QueryOptions opts = new QueryOptions(); opts.Limit = 0; if (limit == 0) opts.Limit = 1; else if (limit > 0) opts.Limit = limit; opts.DistinguishedVariables = new VariableList(); opts.VariableKnownValues = new VarKnownValuesType(); Statement[] graph = new Statement[tripleConstraints.size()]; Hashtable varMap1 = new Hashtable(); Hashtable varMap2 = new Hashtable(); for (int i = 0; i < tripleConstraints.size(); i++) { TripleConstraintData triple = tripleConstraints.get(i) as TripleConstraintData; if (triple == null) return null; graph[i] = new Statement(null, null, null, null); // I don't understand why this should be necessary for a struct, but I get a null reference exception otherwise (yet, that didn't happen initially) graph[i].Subject = ToRes(triple.getSubjectExpression(), knownValues, true, varMap1, varMap2, s, opts) as Entity; graph[i].Predicate = ToRes(triple.getPredicateExpression(), knownValues, true, varMap1, varMap2, s, opts) as Entity; graph[i].Object = ToRes(triple.getObjectExpression(), knownValues, false, varMap1, varMap2, s, opts); graph[i].Meta = new Variable(); // TODO if (graph[i].AnyNull) return new RdfBindingSetImpl(); if (!(graph[i].Subject is Variable) && !(graph[i].Predicate is Variable) && !(graph[i].Object is Variable)) return null; // we could use Contains(), but we'll just abandon the Query() path altogether } opts.VariableLiteralFilters = new LitFilterMap(); foreach (DictionaryEntry kv in varMap1) { if (knownFilters != null && knownFilters.containsKey(kv.Key)) { LitFilterList filters = new LitFilterList(); for (java.util.Iterator iter = ((java.util.List)knownFilters.get(kv.Key)).iterator(); iter.hasNext(); ) filters.Add((LiteralFilter)iter.next()); opts.VariableLiteralFilters[(Variable)kv.Value] = filters; } } // too expensive to do... //if (!qs.MetaQuery(graph, opts).QuerySupported) // return null; // TODO: We could also check if any part has NoData, we can abandon the query entirely QueryResultBuilder builder = new QueryResultBuilder(); builder.varMap = varMap2; builder.source = s; qs.Query(graph, opts, builder); return builder.bindings; } return null; } class QueryResultBuilder : QueryResultSink { public Hashtable varMap; public RdfSourceWrapper source; public RdfBindingSetImpl bindings; public override void Init(Variable[] variables) { java.util.ArrayList vars = new java.util.ArrayList(); foreach (Variable b in variables) if (varMap[b] != null) // because of bad treatment of meta vars.add((SparqlVariable)varMap[b]); bindings = new RdfBindingSetImpl(vars); } public override bool Add(VariableBindings result) { RdfBindingRowImpl row = new RdfBindingRowImpl(bindings); for (int i = 0; i < result.Count; i++) { if (varMap[result.Variables[i]] == null) continue; // because of the bad treatment of meta row.addBinding( (SparqlVariable)varMap[result.Variables[i]], RdfSourceWrapper.Wrap(result.Values[i]) ); } bindings.addRow(row); return true; } public override void AddComments(string comments) { source.Log(comments); } } Resource ToRes(object expr, java.util.Map knownValues, bool entities, Hashtable varMap1, Hashtable varMap2, RdfSourceWrapper src, QueryOptions opts) { if (expr is SparqlVariable) { Variable v; if (varMap1.ContainsKey(expr)) { v = (Variable)varMap1[expr]; } else { v = new Variable(expr.ToString()); varMap1[expr] = v; varMap2[v] = expr; if (knownValues != null && knownValues.get(expr) != null) { java.util.Set values = (java.util.Set)knownValues.get(expr); VarKnownValuesList values2 = new VarKnownValuesList(); for (java.util.Iterator iter = values.iterator(); iter.hasNext(); ) { Resource r = src.ToResource((name.levering.ryan.sparql.common.Value)iter.next()); if (r != null) values2.Add(r); } opts.VariableKnownValues[v] = values2; } if (!(expr is name.levering.ryan.sparql.common.BNode)) ((VariableList)opts.DistinguishedVariables).Add(v); } return v; } return entities ? src.ToEntity((name.levering.ryan.sparql.common.Value)expr) : src.ToResource((name.levering.ryan.sparql.common.Value)expr); } protected override void extractLiteralFilters(name.levering.ryan.sparql.model.logic.ExpressionLogic node, java.util.Map literalFilters) { base.extractLiteralFilters(node, literalFilters); if (node is BinaryExpressionNode) { BinaryExpressionNode b = (BinaryExpressionNode)node; LiteralFilter.CompType comp; if (node is ASTEqualsNode) comp = LiteralFilter.CompType.EQ; else if (node is ASTNotEqualsNode) comp = LiteralFilter.CompType.NE; else if (node is ASTGreaterThanNode) comp = LiteralFilter.CompType.GT; else if (node is ASTGreaterThanEqualsNode) comp = LiteralFilter.CompType.GE; else if (node is ASTLessThanNode) comp = LiteralFilter.CompType.LT; else if (node is ASTLessThanEqualsNode) comp = LiteralFilter.CompType.LE; else return; SparqlVariable var; name.levering.ryan.sparql.common.Literal val; object left = RemoveCast(b.getLeftExpression()); object right = RemoveCast(b.getRightExpression()); if (left is ASTVar && right is name.levering.ryan.sparql.common.Literal) { var = (SparqlVariable)left; val = (name.levering.ryan.sparql.common.Literal)right; } else if (right is ASTVar && left is name.levering.ryan.sparql.common.Literal) { var = (SparqlVariable)right; val = (name.levering.ryan.sparql.common.Literal)left; switch (comp) { case LiteralFilter.CompType.LT: comp = LiteralFilter.CompType.GE; break; case LiteralFilter.CompType.LE: comp = LiteralFilter.CompType.GT; break; case LiteralFilter.CompType.GT: comp = LiteralFilter.CompType.LE; break; case LiteralFilter.CompType.GE: comp = LiteralFilter.CompType.LT; break; } } else { return; } object parsedvalue = new Literal(val.getLabel(), null, val.getDatatype() == null ? null : val.getDatatype().getURI()).ParseValue(); LiteralFilter filter = LiteralFilter.Create(comp, parsedvalue); addLiteralFilter(var, filter, literalFilters); } } object RemoveCast(object node) { if (node is ASTFunctionCall) { string name = ((ASTFunctionCall)node).getName(null).ToString(); if (name.StartsWith("http://www.w3.org/2001/XMLSchema#")) return RemoveCast(((ASTFunctionCall)node).getArguments().get(0)); } if (node is ASTMinusNode) { object inside = RemoveCast(((ASTMinusNode)node).getExpression()); if (inside is ASTLiteral) { string value = ((ASTLiteral)inside).getLabel(); double doublevalue = double.Parse(value); return new LiteralWrapper(new Literal((-doublevalue).ToString(), null, ((ASTLiteral)inside).getDatatype().getURI())); } } return node; } } class TestFunction : RdfFunction { public override string Uri { get { return "http://taubz.for.net/code/semweb/test/function"; } } public override Resource Evaluate(Resource[] args) { return Literal.FromValue(args.Length == 2 && args[0].Equals(args[1])); } } class LCFunction : RdfFunction { public override string Uri { get { return "http://taubz.for.net/code/semweb/test/lc"; } } public override Resource Evaluate(Resource[] args) { if (args.Length != 1 || !(args[0] is Literal)) throw new InvalidOperationException(); return new Literal(((Literal)args[0]).Value.ToLower()); } } class UCFunction : RdfFunction { public override string Uri { get { return "http://taubz.for.net/code/semweb/test/uc"; } } public override Resource Evaluate(Resource[] args) { if (args.Length != 1 || !(args[0] is Literal)) throw new InvalidOperationException(); return new Literal(((Literal)args[0]).Value.ToUpper()); } } } } semweb-1.05+dfsg/src/SparqlClient.cs0000644000175000017500000005372510774502134016674 0ustar meebeymeebeyusing System; using System.Collections; #if DOTNET2 using System.Collections.Generic; #endif using System.IO; using System.Text; using System.Web; using System.Xml; using SemWeb; using SemWeb.Query; using SemWeb.Util; namespace SemWeb.Remote { public interface SparqlSource { void RunSparqlQuery(string sparqlQuery, TextWriter output); void RunSparqlQuery(string sparqlQuery, out bool askResult); void RunSparqlQuery(string sparqlQuery, StatementSink statementResults); void RunSparqlQuery(string sparqlQuery, QueryResultSink selectResults); } public class SparqlHttpSource : QueryableSource, SparqlSource { static bool Debug = System.Environment.GetEnvironmentVariable("SEMWEB_DEBUG_HTTP") != null; string url; public SparqlHttpSource(string url) { this.url = url; } public bool Distinct { get { return false; } } public void RunSparqlQuery(string sparqlQuery, TextWriter output) { Load(sparqlQuery, output); } public void RunSparqlQuery(string sparqlQuery, out bool askResult) { BooleanWrap bw = new BooleanWrap(); Load(sparqlQuery, bw); askResult = bw.value; } public void RunSparqlQuery(string sparqlQuery, StatementSink statementResults) { Load(sparqlQuery, statementResults); } public void RunSparqlQuery(string sparqlQuery, QueryResultSink selectResults) { Load(sparqlQuery, selectResults); } public bool Contains(Resource resource) { throw new NotImplementedException(); } public bool Contains(Statement template) { return Select(template, null, true); } public void Select(StatementSink sink) { Select(Statement.All, sink); } public void Select(Statement template, StatementSink sink) { Select(template, sink, false); } bool Select(Statement template, StatementSink sink, bool ask) { return Select( template.Subject == null ? null : new Entity[] { template.Subject }, template.Predicate == null ? null : new Entity[] { template.Predicate }, template.Object == null ? null : new Resource[] { template.Object }, template.Meta == null ? null : new Entity[] { template.Meta }, null, 0, sink, ask ); } public void Select(SelectFilter filter, StatementSink sink) { Select(filter.Subjects, filter.Predicates, filter.Objects, filter.Metas, filter.LiteralFilters, filter.Limit, sink, false); } bool Select(Entity[] subjects, Entity[] predicates, Resource[] objects, Entity[] metas, LiteralFilter[] litFilters, int limit, StatementSink sink, bool ask) { // TODO: Change meta into named graphs. Anything but a null or DefaultMeta // meta returns no statements immediately. if (metas != null && (metas.Length != 1 || metas[0] != Statement.DefaultMeta)) return false; string query; bool nonull = false; if (subjects != null && subjects.Length == 1 && predicates != null && predicates.Length == 1 && objects != null && objects.Length == 1) { query = "ASK WHERE { " + S(subjects[0], null) + " " + S(predicates[0], null) + " " + S(objects[0], null) + "}"; nonull = true; } else { if (ask) query = "ASK { "; else query = "SELECT * WHERE { "; query += S(subjects, "subject"); query += " "; query += S(predicates, "predicate"); query += " "; query += S(objects, "object"); query += " . "; query += SL(subjects, "subject", false); query += SL(predicates, "predicate", false); query += SL(objects, "object", false); query += " }"; // TODO: Pass literal filters to server. } if (limit >= 1) query += " LIMIT " + limit; Statement d = new Statement( (subjects != null && subjects.Length == 1) ? subjects[0] : null, (predicates != null && predicates.Length == 1) ? predicates[0] : null, (objects != null && objects.Length == 1) ? objects[0] : null); if (ask || nonull) { BooleanWrap bw = new BooleanWrap(); Load(query, bw); if (ask) return bw.value; else if (bw.value) sink.Add(new Statement(subjects[0], predicates[0], objects[0])); return false; } else { Load(query, new QueryToStatements(sink, litFilters, d)); return true; } } class QueryToStatements : QueryResultSink { StatementSink sink; LiteralFilter[] litFilters; Statement d; int si = -1, pi = -1, oi = -1; public QueryToStatements(StatementSink sink, LiteralFilter[] litFilters, Statement d) { this.sink = sink; this.litFilters = litFilters; this.d = d; } public override void Init(Variable[] variables) { for (int i = 0; i < variables.Length; i++) { if (variables[i].LocalName == "subject") si = i; if (variables[i].LocalName == "predicate") pi = i; if (variables[i].LocalName == "object") oi = i; } } public override bool Add(VariableBindings result) { Resource subj = si == -1 ? d.Subject : result.Values[si]; Resource pred = pi == -1 ? d.Predicate : result.Values[pi]; Resource obj = oi == -1 ? d.Object : result.Values[oi]; if (!(subj is Entity) || !(pred is Entity)) return true; if (litFilters != null && !LiteralFilter.MatchesFilters(obj, litFilters, null)) return true; return sink.Add(new Statement((Entity)subj, (Entity)pred, obj)); } } string S(Resource[] r, string v) { if (r == null || r.Length != 1) return "?" + v; return S(r[0], null); } string SL(Resource[] r, string v, bool includeIfJustOne) { if (r == null || (r.Length <= 1 && !includeIfJustOne)) return ""; StringBuilder ret = new StringBuilder(); ret.Append("FILTER("); bool first = true; for (int i = 0; i < r.Length; i++) { if (r[i].Uri == null) continue; if (!first) ret.Append(" || "); first = false; ret.Append('?'); ret.Append(v); ret.Append("=<"); if (r[i].Uri != null) ret.Append(r[i].Uri); ret.Append('>'); } ret.Append(").\n"); if (first) return ""; return ret.ToString(); } #if !DOTNET2 string SL(object r, string v, bool includeIfJustOne) { return SL((Resource[])new ArrayList((ICollection)r).ToArray(typeof(Resource)), v, includeIfJustOne); } #else string SL(ICollection r, string v, bool includeIfJustOne) { return SL(new List(r).ToArray(), v, includeIfJustOne); } #endif string S(Resource r, string v) { if (r == null || r is Variable) { return v; } else if (r is Literal) { return r.ToString(); } else if (r.Uri != null) { if (r.Uri.IndexOf('>') != -1) throw new ArgumentException("Invalid URI: " + r.Uri); return "<" + r.Uri + ">"; } else { throw new NotSupportedException("Blank node in select not supported."); } } class BooleanWrap { public bool value; } void Load(string query, object outputObj) { string qstr = "query=" + System.Web.HttpUtility.UrlEncode(query); string method = "POST"; System.Net.WebRequest rq; if (Debug) { Console.Error.WriteLine("> " + url); Console.Error.WriteLine(query); Console.Error.WriteLine(); } if (method == "GET") { string qurl = url + "?" + qstr; rq = System.Net.WebRequest.Create(qurl); } else { Encoding encoding = new UTF8Encoding(); // ? byte[] data = encoding.GetBytes(qstr); rq = System.Net.WebRequest.Create(url); rq.Method = "POST"; rq.ContentType="application/x-www-form-urlencoded"; rq.ContentLength = data.Length; using (Stream stream = rq.GetRequestStream()) stream.Write(data, 0, data.Length); } System.Net.HttpWebResponse resp = (System.Net.HttpWebResponse)rq.GetResponse(); try { string mimetype = resp.ContentType; if (mimetype.IndexOf(';') > -1) mimetype = mimetype.Substring(0, mimetype.IndexOf(';')); ProcessResponse(mimetype, resp.GetResponseStream(), outputObj); } finally { resp.Close(); } } public static void ParseSparqlResponse(Stream sparqlResponse, QueryResultSink queryResults) { ProcessResponse(null, sparqlResponse, queryResults); } public static void ParseSparqlResponse(Stream sparqlResponse, out bool askResult) { BooleanWrap bw = new BooleanWrap(); ProcessResponse(null, sparqlResponse, bw); askResult = bw.value; } private static void ProcessResponse(string mimetype, Stream stream, object outputObj) { // If the user wants the output sent to a TextWriter, copy the response from // the response stream to the TextWriter. TODO: Get encoding from HTTP header. if (outputObj is TextWriter) { TextWriter tw = (TextWriter)outputObj; using (StreamReader reader = new StreamReader(stream, System.Text.Encoding.UTF8)) { char[] buffer = new char[512]; while (true) { int len = reader.Read(buffer, 0, buffer.Length); if (len <= 0) break; tw.Write(buffer, 0, len); } } tw.Flush(); return; } // If the user wants a boolean out of this, then we're expecting a // SPARQL XML Results document with a boolean response element. if (outputObj is BooleanWrap) { BooleanWrap bw = (BooleanWrap)outputObj; if (mimetype != null && mimetype != "application/sparql-results+xml" && mimetype != "text/xml") throw new ApplicationException("The result of the query was not a SPARQL Results document."); XmlReader xmldoc = new XmlTextReader(stream); { // Move to the document element while (xmldoc.Read()) if (xmldoc.NodeType == XmlNodeType.Element) break; // Just check that it has the right local name. if (xmldoc.LocalName != "sparql" || xmldoc.IsEmptyElement) throw new ApplicationException("Invalid server response: Not a SPARQL results document."); // Move to the next node. while (xmldoc.Read()) if (xmldoc.NodeType == XmlNodeType.Element) break; // If it's a head node, skip it. if (xmldoc.LocalName == "head") { xmldoc.Skip(); // Move to the 'boolean' element, it better be next while (xmldoc.Read()) if (xmldoc.NodeType == XmlNodeType.Element) break; } if (xmldoc.LocalName != "boolean") throw new ApplicationException("Invalid server response: Missing 'boolean' element."); string value = xmldoc.ReadElementString(); bw.value = (value == "true"); } return; } // If the user wants statements out of the response, read it with an RDFReader. if (outputObj is StatementSink) { // If the mime type is application/sparql-results+xml, just try to // read it as if it were an RDF/XML MIME type. if (mimetype != null && mimetype == "application/sparql-results+xml") mimetype = "text/xml"; using (RdfReader reader = RdfReader.Create(mimetype, stream)) reader.Select((StatementSink)outputObj); return; } // If the user wants query result bindings, read the response XML. if (outputObj is QueryResultSink) { QueryResultSink sink = (QueryResultSink)outputObj; if (mimetype != null && mimetype != "application/sparql-results+xml" && mimetype != "text/xml") throw new ApplicationException("The result of the query was not a SPARQL Results document."); ArrayList variableNames = new ArrayList(); ArrayList variables = new ArrayList(); Variable[] variablesArray = null; Hashtable bnodes = new Hashtable(); XmlReader xmldoc = new XmlTextReader(stream); { // Move to the document element while (xmldoc.Read()) if (xmldoc.NodeType == XmlNodeType.Element) break; // Just check that it has the right local name. if (xmldoc.LocalName != "sparql" || xmldoc.IsEmptyElement) throw new ApplicationException("Invalid server response: Not a SPARQL results document."); // Move to the 'head' node, it better be the first element while (xmldoc.Read()) if (xmldoc.NodeType == XmlNodeType.Element) break; if (xmldoc.LocalName != "head" || xmldoc.IsEmptyElement) throw new ApplicationException("Invalid server response: Missing head full element."); // Read the head element while (xmldoc.Read()) { if (xmldoc.NodeType == XmlNodeType.Element && xmldoc.LocalName == "variable") { if (xmldoc.GetAttribute("name") == null) throw new ApplicationException("Invalid server response: Head/variable node missing name attribute."); variableNames.Add(xmldoc.GetAttribute("name")); variables.Add(new Variable(xmldoc.GetAttribute("name"))); if (!xmldoc.IsEmptyElement) xmldoc.Skip(); } else if (xmldoc.NodeType == XmlNodeType.EndElement) { break; } } // Move to the 'results' element, it better be next while (xmldoc.Read()) if (xmldoc.NodeType == XmlNodeType.Element) break; if (xmldoc.LocalName != "results") throw new ApplicationException("Invalid server response: Missing results element."); variablesArray = (Variable[])variables.ToArray(typeof(Variable)); sink.Init(variablesArray); // Read the results while (xmldoc.Read()) { if (xmldoc.NodeType == XmlNodeType.Element && xmldoc.LocalName == "result") { // Read the bindings in this result Resource[] valuesArray = new Resource[variablesArray.Length]; while (xmldoc.Read()) { if (xmldoc.NodeType == XmlNodeType.Element && xmldoc.LocalName == "binding") { if (xmldoc.IsEmptyElement) throw new ApplicationException("Invalid server response: Binding element empty."); if (xmldoc.GetAttribute("name") == null) throw new ApplicationException("Invalid server response: Result binding node missing name attribute."); int vIndex = variableNames.IndexOf(xmldoc.GetAttribute("name")); if (vIndex == -1) throw new ApplicationException("Invalid server response: Result binding name does not match a variable in the head."); Resource value = null; while (xmldoc.Read()) { if (xmldoc.NodeType == XmlNodeType.Whitespace || xmldoc.NodeType == XmlNodeType.SignificantWhitespace) continue; if (xmldoc.NodeType == XmlNodeType.Element && xmldoc.LocalName == "uri") { value = new Entity(xmldoc.ReadElementString()); if (!xmldoc.IsEmptyElement) xmldoc.Skip(); } else if (xmldoc.NodeType == XmlNodeType.Element && xmldoc.LocalName == "literal") { string lang = xmldoc.XmlLang; if (lang == "") lang = null; string dt = xmldoc.GetAttribute("datatype"); value = new Literal(xmldoc.ReadElementString(), lang, dt); if (!xmldoc.IsEmptyElement) xmldoc.Skip(); } else if (xmldoc.NodeType == XmlNodeType.Element && xmldoc.LocalName == "bnode") { string id = xmldoc.ReadElementString(); if (bnodes.ContainsKey(id)) { value = (BNode)bnodes[id]; } else { value = new BNode(id); bnodes[id] = value; } if (!xmldoc.IsEmptyElement) xmldoc.Skip(); } else { throw new ApplicationException("Invalid server response: Invalid content in binding node."); } break; } if (value == null) throw new ApplicationException("Invalid server response: Result binding value is invalid."); valuesArray[vIndex] = value; } else if (xmldoc.NodeType == XmlNodeType.EndElement) { break; } } sink.Add(new VariableBindings(variablesArray, valuesArray)); } else if (xmldoc.NodeType == XmlNodeType.EndElement) { break; } } sink.Finished(); } } } public MetaQueryResult MetaQuery(Statement[] graph, QueryOptions options) { MetaQueryResult ret = new MetaQueryResult(); ret.QuerySupported = true; return ret; } public void Query(Statement[] graph, QueryOptions options, QueryResultSink sink) { StringBuilder query = new StringBuilder(); query.Append("SELECT "); // Get a list of variables and map them to fresh names #if !DOTNET2 Hashtable variableNames = new Hashtable(); #else Dictionary variableNames = new Dictionary(); #endif Hashtable variableNames2 = new Hashtable(); foreach (Statement s in graph) { for (int j = 0; j < 3; j++) { Variable v = s.GetComponent(j) as Variable; if (v == null) continue; if (variableNames.ContainsKey(v)) continue; variableNames2["v" + variableNames.Count] = v; variableNames[v] = "?v" + variableNames.Count; } } // What variables will we select on? ArrayList selectedVars = new ArrayList(); foreach (Variable v in options.DistinguishedVariables != null ? options.DistinguishedVariables : variableNames.Keys) { if (!variableNames.ContainsKey(v)) continue; // in case distinguished variables list // has more than what actually appears in query query.Append(variableNames[v]); query.Append(' '); selectedVars.Add(v); } // Bnodes are not allowed here -- we can't query on them. foreach (Statement s in graph) { for (int j = 0; j < 3; j++) { if (s.GetComponent(j) is BNode && !(s.GetComponent(j) is Variable)) { Variable[] varArray = (Variable[])selectedVars.ToArray(typeof(Variable)); sink.Init(varArray); sink.Finished(); return; } } } // Build the graph pattern. query.Append("WHERE {\n"); ResSet firstVarUse = new ResSet(); foreach (Statement s in graph) { for (int j = 0; j < 3; j++) { Resource r = s.GetComponent(j); query.Append(S(r, r is Variable && variableNames.ContainsKey((Variable)r) ? (string)variableNames[(Variable)r] : null)); query.Append(" "); } query.Append(" . \n"); if (options.VariableKnownValues != null) { for (int j = 0; j < 3; j++) { Resource r = s.GetComponent(j); if (firstVarUse.Contains(r)) continue; firstVarUse.Add(r); if (r is Variable && variableNames.ContainsKey((Variable)r) && #if !DOTNET2 options.VariableKnownValues.Contains(r) #else options.VariableKnownValues.ContainsKey((Variable)r) #endif ) query.Append(SL(options.VariableKnownValues[(Variable)r], (string)variableNames[(Variable)r], true)); } } // And what about meta...? } query.Append("}"); if (options.Limit > 0) { query.Append(" LIMIT "); query.Append(options.Limit); } Load(query.ToString(), new QueryResultsWrapper(sink, variableNames2)); } class QueryResultsWrapper : QueryResultSink { QueryResultSink sink; Hashtable variableNames; Variable[] vars; public QueryResultsWrapper(QueryResultSink sink, Hashtable variableNames) { this.sink = sink; this.variableNames = variableNames; } public override void Init(Variable[] variables) { vars = new Variable[variables.Length]; for (int i = 0; i < variables.Length; i++) vars[i] = (Variable)variableNames[variables[i].LocalName]; sink.Init(vars); } public override bool Add(VariableBindings result) { #if !DOTNET2 return sink.Add(new VariableBindings(vars, result.Values)); #else Resource[] vals = new Resource[result.Values.Count]; result.Values.CopyTo(vals, 0); return sink.Add(new VariableBindings(vars, vals)); #endif } public override void Finished() { sink.Finished(); } public override void AddComments(string comments) { sink.AddComments(comments); } } } } namespace SemWeb.Query { public class SparqlXmlQuerySink : QueryResultSink { System.Xml.XmlWriter output; int blankNodeCounter = 0; Hashtable blankNodes = new Hashtable(); public const string MimeType = "application/sparql-results+xml"; private static System.Xml.XmlWriter GetWriter(System.IO.TextWriter writer) { System.Xml.XmlTextWriter w = new System.Xml.XmlTextWriter(writer); w.Formatting = System.Xml.Formatting.Indented; return w; } public SparqlXmlQuerySink(TextWriter output) : this(GetWriter(output)) { } public SparqlXmlQuerySink(System.Xml.XmlWriter output) { this.output = output; } public override void AddComments(string comments) { if (comments != null && comments.Length > 0) output.WriteComment(comments); } public override void Init(Variable[] variables) { output.WriteStartElement("sparql"); output.WriteAttributeString("xmlns", "http://www.w3.org/2005/sparql-results#"); output.WriteStartElement("head"); foreach (Variable var in variables) { if (var.LocalName == null) continue; output.WriteStartElement("variable"); output.WriteAttributeString("name", var.LocalName); output.WriteEndElement(); } output.WriteEndElement(); // head output.WriteStartElement("results"); // instead of , we might want true } public override bool Add(VariableBindings result) { output.WriteStartElement("result"); for (int i = 0; i < result.Count; i++) { Variable var = result.Variables[i]; Resource val = result.Values[i]; if (var.LocalName == null) continue; if (val == null) continue; output.WriteStartElement("binding"); output.WriteAttributeString("name", var.LocalName); if (val.Uri != null) { output.WriteElementString("uri", val.Uri); } else if (val is Literal) { output.WriteStartElement("literal"); Literal literal = (Literal)val; if (literal.DataType != null) output.WriteAttributeString("datatype", literal.DataType); if (literal.Language != null) output.WriteAttributeString("xml", "lang", null, literal.Language); output.WriteString(literal.Value); output.WriteEndElement(); } else { string id; if (blankNodes.ContainsKey(val)) id = (string)blankNodes[val]; else { id = "r" + (++blankNodeCounter); blankNodes[val] = id; } output.WriteStartElement("bnode"); output.WriteString(id); output.WriteEndElement(); } output.WriteEndElement(); } output.WriteEndElement(); return true; } public override void Finished() { output.WriteEndElement(); // results output.WriteEndElement(); // sparql output.Flush(); } } } semweb-1.05+dfsg/src/GraphMatch.cs0000644000175000017500000006007010774502134016300 0ustar meebeymeebeyusing System; using System.IO; #if !DOTNET2 using System.Collections; #else using System.Collections.Generic; #endif using SemWeb; using SemWeb.Filters; using SemWeb.Stores; using SemWeb.Util; #if !DOTNET2 using VariableList = System.Collections.ArrayList; using BindingList = System.Collections.ArrayList; using VarKnownValuesType = System.Collections.Hashtable; using VarKnownValuesType2 = System.Collections.IDictionary; using LitFilterList = System.Collections.ArrayList; using LitFilterMap = System.Collections.Hashtable; using LitFilterMap2 = System.Collections.IDictionary; #else using VariableList = System.Collections.Generic.List; using BindingList = System.Collections.Generic.List; using VarKnownValuesType = System.Collections.Generic.Dictionary>; using VarKnownValuesType2 = System.Collections.Generic.IDictionary>; using LitFilterList = System.Collections.Generic.List; using LitFilterMap = System.Collections.Generic.Dictionary>; using LitFilterMap2 = System.Collections.Generic.IDictionary>; #endif namespace SemWeb.Query { public class GraphMatch : Query { private static Entity qLimit = "http://purl.oclc.org/NET/rsquary/returnLimit"; private static Entity qStart = "http://purl.oclc.org/NET/rsquary/returnStart"; private static Entity qDistinctFrom = "http://purl.oclc.org/NET/rsquary/distinctFrom"; private static Entity qOptional = "http://purl.oclc.org/NET/rsquary/optional"; StatementList graph = new StatementList(); VarKnownValuesType2 knownValues = new VarKnownValuesType(); LitFilterMap litFilters = new LitFilterMap(); VariableList distinguishedVars = new VariableList(); public GraphMatch() { } public GraphMatch(RdfReader query) : this(new Store(query), query.BaseUri == null ? null : new Entity(query.BaseUri)) { } public GraphMatch(StatementSource queryModel) : this(new Store(queryModel), null) { } private GraphMatch(Store queryModel, Entity queryNode) { // Find the query options if (queryNode != null) { ReturnStart = GetIntOption(queryModel, queryNode, qStart); ReturnLimit = GetIntOption(queryModel, queryNode, qLimit); } foreach (Statement s in queryModel.Select(Statement.All)) { if (IsQueryPredicate(s.Predicate)) continue; if (s.Meta == Statement.DefaultMeta) AddGraphStatement(s); else throw new NotSupportedException("Subgraphs (meta statement relations) are not supported."); } } private int GetIntOption(Store queryModel, Entity query, Entity predicate) { Resource[] rr = queryModel.SelectObjects(query, predicate); if (rr.Length == 0) return -1; Resource r = rr[0]; if (r == null || !(r is Literal)) return -1; try { return int.Parse(((Literal)r).Value); } catch (Exception) { return -1; } } private bool IsQueryPredicate(Entity e) { if (e == qDistinctFrom) return true; if (e == qLimit) return true; if (e == qStart) return true; if (e == qOptional) return true; return false; } public override string GetExplanation() { string ret = "Query:\n"; foreach (Statement s in graph) ret += " " + s + "\n"; return ret; } public void AddGraphStatement(Statement statement) { graph.Add(statement); } #if !DOTNET2 public void SetVariableRange(Variable variable, ICollection range) { #else public void SetVariableRange(Variable variable, ICollection range) { #endif knownValues[variable] = range; } public void AddLiteralFilter(Variable variable, LiteralFilter filter) { if (!litFilters.ContainsKey(variable)) litFilters[variable] = new LitFilterList(); ((LitFilterList)litFilters[variable]).Add(filter); } public void SetDistinguishedVariable(Variable variable) { distinguishedVars.Add(variable); } public override void Run(SelectableSource targetModel, QueryResultSink result) { QueryPart[] parts = new QueryPart[graph.Count]; for (int i = 0; i < graph.Count; i++) parts[i] = new QueryPart(graph[i], targetModel); RunGeneralQuery(parts, knownValues, litFilters, distinguishedVars.Count == 0 ? null : distinguishedVars, ReturnStart, ReturnLimit, false, result); } internal struct QueryPart { public readonly Statement[] Graph; public readonly SelectableSource[] Sources; public QueryPart(Statement s, SelectableSource src) { Graph = new Statement[] { s }; Sources = new SelectableSource[] { src }; } public QueryPart(Statement s, SelectableSource[] sources) { Graph = new Statement[] { s }; Sources = sources; } public QueryPart(Statement[] graph, QueryableSource src) { Graph = graph; Sources = new SelectableSource[] { src }; } } struct BindingSet { public Variable[] Variables; public BindingList Rows; } internal static void RunGeneralQuery(QueryPart[] queryParts, VarKnownValuesType2 knownValues, LitFilterMap2 litFilters, #if !DOTNET2 ICollection distinguishedVars, #else ICollection distinguishedVars, #endif int returnStart, int returnLimit, bool allowQueryableSource, QueryResultSink result) { BindingSet bindings; // We use a sort of adaptive limiting technique in // queries involving intersection. If a limit on // A & B is specified, it is obviously incorrect to // limit A and B separately, since the parts that // intersect may be not at the beginning of either // of A and B. However, in many cases such a limit // is possible, and so we try the limits. But if // that limit doesn't yield enough results, we back // off and use a much larger limit the next time. // Note that when the query involves no intersection, // it *is* correct to pass the limit down, and so // we never need to do a back-off in that case. int adaptiveLimitMultiplier = 1; // If intersection is involved in this query, then // it's likely there will be some holes in the data // and we should query more than the final limit // from each source to start with. But if there's just // one query part, we keep the multiplier at 1 because // we want to pass it down. if (queryParts.Length > 1) adaptiveLimitMultiplier = 2; while (true) { bool adaptiveLimitDidLimit = false; int localLimit = returnLimit * adaptiveLimitMultiplier; bindings = new BindingSet(); bindings.Variables = new Variable[0]; bindings.Rows = new BindingList(); bindings.Rows.Add(null); // we need a dummy row for the first intersection for (int iPart = 0; iPart < queryParts.Length; iPart++) { QueryPart part = queryParts[iPart]; // Get the statements in the target model that match this aspect of the query graph. // get a list of values already found for each variable System.Collections.Hashtable foundValues = new System.Collections.Hashtable(); foreach (Variable v in bindings.Variables) foundValues[v] = new ResSet(); foreach (VariableBindings row in bindings.Rows) { if (row == null) continue; // null in first round for (int i = 0; i < row.Count; i++) ((ResSet)foundValues[row.Variables[i]]).Add(row.Values[i]); } foreach (Variable v in bindings.Variables) foundValues[v] = ((ResSet)foundValues[v]).ToArray(); // matches holds the bindings that match this part of the query BindingList matches; // vars holds an ordered list of variables found in this part of the query Variable[] vars; // Get a set of variables that we care about. These are distinguished variables // in the query plus any variables that we will encounter in a future queryPart. // Any other variables are useless to us at this point and we will not do any // duplicate row tests based on them. ResSet interestingVariables = null; if (distinguishedVars != null) { interestingVariables = new ResSet(); interestingVariables.AddRange(distinguishedVars); for (int jPart = iPart+1; jPart < queryParts.Length; jPart++) { foreach (Statement s in queryParts[jPart].Graph) { for (int jc = 0; jc < 4; jc++) { if (s.GetComponent(jc) is Variable) interestingVariables.Add(s.GetComponent(jc)); } } } } // A QueryPart can either be: // A single statement to match against one or more SelectableSources, or one or more QueryableSources // A graph of statements to match against a single QueryableSource bool allSourcesQueryable = true; foreach (SelectableSource source in part.Sources) if (!(source is QueryableSource)) allSourcesQueryable = false; if (!allowQueryableSource || !allSourcesQueryable) { Statement s = part.Graph[0]; matches = new BindingList(); VariableList varCollector = new VariableList(); // get a list of variables in this part // the filter will have null components for variables, except // for variables with known values, we plug those values in SelectFilter f = new SelectFilter(s); for (int i = 0; i < 4; i++) { Resource r = s.GetComponent(i); if (r is Variable) { Variable v = (Variable)r; if (!varCollector.Contains(v)) varCollector.Add(v); Resource[] values = null; #if DOTNET2 if (foundValues.ContainsKey(v)) #endif values = (Resource[])foundValues[v]; if (values == null && #if !DOTNET2 knownValues[v] != null #else knownValues.ContainsKey(v) #endif ) #if !DOTNET2 values = (Resource[])new ArrayList((ICollection)knownValues[v]).ToArray(typeof(Resource)); #else values = new List(knownValues[v]).ToArray(); #endif if (values == null) { f.SetComponent(i, null); } else if (i != 2) { bool fail = false; f.SetComponent(i, ToEntArray(values, ref fail)); if (fail) return; } else { f.SetComponent(i, values); } } } #if !DOTNET2 if (litFilters != null && s.Object is Variable && litFilters[(Variable)s.Object] != null) f.LiteralFilters = (LiteralFilter[])((LitFilterList)litFilters[(Variable)s.Object]).ToArray(typeof(LiteralFilter)); #else if (litFilters != null && s.Object is Variable && litFilters.ContainsKey((Variable)s.Object)) f.LiteralFilters = ((LitFilterList)litFilters[(Variable)s.Object]).ToArray(); #endif vars = new Variable[varCollector.Count]; varCollector.CopyTo(vars, 0); // get the matching statements; but if a variable was used twice in s, // filter out matching statements that don't respect that (since that info // was lost in the SelectFilter). foreach (SelectableSource source in part.Sources) { if (localLimit > 0) { f.Limit = localLimit - matches.Count; if (f.Limit <= 0) break; } source.Select(f, new Filter(matches, s, vars)); } result.AddComments("SELECT: " + f + " => " + matches.Count); } else { if (part.Sources.Length == 0) throw new InvalidOperationException(); // build a query QueryOptions opts = new QueryOptions(); if (knownValues != null) { foreach (Variable v in knownValues.Keys) #if !DOTNET2 opts.SetVariableKnownValues(v, (System.Collections.ICollection)knownValues[v]); #else opts.SetVariableKnownValues(v, knownValues[v]); #endif } foreach (Variable v in foundValues.Keys) if (foundValues[v] != null) opts.SetVariableKnownValues(v, (Resource[])foundValues[v]); if (litFilters != null) foreach (Variable v in litFilters.Keys) if (litFilters[v] != null) foreach (LiteralFilter f in (System.Collections.ICollection)litFilters[v]) opts.AddLiteralFilter(v, f); // The distinguished variables for this part are any that are distinguished for // the query plus any that we need to tie these results to past and future // bindings (any variable used previously or used later and used in this query). if (distinguishedVars != null) { VariableList dvars = new VariableList(); dvars.AddRange(distinguishedVars); for (int jPart = 0; jPart < queryParts.Length; jPart++) { if (jPart == iPart) continue; foreach (Statement s in queryParts[jPart].Graph) { for (int jc = 0; jc < 4; jc++) { if (s.GetComponent(jc) is Variable) // don't bother checking if it's actually used in this query part dvars.Add((Variable)s.GetComponent(jc)); } } } opts.DistinguishedVariables = dvars; } vars = null; matches = null; foreach (QueryableSource source in part.Sources) { if (localLimit > 0) { opts.Limit = localLimit - (matches == null ? 0 : matches.Count); if (opts.Limit <= 0) break; } QueryResultBuffer partsink = new QueryResultBuffer(); source.Query(part.Graph, opts, partsink); foreach (string comment in partsink.Comments) result.AddComments(source.ToString() + ": " + comment); if (vars == null) { vars = new Variable[partsink.Variables.Length]; partsink.Variables.CopyTo(vars, 0); #if !DOTNET2 matches = new BindingList(partsink.Bindings); #else matches = partsink.Bindings; #endif } else { // add in the bindings from this query, but the variables might // be in a different order this time foreach (VariableBindings b in partsink.Bindings) { Resource[] vals = new Resource[vars.Length]; for (int i = 0; i < vars.Length; i++) vals[i] = b[vars[i]]; VariableBindings c = new VariableBindings(vars, vals); matches.Add(c); } } } string qs = ""; foreach (Statement s in part.Graph) qs += "\n\t" + s; result.AddComments("QUERY: " + qs + (returnLimit > 0 ? " [limit " + returnLimit + "/" + localLimit + "]" : "") + " => " + matches.Count); // If we got back at least as many rows as our local (adaptive) limit, // then we know that the limiting (possibly) had an effect and we may // need to loop again to get all of the rows. if (matches.Count >= localLimit) adaptiveLimitDidLimit = true; } // Intersect the existing bindings with the new matches. // This involves creating binding rows that: // Match on the intersection of variables from the two sets // But include only interestingVariables variables, which // are distinguished variables plus any variables we will // encounter in later parts of the query // Get a list of variables the old and new have in common, and // a list for the common variables of their indexes in the old // and new sets int nCommonVars; int[,] commonVars = IntersectVariables(bindings.Variables, vars, out nCommonVars); ResSet retainedVariables = null; if (interestingVariables != null) { retainedVariables = new ResSet(); foreach (Variable v in bindings.Variables) if (interestingVariables.Contains(v)) retainedVariables.Add(v); foreach (Variable v in vars) if (interestingVariables.Contains(v)) retainedVariables.Add(v); } BindingSet newbindings = new BindingSet(); if (retainedVariables == null) newbindings.Variables = new Variable[bindings.Variables.Length + vars.Length - nCommonVars]; else newbindings.Variables = new Variable[retainedVariables.Count]; // Make a list of the variables in the final set, and a mapping // from indexes in the old/new set to indexes in the final set. int ctr = 0; int[] variableMapLeft = new int[bindings.Variables.Length]; for (int i = 0; i < variableMapLeft.Length; i++) { if (retainedVariables == null || retainedVariables.Contains(bindings.Variables[i])) { variableMapLeft[i] = ctr; newbindings.Variables[ctr++] = bindings.Variables[i]; } else { variableMapLeft[i] = -1; } } int[] variableMapRight = new int[vars.Length]; for (int i = 0; i < variableMapRight.Length; i++) { if ((retainedVariables == null || retainedVariables.Contains(vars[i])) && Array.IndexOf(newbindings.Variables, vars[i]) == -1) { variableMapRight[i] = ctr; newbindings.Variables[ctr++] = vars[i]; } else { variableMapRight[i] = -1; } } newbindings.Rows = new BindingList(); int nMatches = 0; if (nCommonVars == 0) { // no variables in common, make a cartesian product of the bindings foreach (VariableBindings left in bindings.Rows) { for (int i = 0; i < matches.Count; i++) { VariableBindings right = (VariableBindings)matches[i]; Resource[] newValues = new Resource[newbindings.Variables.Length]; CopyValues(left == null ? null : left.Values, right.Values, newValues, variableMapLeft, variableMapRight); nMatches++; if (!quickDupCheckIsDup(newbindings, newValues, nMatches)) newbindings.Rows.Add(new VariableBindings(newbindings.Variables, newValues)); } } } else { // index the new matches by those variables System.Collections.Hashtable indexedMatches = new System.Collections.Hashtable(); foreach (VariableBindings right in matches) { // traverse down the list of common variables making a tree // structure indexing the matches by their variable values System.Collections.Hashtable hash = indexedMatches; for (int i = 0; i < nCommonVars; i++) { Resource value = right.Values[commonVars[i, 1]]; if (i < nCommonVars - 1) { if (hash[value] == null) hash[value] = new System.Collections.Hashtable(); hash = (System.Collections.Hashtable)hash[value]; } else { if (hash[value] == null) hash[value] = new BindingList(); BindingList list = (BindingList)hash[value]; list.Add(right); } } } // for each existing binding, find all of the new matches // that match the common variables, by traversing the index tree foreach (VariableBindings left in bindings.Rows) { System.Collections.Hashtable hash = indexedMatches; BindingList list = null; for (int i = 0; i < nCommonVars; i++) { Resource value = left.Values[commonVars[i, 0]]; if (hash[value] == null) break; if (i < nCommonVars - 1) hash = (System.Collections.Hashtable)hash[value]; else list = (BindingList)hash[value]; } // tree traversal didn't go to the end, meaning there was // no corresponding match (with the same common variable values) if (list == null) continue; for (int i = 0; i < list.Count; i++) { VariableBindings right = (VariableBindings)list[i]; Resource[] newValues = new Resource[newbindings.Variables.Length]; CopyValues(left.Values, right.Values, newValues, variableMapLeft, variableMapRight); nMatches++; if (!quickDupCheckIsDup(newbindings, newValues, nMatches)) newbindings.Rows.Add(new VariableBindings(newbindings.Variables, newValues)); } } } bindings = newbindings; // We go no intersections, so we can't get any results. // No need to try further parts of the query. if (bindings.Rows.Count == 0) break; } // If there's no limit specified, then we aren't doing adaptive limiting. if (returnLimit == 0) break; // If this query has just one part (no intersection), then we aren't doing adaptive limiting. if (queryParts.Length == 1) break; // If we found enough rows, then adaptive limiting worked. if (bindings.Rows.Count >= returnLimit) break; // If the adaptive limit didn't actually limit: that is, we know // that there are no more results than the limit for any part // of the query, then no larger limit will help. if (!adaptiveLimitDidLimit) break; // Increase the adaptive limit multiplier for next time. adaptiveLimitMultiplier *= 5; } // end of adaptive limiting result.Init(bindings.Variables); int counter = 0; foreach (VariableBindings row in bindings.Rows) { counter++; if (returnStart > 0 && counter < returnStart) continue; if (!result.Add(row)) break; if (returnLimit > 0 && counter >= returnLimit) break; } result.Finished(); } static Entity[] ToEntArray(Resource[] res, ref bool fail) { ResSet ents = new ResSet(); foreach (Resource r in res) if (r is Entity) ents.Add(r); if (ents.Count == 0) { fail = true; return null; } return ents.ToEntityArray(); } class Filter : StatementSink { BindingList matches; Statement filter; Variable[] vars; public Filter(BindingList matches, Statement filter, Variable[] vars) { this.matches = matches; this.filter = filter; this.vars = vars; } public bool Add(Statement s) { if (filter.Subject == filter.Predicate && s.Subject != s.Predicate) return true; if (filter.Subject == filter.Object && s.Subject != s.Object) return true; if (filter.Subject == filter.Meta && s.Subject != s.Meta) return true; if (filter.Predicate == filter.Object && s.Predicate != s.Object) return true; if (filter.Predicate == filter.Meta && s.Predicate != s.Meta) return true; if (filter.Object == filter.Meta && s.Object != s.Meta) return true; Resource[] vals = new Resource[vars.Length]; for (int i = 0; i < vars.Length; i++) { if ((object)vars[i] == (object)filter.Subject) vals[i] = s.Subject; else if ((object)vars[i] == (object)filter.Predicate) vals[i] = s.Predicate; else if ((object)vars[i] == (object)filter.Object) vals[i] = s.Object; else if ((object)vars[i] == (object)filter.Meta) vals[i] = s.Meta; } matches.Add(new VariableBindings(vars, vals)); return true; } } static int[,] IntersectVariables(Variable[] leftVars, Variable[] rightVars, out int nCommonVars) { VariableList commonVars = new VariableList(); foreach (Variable v in leftVars) if (Array.IndexOf(rightVars, v) != -1) commonVars.Add(v); int[,] ret = new int[commonVars.Count, 2]; for (int i = 0; i < commonVars.Count; i++) { ret[i,0] = Array.IndexOf(leftVars, commonVars[i]); ret[i,1] = Array.IndexOf(rightVars, commonVars[i]); } nCommonVars = commonVars.Count; return ret; } #if !DOTNET2 static void CopyValues(Resource[] left, Resource[] right, Resource[] newValues, int[] variableMapLeft, int[] variableMapRight) { #else static void CopyValues(IList left, IList right, Resource[] newValues, int[] variableMapLeft, int[] variableMapRight) { #endif for (int i = 0; i < variableMapLeft.Length; i++) if (variableMapLeft[i] != -1) newValues[variableMapLeft[i]] = left[i]; for (int i = 0; i < variableMapRight.Length; i++) if (variableMapRight[i] != -1) newValues[variableMapRight[i]] = right[i]; } static bool quickDupCheckIsDup(BindingSet newbindings, Resource[] newValues, int nMatches) { // If there is a more than 10-to-1 ratio of rejected duplicates // to unique rows, then we check all rows. Otherwise we check the first 100. bool isHighRejectRatio = newbindings.Rows.Count == 0 || (nMatches / newbindings.Rows.Count) > 10; for (int i = 0; i < newbindings.Rows.Count; i++) { if (i > 100 && !isHighRejectRatio) break; bool dup = true; for (int j = 0; j < newValues.Length; j++) { Resource left = ((VariableBindings)newbindings.Rows[i]).Values[j]; Resource right = newValues[j]; if ((object)left == null || (object)right == null) { if (!((object)left == null && (object)right == null)) dup = false; } else if (!left.Equals(right)) { dup = false; break; } } if (dup) return true; } return false; } } } semweb-1.05+dfsg/src/BDB.cs0000644000175000017500000006055510774502134014661 0ustar meebeymeebeyusing System; using System.IO; using System.Runtime.Serialization.Formatters; using System.Runtime.Serialization.Formatters.Binary; using System.Runtime.InteropServices; namespace BDB { public enum DBFormat { Btree=1, Hash=2, Recno=3, Queue=4 } public enum DataType { Any, UInt, IntArray, String } public class DatabaseException : ApplicationException { public DatabaseException(string message) : base(message) { } } public class BDB43 { const string lib = "db-4.3"; Env env; IntPtr dbp; dbstruct funcs; bool closed = false; Serializer binfmt; public DataType KeyType = DataType.Any, ValueType = DataType.Any; public BDB43(string file, bool create, DBFormat format, bool allowDuplicates, Env environment) : this(file, null, create, format, allowDuplicates, environment) { } public BDB43(string file, string table, bool create, DBFormat format, bool allowDuplicates, Env environment) { this.env = environment; db_create(out dbp, environment.envptr, 0); funcs = (dbstruct)Marshal.PtrToStructure((IntPtr)((int)dbp+268), typeof(dbstruct)); uint dbflags = DB_DIRECT_DB; if (allowDuplicates) dbflags |= DB_DUP; // DB_DUPSORT; funcs.set_flags(dbp, dbflags); int type = (int)format; uint flags = DB_DIRTY_READ; // | DB_AUTO_COMMIT; int chmod_mode = 0; if (create) flags |= DB_CREATE; // if file & database are null, db is held in-memory // on file is taken as UTF8 (is this call right?) int ret = funcs.open(dbp, env.Txn, file, table, type, flags, chmod_mode); CheckError(ret); binfmt = new Serializer(); } ~BDB43() { if (!closed) Close(); } public void Close() { if (closed) throw new InvalidOperationException("Database is already closed."); funcs.close(dbp, 0); closed = true; } public void Put(object key, object value) { Put(key, value, 0); } public void Append(object key, object value) { Put(key, value, 2); } public bool PutNew(object key, object value) { return Put(key, value, 22); } private bool Put(object key, object value, uint flags) { Data dkey = new Data(), dvalue = new Data(); try { dkey = Data.New(key, binfmt, KeyType); dvalue = Data.New(value, binfmt, ValueType); int ret = funcs.put(dbp, env.Txn, ref dkey, ref dvalue, flags); if (ret == DB_KEYEXIST) { return false; } CheckError(ret); return true; } finally { dkey.Free(); dvalue.Free(); } } public void Delete(object key) { Data dkey = Data.New(key, binfmt, KeyType); try { uint flags = 0; int ret = funcs.del(dbp, env.Txn, ref dkey, flags); CheckError(ret); } finally { dkey.Free(); } } public object Get(object key) { Data dkey = new Data(); Data dvalue = Data.New(); try { dkey = Data.New(key, binfmt, KeyType); int ret = funcs.get(dbp, env.Txn, ref dkey, ref dvalue, 0); if (ret == DB_NOTFOUND || ret == DB_KEYEMPTY) return null; CheckError(ret); return dvalue.GetObject(binfmt, ValueType); } finally { dkey.Free(); dvalue.Free(); } } public long Truncate() { uint recs; int ret = funcs.truncate(dbp, env.Txn, out recs, 0); CheckError(ret); return recs; } public void Sync() { int ret = funcs.sync(dbp, 0); CheckError(ret); } public Cursor NewCursor() { IntPtr cursorp; int ret = funcs.cursor(dbp, env.Txn, out cursorp, 0); CheckError(ret); return new Cursor(this, cursorp); } public struct Cursor : IDisposable { IntPtr cursorp; cursorstruct funcs; BDB43 parent; public enum Seek { Current = 7, First = 9, Last = 17, Next = 18, Prev = 25, NextDup = 19, NextNoDup = 20, PrevNoDup = 26 } private enum Dest { After = 1, Before = 3, Current = 7, KeyFirst = 15, KeyLast = 16 } const uint DB_GET_BOTH = 10; const uint DB_SET = 28; internal Cursor(BDB43 parent, IntPtr cursorp) { this.cursorp = cursorp; this.parent = parent; funcs = (cursorstruct)Marshal.PtrToStructure((IntPtr)((int)cursorp+188), typeof(cursorstruct)); } public long Count() { uint count; int ret = funcs.count(cursorp, out count, 0); CheckError(ret); return count; } public void Delete() { int ret = funcs.del(cursorp, 0); CheckError(ret); } public Cursor Duplicate() { IntPtr newp; int ret = funcs.dup(cursorp, out newp, 0); CheckError(ret); return new Cursor(parent, newp); } public object MoveTo(object key) { return MoveTo(key, null, false); } public bool MoveTo(object key, object value) { return MoveTo(key, value, true) != null; } private object MoveTo(object key, object value, bool usevalue) { Data dkey = new Data(); Data dvalue = new Data(); try { dkey = Data.New(key, parent.binfmt, parent.KeyType); if (!usevalue) dvalue = Data.New(); else dvalue = Data.New(value, parent.binfmt, parent.ValueType); int ret = funcs.get(cursorp, ref dkey, ref dvalue, !usevalue ? DB_SET : DB_GET_BOTH); if (ret == DB_NOTFOUND || ret == DB_KEYEMPTY) return null; CheckError(ret); if (usevalue) return value; return dvalue.GetObject(parent.binfmt, parent.ValueType); } finally { dkey.Free(); dvalue.Free(); } } public bool Get(Seek seek, out object key, out object value) { Data dkey = Data.New(); Data dvalue = Data.New(); try { int ret = funcs.get(cursorp, ref dkey, ref dvalue, (uint)seek); if (ret == DB_NOTFOUND || ret == DB_KEYEMPTY) { key = null; value = null; return false; } CheckError(ret); key = dkey.GetObject(parent.binfmt, parent.KeyType); value = dvalue.GetObject(parent.binfmt, parent.ValueType); return true; } finally { dkey.Free(); dvalue.Free(); } } public void Append(object key, object value) { Put(key, value, Dest.KeyLast); } public void Overwrite(object value) { Put(null, value, Dest.Current); } private void Put(object key, object value, Dest putwhere) { Data dkey = new Data(), dvalue = new Data(); try { if (key != null) dkey = Data.New(key, parent.binfmt, parent.KeyType); else dkey = new Data(); // for putwhere == Current dvalue = Data.New(value, parent.binfmt, parent.ValueType); int ret = funcs.put(cursorp, ref dkey, ref dvalue, (uint)putwhere); if (ret == DB_KEYEXIST) { return; } CheckError(ret); } finally { dkey.Free(); dvalue.Free(); } } public void Dispose() { funcs.close(cursorp); } } public class Env : IDisposable { internal IntPtr envptr; envstruct1 funcs1; envstruct2 funcs2; internal IntPtr Txn = IntPtr.Zero; txnstruct txnfuncs; public Env(string home) { int ret = db_env_create(out envptr, 0); CheckError(ret); funcs1 = (envstruct1)Marshal.PtrToStructure((IntPtr)((int)envptr+276), typeof(envstruct1)); funcs2 = (envstruct2)Marshal.PtrToStructure((IntPtr)((int)envptr+712), typeof(envstruct2)); funcs1.set_flags(envptr, DB_LOG_INMEMORY, 1); ret = funcs1.open(envptr, home, DB_CREATE | DB_INIT_MPOOL | DB_PRIVATE , 0); // | DB_INIT_LOCK | DB_INIT_LOG | DB_INIT_TXN if (ret != 0) funcs1.close(envptr, 0); CheckError(ret); } public void Dispose() { funcs1.close(envptr, 0); envptr = IntPtr.Zero; } public void BeginTransaction() { int ret = funcs2.txn_begin(envptr, Txn, out Txn, DB_DIRTY_READ); CheckError(ret); txnfuncs = (txnstruct)Marshal.PtrToStructure((IntPtr)((int)Txn+100), typeof(txnstruct)); } public void Commit() { int ret = txnfuncs.commit(Txn, 0); txnfuncs.commit = null; Txn = IntPtr.Zero; CheckError(ret); } ~Env() { if (envptr != IntPtr.Zero) funcs1.close(envptr, 0); } } static void CheckError(int error) { if (error == 0) return; throw new DatabaseException( Marshal.PtrToStringAnsi(db_strerror(error)) ); } [DllImport(lib)] static extern int db_create(out IntPtr dbp, IntPtr dbenv, uint flags); [DllImport(lib)] static extern IntPtr db_strerror(int error); [DllImport(lib)] static extern int db_env_create(out IntPtr dbenvp, uint flags); private struct Data { const uint DB_DBT_MALLOC = 0x004; public IntPtr Ptr; public uint Size; #pragma warning disable 169 uint ulen, dlen, doff; #pragma warning restore 169 public uint flags; static byte[] staticdata; static void staticalloc(int len) { if (staticdata == null) { staticdata = new byte[len]; } else if (staticdata.Length < len) { staticdata = new byte[len]; } } static IntPtr BytesToAlloc (Array marshal, int length, int stride) { IntPtr mem = Marshal.AllocHGlobal (length*stride); if (mem == IntPtr.Zero) throw new OutOfMemoryException (); bool copied = false; try { if (marshal is byte[]) Marshal.Copy ((byte[])marshal, 0, mem, length); else if (marshal is int[]) Marshal.Copy ((int[])marshal, 0, mem, length); else if (marshal is char[]) Marshal.Copy ((char[])marshal, 0, mem, length); else throw new InvalidOperationException(); copied = true; } finally { if (!copied) Marshal.FreeHGlobal (mem); } return mem; } public static Data New(object data, Serializer binfmt, DataType datatype) { Data ret = new Data(); if (data == null) { ret.Ptr = IntPtr.Zero; ret.Size = 0; } else if (datatype == DataType.UInt) { staticalloc(4); uint value = (uint)data; byte[] d = staticdata; d[0] = (byte)((value) & 0xFF); d[1] = (byte)((value >> 8) & 0xFF); d[2] = (byte)((value >> 16) & 0xFF); d[3] = (byte)((value >> 24) & 0xFF); ret.Ptr = BytesToAlloc(d, 4, 1); ret.Size = (uint)4; } else if (datatype == DataType.IntArray) { int[] values = (int[])data; ret.Size = (uint)(4*values.Length); ret.Ptr = BytesToAlloc(values, values.Length, 4); /*} else if (datatype == DataType.String && false) { // Somehow this is slower than the below path. char[] values = ((string)data).ToCharArray(); ret.Size = (uint)(2*values.Length); ret.Ptr = BytesToAlloc(values, values.Length, 2);*/ } else { MemoryStream binary = binfmt.Serialize(data); if (binary.Length > uint.MaxValue) throw new ArgumentException("data is too large"); ret.Ptr = BytesToAlloc(binary.GetBuffer(), (int)binary.Length, 1); ret.Size = (uint)binary.Length; } return ret; } public static Data New() { Data ret = new Data(); ret.flags = DB_DBT_MALLOC; return ret; } public object GetObject(Serializer binfmt, DataType datatype) { if (Size == 0) return null; if (datatype == DataType.UInt) { staticalloc((int)Size); Marshal.Copy(Ptr, staticdata, 0, (int)Size); byte[] d = staticdata; uint val = (uint)d[0] + ((uint)d[1] << 8) + ((uint)d[2] << 16) + ((uint)d[3] << 24); return val; } else if (datatype == DataType.IntArray) { int[] data = new int[(int)Size/4]; Marshal.Copy(Ptr, data, 0, data.Length); return data; /*} else if (datatype == DataType.String && false) { char[] data = new char[(int)Size/2]; Marshal.Copy(Ptr, data, 0, data.Length); return new String(data);*/ } else { staticalloc((int)Size); Marshal.Copy(Ptr, staticdata, 0, (int)Size); return binfmt.Deserialize(staticdata); } } public void Free() { if (Ptr != IntPtr.Zero) Marshal.FreeHGlobal(Ptr); } } #pragma warning disable 169 const int DB_CREATE = 0x0000001; const int DB_DUP = 0x0000002; const int DB_DUPSORT = 0x0000004; const int DB_THREAD = 0x0000040; const int DB_AUTO_COMMIT = 0x01000000; const int DB_NOTFOUND = (-30989);/* Key/data pair not found (EOF). */ const int DB_KEYEMPTY = (-30997);/* Key/data deleted or never created. */ const int DB_KEYEXIST = (-30996);/* The key/data pair already exists. */ const int DB_INIT_CDB = 0x0001000; /* Concurrent Access Methods. */ const int DB_INIT_LOCK = 0x0002000; /* Initialize locking. */ const int DB_INIT_LOG = 0x0004000; /* Initialize logging. */ const int DB_INIT_MPOOL = 0x0008000; /* Initialize mpool. */ const int DB_INIT_REP = 0x0010000; /* Initialize replication. */ const int DB_INIT_TXN = 0x0020000; /* Initialize transactions. */ const int DB_JOINENV = 0x0040000; /* Initialize all subsystems present. */ const int DB_LOCKDOWN = 0x0080000; /* Lock memory into physical core. */ const int DB_LOG_INMEMORY = 0x00020000; /* Store logs in buffers in memory. */ const int DB_PRIVATE = 0x0100000; /* DB_ENV is process local. */ const int DB_TXN_NOSYNC = 0x0000100;/* Do not sync log on commit. */ const int DB_TXN_NOT_DURABLE = 0x0000200; /* Do not log changes. */ const int DB_DIRTY_READ = 0x04000000; /* Dirty Read. */ const int DB_DIRECT_DB = 0x00002000; struct dbstruct { IntPtr associate; public db_close_delegate close; public db_cursor_delegate cursor; public db_del_delegate del; IntPtr dump; IntPtr err; IntPtr errx; IntPtr dx; public db_get_delegate get; IntPtr pget; IntPtr get_bytesswapped; IntPtr get_cachesize; IntPtr get_dbname; IntPtr get_encrypt_flags; IntPtr get_env; IntPtr get_errfile; IntPtr get_errpfx; IntPtr get_flags; IntPtr get_lorder; IntPtr get_open_flags; IntPtr get_pagesize; IntPtr get_transactional; IntPtr get_type; IntPtr join; IntPtr key_range; public db_open_delegate open; public db_put_delegate put; IntPtr remove; IntPtr rename; public db_truncate_delegate truncate; IntPtr set_append_recno; IntPtr set_alloc; IntPtr set_cachesize; IntPtr set_dup_compare; IntPtr set_encrypt; IntPtr set_errcall; IntPtr set_errfile; IntPtr set_errpfx; IntPtr set_feedback; public db_set_flags_delegate set_flags; IntPtr set_lorder; IntPtr set_msgcall; IntPtr get_msgfile; IntPtr set_msgfile; IntPtr set_pagesize; IntPtr set_paniccall; IntPtr stat; IntPtr stat_print; public db_sync_delegate sync; IntPtr upgrade; IntPtr verify; IntPtr get_bt_minkey; IntPtr set_bt_compare; IntPtr set_bt_maxkey; IntPtr set_bt_minkey; IntPtr set_bt_prefix; IntPtr get_h_ffactor; IntPtr get_h_nelem; IntPtr set_h_ffactor; IntPtr set_h_hash; IntPtr set_h_nelem; IntPtr get_re_delim; IntPtr get_re_len; IntPtr get_re_pad; IntPtr get_re_source; IntPtr set_re_delim; IntPtr set_re_len; IntPtr set_re_pad; IntPtr set_re_source; IntPtr get_q_extentsize; IntPtr set_q_extentsize; } struct cursorstruct { public c_close_delegate close; public c_count_delegate count; public c_del_delegate del; public c_dup_delegate dup; public c_get_delegate get; IntPtr pget; public c_put_delegate put; } struct envstruct1 { public env_close_delegate close; IntPtr dbremove; IntPtr dbrename; IntPtr err; IntPtr errx; public env_open_delegate open; IntPtr remove; IntPtr stat_print; IntPtr fileid_reset; IntPtr is_bigendian; IntPtr lsn_reset; IntPtr prdbt; IntPtr set_alloc; IntPtr set_app_dispatch; IntPtr get_data_dirs; IntPtr set_data_dirs; IntPtr get_encrypt_flags; IntPtr set_encrypt; IntPtr set_errcall; IntPtr get_errfile; IntPtr set_errfile; IntPtr get_errpfx; IntPtr set_errpfx; IntPtr set_feedback; IntPtr get_flags; public env_set_flags_delegate set_flags; } struct envstruct2 { public env_tnx_begin_delegate txn_begin; } struct txnstruct { IntPtr abort; public txn_commit_delegate commit; IntPtr discard; IntPtr prepare; } #pragma warning restore 169 delegate int db_set_flags_delegate(IntPtr db, uint flags); delegate int db_close_delegate(IntPtr dbp, uint flags); delegate int db_open_delegate(IntPtr db, IntPtr txnid, string file, string database, int type, uint flags, int mode); delegate int db_get_delegate(IntPtr db, IntPtr txnid, ref Data key, ref Data data, uint flags); delegate int db_put_delegate(IntPtr db, IntPtr txnid, ref Data key, ref Data data, uint flags); delegate int db_del_delegate(IntPtr db, IntPtr txnid, ref Data key, uint flags); delegate int db_truncate_delegate(IntPtr db, IntPtr txnid, out uint count, uint flags); delegate int db_sync_delegate(IntPtr db, uint flags); delegate int db_cursor_delegate(IntPtr db, IntPtr txnid, out IntPtr cursorp, uint flags); delegate int c_close_delegate(IntPtr cursorp); delegate int c_count_delegate(IntPtr cursorp, out uint count, uint flags); delegate int c_del_delegate(IntPtr cursorp, uint flags); delegate int c_dup_delegate(IntPtr cursorp, out IntPtr newcursorp, uint flags); delegate int c_put_delegate(IntPtr cursorp, ref Data key, ref Data value, uint flags); delegate int c_get_delegate(IntPtr cursorp, ref Data key, ref Data value, uint flags); delegate int env_close_delegate(IntPtr envp, uint flags); delegate int env_open_delegate(IntPtr envp, string home, uint flags, int mode); delegate int env_tnx_begin_delegate(IntPtr envp, IntPtr parenttxn, out IntPtr txnp, uint flags); delegate int env_set_flags_delegate(IntPtr envp, uint flag, int value); delegate int txn_commit_delegate(IntPtr tid, uint flags); } class Serializer { BinaryFormatter binfmt; MemoryStream stream; BinaryWriter writer; public Serializer() { binfmt = new BinaryFormatter(); stream = new MemoryStream(); writer = new BinaryWriter(stream); } public MemoryStream Serialize(object obj) { // Reuse our memory stream by clearing it. // Not thread safe, obviously. stream.SetLength(0); Type type = obj.GetType(); stream.WriteByte((byte)Type.GetTypeCode(type)); switch (Type.GetTypeCode (type)) { case TypeCode.Boolean: writer.Write ((bool)obj); break; case TypeCode.Byte: writer.Write ((byte)obj); break; case TypeCode.Char: writer.Write ((char)obj); break; case TypeCode.DateTime: writer.Write (((DateTime)obj).Ticks); break; case TypeCode.Decimal: writer.Write ((decimal)obj); break; case TypeCode.Double: writer.Write ((double)obj); break; case TypeCode.Int16: writer.Write ((short)obj); break; case TypeCode.Int32: writer.Write ((int)obj); break; case TypeCode.Int64: writer.Write ((long)obj); break; case TypeCode.SByte: writer.Write ((sbyte)obj); break; case TypeCode.Single: writer.Write ((float)obj); break; case TypeCode.UInt16: writer.Write ((ushort)obj); break; case TypeCode.UInt32: writer.Write ((uint)obj); break; case TypeCode.UInt64: writer.Write ((ulong)obj); break; case TypeCode.String: writer.Write ((string)obj); break; default: // TypeCode.Object if (type.IsArray && type.GetArrayRank() == 1 && Type.GetTypeCode(type.GetElementType()) != TypeCode.Object) { int length = ((Array)obj).Length; TypeCode innertype = Type.GetTypeCode(type.GetElementType()); stream.WriteByte(0); stream.WriteByte((byte)innertype); writer.Write(length); for (int i = 0; i < length; i++) { switch (innertype) { case TypeCode.Boolean: writer.Write (((bool[])obj)[i]); break; case TypeCode.Byte: writer.Write (((byte[])obj)[i]); break; case TypeCode.Char: writer.Write (((char[])obj)[i]); break; case TypeCode.DateTime: writer.Write ((((DateTime[])obj)[i]).Ticks); break; case TypeCode.Decimal: writer.Write (((decimal[])obj)[i]); break; case TypeCode.Double: writer.Write (((double[])obj)[i]); break; case TypeCode.Int16: writer.Write (((short[])obj)[i]); break; case TypeCode.Int32: writer.Write (((int[])obj)[i]); break; case TypeCode.Int64: writer.Write (((long[])obj)[i]); break; case TypeCode.SByte: writer.Write (((sbyte[])obj)[i]); break; case TypeCode.Single: writer.Write (((float[])obj)[i]); break; case TypeCode.UInt16: writer.Write (((ushort[])obj)[i]); break; case TypeCode.UInt32: writer.Write (((uint[])obj)[i]); break; case TypeCode.UInt64: writer.Write (((ulong[])obj)[i]); break; case TypeCode.String: writer.Write (((string[])obj)[i]); break; } } } else { stream.WriteByte(1); binfmt.Serialize(stream, obj); } break; } return stream; } public object Deserialize(byte[] data) { MemoryStream stream = new MemoryStream(data); BinaryReader reader = new BinaryReader(stream); TypeCode typecode = (TypeCode)stream.ReadByte(); switch (typecode) { case TypeCode.Boolean: return reader.ReadBoolean (); case TypeCode.Byte: return reader.ReadByte (); case TypeCode.Char: return reader.ReadChar (); case TypeCode.DateTime: return new DateTime(reader.ReadInt64 ()); case TypeCode.Decimal: return reader.ReadDecimal (); case TypeCode.Double: return reader.ReadDouble (); case TypeCode.Int16: return reader.ReadInt16 (); case TypeCode.Int32: return reader.ReadInt32 (); case TypeCode.Int64: return reader.ReadInt64 (); case TypeCode.SByte: return reader.ReadSByte (); case TypeCode.Single: return reader.ReadSingle (); case TypeCode.UInt16: return reader.ReadUInt16 (); case TypeCode.UInt32: return reader.ReadUInt32 (); case TypeCode.UInt64: return reader.ReadUInt64 (); case TypeCode.String: return reader.ReadString (); default: // TypeCode.Object byte objtype = (byte)stream.ReadByte(); if (objtype == 0) { int length = reader.ReadInt32(); TypeCode innertype = (TypeCode)reader.ReadByte(); object obj; switch (typecode) { case TypeCode.Boolean: obj = new Boolean[length]; break; case TypeCode.Byte: obj = new Byte[length]; break; case TypeCode.Char: obj = new Char[length]; break; case TypeCode.DateTime: obj = new DateTime[length]; break; case TypeCode.Decimal: obj = new Decimal[length]; break; case TypeCode.Double: obj = new Double[length]; break; case TypeCode.Int16: obj = new Int16[length]; break; case TypeCode.Int32: obj = new Int32[length]; break; case TypeCode.Int64: obj = new Int64[length]; break; case TypeCode.SByte: obj = new SByte[length]; break; case TypeCode.Single: obj = new Single[length]; break; case TypeCode.UInt16: obj = new UInt16[length]; break; case TypeCode.UInt32: obj = new UInt32[length]; break; case TypeCode.UInt64: obj = new UInt64[length]; break; case TypeCode.String: obj = new String[length]; break; default: throw new InvalidOperationException(); } for (int i = 0; i < length; i++) { switch (innertype) { case TypeCode.Boolean: (((bool[])obj)[i]) = reader.ReadBoolean(); break; case TypeCode.Byte: (((byte[])obj)[i]) = reader.ReadByte(); break; case TypeCode.Char: (((char[])obj)[i]) = reader.ReadChar(); break; case TypeCode.DateTime: (((DateTime[])obj)[i]) = new DateTime(reader.ReadInt32()); break; case TypeCode.Decimal: (((decimal[])obj)[i]) = reader.ReadDecimal(); break; case TypeCode.Double: (((double[])obj)[i]) = reader.ReadDouble(); break; case TypeCode.Int16: (((short[])obj)[i]) = reader.ReadInt16(); break; case TypeCode.Int32: (((int[])obj)[i]) = reader.ReadInt32(); break; case TypeCode.Int64: (((long[])obj)[i]) = reader.ReadInt64(); break; case TypeCode.SByte: (((sbyte[])obj)[i]) = reader.ReadSByte(); break; case TypeCode.Single: (((float[])obj)[i]) = reader.ReadSingle(); break; case TypeCode.UInt16: (((ushort[])obj)[i]) = reader.ReadUInt16(); break; case TypeCode.UInt32: (((uint[])obj)[i]) = reader.ReadUInt32(); break; case TypeCode.UInt64: (((ulong[])obj)[i]) = reader.ReadUInt64(); break; case TypeCode.String: (((string[])obj)[i]) = reader.ReadString(); break; } } return obj; } else if (objtype == 1) { return binfmt.Deserialize(stream); } else { throw new InvalidOperationException(); } } } } } semweb-1.05+dfsg/src/RdfReader.cs0000644000175000017500000001240510774502134016117 0ustar meebeymeebeyusing System; using System.Collections; using System.IO; using System.Web; #if !DOTNET2 using VariableSet = System.Collections.Hashtable; using VariableList = System.Collections.ICollection; using WarningsList = System.Collections.ArrayList; #else using VariableSet = System.Collections.Generic.Dictionary; using VariableList = System.Collections.Generic.ICollection; using WarningsList = System.Collections.Generic.List; #endif namespace SemWeb { public class ParserException : ApplicationException { public ParserException (string message) : base (message) {} public ParserException (string message, Exception cause) : base (message, cause) {} } public abstract class RdfReader : StatementSource, IDisposable { Entity meta = Statement.DefaultMeta; string baseuri = null; WarningsList warnings = new WarningsList(); VariableSet variables = new VariableSet(); bool reuseentities = false; NamespaceManager nsmgr = new NamespaceManager(); public Entity Meta { get { return meta; } set { meta = value; } } public string BaseUri { get { return baseuri; } set { baseuri = value; } } public bool ReuseEntities { get { return reuseentities; } set { reuseentities = value; } } bool StatementSource.Distinct { get { return false; } } public NamespaceManager Namespaces { get { return nsmgr; } } public VariableList Variables { get { return variables.Keys; } } #if !DOTNET2 public IList Warnings { get { return ArrayList.ReadOnly(warnings); } } #else public System.Collections.Generic.ICollection Warnings { get { return warnings.AsReadOnly(); } } #endif protected void AddVariable(Variable variable) { variables[variable] = variable; } public abstract void Select(StatementSink sink); public virtual void Dispose() { } internal static string NormalizeMimeType(string type) { switch (type) { case "text/xml": case "application/xml": case "application/rdf+xml": return "xml"; case "text/n3": case "text/rdf+n3": case "application/n3": case "application/turtle": case "application/x-turtle": return "n3"; } return type; } public static RdfReader Create(string type, string source) { type = NormalizeMimeType(type); switch (type) { case "xml": return new RdfXmlReader(source); case "n3": return new N3Reader(source); default: throw new ArgumentException("Unknown parser or MIME type: " + type); } } public static RdfReader Create(string type, Stream source) { type = NormalizeMimeType(type); switch (type) { case "xml": return new RdfXmlReader(source); case "n3": return new N3Reader(new StreamReader(source, System.Text.Encoding.UTF8)); default: throw new ArgumentException("Unknown parser or MIME type: " + type); } } public static RdfReader LoadFromUri(Uri webresource) { // TODO: Add Accept header for HTTP resources. System.Net.WebRequest rq = System.Net.WebRequest.Create(webresource); System.Net.WebResponse resp = rq.GetResponse(); string mimetype = resp.ContentType; if (mimetype.IndexOf(';') > -1) mimetype = mimetype.Substring(0, mimetype.IndexOf(';')); mimetype = NormalizeMimeType(mimetype.Trim()); RdfReader reader; if (mimetype == "xml" || mimetype == "application/rss+xml") reader = new RdfXmlReader(resp.GetResponseStream()); else if (mimetype == "n3") reader = new N3Reader(new StreamReader(resp.GetResponseStream(), System.Text.Encoding.UTF8)); else if (webresource.LocalPath.EndsWith(".rdf") || webresource.LocalPath.EndsWith(".xml") || webresource.LocalPath.EndsWith(".rss")) reader = new RdfXmlReader(resp.GetResponseStream()); else if (webresource.LocalPath.EndsWith(".n3") || webresource.LocalPath.EndsWith(".ttl") || webresource.LocalPath.EndsWith(".nt")) reader = new N3Reader(new StreamReader(resp.GetResponseStream(), System.Text.Encoding.UTF8)); else throw new InvalidOperationException("Could not determine the RDF format of the resource."); reader.BaseUri = resp.ResponseUri.ToString(); return reader; } internal static TextReader GetReader(string file) { if (file == "-") return Console.In; return new StreamReader(file); } protected void OnWarning(string message) { warnings.Add(message); } internal string GetAbsoluteUri(string baseuri, string uri) { if (baseuri == null) { if (uri == "") throw new ParserException("An empty relative URI was found in the document but could not be converted into an absolute URI because no base URI is known for the document."); return uri; } if (uri.IndexOf(':') != -1) return uri; try { UriBuilder b = new UriBuilder(baseuri); b.Fragment = null; // per W3 RDF/XML test suite return new Uri(b.Uri, uri, true).ToString(); } catch (UriFormatException) { return baseuri + uri; } } } internal class MultiRdfReader : RdfReader { private ArrayList parsers = new ArrayList(); public ArrayList Parsers { get { return parsers; } } public override void Select(StatementSink storage) { foreach (RdfReader p in Parsers) p.Select(storage); } } } semweb-1.05+dfsg/src/SemWeb.csproj0000644000175000017500000000616110774502134016340 0ustar meebeymeebey Debug AnyCPU 8.0.50727 2.0 {98EA8780-0045-41A4-BAA1-575582B92BCC} Library Properties SemWeb SemWeb true full false bin_generics\Debug\ TRACE;DEBUG;DOTNET2 prompt 4 pdbonly true ..\bin_generics\ TRACE;DOTNET2 prompt 4 semweb-1.05+dfsg/src/SQLServerStore.cs0000644000175000017500000002017610774502134017130 0ustar meebeymeebey//#define CATCHEXCEPTIONS using System; using System.Collections; using System.Reflection; using System.Data; using System.Data.SqlClient; using System.Text; [assembly: AssemblyTitle( "SQLServerStore - A SQL Server Store for SemWeb" )] [assembly: AssemblyCopyright( "Copyright (c) 2008 Khaled Hammouda \n\nBased on other SemWeb SQLStore implementations,\nCopyright (c) 2006 Joshua Tauberer \nreleased under the GPL." )] [assembly: AssemblyDescription( "A SQL Server Store for SemWeb" )] namespace SemWeb.Stores { public class SQLServerStore : SQLStore { const int MAX_URI_LENGTH = 400; // this max is to allow creating an index on the uri value // (max key size for index is 900; note that each nvarchar is 2 bytes) SqlConnection connection; string connectionString; Version version; static bool Debug = System.Environment.GetEnvironmentVariable("SEMWEB_DEBUG_SQLSERVER") != null; public SQLServerStore( string connectionString, string table ) : base(table) { this.connectionString = connectionString; } protected override bool HasUniqueStatementsConstraint { get { return true; } } protected override string InsertIgnoreCommand { get { return null; } } protected override bool SupportsInsertCombined { get { return false; } } protected override bool SupportsSubquery { get { return true; } } protected override bool SupportsViews { get { return true; } } protected override bool SupportsLimitClause { get { return false; } } protected override int MaximumUriLength { get { return MAX_URI_LENGTH; } } // SQL Server-specific internal protected bool SupportsVarCharMax { get { return version > new Version( 8, 0 ); } } protected override void CreateNullTest(string column, System.Text.StringBuilder command) { command.Append( column ); command.Append( " IS NULL" ); } protected override void CreateLikeTest(string column, string match, int method, System.Text.StringBuilder command) { command.Append( column ); command.Append( " LIKE '" ); if( method == 1 || method == 2 ) command.Append( "%" ); // contains or ends-with EscapedAppend( command, match, false, true ); if( method != 2 ) command.Append( "%" ); // contains or starts-with command.Append( "' ESCAPE '\\'" ); } protected override void EscapedAppend( StringBuilder b, string str, bool quotes, bool forLike ) { if( quotes ) b.Append( GetQuoteChar() ); for( int i = 0; i < str.Length; i++ ) { char c = str[ i ]; switch( c ) { case '\'': b.Append( c ); b.Append( c ); break; case '%': case '_': if( forLike ) b.Append( '\\' ); b.Append( c ); break; default: b.Append( c ); break; } } if( quotes ) b.Append( GetQuoteChar() ); } public override void Close() { base.Close(); if (connection != null) connection.Close(); } private void Open() { if (connection != null) return; SqlConnection c = new SqlConnection(connectionString); c.Open(); connection = c; // only set field if open was successful using( IDataReader reader = RunReader( "SELECT CAST(SERVERPROPERTY('productversion') AS VARCHAR)" ) ) { reader.Read(); version = new Version(reader.GetString(0)); } } #if !CATCHEXCEPTIONS protected override void RunCommand(string sql) { Open(); if (Debug) Console.Error.WriteLine(sql); using (SqlCommand cmd = new SqlCommand(sql, connection)) { cmd.CommandTimeout = 0; // things like Clear can take a while cmd.ExecuteNonQuery(); } } protected override object RunScalar(string sql) { Open(); using (SqlCommand cmd = new SqlCommand(sql, connection)) { object ret = null; using (IDataReader reader = cmd.ExecuteReader()) { if (reader.Read()) { ret = reader[0]; } } if (Debug) Console.Error.WriteLine(sql + " => " + ret); return ret; } } protected override IDataReader RunReader(string sql) { Open(); if (Debug) Console.Error.WriteLine(sql); using (SqlCommand cmd = new SqlCommand(sql, connection)) { return cmd.ExecuteReader(); } } #else protected override void RunCommand(string sql) { Open(); try { if (Debug) Console.Error.WriteLine(sql); using (SqlCommand cmd = new SqlCommand(sql, connection)) cmd.ExecuteNonQuery(); } catch (Exception e) { Console.WriteLine(sql); throw e; } } protected override object RunScalar(string sql) { Open(); try { using (SqlCommand cmd = new SqlCommand(sql, connection)) { object ret = null; using (IDataReader reader = cmd.ExecuteReader()) { if (reader.Read()) { ret = reader[0]; } } if (Debug) Console.Error.WriteLine(sql + " => " + ret); return ret; } } catch (Exception e) { Console.WriteLine(sql); throw e; } } protected override IDataReader RunReader(string sql) { Open(); try { if (Debug) Console.Error.WriteLine(sql); using (SqlCommand cmd = new SqlCommand(sql, connection)) { return cmd.ExecuteReader(); } } catch (Exception e) { Console.WriteLine(sql); throw e; } } #endif protected override void BeginTransaction() { // disable indexes to speed up bulk inserts RunCommand( "ALTER INDEX [predicate_index] ON " + TableName + "_statements DISABLE" ); RunCommand( "ALTER INDEX [object_index] ON " + TableName + "_statements DISABLE" ); RunCommand( "ALTER INDEX [meta_index] ON " + TableName + "_statements DISABLE" ); } protected override void EndTransaction() { // rebuild indexes. note that if bulk insert was aborted before calling EndTransaction(), // indexes will remain disabled - not good! RunCommand( "ALTER INDEX [predicate_index] ON " + TableName + "_statements REBUILD" ); RunCommand( "ALTER INDEX [object_index] ON " + TableName + "_statements REBUILD" ); RunCommand( "ALTER INDEX [meta_index] ON " + TableName + "_statements REBUILD" ); } protected override char GetQuoteChar() { return '\''; } protected override void CreateTable() { foreach( string cmd in GetCreateTableCommands( TableName ) ) { try { RunCommand( cmd ); } catch( Exception e ) { if( Debug ) Console.Error.WriteLine( e ); } } } protected override void CreateIndexes() { foreach( string cmd in GetCreateIndexCommands( TableName ) ) { try { RunCommand( cmd ); } catch( Exception e ) { if( Debug ) Console.Error.WriteLine( e ); } } } internal static string[] GetCreateTableCommands(string table) { //string textColumnType = "NTEXT"; //if( SupportsVarCharMax ) { // textColumnType = "NVARCHAR(MAX)"; //} string textColumnType = "NVARCHAR(4000)"; return new string[] { "CREATE TABLE " + table + "_statements" + "(subject INT NOT NULL, predicate INT NOT NULL, objecttype INT NOT NULL, object INT NOT NULL, meta INT NOT NULL);", "CREATE TABLE " + table + "_literals" + "(id INT NOT NULL, value " + textColumnType + " NOT NULL, language NVARCHAR(255), datatype NVARCHAR(255), hash NCHAR(28), PRIMARY KEY(id));", "CREATE TABLE " + table + "_entities" + "(id INT NOT NULL, value NVARCHAR(" + MAX_URI_LENGTH + ") NOT NULL, PRIMARY KEY(id));" }; } internal static string[] GetCreateIndexCommands( string table ) { return new string[] { // the "WITH (IGNORE_DUP_KEY = ON)" part in the following index drops duplicate keys during insert operations // .. it is similar to the "INSERT IGNORE" mechanism in MySQL. "CREATE UNIQUE CLUSTERED INDEX subject_full_index ON " + table + "_statements(subject, predicate, object, meta, objecttype) WITH (IGNORE_DUP_KEY = ON);", "CREATE INDEX predicate_index ON " + table + "_statements(predicate, object);", "CREATE INDEX object_index ON " + table + "_statements(object);", "CREATE INDEX meta_index ON " + table + "_statements(meta);", "CREATE UNIQUE INDEX literal_index ON " + table + "_literals(hash);", // "CREATE INDEX literal_value_index ON " + table + "_literals(value);", "CREATE UNIQUE INDEX entity_index ON " + table + "_entities(value) INCLUDE id WITH (IGNORE_DUP_KEY = ON);" }; } } } semweb-1.05+dfsg/src/RdfWriter.cs0000644000175000017500000000403710774502134016173 0ustar meebeymeebeyusing System; using System.Collections; using System.IO; namespace SemWeb { public abstract class RdfWriter : IDisposable, StatementSink { string baseuri; bool closed; public abstract NamespaceManager Namespaces { get; } public string BaseUri { get { return baseuri; } set { baseuri = value; } } protected object GetResourceKey(Resource resource) { return resource.GetResourceKey(this); } protected void SetResourceKey(Resource resource, object value) { resource.SetResourceKey(this, value); } internal static TextWriter GetWriter(string dest) { if (dest == "-") return Console.Out; return new StreamWriter(dest); } bool StatementSink.Add(Statement statement) { Add(statement); return true; } public abstract void Add(Statement statement); public virtual void Close() { if (closed) return; closed = true; } public virtual void Write(StatementSource source) { source.Select(this); } void IDisposable.Dispose() { Close(); } public static RdfWriter Create(string type, TextWriter output) { switch (RdfReader.NormalizeMimeType(type)) { case "xml": #if !SILVERLIGHT return new RdfXmlWriter(output); #else throw new NotSupportedException("RDF/XML output is not supported by the Silverlight build of the SemWeb library."); #endif case "n3": return new N3Writer(output); default: throw new ArgumentException("Unknown parser or MIME type: " + type); } } public static RdfWriter Create(string type, string file) { switch (RdfReader.NormalizeMimeType(type)) { case "xml": #if !SILVERLIGHT return new RdfXmlWriter(file); #else throw new NotSupportedException("RDF/XML output is not supported by the Silverlight build of the SemWeb library."); #endif case "n3": return new N3Writer(file); default: throw new ArgumentException("Unknown parser or MIME type: " + type); } } } public interface CanForgetBNodes { void ForgetBNode(BNode bnode); } } semweb-1.05+dfsg/src/Algos.cs0000644000175000017500000006651010774502134015334 0ustar meebeymeebeyusing System; using System.Collections; using SemWeb; using SemWeb.Query; using SemWeb.Util; namespace SemWeb.Algos { class SubtractionSource : SelectableSource { SelectableSource a, b; public SubtractionSource(SelectableSource a, SelectableSource b) { this.a = a; this.b = b; } public bool Distinct { get { return a.Distinct; } } public bool Contains(Resource resource) { return a.Contains(resource) || b.Contains(resource); } public bool Contains(Statement template) { return Store.DefaultContains(this, template); } public void Select(StatementSink sink) { Select(Statement.All, sink); } public void Select(Statement template, StatementSink sink) { a.Select(template, new Tester(b, sink)); } public void Select(SelectFilter filter, StatementSink sink) { a.Select(filter, new Tester(b, sink)); } class Tester : StatementSink { SelectableSource b; StatementSink c; public Tester(SelectableSource b, StatementSink c) { this.b = b; this.c = c;} public bool Add(Statement s) { if (b.Contains(s)) return true; return c.Add(s); } } } // This class makes a graph lean. public class Lean { // A graph g is not lean if it can be decomposed // into a and b such that a entails b. (where // 'decomposed' means a and b don't overlap // and their union is g.) // One graph a entails another graph b when: // Let V be the set of variables, which is the // set of blank nodes that are in b but not in a. // Let M be a mapping from nodes to nodes taking // nodes that aren't in V to themselves. // Let M* be a mapping from graphs to graphs that // maps a graph to the same graph except where // each node x is replaced by M(x). // If there exists an M such that M*(b) is a // subgraph of a, then a entails b. // Let a and b be a decomposition of g, and V be // the variables in b w.r.t. a (as defined above). // Assume a entails b. // |a| >= |b|. // Since a and b are nonoverlapping, every statement // in b must have a variable. b therefore contains // all and only the statements in g that mention a // variable. (If b had a statement without a variable, // M*(b) would still have that statement, so it could // not be a subgraph of a.) // Define a N-decomposition as a decomposition of // a graph g into g1 and g2 such that the nodes of // N each appear in either g1 or g2, but not both. // In such a decomposition, there is no statement // in g that mentions a node from N and g1 and // also mention a node from N and g2. // Assume b has a V-decomposition into b1 and b2. // Then if a entails b, a entails b1 and a entails b2. // Thus, if b has a V-decomposition, b need not be // considered as its decomposed parts will be considered. // Define 'directly connected' as a relation between // two nodes and a graph that is true iff there is // a statement in the graph that mentions both nodes. // Define connected (generally) as a relation between // two nodes x and y, a graph g, and a set S that is true // iff x and y are directly connected in g or else there // exists another node z in S such that x and z are // connected and z and y are connected, in g with S. // If b has a V-decomposition, then V can be decomposed // into V1 and V2 and b can be decomposed into b1 and b2 // such that all nodes in V1 appear in b1 and all nodes // in V2 appear in b2. It can be seen that a node in // V1 cannot be connected to a node in V2 w.r.t. b and V. // Therefore iff every node in V is connected to every // other node in V, then b has no V-decomposition. // The only b's to consider are those whose variables V // are all connected to each other in b w.r.t. V. // The plan then is first to consider MSGs, and then // look at their subgraphs. public static void MakeLean(Store store) { MakeLean(store, null, null); } public static void MakeLean(Store store, SelectableSource relativeTo) { MakeLean(store, relativeTo, null); } public static void MakeLean(Store store, SelectableSource relativeTo, StatementSink removed) { // Break the data source into MSGs. Make each MSG // lean first (in isolation). Then check each lean MSG // to see if it's already entailed by the whole store, // or by relativeTo if it's provided (not null). MSG.Graph[] msgs = MSG.FindMSGs(store, true); foreach (MSG.Graph msgg in msgs) { // Load the MSG into memory. MemoryStore msg = new MemoryStore(msgg); // unnecessary duplication... // Make this MSG lean. The "right" thing to do is // to consider all of the 'connected' subgraphs of MSG // against the whole store, rather than the MSG in // isolation. But that gets much too expensive. MemoryStore msgremoved = new MemoryStore(); MakeLeanMSG(new Store(msg), msgg.GetBNodes(), msgremoved); // Whatever was removed from msg, remove it from the main graph. store.RemoveAll(msgremoved.ToArray()); // And track what was removed. if (removed != null) msgremoved.Select(removed); // If this MSG is now (somehow) empty (shouldn't happen, // but one never knows), don't test for entailment. if (msg.StatementCount == 0) continue; // Remove this MSG if it is already entailed. // The GraphMatch will treat all blank nodes in // msg as variables. GraphMatch match = new GraphMatch(msg); QueryResultBuffer sink = new QueryResultBuffer(); match.Run(new SubtractionSource(store, msg), sink); if (sink.Bindings.Count > 0) { // This MSG can be removed. store.RemoveAll(msg.ToArray()); if (removed != null) msg.Select(removed); } else if (relativeTo != null) { match.Run(relativeTo, sink); if (sink.Bindings.Count > 0) { // This MSG can be removed. store.RemoveAll(msg.ToArray()); if (removed != null) msg.Select(removed); } } } } private static void MakeLeanMSG(Store msg, ICollection bnodecollection, StatementSink removed) { // To make any graph lean, we try to eliminate duplicate // paths through the graph, where duplicate means we // take some subset of the bnodes and call them variables, // and we relabel them as other bnodes from the remaining // set (the fixed nodes). But there are 2^N subsets of bnodes // we could choose as variables (N=number of bnodes), so we can't // reasonably iterate through them. // I'll make a simplifying assumption that bnode predicates // in the graph will be considered always fixed. // This lets us view the graph as actually a graph (with // nodes and edges), and then we can make the observation that // if variable node V is part of a subgraph that can be removed, // if V directly connects to fixed node F via an edge labeled P, // then F must connect to a fixed node G via an edge also // labeled P. That is, we can start our search looking for // nodes that project two edges with the same label. // Also, we only want to consider contiguous 'paths' -- subsets // of the bnodes connected only through those nodes -- // to see if there is another path in the MSG if we // map bnodes in the first path to nodes in the MSG. // So the strategy is to start at each node in the graph // and consider it fixed. If it has two outgoing // edges with the same property and one terminates on a // bnode, this is the beginning of a possible pair // of redundant paths (the one with the bnode being // eliminable). // However, the path with the bnode // has to be incremented with all of that bnode's // outgoing edges. The other path has to be // incremented in parallel, following the same predicates // to other nodes. If that can't be done, then these // paths are not duplicates. If the parallel predicates // terminate on the very same nodes, the bnode and its edges can // be removed. // From there, each of the nodes the bnode edges terminate on, // besides the initial node, can be considered fixed or // a variable. If it's a variable it might be able to have // one of many possible values, but then the path has to // be expanded to include all of the outgoing edges for this // variable. // Ok, here we go. // If there is only one bnode in the MSG, then // there are no subgraphs to check. That's nice. if (bnodecollection.Count == 1) return; // Remember which bnodes have been removed in // due course. ResSet nodesremoved = new ResSet(); // Remember which nodes are predicates and can't // be considered variable. ResSet predicates = new ResSet(); foreach (Statement s in msg.Select(Statement.All)) predicates.Add(s.Predicate); // Start with each bnode to consider fixed. foreach (BNode b in bnodecollection) { if (nodesremoved.Contains(b)) continue; MakeLeanMSG2(msg, predicates, removed, nodesremoved, b); } } private static void MakeLeanMSG2(Store msg, ResSet predicates, StatementSink removed, ResSet nodesremoved, BNode startingnode) { // Find every pair of two distinct outgoing edges from startingnode // with the same predicate, targeting entities only. MultiMap edges = new MultiMap(); foreach (Statement s in msg.Select(new Statement(startingnode, null, null))) if (s.Object is Entity) edges.Put(new Edge(true, startingnode, s.Predicate, null), s.Object); foreach (Statement s in msg.Select(new Statement(null, null, startingnode))) edges.Put(new Edge(false, startingnode, s.Predicate, null), s.Subject); foreach (Edge e in edges.Keys) { // Make sure we have a distinct set of targets. ResSet targets_set = new ResSet(); foreach (Entity r in edges.Get(e)) targets_set.Add(r); if (targets_set.Count == 1) continue; IList targets = targets_set.ToEntityArray(); // Take every pair of targets, provided // one is a bnode that can be a variable. for (int i = 0; i < targets.Count; i++) { if (!(targets[i] is BNode) || predicates.Contains((BNode)targets[i])) continue; if (nodesremoved.Contains((BNode)targets[i])) continue; for (int j = 0; j < targets.Count; j++) { if (i == j) continue; // Create a new synchronous-path object. SyncPath p = new SyncPath(); p.FixedNodes.Add((Resource)targets[j]); p.FrontierVariables.Add((Resource)targets[i]); p.Mapping[targets[i]] = targets[j]; p.Path[new Edge(e.Direction, e.Start, e.Predicate, (BNode)targets[i])] = p.Path; if (MakeLeanMSG3(msg, predicates, removed, nodesremoved, p)) break; // the target was removed } } } } private static bool MakeLeanMSG3(Store msg, ResSet predicates, StatementSink removed, ResSet nodesremoved, SyncPath path) { // The variable path has to be expanded by including the statements // connected to the variables on the frontier. Statements // mentioning a variable node have already been considered. // The target of each such statement can be considered fixed // or variable. If a variable is considered fixed, the edge // must exist in the MSG substituting the variables for their // values. If it's variable, it has to have at least one // match in the MSG but not as any of the variable nodes. // If all targets are considered fixed (and have matches), // then the variables so far (and their edges) can all be // removed and no more processing needs to be done. // There are (2^N)-1 other considerations. For each of those, // the targets considered variables all become the new // frontier, and this is repeated. // First, get a list of edges from the frontier that we // haven't considered yet. ArrayList alledges = new ArrayList(); foreach (BNode b in path.FrontierVariables) { // Make sure all edges are kept because even the ones // to literals have to be removed when duplication is found. foreach (Statement s in msg.Select(new Statement(b, null, null))) alledges.Add(new Edge(true, b, s.Predicate, s.Object)); foreach (Statement s in msg.Select(new Statement(null, null, b))) alledges.Add(new Edge(false, b, s.Predicate, s.Subject)); } ArrayList newedges = new ArrayList(); ResSet alltargets = new ResSet(); ResSet fixabletargetsset = new ResSet(); // can be fixed ResSet variabletargetsset = new ResSet(); // must be variable foreach (Edge e in alledges) { if (path.Path.ContainsKey(e)) continue; path.Path[e] = e; // This checks if we can keep the target of this edge // fixed, given the variable mappings we have so far. bool isTargetFixable = msg.Contains(e.AsStatement().Replace(path.Mapping)); // If the target of e is any of the following, we // can check immediately if the edge is supported // by the MSG under the variable mapping we have so far: // a named node, literal, fixed node, or predicate // a variable we've seen already // If it's not supported, this path fails. If it is // supported, we're done with this edge. if (!(e.End is BNode) || path.FixedNodes.Contains(e.End) || predicates.Contains(e.End) || path.VariableNodes.Contains(e.End)) { if (!isTargetFixable) return false; continue; // this edge is supported, so we can continue } // The target of e is a new BNode. // If this target is not fixable via this edge, it's // not fixable at all. if (!isTargetFixable) { fixabletargetsset.Remove(e.End); variabletargetsset.Add(e.End); } if (!alltargets.Contains(e.End)) { alltargets.Add(e.End); fixabletargetsset.Add(e.End); } newedges.Add(e); } // If all of the targets were fixable (trivially true also // if there simple were no new edges/targets), then we've reached // the end of this path. We can immediately remove // the edges we've seen so far, under the variable mapping // we've chosen. if (variabletargetsset.Count == 0) { foreach (Edge e in path.Path.Keys) { Statement s = e.AsStatement(); msg.Remove(s); if (removed != null) removed.Add(s); } foreach (Entity e in path.Mapping.Keys) nodesremoved.Add(e); return true; } // At this point, at least one target must be a variable // and we'll have to expand the path in that direction. // We might want to permute through the ways we can // take fixable nodes as either fixed or variable, but // we'll be greedy and assume everything fixable is // fixed and everything else is a variable. path.FixedNodes.AddRange(fixabletargetsset); path.VariableNodes.AddRange(variabletargetsset); // But we need to look at all the ways each variable target // can be mapped to a new value, which means intersecting // the possible matches for each relevant edge. Entity[] variables = variabletargetsset.ToEntityArray(); ResSet[] values = new ResSet[variables.Length]; Entity[][] values_array = new Entity[variables.Length][]; int[] choices = new int[variables.Length]; for (int i = 0; i < variables.Length; i++) { foreach (Edge e in newedges) { if (e.End != variables[i]) continue; // Get the possible values this edge allows Resource[] vr; if (e.Direction) vr = msg.SelectObjects((Entity)path.Mapping[e.Start], e.Predicate); else vr = msg.SelectSubjects(e.Predicate, (Entity)path.Mapping[e.Start]); // Filter out literals and any variables // on the path! The two paths can't intersect // except at fixed nodes. ResSet v = new ResSet(); foreach (Resource r in vr) { if (r is Literal) continue; if (path.Mapping.ContainsKey(r)) continue; v.Add(r); } // Intersect these with the values we have already. if (values[i] == null) values[i] = v; else values[i].RetainAll(v); // If no values are available for this variable, // we're totally done. if (values[i].Count == 0) return false; } choices[i] = values[i].Count; values_array[i] = values[i].ToEntityArray(); } // Now we have to permute through the choice of values. // Make an array of the number of choices for each variable. Permutation p = new Permutation(choices); int[] pstate; while ((pstate = p.Next()) != null) { SyncPath newpath = new SyncPath(); newpath.FixedNodes.AddRange(path.FixedNodes); newpath.VariableNodes.AddRange(path.VariableNodes); newpath.Mapping = (Hashtable)path.Mapping.Clone(); newpath.Path = (Hashtable)path.Path.Clone(); newpath.FrontierVariables = variabletargetsset; for (int i = 0; i < variables.Length; i++) { Entity value = values_array[i][pstate[i]]; newpath.Mapping[variables[i]] = value; newpath.FixedNodes.Add(value); } if (MakeLeanMSG3(msg, predicates, removed, nodesremoved, newpath)) return true; } return false; } private class Edge { bool direction; Entity start, predicate; Resource end; public Edge(bool direction, Entity start, Entity predicate, Resource end) { this.direction = direction; this.start = start; this.predicate = predicate; this.end = end; } public bool Direction { get { return direction; } } public Entity Start { get { return start; } } public Entity Predicate { get { return predicate; } } public Resource End { get { return end; } } public override int GetHashCode() { return predicate.GetHashCode(); } public override bool Equals(object other) { Edge e = (Edge)other; return Direction == e.Direction && Start == e.Start && Predicate == e.Predicate && End == e.End; } public Statement AsStatement() { if (Direction) return new Statement(Start, Predicate, End); else return new Statement((Entity)End, Predicate, Start); } } private class SyncPath { public ResSet FixedNodes = new ResSet(); public ResSet VariableNodes = new ResSet(); public ResSet FrontierVariables = new ResSet(); public Hashtable Mapping = new Hashtable(); public Hashtable Path = new Hashtable(); } private class Sink : StatementSink { ResSet variables; Store store; public Sink(ResSet variables, Store store) { this.variables = variables; this.store = store; } public bool Add(Statement s) { s.Meta = Statement.DefaultMeta; if (store.Contains(s)) return true; if (variables.Contains(s.Subject) || variables.Contains(s.Predicate) || variables.Contains(s.Object)) store.Add(s); return true; } } } public class MSG { // These methods find minimal self-contained graphs // in a graph by recursively expanding a subgraph. public static MemoryStore FindMSG(SelectableSource store, Entity node) { MemoryStore ret = new MemoryStore(); FindMSG(store, node, ret); return ret; } public static void FindMSG(SelectableSource store, Entity node, StatementSink msg) { if (node.Uri != null) throw new ArgumentException("node must be anonymous"); ResSet nodesSeen = new ResSet(); ResSet nodesToAdd = new ResSet(); nodesToAdd.Add(node); while (nodesToAdd.Count > 0) { ResSet nodes = nodesToAdd; nodesToAdd = new ResSet(); Sink sink = new Sink(msg, nodesToAdd); foreach (Entity n in nodes) { if (nodesSeen.Contains(n)) continue; nodesSeen.Add(n); store.Select(new Statement(n, null, null, null), sink); store.Select(new Statement(null, n, null, null), sink); store.Select(new Statement(null, null, n, null), sink); } } } private class Sink : StatementSink { StatementSink msg; ResSet add; public Sink(StatementSink msg, ResSet add) { this.msg = msg; this.add = add; } public bool Add(Statement s) { if (msg is SelectableSource && ((SelectableSource)msg).Contains(s)) return true; msg.Add(s); if (s.Subject.Uri == null) add.Add(s.Subject); if (s.Predicate.Uri == null) add.Add(s.Predicate); if (s.Object is Entity && s.Object.Uri == null) add.Add(s.Object); return true; } } // This method finds all minimal self-contained graphs // by painting nodes colors (the colors happen to be // objects) in one pass over the statements and then doing // a second pass to put each statement mentioning a bnode // into the appropriate graph structure. public static Graph[] FindMSGs(SelectableSource source, bool loadIntoMemory) { FindMSGsSink sink = new FindMSGsSink(source, loadIntoMemory); source.Select(Statement.All, sink); ArrayList graphs = new ArrayList(sink.colors.Keys); return (Graph[])graphs.ToArray(typeof(Graph)); } public class Graph : StatementSource { SelectableSource source; internal ResSet entities = new ResSet(); internal MemoryStore statements; internal Graph(SelectableSource source) { this.source = source; } public bool Distinct { get { return source.Distinct; } } public bool Contains(Entity e) { return entities.Contains(e); } public ICollection GetBNodes() { return entities.Items; } public void Select(StatementSink s) { if (statements == null) source.Select(Statement.All, new Sink(this, s)); else statements.Select(s); } private class Sink : StatementSink { Graph g; StatementSink s; public Sink(Graph g, StatementSink s) { this.g = g; this.s = s; } public bool Add(Statement s) { if (g.Contains(s.Subject) || g.Contains(s.Predicate) || (s.Object is Entity && g.Contains((Entity)s.Object))) return this.s.Add(s); return true; } } public static void LoadGraphs(Graph[] graphs) { } } class FindMSGsSink : StatementSink { SelectableSource source; bool loadin; Hashtable bnodecolors = new Hashtable(); public Hashtable colors = new Hashtable(); public FindMSGsSink(SelectableSource source, bool loadIntoMem) { this.source = source; loadin = loadIntoMem; } public bool Add(Statement s) { // Get the color of any painted entity in the statement. int numcon = 0; Graph color = null; if (s.Subject.Uri == null) { Go1(s.Subject, ref color); numcon++; } if (s.Predicate.Uri == null) { Go1(s.Predicate, ref color); numcon++; } if (s.Object.Uri == null && s.Object is Entity) { Go1((Entity)s.Object, ref color); numcon++; } // If there isn't a blank node here, nothing to do. if (numcon == 0) return true; // No nodes were colored yet, so pick a new color. if (color == null) { color = new Graph(source); if (loadin) color.statements = new MemoryStore(); colors[color] = color; } // Apply that color to all of the nodes. if (s.Subject.Uri == null) Go2(s.Subject, ref color); if (s.Predicate.Uri == null) Go2(s.Predicate, ref color); if (s.Object.Uri == null && s.Object is Entity) Go2((Entity)s.Object, ref color); // And put this statement into that color if (loadin) color.statements.Add(s); return true; } void Go1(Entity e, ref Graph color) { if (color == null && bnodecolors.ContainsKey(e)) { color = (Graph)bnodecolors[e]; } } void Go2(Entity e, ref Graph color) { if (bnodecolors.ContainsKey(e)) { Graph curcolor = (Graph)bnodecolors[e]; if (curcolor != color) { // Everyone that has the color curcolor // has to switch to the color color. foreach (Entity e2 in curcolor.entities) bnodecolors[e2] = color; color.entities.AddRange(curcolor.entities); if (loadin) foreach (Statement s in curcolor.statements) color.statements.Add(s); colors.Remove(curcolor); } } else { bnodecolors[e] = color; color.entities.Add(e); } } } } public class Connectivity { public static void Build(StatementSource graph, out bool[,] connectivity, Hashtable indexes) { connectivity = new bool[indexes.Count, indexes.Count]; graph.Select(new Sink(connectivity, indexes)); } class Sink : StatementSink { bool[,] connectivity; Hashtable indexes; public Sink(bool[,] connectivity, Hashtable indexes) { this.connectivity = connectivity; this.indexes = indexes; } public bool Add(Statement st) { int s = indexes.ContainsKey(st.Subject) ? (int)indexes[st.Subject] : -1; int p = indexes.ContainsKey(st.Predicate) ? (int)indexes[st.Predicate] : -1; int o = indexes.ContainsKey(st.Object) ? (int)indexes[st.Object] : -1; if (s != -1 && p != -1) { connectivity[s,p]=true; connectivity[p,s]=true; } if (s != -1 && o != -1) { connectivity[s,o]=true; connectivity[o,s]=true; } if (p != -1 && o != -1) { connectivity[p,o]=true; connectivity[o,p]=true; } return true; } } } // This class uses a connectivity matrix to iterate // through the connected subsets of the nodes, that is, // subsets of the nodes that are connected by traveling // just through those nodes. The Next() method returns // a bool[] indicating the nodes in the subgraph. public class SubgraphIterator { // This is based on something I read. // We'll maintain a queue of connected // subgraphs to process. The queue will // start with a one-node subgraph for each // bnode. Then each time we process a // subgraph, we'll extend the graph by one // node every way we can and add all of those // new subgraphs into the queue -- unless we've // already processed the subgraph. int n; bool[,] conn; Queue queue = new Queue(); Hashtable processed = new Hashtable(); public SubgraphIterator(bool[,] connectivity) { this.conn = connectivity; n = conn.GetLength(0); for (int i = 0; i < n; i++) QueueSubgraph(null, i); } void QueueSubgraph(Subgraph a, int b) { Subgraph s = new Subgraph(); s.nodes = new bool[n]; s.touching = new bool[n]; if (a != null) { a.nodes.CopyTo(s.nodes, 0); a.touching.CopyTo(s.touching, 0); } s.nodes[b] = true; s.sum = unchecked((a != null ? a.sum : 0) + b); if (processed.ContainsKey(s)) return; for (int i = 0; i < n; i++) if (conn[b,i]) s.touching[i] = true; processed[s] = processed; queue.Enqueue(s); } public bool[] Next() { if (queue.Count == 0) return null; Subgraph s = (Subgraph)queue.Dequeue(); // Create a new s for every node touching // s but not in s. for (int i = 0; i < n; i++) if (!s.nodes[i] && s.touching[i]) QueueSubgraph(s, i); return s.nodes; } class Subgraph { public bool[] nodes; public bool[] touching; public int sum; public override int GetHashCode() { return sum; } public override bool Equals(object o) { Subgraph g = (Subgraph)o; for (int i = 0; i < nodes.Length; i++) if (nodes[i] != g.nodes[i]) return false; return true; } } } } semweb-1.05+dfsg/src/RdfXmlWriter.cs0000644000175000017500000004255010774502134016656 0ustar meebeymeebeyusing System; using System.Collections; using System.IO; using System.Text; using System.Xml; using SemWeb; // Since this class relies on the XmlDocument class, // it must be excluded completely from the Silverlight // build. #if !SILVERLIGHT namespace SemWeb { public class RdfXmlWriter : RdfWriter { public class Options { public bool UseTypedNodes = true; public bool UseRdfID = true; public bool UseRdfLI = true; public bool EmbedNamedNodes = true; public bool UsePredicateAttributes = true; public bool UseParseTypeLiteral = true; internal bool UseParseTypeResource = false; // this is broken because it uses Clone(), which breaks references in Hashtables public static Options Full = new Options(); public static Options XMP; static Options() { XMP = new Options(); XMP.UseTypedNodes = false; XMP.UseRdfID = false; XMP.UseParseTypeLiteral = false; XMP.UsePredicateAttributes = false; } } Options opts; XmlWriter writer; NamespaceManager ns = new NamespaceManager(); XmlDocument doc; bool initialized = false; bool closeStream = false; Hashtable nodeMap = new Hashtable(); long anonCounter = 0; Hashtable anonAlloc = new Hashtable(); Hashtable nameAlloc = new Hashtable(); Hashtable nodeReferences = new Hashtable(); ArrayList predicateNodes = new ArrayList(); Hashtable nodeLiCounter = new Hashtable(); static Entity rdftype = "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"; static Entity rdfli = "http://www.w3.org/1999/02/22-rdf-syntax-ns#li"; static string RDFNS_ = NS.RDF + "_"; public RdfXmlWriter(XmlDocument dest) : this(dest, Options.Full) { } public RdfXmlWriter(string file) : this (file, Options.Full) { } public RdfXmlWriter(TextWriter writer) : this(writer, Options.Full) { } public RdfXmlWriter(XmlWriter writer) : this(writer, Options.Full) { } public RdfXmlWriter(XmlDocument dest, Options style) { if (dest == null) throw new ArgumentNullException("dest"); if (style == null) throw new ArgumentNullException("style"); doc = dest; opts = style; } public RdfXmlWriter(string file, Options style) : this(GetWriter(file), style) { closeStream = true; } public RdfXmlWriter(TextWriter writer, Options style) : this(NewWriter(writer), style) { } public RdfXmlWriter(XmlWriter writer, Options style) { if (writer == null) throw new ArgumentNullException("writer"); if (style == null) throw new ArgumentNullException("style"); this.writer = writer; this.opts = style; } private static XmlWriter NewWriter(TextWriter writer) { XmlTextWriter ret = new XmlTextWriter(writer); ret.Formatting = Formatting.Indented; ret.Indentation = 1; ret.IndentChar = '\t'; ret.Namespaces = true; return ret; } private void Start() { if (initialized) return; initialized = true; if (doc == null) doc = new XmlDocument(); doc.AppendChild(doc.CreateXmlDeclaration("1.0", null, null)); string rdfprefix = ns.GetPrefix(NS.RDF); if (rdfprefix == null) { if (ns.GetNamespace("rdf") == null) { rdfprefix = "rdf"; ns.AddNamespace(NS.RDF, "rdf"); } } XmlElement root = doc.CreateElement(rdfprefix + ":RDF", NS.RDF); foreach (string prefix in ns.GetPrefixes()) root.SetAttribute("xmlns:" + prefix, ns.GetNamespace(prefix)); if (BaseUri != null) root.SetAttribute("xml:base", BaseUri); doc.AppendChild(root); } public override NamespaceManager Namespaces { get { return ns; } } char[] normalizechars = { '#', '/' }; private void Normalize(string uri, out string prefix, out string localname) { if (uri == "") throw new InvalidOperationException("The empty URI cannot be used as an element node."); if (BaseUri == null && uri.StartsWith("#")) { // This isn't quite right, but it prevents dieing // for something not uncommon in N3. The hash // gets lost. prefix = ""; localname = uri.Substring(1); return; } if (ns.Normalize(uri, out prefix, out localname)) return; // No namespace prefix was registered, so come up with something. int last = uri.LastIndexOfAny(normalizechars); if (last <= 0) throw new InvalidOperationException("No namespace was registered and no prefix could be automatically generated for <" + uri + ">"); int prev = uri.LastIndexOfAny(normalizechars, last-1); if (prev <= 0) throw new InvalidOperationException("No namespace was registered and no prefix could be automatically generated for <" + uri + ">"); string n = uri.Substring(0, last+1); localname = uri.Substring(last+1); // TODO: Make sure the local name (here and anywhere in this // class) is a valid XML name. if (Namespaces.GetPrefix(n) != null) { prefix = Namespaces.GetPrefix(n); return; } prefix = uri.Substring(prev+1, last-prev-1); // Remove all non-xmlable (letter) characters. StringBuilder newprefix = new StringBuilder(); foreach (char c in prefix) if (char.IsLetter(c)) newprefix.Append(c); prefix = newprefix.ToString(); if (prefix.Length == 0 || prefix == "xmlns") { // There were no letters in the prefix or the prefix was "xmlns", which isn't valid! prefix = "ns"; } if (Namespaces.GetNamespace(prefix) == null) { doc.DocumentElement.SetAttribute("xmlns:" + prefix, n); Namespaces.AddNamespace(n, prefix); return; } int ctr = 1; while (true) { if (Namespaces.GetNamespace(prefix + ctr) == null) { prefix += ctr; doc.DocumentElement.SetAttribute("xmlns:" + prefix, n); Namespaces.AddNamespace(n, prefix); return; } ctr++; } } private void SetAttribute(XmlElement element, string nsuri, string prefix, string localname, string val) { XmlAttribute attr = doc.CreateAttribute(prefix, localname, nsuri); attr.Value = val; element.SetAttributeNode(attr); } private XmlElement GetNode(Entity entity, string type, XmlElement context) { string uri = entity.Uri; if (nodeMap.ContainsKey(entity)) { XmlElement ret = (XmlElement)nodeMap[entity]; if (type == null) return ret; // Check if we have to add new type information to the existing node. if (ret.NamespaceURI + ret.LocalName == NS.RDF + "Description") { // Replace the untyped node with a typed node, copying in // all of the attributes and children of the old node. string prefix, localname; Normalize(type, out prefix, out localname); XmlElement newnode = doc.CreateElement(prefix + ":" + localname, ns.GetNamespace(prefix)); ArrayList children = new ArrayList(); foreach (XmlNode childnode in ret) children.Add(childnode); foreach (XmlNode childnode in children) { ret.RemoveChild(childnode); newnode.AppendChild(childnode); } foreach (XmlAttribute childattr in ret.Attributes) newnode.Attributes.Append((XmlAttribute)childattr.Clone()); ret.ParentNode.ReplaceChild(newnode, ret); nodeMap[entity] = newnode; if (nodeReferences.ContainsKey(ret)) { nodeReferences[newnode] = nodeReferences[ret]; nodeReferences.Remove(ret); } if (nodeLiCounter.ContainsKey(ret)) { nodeLiCounter[newnode] = nodeLiCounter[ret]; nodeLiCounter.Remove(ret); } return newnode; } else { // The node is already typed, so just add a type predicate. XmlElement prednode = CreatePredicate(ret, NS.RDF + "type"); SetAttribute(prednode, NS.RDF, ns.GetPrefix(NS.RDF), "resource", type); return ret; } } Start(); XmlElement node; if (type == null) { node = doc.CreateElement(ns.GetPrefix(NS.RDF) + ":Description", NS.RDF); } else { string prefix, localname; Normalize(type, out prefix, out localname); node = doc.CreateElement(prefix + ":" + localname, ns.GetNamespace(prefix)); } if (uri != null) { string fragment; if (!Relativize(uri, out fragment)) SetAttribute(node, NS.RDF, ns.GetPrefix(NS.RDF), "about", uri); else if (fragment.Length == 0) SetAttribute(node, NS.RDF, ns.GetPrefix(NS.RDF), "about", ""); else if (!opts.UseRdfID) SetAttribute(node, NS.RDF, ns.GetPrefix(NS.RDF), "about", uri); else SetAttribute(node, NS.RDF, ns.GetPrefix(NS.RDF), "ID", fragment.Substring(1)); // chop off hash } else { // The nodeID attribute will be set the first time the node is referenced, // in case it's never referenced so we don't need to put a nodeID on it. } if (context == null) doc.DocumentElement.AppendChild(node); else context.AppendChild(node); nodeMap[entity] = node; return node; } private XmlElement CreatePredicate(XmlElement subject, Entity predicate) { if (predicate.Uri == null) throw new InvalidOperationException("Predicates cannot be blank nodes when serializing RDF to XML."); if (opts.UseRdfLI && predicate.Uri.StartsWith(RDFNS_)) { try { int n = int.Parse(predicate.Uri.Substring(RDFNS_.Length)); int expected = nodeLiCounter.ContainsKey(subject) ? (int)nodeLiCounter[subject] : 1; if (n == expected) { predicate = rdfli; nodeLiCounter[subject] = expected+1; } } catch { } } string prefix, localname; Normalize(predicate.Uri, out prefix, out localname); XmlElement pred = doc.CreateElement(prefix + ":" + localname, ns.GetNamespace(prefix)); subject.AppendChild(pred); predicateNodes.Add(pred); return pred; } public override void Add(Statement statement) { if (statement.AnyNull) throw new ArgumentNullException(); XmlElement subjnode; bool hastype = opts.UseTypedNodes && statement.Predicate == rdftype && statement.Object.Uri != null; subjnode = GetNode(statement.Subject, hastype ? statement.Object.Uri : null, null); if (hastype) return; XmlElement prednode = CreatePredicate(subjnode, statement.Predicate); if (!(statement.Object is Literal)) { if (!nodeMap.ContainsKey(statement.Object) && (opts.EmbedNamedNodes || statement.Object.Uri == null)) { // Embed the object node right within the predicate node // if we haven't already created a node for the object // and if we're allowed to do so. GetNode((Entity)statement.Object, null, prednode); } else { // Otherwise, we will reference the object with a // rdf:resource or rdf:nodeID attribute. // Create the object node at top-level if a node doesn't exist. if (!nodeMap.ContainsKey(statement.Object)) GetNode((Entity)statement.Object, null, null); if (statement.Object.Uri != null) { string uri = statement.Object.Uri, fragment; if (Relativize(statement.Object.Uri, out fragment)) uri = fragment; SetAttribute(prednode, NS.RDF, ns.GetPrefix(NS.RDF), "resource", uri); } else { SetAttribute(prednode, NS.RDF, ns.GetPrefix(NS.RDF), "nodeID", GetBNodeRef((BNode)statement.Object)); // If this is the first reference to the bnode, put its nodeID on it, since we // delayed setting that attribute until we needed it. SetAttribute((XmlElement)nodeMap[statement.Object], NS.RDF, ns.GetPrefix(NS.RDF), "nodeID", GetBNodeRef((BNode)statement.Object)); } // Track at most one reference to this entity as a statement object if (nodeReferences.ContainsKey(nodeMap[statement.Object])) nodeReferences[nodeMap[statement.Object]] = null; else nodeReferences[nodeMap[statement.Object]] = prednode; } } else { Literal literal = (Literal)statement.Object; if (opts.UseParseTypeLiteral && literal.DataType != null && literal.DataType == "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral") { prednode.InnerXml = literal.Value; SetAttribute(prednode, NS.RDF, ns.GetPrefix(NS.RDF), "parseType", "Literal"); } else { prednode.InnerText = literal.Value; if (literal.Language != null) prednode.SetAttribute("xml:lang", literal.Language); if (literal.DataType != null) SetAttribute(prednode, NS.RDF, ns.GetPrefix(NS.RDF), "datatype", literal.DataType); } } } private string GetBNodeRef(BNode node) { if (node.LocalName != null && (nameAlloc[node.LocalName] == null || (BNode)nameAlloc[node.LocalName] == node) && !node.LocalName.StartsWith("bnode")) { nameAlloc[node.LocalName] = node; // ensure two different nodes with the same local name don't clash return node.LocalName; } else if (anonAlloc[node] != null) { return (string)anonAlloc[node]; } else { string id = "bnode" + (anonCounter++); anonAlloc[node] = id; return id; } } void MakeDocumentNice() { // For any node that was referenced by exactly one predicate, // move the node into that predicate, provided the subject // isn't itself! foreach (DictionaryEntry e in nodeReferences) { XmlElement node = (XmlElement)e.Key; XmlElement predicate = (XmlElement)e.Value; // Node is already embedded somewhere. if (node.ParentNode != node.OwnerDocument.DocumentElement) continue; // Node is referenced by more than one predicate if (predicate == null) continue; // The option to do this for named nodes is turned off. if (!opts.EmbedNamedNodes && node.HasAttribute("about", NS.RDF)) continue; // we can have circular references between nodes (also // between a node and itself), // which we can't nicely collapse this way. Make sure // that the predicate we want to insert ourselves into // is not a descendant of the node we're moving! XmlNode ancestry = predicate.ParentNode; bool canMove = true; while (ancestry != null) { if (ancestry == node) { canMove = false; break; } ancestry = ancestry.ParentNode; } if (!canMove) continue; node.ParentNode.RemoveChild(node); predicate.AppendChild(node); predicate.RemoveAttribute("resource", NS.RDF); // it's on the lower node predicate.RemoveAttribute("nodeID", NS.RDF); // it's on the lower node node.RemoveAttribute("nodeID", NS.RDF); // not needed anymore } // Predicates that have rdf:Description nodes 1) with only literal // properties (with no language/datatype/parsetype) can be // condensed by putting the literals onto the predicate as // attributes, 2) with no literal attributes but resource // objects can be condensed by using parseType=Resource. foreach (XmlElement pred in predicateNodes) { // Is this a property with a resource as object? if (!(pred.FirstChild is XmlElement)) continue; // literal value if (pred.Attributes.Count > 0) continue; // parseType=Literal already // Make sure this resource is not typed XmlElement obj = (XmlElement)pred.FirstChild; if (obj.NamespaceURI + obj.LocalName != NS.RDF + "Description") continue; // untyped // And make sure it has no attributes already but an rdf:about if (obj.Attributes.Count > 1) continue; // at most a rdf:about attribute if (obj.Attributes.Count == 1 && obj.Attributes[0].NamespaceURI+obj.Attributes[0].LocalName != NS.RDF+"about") continue; // See if all its predicates are literal with no attributes. bool hasSimpleLits = false; bool allSimpleLits = true; foreach (XmlElement opred in obj.ChildNodes) { if (opred.FirstChild is XmlElement) allSimpleLits = false; if (opred.Attributes.Count > 0) allSimpleLits = false; hasSimpleLits = true; } if (hasSimpleLits && allSimpleLits && obj.ChildNodes.Count <= 3) { if (!opts.UsePredicateAttributes) continue; // Condense by moving all of obj's elements to attributes of the predicate, // and turning a rdf:about into a rdf:resource, and then remove obj completely. if (obj.Attributes.Count == 1) SetAttribute(pred, NS.RDF, ns.GetPrefix(NS.RDF), "resource", obj.Attributes[0].Value); foreach (XmlElement opred in obj.ChildNodes) SetAttribute(pred, opred.NamespaceURI, ns.GetPrefix(opred.NamespaceURI), opred.LocalName, opred.InnerText); pred.RemoveChild(obj); if (pred.ChildNodes.Count == 0) pred.IsEmpty = true; } else if (obj.ChildNodes.Count == 0 && obj.Attributes.Count == 1) { // Condense by turning a rdf:about into a rdf:resource, // and then remove obj completely. SetAttribute(pred, NS.RDF, ns.GetPrefix(NS.RDF), "resource", obj.Attributes[0].Value); pred.RemoveChild(obj); if (pred.ChildNodes.Count == 0) pred.IsEmpty = true; } else if (obj.Attributes.Count == 0) { // no rdf:about if (!opts.UseParseTypeResource) continue; // Condense this node using parseType=Resource pred.RemoveChild(obj); foreach (XmlElement opred in obj.ChildNodes) pred.AppendChild(opred.Clone()); SetAttribute(pred, NS.RDF, ns.GetPrefix(NS.RDF), "parseType", "Resource"); } } } public override void Close() { Start(); // make sure the document node was written MakeDocumentNice(); base.Close(); if (writer != null) { doc.WriteTo(writer); if (closeStream) writer.Close(); else writer.Flush(); } } bool Relativize(string uri, out string fragment) { fragment = null; if (BaseUri == null) return false; if (!uri.StartsWith(BaseUri) || uri.Length < BaseUri.Length) return false; string rel = uri.Substring(BaseUri.Length); if (rel == "") { fragment = ""; return true; } if (rel[0] == '#') { fragment = rel; return true; } return false; } } } #endif semweb-1.05+dfsg/src/semweb.pidb0000644000175000017500000067765110774502134016100 0ustar meebeymeebeySystem.Collections.Hashtable LoadFactorVersionComparerHashCodeProviderHashSizeKeysValuesequalityComparer @?"   LastValidTaskListTokensVersionLastValidTagCommentsFIXME:2;TODO:1;HACK:1;UNDONE:0  3m) RdfXmlReaderSemWebSemWeb.RdfReaderXmlBaseAwareReaderSystem.Xml.XmlReader_readerSystem.Xml.XmlReader_basesSystem.Collections.Stack_baseUri System.Uritemp3resolverSystem.Xml.XmlResolver3BaseURI Q%&AttributeCount H[[&[['QCanResolveEntity 3\\)\\*VDepth H]]]]?EOF 3^^^^< HasAttributes 3__&__'PHasValue 3``!``"F IsDefault 3aa"aa#HIsEmptyElement 3bb'bb(R LocalName Qff$ff%J" Qgggg @ NamespaceURI Qhh'hh(P NameTable System.Xml.XmlNameTableii*ii+PNodeType System.Xml.XmlNodeTypejj(jj)MPrefix Qkk!kk"D QuoteChar 5ll"ll#H ReadState System.Xml.ReadStatemm'mm(MValue Qnn nn!BXmlLang Qoo"oo#FXmlSpace System.Xml.XmlSpacepp%pp&JctorreaderSystem.Xml.XmlReader22Read3!!"!<"CloseU>>!>>!6 GetAttributeQH??/??/S GetAttributeQ!Q@@5@@5\ GetAttributeQ localNameQ namespaceNameQAAPAAPIsStartElement3BB*BB*OIsStartElement3!QCC5CC5^IsStartElement3 localNameQ namespaceNameQDDPDDPLookupNamespaceQprefixQEE:EE:fMoveToAttributeUHFF0FF0PMoveToAttribute3!QGG6GG6`MoveToAttribute3 localNameQ namespaceNameQHHQHHQ MoveToContentSystem.Xml.XmlNodeTypeII0II0T MoveToElement3JJ)JJ)MMoveToFirstAttribute3KK0KK0[MoveToNextAttribute3LL/LL/YReadAttributeValue3MM.MM.WReadElementStringQNN/NN/WReadElementStringQ!QOO:OO:fReadElementStringQ localNameQ namespaceNameQPPUPPUReadEndElementUQQ*QQ*H ReadInnerXmlQRR*RR*M ReadOuterXmlQSS*SS*MReadStartElementUTT,TT,LReadStartElementU!QUU7UU7[ReadStartElementU localNameQ namespaceNameQVVRVVR ReadStringQWW(WW(I ResolveEntityUXX)XX)FSkipUYY YY 4XmlBaseAwareReaderQHcc'XmlBaseAwareReaderQ!Qdd-XmlBaseAwareReaderQ localNameQ namespaceNameQeeHqq xmlSystem.Xml.XmlReader  blankNodes7* namedNodesSemWeb.Util.UriMap$seenIDs7'storageSemWeb.StatementSinkrdfTypeEntityJrdfFirstEntityJrdfRestEntityJrdfNilEntityJ rdfSubjectEntityJ rdfPredicateEntityJ rdfObjectEntityJ rdfStatementEntityJctordocumentSystem.Xml.XmlDocument ,",ctordocumentSystem.Xml.XmlReader$$ *$)*ctordocumentSystem.IO.TextReader++ O+,OctordocumentK.. J./JctordocumentSystem.IO.TextReaderbaseUriQ11 L13LctordocumentKbaseUriQ55 c56cctorfileQbaseUriQ88 T89TctorfileQ;; N;<NLoadNamespacesU>> >N SelectUstorageSemWeb.StatementSinkPP5Pu5CurNodeQwwwissetH attributeQ&& UnrelativizeQuriQ** GetBlankNodeEntitynodeIDQ-- GetNamedNodeEntityuriQ**ParseDescriptionEntity$$ParsePropertyAttributes3entityEntity66ParsePropertyNodesUsubjectEntity22 ParsePropertyUsubjectEntityliIndexH>>IsRestrictedName3!Q--IsDeprecatedName3!Q--IsValidXmlName3!Q++OnErrorUQ'' OnWarningUQ---/home/tauberer/dev/semweb/src/RdfXmlReader.cs r-/home/tauberer/dev/semweb/src/RdfXmlReader.cs r! N3WriterSemWebSemWeb.RdfWriterFormats@NTriples Turtle Notation3 NamespaceManager2SemWeb.NamespaceManager addedPrefixes65 AddNamespaceUuriQprefixQ@@ writerSystem.IO.TextWriter ns!SemWeb.N3Writer.NamespaceManager2 2 hasWritten3 closed3  closeStream3 lastSubjectQ3 lastPredicateQ3 anonNames7) anonNameMap7+formatSemWeb.N3Writer.Formats# xsdIntegerQ> xsdDoubleQ< Namespaces SemWeb.NamespaceManager&&.&&/EFormat`SemWeb.N3Writer.Formats((((K ctorfileQ 7 7OctorwriterSystem.IO.TextWriter"" %"$%U statementSemWeb.Statement**0*.0CloseU000;LiteralQliteralLiteral==*=B*URIQentityEntityDD$Dh$HexDigit5c5digitHjj2jp2EscapeQstrQrr,r,WriteStatement2UsubjQpredQ'QEE WriteThingUWQ'')/home/tauberer/dev/semweb/src/N3Writer.cs )/home/tauberer/dev/semweb/src/N3Writer.cs  RdfXmlWriterSemWebSemWeb.RdfWriterOptions UseTypedNodes3 %UseRdfID3 UseRdfLI3 EmbedNamedNodes3'UsePredicateAttributes3.UseParseTypeLiteral3+UseParseTypeResource3/FullSemWeb.RdfXmlWriter.Options/XMPSemWeb.RdfXmlWriter.Optionsctor   optsSemWeb.RdfXmlWriter.Options""writerSystem.Xml.XmlWriter##nsSemWeb.NamespaceManager$$0docSystem.Xml.XmlDocument&& initialized3'' closeStream3((nodeMap7**' anonCounterI,, anonAlloc7--) nameAlloc7..)nodeReferences7//.predicateNodes600. nodeLiCounter711-rdftypeEntity33MrdfliEntity44IRDFNS_Q55'normalizechars5uu( Namespaces SemWeb.NamespaceManagerss.ss/EctordestSystem.Xml.XmlDocument77 C77CGctorfileQ99 ?99?CctorwriterSystem.IO.TextWriter;; F;;FJctorwriterSystem.Xml.XmlWriter== E==EIctordestSystem.Xml.XmlDocumentstyleSemWeb.RdfXmlWriter.Options?? 7?D7ctorfileQstyleSemWeb.RdfXmlWriter.OptionsFF QFFQictorwriterSystem.IO.TextWriterstyleSemWeb.RdfXmlWriter.OptionsHH YHHY]ctorwriterSystem.Xml.XmlWriterstyleSemWeb.RdfXmlWriter.OptionsJJ 7JO7 NewWriterSystem.Xml.XmlWriterwriterSystem.IO.TextWriterQQ8QX8StartUZZZq NormalizeUuriQprefixQ localnameQwwNwN SetAttributeUelementSystem.Xml.XmlElementnsuriQprefixQ localnameQvalQkkGetNodeSystem.Xml.XmlElemententityEntity_Q System.Xml.XmlElementMMCreatePredicateSystem.Xml.XmlElementsubjectSystem.Xml.XmlElement predicateEntityK*KU statementSemWeb.Statement,,0,f0 GetBNodeRefQ%BNodehh)hu)MakeDocumentNiceUwwwCloseU Relativize3uriQfragmentQ33-/home/tauberer/dev/semweb/src/RdfXmlWriter.cs -/home/tauberer/dev/semweb/src/RdfXmlWriter.cs a  StatementList SemWeb.Util8MEnumer9listSemWeb.Util.StatementListH  Current M9ctorlistSemWeb.Util.StatementList   %  %GResetU    'MoveNext3   DefaultInitialCapacityH3_sizeH_itemsSemWeb.StatementCount H-SyncRoot M2IsSynchronized 37ctor ctor statementsSemWeb.Statement //EnsureCapacityU H))ShiftUH H++H`SemWeb.Statement"",U.SemWeb.Statement""Clear(URemoveAt(UH**ReverseUToArraySemWeb.StatementToArraySemWeb.StatementtR'' GetEnumerator9%%BCopyToUdest System.ArraystartH,,SortU StatementListSemWeb.StatementH #%/home/tauberer/dev/semweb/src/Util.cs%/home/tauberer/dev/semweb/src/Util.csGMultiMap SemWeb.UtilMitems7%Keys System.Collections.IEnumerablector PutUM`M,,ClearU    GetSystem.Collections.IListM%/home/tauberer/dev/semweb/src/Util.cs%/home/tauberer/dev/semweb/src/Util.cs StatementMap SemWeb.UtilMSlotused3 removed3 SemWeb.Statement`MhashMixH   EnumeratorA9hostSemWeb.Util.StatementMapstampHposHsizeH hasCurrentKey3 currentKeySemWeb.Statement! currentValueM Entry "System.Collections.DictionaryEntry Key SemWeb.StatementValue MCurrent MctorhostSemWeb.Util.StatementMap ))FailFastUResetUMoveNext3 HashValuesSystem.Collections.IEnumerablehostSemWeb.Util.StatementMapctorhostSemWeb.Util.StatementMap )) GetEnumerator(9// CHAIN_MARKERH""-xstrQ##WinUseH%%modificationCountH&&! loadFactorP''tableSemWeb.Util.StatementMap.Slot(( thresholdH))hashKeysSemWeb.Util.StatementList++" hashValues#SemWeb.Util.StatementMap.HashValues,,!primeTblH.QCount HkkkoKeys SemWeb.Util.StatementListqqq{Values System.Collections.IEnumerable}}} ctorSS *SS*-ctorcapacityH loadFactorPUU 7Ui7Clear(U ContainsKey3SemWeb.Statement**,(USemWeb.Statement--AdjustThresholdU""SetTableUtableSemWeb.Util.StatementMap.Slot((FindHSemWeb.Statement##RehashU$PutImplUSemWeb.Statement`M overwrite3''E'hE TestPrime3bHmm)mx) CalcPrimeHbHzz(z(ToPrimeHbH&& StatementMapMSemWeb.Statement %%/home/tauberer/dev/semweb/src/Util.cs%/home/tauberer/dev/semweb/src/Util.csg Permutation SemWeb.UtilM0HmaxH   ctornH!! )!")ctornHH## ##(#ctorchoicesH)) $),$NextH---=ResetU>>>@%/home/tauberer/dev/semweb/src/Util.csA%/home/tauberer/dev/semweb/src/Util.csA UriMap SemWeb.UtilSystem.Collections.IDictionaryMNodeChildrenSystem.Collections.IDictionary ValueM FindChildSemWeb.Util.UriMap.Node!Qcreate3created3EE RemoveChild3!Q(( splitchars59RootSemWeb.Util.UriMap.Node  H  IsSynchronized 3"#<SyncRoot M7 IsFixedSize 3 9 IsReadOnly 38Keys 8'''' PValues 8((!(("RCount HIIII- ctor  UM`M1!1Contains3M##(#%( GetEnumerator(System.Collections.IDictionaryEnumerator))4))4],UM++&+-&CopyToUdest System.ArrayH//1//1Z GetEnumerator911*11*SClearU???BContains3uriQDD#DG#FindNodeSemWeb.Util.UriMap.NodeuriQcreate3KK)KW),UuriQYY!Yl!NextPieceStartUpositionHnn(np( NextPieceQuriQpositionHrr1r1UriMapMM&UriMapMuriQ33 !'/home/tauberer/dev/semweb/src/UriMap.cs'/home/tauberer/dev/semweb/src/UriMap.csDistinctStatementsSink SemWeb.UtilSemWeb.StatementSinkMsinkSemWeb.StatementSinkhashSemWeb.Util.StatementMap resetMeta3ctorsinkSemWeb.StatementSink resetMeta3 DD3.SemWeb.Statement%/home/tauberer/dev/semweb/src/Util.cs~%/home/tauberer/dev/semweb/src/Util.cs~ ResSet SemWeb.Util8items7 %keys8 Items 8<<<BCount HTTTT3IsSynchronized 3XX"XX#<SyncRoot MYYYY7ctor  ctoritems8 ##%ctoritems(System.Collections.Generic.ICollection`1SemWeb.Resource HHctoritems(System.Collections.Generic.ICollection`1Variable JJctoritems7 " ""UresSemWeb.Resource$$ $' AddRangeUitems8******,AddRangeUitems(System.Collections.Generic.ICollection`1T,,K,1KTSemWeb.Resource,UresSemWeb.Resource33#36#Contains3resSemWeb.Resource88%8:%AddRangeUsetSemWeb.Util.ResSetDD#DI#ClearUKKKNCloneSemWeb.Util.ResSetPPPR GetEnumerator9VV%VV%LCopyToU System.ArrayH[[4[^4ToArraySemWeb.Resource```d ToEntityArrayEntityff"fj" RetainAllUsetSemWeb.Util.ResSetll$lp$%/home/tauberer/dev/semweb/src/Util.cs|%/home/tauberer/dev/semweb/src/Util.cs|MyReaderSemWebMrSystem.IO.TextReaderLineHColHpeekedH peekCountHLocation SemWeb.LocationGctorreaderSystem.IO.TextReader %%5PeekHPeek2HReadH)/home/tauberer/dev/semweb/src/N3Reader.cs)/home/tauberer/dev/semweb/src/N3Reader.csq StatementSemWebSystem.IEquatable`1SemWeb.StatementSystem.IComparable`1SemWeb.StatementM*/home/tauberer/dev/semweb/src/Statement.cs */home/tauberer/dev/semweb/src/Statement.cs MultiRdfReaderSemWebSemWeb.RdfReaderparsers6/Parsers 67SelectUstorageSemWeb.StatementSink55*/home/tauberer/dev/semweb/src/RdfReader.cs*/home/tauberer/dev/semweb/src/RdfReader.csSubgraphIterator SemWeb.AlgosMSubgraphnodes3touching3sumH GetHashCodeH%%53&M))nH conn3 queueSystem.Collections.Queue processed7)ctor connectivity3 00 QueueSubgraphUa&SemWeb.Algos.SubgraphIterator.SubgraphbH((Next3&/home/tauberer/dev/semweb/src/Algos.cs &/home/tauberer/dev/semweb/src/Algos.cs MSG SemWeb.AlgosSinkSemWeb.StatementSinkmsgSemWeb.StatementSinkaddSemWeb.Util.ResSetctormsgSemWeb.StatementSinkaddSemWeb.Util.ResSet ..3.SemWeb.Statement   ' ((GraphSemWeb.StatementSourceSinkSemWeb.StatementSinkgSemWeb.Algos.MSG.GraphNN .SemWeb.StatementSinkOOctorgSemWeb.Algos.MSG.Graph.SemWeb.StatementSinkPP *PS*3.SemWeb.StatementTT!TZ!M[M[sourceSemWeb.SelectableSource77entitiesSemWeb.Util.ResSet88, statementsSemWeb.MemoryStore99$Distinct 3????<ctorsourceSemWeb.SelectableSource;; +;=+Contains3Entity@@"@B" GetBNodes8CC"CE"SelectU.SemWeb.StatementSinkFF'FK' LoadGraphsUgraphsSemWeb.Algos.MSG.Graph\\1\]16^6^ FindMSGsSinkSemWeb.StatementSinksourceSemWeb.SelectableSourceaaloadin3bb bnodecolors7cc,colors7dd.ctorsourceSemWeb.SelectableSource loadIntoMem3ee BeeBr3.SemWeb.Statementff f Go1UEntitycolorSemWeb.Algos.MSG.Graph''Go2UEntitycolorSemWeb.Algos.MSG.Graph''``FindMSGSemWeb.MemoryStorestoreSemWeb.SelectableSource%EntityIIFindMSGUstoreSemWeb.SelectableSource%EntitymsgSemWeb.StatementSinkUUFindMSGsSemWeb.Algos.MSG.GraphsourceSemWeb.SelectableSourceloadIntoMemory3//O/4O&/home/tauberer/dev/semweb/src/Algos.cs&/home/tauberer/dev/semweb/src/Algos.cs Connectivity SemWeb.AlgosMSinkSemWeb.StatementSink connectivity3 indexes7ctor connectivity3indexes7 883stSemWeb.Statement!!BuildUgraphSemWeb.StatementSource connectivity3indexes7__&/home/tauberer/dev/semweb/src/Algos.cs&/home/tauberer/dev/semweb/src/Algos.csJSubtractionSource SemWeb.AlgosSemWeb.SelectableSourceTesterSemWeb.StatementSinkbSemWeb.SelectableSource!!cSemWeb.StatementSink""ctorbSemWeb.SelectableSourcecSemWeb.StatementSink## 6##6Q3.SemWeb.Statement$$ $'  ( (aSemWeb.SelectableSource bSemWeb.SelectableSource Distinct 36ctoraSemWeb.SelectableSourcebSemWeb.SelectableSource C CContains3resourceSemWeb.Resource**Contains3templateSemWeb.Statement++SelectUsinkSemWeb.StatementSink))SelectUtemplateSemWeb.StatementsinkSemWeb.StatementSink==SelectUfilter SelectFiltersinkSemWeb.StatementSink>>&/home/tauberer/dev/semweb/src/Algos.cs )&/home/tauberer/dev/semweb/src/Algos.cs )mLean SemWeb.AlgosEdge direction3startEntity predicateEntityendSemWeb.Resource Direction 37Start Entity1 Predicate Entity9End SemWeb.Resource/ctor direction3startEntity predicateEntityendSemWeb.Resource MM GetHashCodeH%%I3otherM-- AsStatementSemWeb.Statement""SyncPath FixedNodesSemWeb.Util.ResSet, VariableNodesSemWeb.Util.ResSet/FrontierVariablesSemWeb.Util.ResSet3Mapping7/Path7,SinkSemWeb.StatementSink variablesSemWeb.Util.ResSetstore SemWeb.Storector variablesSemWeb.Util.ResSetstore SemWeb.Store ..3.SemWeb.Statement  MakeLeanUstore SemWeb.Storejj+jl+MakeLeanUstore SemWeb.Store relativeToSemWeb.SelectableSourcennHnpHMakeLeanUstore SemWeb.Store relativeToSemWeb.SelectableSourceremovedSemWeb.StatementSinkrr_r_ MakeLeanMSGUmsg SemWeb.Storebnodecollection8removedSemWeb.StatementSinkaa MakeLeanMSG2Umsg SemWeb.Store predicatesSemWeb.Util.ResSetremovedSemWeb.StatementSink nodesremovedSemWeb.Util.ResSet startingnodeBNode,, MakeLeanMSG33msg SemWeb.Store predicatesSemWeb.Util.ResSetremovedSemWeb.StatementSink nodesremovedSemWeb.Util.ResSet)SemWeb.Algos.Lean.SyncPath''&/home/tauberer/dev/semweb/src/Algos.cs,&/home/tauberer/dev/semweb/src/Algos.cs,ModifiableSourceSemWebSemWeb.SelectableSourceSemWeb.StatementSinkClearU)))ImportUsourceSemWeb.StatementSource**'*',UtemplateSemWeb.Statement++#+# RemoveAllU templatesSemWeb.Statement,,),)ReplaceUfindEntity replacementEntity--1-1ReplaceUfindSemWeb.Statement replacementSemWeb.Statement..7.7+/home/tauberer/dev/semweb/src/Interfaces.cs(/+/home/tauberer/dev/semweb/src/Interfaces.cs(/SelectableSourceSemWebSemWeb.StatementSourceContains3resourceSemWeb.Resource$$Contains3templateSemWeb.Statement%%SelectUtemplateSemWeb.StatementsinkSemWeb.StatementSink77SelectUfilter SelectFiltersinkSemWeb.StatementSink88+/home/tauberer/dev/semweb/src/Interfaces.cs +/home/tauberer/dev/semweb/src/Interfaces.cs   RdfReaderSemWebSemWeb.StatementSourceSystem.IDisposablemetaEntity'baseuriQwarnings6. variables7- reuseentities3nsmgrSemWeb.NamespaceManager3Meta`Entity%BaseUri`Q'''. ReuseEntities`30007Distinct 399 99!: Namespaces SemWeb.NamespaceManager;;%;;&? Variables 8== ==!CWarnings System.Collections.IList@@@@IWarnings (System.Collections.Generic.ICollection`1QBBABBBk AddVariableUvariableVariableEE0EG0SelectUsinkSemWeb.StatementSinkII2I2(UKK KL NormalizeMimeTypeQ_QNN8N^8CreateSemWeb.RdfReader_QsourceQ``=`k=CreateSemWeb.RdfReader_QsourceKmm=mx= LoadFromUriSemWeb.RdfReader webresource System.Urizz7z7 GetReaderSystem.IO.TextReaderfileQ44 OnWarningUQ++GetAbsoluteUriQbaseuriQuriQ==*/home/tauberer/dev/semweb/src/RdfReader.cs*/home/tauberer/dev/semweb/src/RdfReader.cso StatementSinkSemWebM3 statementSemWeb.Statement%%!%!+/home/tauberer/dev/semweb/src/Interfaces.cs$&+/home/tauberer/dev/semweb/src/Interfaces.cs$& StaticSourceSemWebSemWeb.SelectableSourceStatementCount H GetEntitiesEntity  GetPredicatesEntity GetMetasEntity GetPersistentBNodeIdQ%BNode + +GetBNodeFromPersistentIdBNode persistentIdQ!!7!7+/home/tauberer/dev/semweb/src/Interfaces.cs"+/home/tauberer/dev/semweb/src/Interfaces.cs" RdfWriterSemWebSystem.IDisposableSemWeb.StatementSinkMbaseuriQclosed3 Namespaces SemWeb.NamespaceManager . /7BaseUri`Q   GetResourceKeyMresourceSemWeb.Resource55SetResourceKeyUresourceSemWeb.Resource`MAA GetWriterSystem.IO.TextWriterdestQ4!43 statementSemWeb.Statement##.#&.U statementSemWeb.Statement((0(0Close(U***-Write(UsourceSemWeb.StatementSource//4/14U3335CreateSemWeb.RdfWriter_QoutputSystem.IO.TextWriter77A7@ACreateSemWeb.RdfWriter_QfileQBB;BK;*/home/tauberer/dev/semweb/src/RdfWriter.csL*/home/tauberer/dev/semweb/src/RdfWriter.csLReasonerSemWeb.InferenceDistinct 3 !)SelectUtemplateSemWeb.Statement targetModelSemWeb.SelectableSourcesinkSemWeb.StatementSink[[SelectUfilter SelectFilter targetModelSemWeb.SelectableSourcesinkSemWeb.StatementSinkee MetaQuerySemWeb.Query.MetaQueryResultgraphSemWeb.StatementoptionsSemWeb.Query.QueryOptions targetModelSemWeb.SelectableSourcessQueryUgraphSemWeb.StatementoptionsSemWeb.Query.QueryOptions targetModelSemWeb.SelectableSource-SemWeb.Query.QueryResultSink||*/home/tauberer/dev/semweb/src/Inference.cs*/home/tauberer/dev/semweb/src/Inference.cs6 RDFSSemWeb.InferenceSemWeb.Inference.Reasoner SchemaSinkSemWeb.StatementSinkrdfsSemWeb.Inference.RDFS66ctorparentSemWeb.Inference.RDFS77 "77"53.SemWeb.Statement88'88'J5959ExpandSemWeb.StatementSinktable7sinkSemWeb.StatementSinkctort7.SemWeb.StatementSink //H3.SemWeb.Statement      ExpandDomRanSemWeb.StatementSinkdomranHmap7sinkSemWeb.StatementSinkctordrH propToType7.SemWeb.StatementSink FF3.SemWeb.Statement %  & &Expand3SemWeb.StatementSinkdomranH))table7** superclasses7++sinkSemWeb.StatementSink,,ctordrHt7sc7.SemWeb.StatementSink-- F--F3.SemWeb.Statement.. .< (=(=PredMapSemWeb.StatementSinktable7@@sinkSemWeb.StatementSinkAActort7.SemWeb.StatementSinkBB 0BB0I3.SemWeb.StatementCC CL ?M?M LiteralDTMapSemWeb.StatementSinkranges7PPsinkSemWeb.StatementSinkQQctort7.SemWeb.StatementSinkRR 5RR5O3.SemWeb.StatementSS Sc OdOd_Entity1 subClassOfEntity> subPropertyOfEntityDdomainEntity6rangeEntity4 rdfsresourceEntity> superclasses7, subclasses7* superprops7*subprops7(domains7$$'ranges7%%&domainof7&&(rangeof7''' schemasinkSemWeb.StatementSink))Schema SemWeb.StatementSink3333=Distinct 3gg gg!:ctor++ +-ctorschemaSemWeb.StatementSource// //1/AddAxiomUschemastatementSemWeb.Statement;;+;K+ AddRelationUaEntitybEntitysupers7subs7MMIMPI AddRelationUaEntitybEntityh7RR4RY4 LoadSchemaUsourceSemWeb.StatementSource[[1[e1SelectUfilter SelectFilterSemWeb.SelectableSourcesinkSemWeb.StatementSinkii^i^ GetClosureEntitystartEntitytable7 includeStart3OO GetClosureEntitystartsSemWeb.Util.ResSettable7 includeStarts3QQ GetClosureEntitystartsSemWeb.Resourcetable7 includeStarts3UU MetaQuerySemWeb.Query.MetaQueryResultgraphSemWeb.StatementoptionsSemWeb.Query.QueryOptionsSemWeb.SelectableSourcefffoQueryUgraphSemWeb.StatementoptionsSemWeb.Query.QueryOptionsSemWeb.SelectableSourcesinkSemWeb.Query.QueryResultSinkqqq~ RewriteGraphUgraphSemWeb.StatementoptionsSemWeb.Query.QueryOptionsgraph2SemWeb.Statementoptions2SemWeb.Query.QueryOptionssinkSemWeb.Query.QueryResultSink GetQueryResSemWeb.Util.ResSet.SemWeb.StatementHoptionsSemWeb.Query.QueryOptionsLL<%/home/tauberer/dev/semweb/src/RDFS.cs;%/home/tauberer/dev/semweb/src/RDFS.cs;f RdfRelationSemWeb.InferenceSemWeb.Query.RdfFunctionEvaluateSemWeb.ResourceSemWeb.Resource6 6Evaluate3SemWeb.Resource(SemWeb.ResourceGG1/home/tauberer/dev/semweb/src/SpecialRelations.cs1/home/tauberer/dev/semweb/src/SpecialRelations.cs(EulerSemWeb.InferenceSemWeb.Inference.ReasonerSequentheadSemWeb.StatementbodySemWeb.StatementcallArgs7ctorheadSemWeb.StatementbodySemWeb.StatementcallArgs7 HHctorheadSemWeb.Statement ""ToRuleRule3&M)) GetHashCodeH%%^Q%% op_Equality3aSemWeb.Inference.Euler.SequentbSemWeb.Inference.Euler.Sequent66 op_Inequality3aSemWeb.Inference.Euler.SequentbSemWeb.Inference.Euler.Sequent66GroundsrcSemWeb.Inference.Euler.Sequentenv7ctorsrcSemWeb.Inference.Euler.Sequentenv7 -- ToProofStep ProofStep"" EvidenceItemheadSemWeb.Statementbody6env7ToProofProof^Q%% QueueItemruleSemWeb.Inference.Euler.SequentsrcSemWeb.Inference.Euler.SequentindHparent SemWeb.Inference.Euler.QueueItemenv7ground6Clone SemWeb.Inference.Euler.QueueItem^Q%% RemoveMetaSemWeb.StatementSinksinkSemWeb.StatementSinkWWctor.SemWeb.StatementSinkXX &XX&43.SemWeb.StatementYY Y\ V]V]Debug3_rules7builtInRelations7% entLOGIMPLIESEntity_ entRDFFIRSTEntityc entRDFRESTEntitya entRDFNILEntity_Distinct 3++ ++!:ctor %ctorrulesSemWeb.StatementSource'' &')&SelectUfilter SelectFilter targetModelSemWeb.SelectableSourcesinkSemWeb.StatementSink--e-Ce QueryCheckArgUgraphSemWeb.StatementEE0EM0 MetaQuerySemWeb.Query.MetaQueryResultgraphSemWeb.StatementoptionsSemWeb.Query.QueryOptions targetModelSemWeb.SelectableSourceOOOUQueryUgraphSemWeb.StatementoptionsSemWeb.Query.QueryOptions targetModelSemWeb.SelectableSourcesinkSemWeb.Query.QueryResultSinkWWWProveProofworldSemWeb.SelectableSourcegoalSemWeb.StatementAAprove6cases7worldSemWeb.SelectableSourcegoalSemWeb.StatementmaxNumberOfStepsHrrunify3.SemWeb.Resourcesenv7dSemWeb.Resourcedenv7f3\\unify3.SemWeb.Statementsenv7dSemWeb.Statementdenv7f3^ ^evaluateSemWeb.ResourcetSemWeb.Resourceenv7  > >evaluateSemWeb.StatementtSemWeb.Statementenv7@"@ RulesToCases7rulesSemWeb.StatementSource))?)T?CollectCallArgsUbodySemWeb.MemoryStorecallArgs7__L_L AddSequentUcases7.SemWeb.Inference.Euler.Sequent==FindUserPredicateSemWeb.Inference.RdfRelation predicateEntityAA&/home/tauberer/dev/semweb/src/Euler.cs&/home/tauberer/dev/semweb/src/Euler.csMathSumRelationSemWeb.Inference.Relations+SemWeb.Inference.Relations.MathListRelationUri Q\ InitialValue System.Decimal+,LCombineSystem.DecimalleftSystem.DecimalrightSystem.DecimalCC\1/home/tauberer/dev/semweb/src/SpecialRelations.cs1/home/tauberer/dev/semweb/src/SpecialRelations.csMathDegreesRelationSemWeb.Inference.Relations,SemWeb.Inference.Relations.MathUnaryRelationUri Q@@@@`EvaluateForwardSystem.DecimalleftSystem.DecimalAA<AA<rEvaluateReverseSystem.DecimalrightSystem.DecimalBB=BB=t1/home/tauberer/dev/semweb/src/SpecialRelations.cs?C1/home/tauberer/dev/semweb/src/SpecialRelations.cs?CQMathNotGreaterThanRelationSemWeb.Inference.Relations1SemWeb.Inference.Relations.MathComparisonRelationUri QgEvaluate3leftSystem.DecimalrightSystem.Decimal>>1/home/tauberer/dev/semweb/src/SpecialRelations.cs1/home/tauberer/dev/semweb/src/SpecialRelations.csKMathLessThanRelationSemWeb.Inference.Relations1SemWeb.Inference.Relations.MathComparisonRelationUri QaEvaluate3leftSystem.DecimalrightSystem.Decimal>>1/home/tauberer/dev/semweb/src/SpecialRelations.cs1/home/tauberer/dev/semweb/src/SpecialRelations.csMathSinhRelationSemWeb.Inference.Relations,SemWeb.Inference.Relations.MathUnaryRelationUri QYYYY]EvaluateForwardSystem.DecimalleftSystem.DecimalZZ<ZZ<iEvaluateReverseSystem.DecimalrightSystem.Decimal[[=[[=Z1/home/tauberer/dev/semweb/src/SpecialRelations.csX\1/home/tauberer/dev/semweb/src/SpecialRelations.csX\MathNegationRelationSemWeb.Inference.Relations,SemWeb.Inference.Relations.MathUnaryRelationUri QJJJJaEvaluateForwardSystem.DecimalleftSystem.DecimalKK<KK<NEvaluateReverseSystem.DecimalrightSystem.DecimalLL=LL=P1/home/tauberer/dev/semweb/src/SpecialRelations.csIM1/home/tauberer/dev/semweb/src/SpecialRelations.csIMTMathQuotientRelationSemWeb.Inference.Relations+SemWeb.Inference.Relations.MathPairRelationUri QaEvaluateSystem.DecimalleftSystem.DecimalrightSystem.DecimalDD]1/home/tauberer/dev/semweb/src/SpecialRelations.cs1/home/tauberer/dev/semweb/src/SpecialRelations.csUMathRemainderRelationSemWeb.Inference.Relations+SemWeb.Inference.Relations.MathPairRelationUri QbEvaluateSystem.DecimalleftSystem.DecimalrightSystem.DecimalDD]1/home/tauberer/dev/semweb/src/SpecialRelations.cs1/home/tauberer/dev/semweb/src/SpecialRelations.csMathProductRelationSemWeb.Inference.Relations+SemWeb.Inference.Relations.MathListRelationUri Q` InitialValue System.Decimal+,KCombineSystem.DecimalleftSystem.DecimalrightSystem.DecimalCC\1/home/tauberer/dev/semweb/src/SpecialRelations.cs1/home/tauberer/dev/semweb/src/SpecialRelations.csNMathGreaterThanRelationSemWeb.Inference.Relations1SemWeb.Inference.Relations.MathComparisonRelationUri QdEvaluate3leftSystem.DecimalrightSystem.Decimal>>1/home/tauberer/dev/semweb/src/SpecialRelations.cs1/home/tauberer/dev/semweb/src/SpecialRelations.cs[MathIntegerQuotientRelationSemWeb.Inference.Relations+SemWeb.Inference.Relations.MathPairRelationUri QhEvaluateSystem.DecimalleftSystem.DecimalrightSystem.DecimalDDn1/home/tauberer/dev/semweb/src/SpecialRelations.cs1/home/tauberer/dev/semweb/src/SpecialRelations.csMathSinRelationSemWeb.Inference.Relations,SemWeb.Inference.Relations.MathUnaryRelationUri QTTTT\EvaluateForwardSystem.DecimalleftSystem.DecimalUU<UU<hEvaluateReverseSystem.DecimalrightSystem.DecimalVV=VV=k1/home/tauberer/dev/semweb/src/SpecialRelations.csSW1/home/tauberer/dev/semweb/src/SpecialRelations.csSWMMathNotEqualToRelationSemWeb.Inference.Relations1SemWeb.Inference.Relations.MathComparisonRelationUri QcEvaluate3leftSystem.DecimalrightSystem.Decimal>>1/home/tauberer/dev/semweb/src/SpecialRelations.cs1/home/tauberer/dev/semweb/src/SpecialRelations.csMathAbsoluteValueRelationSemWeb.Inference.Relations,SemWeb.Inference.Relations.MathUnaryRelationUri Q6666fEvaluateForwardSystem.DecimalleftSystem.Decimal77<77<aEvaluateReverseSystem.DecimalrightSystem.Decimal88=88=Z1/home/tauberer/dev/semweb/src/SpecialRelations.cs591/home/tauberer/dev/semweb/src/SpecialRelations.cs59MathCosRelationSemWeb.Inference.Relations,SemWeb.Inference.Relations.MathUnaryRelationUri Q;;;;\EvaluateForwardSystem.DecimalleftSystem.Decimal<<<<<<hEvaluateReverseSystem.DecimalrightSystem.Decimal======k1/home/tauberer/dev/semweb/src/SpecialRelations.cs:>1/home/tauberer/dev/semweb/src/SpecialRelations.cs:>NMathNotLessThanRelationSemWeb.Inference.Relations1SemWeb.Inference.Relations.MathComparisonRelationUri QdEvaluate3leftSystem.DecimalrightSystem.Decimal>>1/home/tauberer/dev/semweb/src/SpecialRelations.cs1/home/tauberer/dev/semweb/src/SpecialRelations.csMathTanRelationSemWeb.Inference.Relations,SemWeb.Inference.Relations.MathUnaryRelationUri Q^^^^\EvaluateForwardSystem.DecimalleftSystem.Decimal__<__<hEvaluateReverseSystem.DecimalrightSystem.Decimal``=``=k1/home/tauberer/dev/semweb/src/SpecialRelations.cs]a1/home/tauberer/dev/semweb/src/SpecialRelations.cs]aMathTanhRelationSemWeb.Inference.Relations,SemWeb.Inference.Relations.MathUnaryRelationUri Qcccc]EvaluateForwardSystem.DecimalleftSystem.Decimaldd<dd<iEvaluateReverseSystem.DecimalrightSystem.Decimalee=ee=Z1/home/tauberer/dev/semweb/src/SpecialRelations.csbf1/home/tauberer/dev/semweb/src/SpecialRelations.csbfMathPairRelationSemWeb.Inference.RelationsSemWeb.Inference.RdfRelationEvaluateSystem.DecimalleftSystem.DecimalrightSystem.DecimaliiDiDEvaluate3SemWeb.Resource(SemWeb.ResourcekkHkH1/home/tauberer/dev/semweb/src/SpecialRelations.csh1/home/tauberer/dev/semweb/src/SpecialRelations.csh$MathUnaryRelationSemWeb.Inference.RelationsSemWeb.Inference.RdfRelationEvaluateForwardSystem.DecimalleftSystem.Decimal<<EvaluateReverseSystem.DecimalrightSystem.Decimal==Evaluate3SemWeb.Resource(SemWeb.ResourceH2H1/home/tauberer/dev/semweb/src/SpecialRelations.cs31/home/tauberer/dev/semweb/src/SpecialRelations.cs3ZMathExponentiationRelationSemWeb.Inference.Relations+SemWeb.Inference.Relations.MathPairRelationUri QgEvaluateSystem.DecimalleftSystem.DecimalrightSystem.DecimalDD1/home/tauberer/dev/semweb/src/SpecialRelations.cs1/home/tauberer/dev/semweb/src/SpecialRelations.csMathListRelationSemWeb.Inference.RelationsSemWeb.Inference.RdfRelation InitialValue System.Decimal+,4CombineSystem.DecimalleftSystem.DecimalrightSystem.DecimalCCEvaluate3SemWeb.Resource(SemWeb.ResourceHH1/home/tauberer/dev/semweb/src/SpecialRelations.cs1/home/tauberer/dev/semweb/src/SpecialRelations.cs<MathComparisonRelationSemWeb.Inference.RelationsSemWeb.Inference.RdfRelationEvaluateSemWeb.ResourceSemWeb.Resource77Evaluate3leftSystem.DecimalrightSystem.Decimal>>Evaluate3SemWeb.Resource(SemWeb.ResourceHH1/home/tauberer/dev/semweb/src/SpecialRelations.cs1/home/tauberer/dev/semweb/src/SpecialRelations.csVMathDifferenceRelationSemWeb.Inference.Relations+SemWeb.Inference.Relations.MathPairRelationUri QcEvaluateSystem.DecimalleftSystem.DecimalrightSystem.DecimalDD]1/home/tauberer/dev/semweb/src/SpecialRelations.cs1/home/tauberer/dev/semweb/src/SpecialRelations.csMathRoundedRelationSemWeb.Inference.Relations,SemWeb.Inference.Relations.MathUnaryRelationUri QOOOO`EvaluateForwardSystem.DecimalleftSystem.DecimalPP<PP<\EvaluateReverseSystem.DecimalrightSystem.DecimalQQ=QQ=Z1/home/tauberer/dev/semweb/src/SpecialRelations.csNR1/home/tauberer/dev/semweb/src/SpecialRelations.csNRQMathAtan2RelationSemWeb.Inference.Relations+SemWeb.Inference.Relations.MathPairRelationUri Q^EvaluateSystem.DecimalleftSystem.DecimalrightSystem.DecimalDD1/home/tauberer/dev/semweb/src/SpecialRelations.cs1/home/tauberer/dev/semweb/src/SpecialRelations.csMathEqualToRelationSemWeb.Inference.Relations,SemWeb.Inference.Relations.MathUnaryRelationUri QEEEE`EvaluateForwardSystem.DecimalleftSystem.DecimalFF<FF<MEvaluateReverseSystem.DecimalrightSystem.DecimalGG=GG=O1/home/tauberer/dev/semweb/src/SpecialRelations.csDH1/home/tauberer/dev/semweb/src/SpecialRelations.csDHSimpleEntailmentSemWeb.InferenceSemWeb.Inference.ReasonerDistinct 3 !9SelectUfilter SelectFilter targetModelSemWeb.SelectableSourcesinkSemWeb.StatementSinke e MetaQuerySemWeb.Query.MetaQueryResultgraphSemWeb.StatementoptionsSemWeb.Query.QueryOptionssourceSemWeb.SelectableSource""{"F{:*/home/tauberer/dev/semweb/src/Inference.csF9*/home/tauberer/dev/semweb/src/Inference.csF9DateTimeCompareFilterSemWeb.FiltersSemWeb.LiteralFilterValue;"TypeCompType!ctordatetime;_CompType AAFilter3resourceLiteral targetModelSemWeb.SelectableSourceNN//home/tauberer/dev/semweb/src/LiteralFilters.cs//home/tauberer/dev/semweb/src/LiteralFilters.cs TimeSpanCompareFilterSemWeb.FiltersSemWeb.LiteralFilterValueSystem.TimeSpan"TypeCompType!ctortimespanSystem.TimeSpan_CompType AAFilter3resourceLiteral targetModelSemWeb.SelectableSourceNN//home/tauberer/dev/semweb/src/LiteralFilters.cs//home/tauberer/dev/semweb/src/LiteralFilters.csStringCompareFilterSemWeb.FiltersSemWeb.LiteralFilterPatternQNN"TypeCompTypeOO!ctorpatternQ_CompTypePP <PS<Filter3resourceLiteral targetModelSemWeb.SelectableSourceTTNTXN//home/tauberer/dev/semweb/src/LiteralFilters.csMY//home/tauberer/dev/semweb/src/LiteralFilters.csMYStringContainsFilterSemWeb.FiltersSemWeb.LiteralFilterPatternQ\\"ctorpatternQ]] .]_.Filter3resourceLiteral targetModelSemWeb.SelectableSource``N`cN//home/tauberer/dev/semweb/src/LiteralFilters.cs[d//home/tauberer/dev/semweb/src/LiteralFilters.cs[d NumericCompareFilterSemWeb.FiltersSemWeb.LiteralFilterNumberSystem.Decimalrr"TypeCompTypess!ctornumberSystem.Decimal_CompTypeuu =ux=Filter3resourceLiteral targetModelSemWeb.SelectableSourcezzNzN//home/tauberer/dev/semweb/src/LiteralFilters.csq//home/tauberer/dev/semweb/src/LiteralFilters.csqStringStartsWithFilterSemWeb.FiltersSemWeb.LiteralFilterPatternQgg"ctorpatternQhh 0hj0Filter3resourceLiteral targetModelSemWeb.SelectableSourcekkNknN//home/tauberer/dev/semweb/src/LiteralFilters.csfo//home/tauberer/dev/semweb/src/LiteralFilters.csfo FilterSinkSemWeb.FiltersSemWeb.StatementSinkMfiltersSemWeb.LiteralFilter==sinkSemWeb.StatementSink>>modelSemWeb.SelectableSource??ctorfiltersSemWeb.LiteralFiltersinkSemWeb.StatementSinkmodelSemWeb.SelectableSource@@ Y@DY3.SemWeb.StatementEEEJ//home/tauberer/dev/semweb/src/LiteralFilters.cs<K//home/tauberer/dev/semweb/src/LiteralFilters.cs<KAutoPrefixNamespaceManager SemWeb.IOSemWeb.NamespaceManagercounterHctor 44ctorparentSemWeb.NamespaceManager LL GetPrefixQuriQ//1/home/tauberer/dev/semweb/src/NamespaceManager.cs1/home/tauberer/dev/semweb/src/NamespaceManager.cs;SQLStore SemWeb.StoresSemWeb.QueryableSourceSemWeb.StaticSourceSemWeb.ModifiableSourceSystem.IDisposable ResourceKeyResIdHctoridH . GetHashCodeH%%E3otherM--wSelectColumnFilter SubjectId39 PredicateId39ObjectId39MetaId39 SubjectUri3> PredicateUri3> ObjectData3>MetaUri3>MultiResSemWeb.ResourceitemsSemWeb.ResourceGGUri QHHHH7ctoraSemWeb.ResourceFF !FF!0ContainsLiterals3II"IN"EOEOdbformatH@@tableQEEguidQJJfirstUse3NN isImporting3YY cachedNextIdH__ entityCache7cc+ literalCache7dd,addStatementBufferSemWeb.Util.StatementListgg+importAddBufferSizeHkk>importAddBufferRotationHkk>importAddBufferTimeSystem.TimeSpanll4anonEntityHeldIds6uu1statementsRemoved3zz"Debug3}}] DebugLogSpeed3~~o cmdBufferSystem.Text.StringBuilder1quote5syncrootM"sha!System.Security.Cryptography.SHA1 rdfs_memberQ1rdf_liQ&fourcolsQipredcolQKmetacolQF INSERT_INTO_LITERALS_VALUES Q-.nINSERT_INTO_ENTITIES_VALUES Q-.nINSERT_INTO_STATEMENTS_VALUES Q/0 TableName Q7HasUniqueStatementsConstraint 389AInsertIgnoreCommand Q019SupportsInsertCombined 312:SupportsSubquery 3+,4 SupportsViews$ 3'(AMaximumUriLength$ H)*@Distinct 30StatementCount H   7ctortableQ ##CreateNullTestUcolumnQcommandSystem.Text.StringBuilder[[CreateLikeTestUcolumnQprefixQ HcommandSystem.Text.StringBuildervvCreateEntityPrefixTest$3columnQprefixQcommandSystem.Text.StringBuilderqqInitU CreateVersion3ParseVersionInfo2System.Collections.Specialized.NameValueCollectionverdataQ77SerializeVersionInfoQverdata2System.Collections.Specialized.NameValueCollection;; GetStoreGuidQ0GetPersistentBNodeIdQ%BNode11GetBNodeFromPersistentIdBNode persistentIdQ=$=NextIdH+++?CheckMaxUcommandQnextidHAA8AD8ClearUGGGTGetLiteralHashQliteralLiteralWW1W[1 GetLiteralIdHliteralLiteralcreate3bufferSystem.Text.StringBuilderinsertCombined3 firstInsert3cczcz AddLiteralHliteralLiteralbufferSystem.Text.StringBuilderinsertCombined3 firstInsert3kk GetEntityIdHuriQcreate3entityInsertBufferSystem.Text.StringBuilderinsertCombined3 checkIfExists3 firstInsert3 GetResourceIdHresourceSemWeb.Resourcecreate3<<GetResourceIdBufferHresourceSemWeb.Resourcecreate3literalInsertBufferSystem.Text.StringBuilderentityInsertBufferSystem.Text.StringBuilderinsertCombined3firstLiteralInsert3firstEntityInsert36 ObjectTypeHrSemWeb.Resource99%9<% MakeEntityEntity resourceIdHuriQcache7@@I@XI3 statementSemWeb.Statement^^.^a.U statementSemWeb.Statementbb'b'RunAddBufferDynamicU%% RunAddBufferUE,UtemplateSemWeb.StatementGG)GT) RemoveAllU templatesSemWeb.StatementVV/VZ/ GetEntitiesEntity\\ \^  GetPredicatesEntity``"`b"GetMetasEntitydddfGetAllEntitiesEntitycolsQhh1h{1 WhereItem3colQrSemWeb.ResourcecmdSystem.Text.StringBuilderand3}}Z}ZAppendMultiRes3rSemWeb.Stores.SQLStore.MultiRescmdSystem.Text.StringBuilder== WhereClause3templateSemWeb.StatementcmdSystem.Text.StringBuilderNN WhereClause3templateSubjectSemWeb.ResourcetemplatePredicateSemWeb.ResourcetemplateObjectSemWeb.Resource templateMetaSemWeb.ResourcecmdSystem.Text.StringBuilder wroteWhere3AsIntHrMAsStringQrM$$ AppendCommaUbuilderSystem.Text.StringBuilderWQcomma3RRContains3resourceSemWeb.Resource**Contains3templateSemWeb.Statement++SelectFilterColumnsUfilter)SemWeb.Stores.SQLStore.SelectColumnFiltercmdSystem.Text.StringBuilderXXSelectFilterTablesUfilter)SemWeb.Stores.SQLStore.SelectColumnFiltercmdSystem.Text.StringBuilderPPSelectU-SemWeb.StatementSink++SelectUfilter SelectFilter-SemWeb.StatementSink@(@ SplitArraySemWeb.ResourceSemWeb.Resource**(*=( ToMultiResSemWeb.ResourcerSemWeb.Resource??$?C$ CleanMultiResUresSemWeb.Stores.SQLStore.MultiResQQ#QW#CacheMultiObjectsUentMap7'SemWeb.ResourceYY9Y]9 isOrContains3rSemWeb.ResourceuriQ__,_j,PrefetchResourceIdsU resourcesSystem.Collections.IListll,l,SelectUtemplateSemWeb.Statement-SemWeb.StatementSink??SelectUtemplateSubjectSemWeb.ResourcetemplatePredicateSemWeb.ResourcetemplateObjectSemWeb.Resource templateMetaSemWeb.Resource litFiltersSemWeb.LiteralFilter-SemWeb.StatementSinklimitH8 MetaQuerySemWeb.Query.MetaQueryResultgraphSemWeb.StatementoptionsSemWeb.Query.QueryOptions::f:<fQueryUgraphSemWeb.StatementoptionsSemWeb.Query.QueryOptionssinkSemWeb.Query.QueryResultSink>>m>m")/home/tauberer/dev/semweb/src/SQLStore.cs: )/home/tauberer/dev/semweb/src/SQLStore.cs: /StatementExistsSinkSemWebSemWeb.StatementSinkMexists3==Exists 3????03 statementSemWeb.StatementAA'AD'+/home/tauberer/dev/semweb/src/Interfaces.cs<E+/home/tauberer/dev/semweb/src/Interfaces.cs<EO MemoryStoreSemWeb SemWeb.Store(System.Collections.Generic.IEnumerable`1SemWeb.Statement,/home/tauberer/dev/semweb/src/MemoryStore.cs ,/home/tauberer/dev/semweb/src/MemoryStore.cs StatementSourceSemWebMDistinct 3  SelectUsinkSemWeb.StatementSink # #+/home/tauberer/dev/semweb/src/Interfaces.cs +/home/tauberer/dev/semweb/src/Interfaces.cs LocationSemWebMLineH  !ColH  !ctorlineHcolH   %  %A)/home/tauberer/dev/semweb/src/N3Reader.cs  )/home/tauberer/dev/semweb/src/N3Reader.cs  ParserExceptionSemWebSystem.ApplicationExceptionctorQ ;;>ctorQcauseC SSV*/home/tauberer/dev/semweb/src/RdfReader.cs*/home/tauberer/dev/semweb/src/RdfReader.csQueryResultBuffer SemWeb.QuerySemWeb.Query.QueryResultSinkSystem.Collections.IEnumerable(System.Collections.Generic.IEnumerable`1SemWeb.Query.VariableBindings variablesVariable bindings6(comments6(bindings!System.Collections.Generic.List`1SemWeb.Query.VariableBindingsBcomments!System.Collections.Generic.List`1Q. Variables Variable<Bindings System.Collections.IList5Comments System.Collections.IList5Bindings !System.Collections.Generic.List`1SemWeb.Query.VariableBindings)*FComments !System.Collections.Generic.List`1Q <InitU variablesVariable223-SemWeb.Query.VariableBindings44 AddCommentsUcommentQ33 GetEnumerator9PP GetEnumerator(System.Collections.Generic.IEnumerator`1SemWeb.Query.VariableBindingsNN&/home/tauberer/dev/semweb/src/Query.cs&/home/tauberer/dev/semweb/src/Query.csQueryExecutionException SemWeb.QuerySystem.ApplicationExceptionctorQ AAEctorQcauseC YY]&/home/tauberer/dev/semweb/src/Query.cs&/home/tauberer/dev/semweb/src/Query.csB QueryOptions SemWeb.QueryLimitHDistinguishedVariables8-VariableKnownValuesSystem.Collections.IDictionary *VariableLiteralFiltersSystem.Collections.IDictionary!!-DistinguishedVariables(System.Collections.Generic.ICollection`1Variable##7VariableKnownValues(System.Collections.Generic.IDictionary`2Variable(System.Collections.Generic.ICollection`1SemWeb.Resource$$JVariableLiteralFilters(System.Collections.Generic.IDictionary`2Variable(System.Collections.Generic.ICollection`1SemWeb.LiteralFilter%%RAddDistinguishedVariableUvariableVariable((:(4:SetVariableKnownValuesUvariableVariable knownValues866M6?MAddLiteralFilterUvariableVariablefilterSemWeb.LiteralFilterAAHANHCloneSemWeb.Query.QueryOptionsPP Pq &/home/tauberer/dev/semweb/src/Query.csr&/home/tauberer/dev/semweb/src/Query.csrQuery SemWeb.QuerystartHlimitH queryMetaEntity ReturnStart`Hd ReturnLimit`HJ QueryMeta`EntitySMimeType(`Q!"Run(UsourceSemWeb.SelectableSourceoutputSystem.IO.TextWriterFFRunUsourceSemWeb.SelectableSource resultsinkSemWeb.Query.QueryResultSinkPPGetExplanationQ**&/home/tauberer/dev/semweb/src/Query.cs&/home/tauberer/dev/semweb/src/Query.cs GraphMatch SemWeb.QuerySemWeb.Query.Query QueryPartGraphSemWeb.Statement&SourcesSemWeb.SelectableSource/ctor.SemWeb.StatementsrcSemWeb.SelectableSource 77ctor.SemWeb.StatementsourcesSemWeb.SelectableSource ==ctorgraphSemWeb.StatementsrcSemWeb.QueryableSource << BindingSet VariablesVariable Rows6 qLimitEntity$$QqStartEntity%%Q qDistinctFromEntity&&Y qOptionalEntity''QgraphSemWeb.Util.StatementList))- knownValuesSystem.Collections.IDictionary**> litFilters7++0distinguishedVars6,,7Debug3..dctor00 01ctorquerySemWeb.RdfReader35 >56>ctor queryModelSemWeb.StatementSource88 T89Tctor queryModel SemWeb.Store queryNodeEntity;; 9;J9 GetIntOptionH queryModel SemWeb.StorequeryEntity predicateEntityLLMLVMIsQueryPredicate3EntityXX*X^*GetExplanationQ``*`e*AddGraphStatementU statementSemWeb.Statementgg5gi5SetVariableRangeUvariableVariablerange8llEllEGSetVariableRangeUvariableVariablerange(System.Collections.Generic.ICollection`1SemWeb.ResourcennOnqOAddLiteralFilterUvariableVariablefilterSemWeb.LiteralFilterssHswHSetDistinguishedVariableUvariableVariableyy:y{:RunU targetModelSemWeb.SelectableSource-SemWeb.Query.QueryResultSink}}Q}QRunGeneralQueryU queryParts!SemWeb.Query.GraphMatch.QueryPart knownValuesSystem.Collections.IDictionary litFiltersSystem.Collections.IDictionarydistinguishedVars8distinguishedVars(System.Collections.Generic.ICollection`1Variable returnStartH returnLimitHallowQueryableSource3-SemWeb.Query.QueryResultSink"+/home/tauberer/dev/semweb/src/GraphMatch.cs#!+/home/tauberer/dev/semweb/src/GraphMatch.cs#! RdfFunction SemWeb.QueryMUri Q&EvaluateSemWeb.ResourceSemWeb.Resource55&/home/tauberer/dev/semweb/src/Query.cs&/home/tauberer/dev/semweb/src/Query.csmVariableBindings SemWeb.QueryvarsVariable valsSemWeb.Resource Count H3 Variables Variable7Values SemWeb.Resource4 Variables "System.Collections.Generic.IList`1Variable#$<Values "System.Collections.Generic.IList`1SemWeb.Resource !9ctorvarsVariablevalsSemWeb.Resource << SubstituteSemWeb.StatementtemplateSemWeb.Statement22^Q$"$VariableBindingsSemWeb.ResourcevariableVariable *VariableBindingsSemWeb.Resource variableNameQ ,&/home/tauberer/dev/semweb/src/Query.cs#&/home/tauberer/dev/semweb/src/Query.cs#QueryFormatException SemWeb.QuerySystem.ApplicationExceptionctorQ|| >||>BctorQcauseC}} V}}VZ&/home/tauberer/dev/semweb/src/Query.cs{~&/home/tauberer/dev/semweb/src/Query.cs{~QueryResultSink SemWeb.QueryInit(U variablesVariable113-SemWeb.Query.VariableBindings44Finished(U!! AddComments(UcommentsQ33&/home/tauberer/dev/semweb/src/Query.cs&/home/tauberer/dev/semweb/src/Query.csMetaQueryResult SemWeb.QueryMQuerySupported3uuNoData3vv IsDefinitive3ww&/home/tauberer/dev/semweb/src/Query.cstx&/home/tauberer/dev/semweb/src/Query.cstx StoreSemWebSemWeb.StatementSourceSemWeb.StatementSinkSemWeb.SelectableSourceSemWeb.QueryableSourceSemWeb.StaticSourceSemWeb.ModifiableSourceSystem.IDisposablerdfTypeEntity[ unnamedgraphs6/ namedgraphs75 allsources6, reasoners6/ DataSources System.Collections.IList DataSources "System.Collections.Generic.IList`1SemWeb.SelectableSource-.Distinct 3Create SemWeb.StorespecQ*;*CreateForInputSemWeb.StatementSourcespecQ==<=D<CreateForOutputSemWeb.StatementSinkspecQFF;FH;CreateMspecQoutput3JJ9J9ctor ctorsourceSemWeb.StatementSource ''ctorsourceSemWeb.SelectableSource (( AddSource(UsourceSemWeb.SelectableSource99 AddSource(UsourceSemWeb.SelectableSourceuriQEE AddSource2UstoreSemWeb.SelectableSource33 AddReasoner(UreasonerSemWeb.Inference.Reasoner55WriteUwriterSystem.IO.TextWriter11USelectU-SemWeb.StatementSink++ GetSourcesSemWeb.SelectableSourcegraphEntity: :"&/home/tauberer/dev/semweb/src/Store.cs !&/home/tauberer/dev/semweb/src/Store.cs ! SparqlSource SemWeb.RemoteMRunSparqlQueryU sparqlQueryQoutputSystem.IO.TextWriter>>RunSparqlQueryU sparqlQueryQ askResult3??RunSparqlQueryU sparqlQueryQstatementResultsSemWeb.StatementSinkKKRunSparqlQueryU sparqlQueryQ selectResultsSemWeb.Query.QueryResultSinkJJ-/home/tauberer/dev/semweb/src/SparqlClient.cs-/home/tauberer/dev/semweb/src/SparqlClient.csHSparqlHttpSource SemWeb.RemoteSemWeb.QueryableSourceSemWeb.Remote.SparqlSourceQueryToStatementsSemWeb.Query.QueryResultSinksinkSemWeb.StatementSink litFiltersSemWeb.LiteralFilterdSemWeb.StatementsiH"piH"oiH"ctorsinkSemWeb.StatementSink litFiltersSemWeb.LiteralFilterdSemWeb.Statement YYInitU variablesVariable333-SemWeb.Query.VariableBindings55 BooleanWrap`3Debug3^urlQDistinct 3!!!!1ctorurlQ &&RunSparqlQueryU sparqlQueryQoutputSystem.IO.TextWriter##D#%DRunSparqlQueryU sparqlQueryQ askResult3''E'+ERunSparqlQueryU sparqlQueryQstatementResultsSemWeb.StatementSink--Q-/QRunSparqlQueryU sparqlQueryQ selectResultsSemWeb.Query.QueryResultSink11P13PContains3resourceSemWeb.Resource55*57*Contains3templateSemWeb.Statement99+9;+SelectUsinkSemWeb.StatementSink==)=?)SelectUtemplateSemWeb.StatementsinkSemWeb.StatementSinkAA=AC=Select3templateSemWeb.StatementsinkSemWeb.StatementSinkask3EE@EP@SelectUfilter SelectFiltersinkSemWeb.StatementSinkRR>RT>Select3subjectsEntity predicatesEntityobjectsSemWeb.ResourcemetasEntity litFiltersSemWeb.LiteralFilterlimitHsinkSemWeb.StatementSinkask3VVVSQrSemWeb.ResourcevQ##SLQrSemWeb.ResourcevQincludeIfJustOne3;;SLQrMvQincludeIfJustOne377SLQr(System.Collections.Generic.ICollection`1SemWeb.ResourcevQincludeIfJustOne3FFSQrSemWeb.ResourcevQ!!LoadUqueryQ outputObjM,,ParseSparqlResponseUsparqlResponseK queryResultsSemWeb.Query.QueryResultSink^ ^ParseSparqlResponseUsparqlResponseK askResult3  T TProcessResponseUmimetypeQstreamK outputObjMXX MetaQuerySemWeb.Query.MetaQueryResultgraphSemWeb.StatementoptionsSemWeb.Query.QueryOptionsLLQueryUgraphSemWeb.StatementoptionsSemWeb.Query.QueryOptionssinkSemWeb.Query.QueryResultSinkSS;-/home/tauberer/dev/semweb/src/SparqlClient.cs:-/home/tauberer/dev/semweb/src/SparqlClient.cs:9StatementCounterSinkSemWebSemWeb.StatementSinkMcounterH22StatementCount H444483 statementSemWeb.Statement66'69'+/home/tauberer/dev/semweb/src/Interfaces.cs1:+/home/tauberer/dev/semweb/src/Interfaces.cs1: LiteralFilterSemWebCompType@LT))LE)) NE)) EQ))GT))GE))(*(*Filter3`Literal targetModelSemWeb.SelectableSourceKKCreateSemWeb.LiteralFilter_SemWeb.LiteralFilter.CompType`M B B CompareFilter3cmpH_SemWeb.LiteralFilter.CompType6&6MatchesFilters3literalSemWeb.ResourcefiltersSemWeb.LiteralFilter targetModelSemWeb.SelectableSource,,m,0mMatchesFilters3literalLiteralfiltersSemWeb.LiteralFilter targetModelSemWeb.SelectableSource22m27m//home/tauberer/dev/semweb/src/LiteralFilters.cs8//home/tauberer/dev/semweb/src/LiteralFilters.cs8 QueryableSourceSemWebSemWeb.SelectableSourceM MetaQuerySemWeb.Query.MetaQueryResultgraphSemWeb.StatementoptionsSemWeb.Query.QueryOptions``QueryUgraphSemWeb.StatementoptionsSemWeb.Query.QueryOptionssinkSemWeb.Query.QueryResultSinkgg+/home/tauberer/dev/semweb/src/Interfaces.cs+/home/tauberer/dev/semweb/src/Interfaces.csPNamespaceManagerSemWebMparentSemWeb.NamespaceManageratob7$btoa7$ ctor **ctorparentSemWeb.NamespaceManager 33 AddNamespace(UuriQprefixQ > #>AddFromUnsmgrSemWeb.NamespaceManager%%.%(. GetNamespace(QprefixQ**4*/4 GetPrefix(QuriQ11.16. Normalize3uriQprefixQ localnameQ88M8OM NormalizeQuriQQQ&Q^&ResolveQqnameQ``&`g& GetNamespaces8ii%ip% GetPrefixes8rr#ry#1/home/tauberer/dev/semweb/src/NamespaceManager.csz1/home/tauberer/dev/semweb/src/NamespaceManager.cszNSSemWebMRDFQKRDFSQF XMLSCHEMAQ G1/home/tauberer/dev/semweb/src/NamespaceManager.cs1/home/tauberer/dev/semweb/src/NamespaceManager.cs$ResourceSemWebSystem.IComparable`1SemWeb.ResourceM)/home/tauberer/dev/semweb/src/Resource.cs )/home/tauberer/dev/semweb/src/Resource.cs N3ReaderSemWebSemWeb.RdfReader ParseContext sourceSemWeb.MyReader&&storeSemWeb.StatementSink'' namespacesSemWeb.NamespaceManager((' namedNodeSemWeb.Util.UriMap)) anonymous7** variables7++metaEntity,, UsingKeywords3--Keywords7.. overrideMetaEntity//Location SemWeb.Location1111V%2%2 PrefixResourceSemWeb.Resource 4KeywordsResourceSemWeb.Resource 8 BaseResourceSemWeb.Resource0 sourcestreamSystem.IO.TextReader namespacesSemWeb.NamespaceManager8 entRDFTYPEEntityI entRDFFIRSTEntityK entRDFRESTEntityI entRDFNILEntityG entDAMLEQUIVEntityM entLOGIMPLIESEntityGentGRAPHCONTAINSEntity_readTokenBufferSystem.Text.StringBuilder?ctorsourceSystem.IO.TextReader %%ctor sourcefileQ % #%SelectUstoreSemWeb.StatementSink4434?3 ReadStatement3 SemWeb.N3Reader.ParseContextAA3A3ReadPredicates5subjectSemWeb.Resource SemWeb.N3Reader.ParseContextFF ReadPredicate5subjectSemWeb.Resource SemWeb.N3Reader.ParseContextEE ReadObjectUsubjectSemWeb.Resource predicateEntity SemWeb.N3Reader.ParseContextreverse3bbReadWhitespaceUsourceSemWeb.MyReader//ReadPunc5sourceSemWeb.MyReader))NextPuncHsourceSemWeb.MyReader((ReadEscapedCharUc5bSystem.Text.StringBuildersourceSemWeb.MyReaderlocSemWeb.LocationWW ReadTokenMsourceSemWeb.MyReader SemWeb.N3Reader.ParseContextBB ReadResourceSemWeb.Resource SemWeb.N3Reader.ParseContextallowDirective3reverse3]] GetResourceEntity SemWeb.N3Reader.ParseContexturiQ?? ResolveQNameSemWeb.ResourcestrQ SemWeb.N3Reader.ParseContextlocSemWeb.LocationPP ReadResource2SemWeb.Resource SemWeb.N3Reader.ParseContextallowDirective3reverse3^^UstoreSemWeb.StatementSink statementSemWeb.StatementpositionSemWeb.LocationPPOnErrorUQpositionSemWeb.Location::)/home/tauberer/dev/semweb/src/N3Reader.cs )/home/tauberer/dev/semweb/src/N3Reader.cs     System.Collections.ArrayList_size_items_version  MonoDevelop.Projects*MonoDevelop.Projects.Parser.NamespaceEntrycontentsparentnameSystem.Collections.Hashtable*MonoDevelop.Projects.Parser.NamespaceEntry  System.Collections.Hashtable LoadFactorVersionComparerHashCodeProviderHashSizeKeysValuesequalityComparer @? % @? m       @?    '/home/tauberer/dev/semweb/src/UriMap.cs1/home/tauberer/dev/semweb/src/NamespaceManager.cs-/home/tauberer/dev/semweb/src/AssemblyInfo.cs+/home/tauberer/dev/semweb/src/GraphMatch.cs-/home/tauberer/dev/semweb/src/RdfXmlWriter.cs,/home/tauberer/dev/semweb/src/MemoryStore.cs&/home/tauberer/dev/semweb/src/Euler.cs)/home/tauberer/dev/semweb/src/N3Writer.cs*/home/tauberer/dev/semweb/src/RdfReader.cs)/home/tauberer/dev/semweb/src/Resource.cs-/home/tauberer/dev/semweb/src/RdfXmlReader.cs -/home/tauberer/dev/semweb/src/SparqlClient.cs!&/home/tauberer/dev/semweb/src/Algos.cs")/home/tauberer/dev/semweb/src/SQLStore.cs#&/home/tauberer/dev/semweb/src/Query.cs$&/home/tauberer/dev/semweb/src/Store.cs%*/home/tauberer/dev/semweb/src/Statement.cs&%/home/tauberer/dev/semweb/src/Util.cs'*/home/tauberer/dev/semweb/src/Inference.cs(1/home/tauberer/dev/semweb/src/SpecialRelations.cs))/home/tauberer/dev/semweb/src/N3Reader.cs*%/home/tauberer/dev/semweb/src/RDFS.cs+//home/tauberer/dev/semweb/src/LiteralFilters.cs,*/home/tauberer/dev/semweb/src/RdfWriter.cs-+/home/tauberer/dev/semweb/src/Interfaces.cs  . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F GSemWeb.StatementSourceHSystem.Xml.XmlReaderISystem.Collections.IEnumerableJSystem.ApplicationExceptionK(System.Collections.Generic.IEnumerable`1LSystem.Collections.IDictionaryMStatNSystem.IComparable`1O StatementSinkPSystem.Collections.ICollectionQ StatementSRResourceSSemWeb.StatementSinkTStatementSourceUSemWeb.NamespaceManagerVSemWeb.ResourceW System.EnumXSystem.IEquatable`1YSystem.IDisposableZSystem.Collections.IEnumerator[S\SemWeb.Query.QueryResultSink  ] ^ _ ` a b c d e f g h i j k l m n o p q r *MonoDevelop.Projects.Parser.ReferenceEntry databaseUrisRAssembly:System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 tWAssembly:System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 uVAssembly:System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 vcAssembly:System.Runtime.Remoting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 wVAssembly:System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a xTAssembly:mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089ySemWeb z.%MonoDevelop.Projects.Parser.FileEntryfilePath parseTimeparseErrorRetries commentTasksclasses )MonoDevelop.Projects.Parser.TagCollection eA2 {/. J؂ |0. J؂ 1. 9 }2. J؂ ~ 3. )k 4. J؂ 5. J؂ 6. X 7. t,e 8. J؂ 9. K(n6 :. !9lE ;. "J؂ <. #Hw= =. $J؂ >. %K ?. &9I @. 'X A. (J؂ B. )[2 C. *γ D. + E. ,X F. -vJ ] ^ _ ` 6a b c d e /f g h iq j k lT m n o p q r -z  y{&MonoDevelop.Projects.Parser.ClassEntryposition namespaceRefname fileEntry subclassesflagsctype modifiers *MonoDevelop.Projects.Parser.NamespaceEntry%MonoDevelop.Projects.Parser.FileEntrySystem.Collections.ArrayList(MonoDevelop.Projects.Parser.ContentFlags%MonoDevelop.Projects.Parser.ClassType(MonoDevelop.Projects.Parser.ModifierEnumu UriMap . (MonoDevelop.Projects.Parser.ContentFlagsvalue__~%MonoDevelop.Projects.Parser.ClassTypevalue__(MonoDevelop.Projects.Parser.ModifierEnumvalue__|&MonoDevelop.Projects.Parser.ClassEntry }{v  GraphMatch 1 ~)MonoDevelop.Projects.Parser.TagCollectionCollectionBase+listSystem.Collections.ArrayList {_8 z RdfXmlWriter 2 >{ z MemoryStore 3 ~ {+ Euler 4 >{:+ zN3Writer 5 >~ &MonoDevelop.Projects.Parser.ClassEntry {vU zResource 7 ~ {< z RdfXmlReader 8 ~ &MonoDevelop.Projects.Parser.ClassEntry &MonoDevelop.Projects.Parser.ClassEntry ~ { SQLStore ; > &MonoDevelop.Projects.Parser.ClassEntry { zStore = :{ z Statement > &MonoDevelop.Projects.Parser.ClassEntry     &MonoDevelop.Projects.Parser.ClassEntry  &MonoDevelop.Projects.Parser.ClassEntry                           ! "~ #&MonoDevelop.Projects.Parser.ClassEntry $ % &~ '{ (RDFS C )>*+&MonoDevelop.Projects.Parser.ClassEntry , - . / 0 1 2 3{ z4 RdfWriter E 56:78&MonoDevelop.Projects.Parser.ClassEntry 9 : ; < = > ? @ASemWeb.Algos.MSG.GraphBSemWeb.Algos.MSG.GraphCSemWeb.Algos.MSG.Graph D&SemWeb.RdfXmlReader.XmlBaseAwareReaderE&SemWeb.RdfXmlReader.XmlBaseAwareReaderF&SemWeb.RdfXmlReader.XmlBaseAwareReaderG&SemWeb.RdfXmlReader.XmlBaseAwareReaderH#SemWeb.Util.StatementMap.HashValuesI#SemWeb.Util.StatementMap.HashValuesJ#SemWeb.Util.StatementMap.HashValuesK#SemWeb.Util.StatementMap.HashValues    { L SemWeb.Stores.SQLStore2.Importer   M!SemWeb.Inference.Euler.RemoveMetaN%SemWeb.Algos.SubtractionSource.TesterOSemWeb.Algos.Lean.SinkPSemWeb.Algos.MSG.SinkQSemWeb.Algos.MSG.Graph.SinkRSemWeb.Algos.MSG.FindMSGsSinkSSemWeb.Algos.Connectivity.SinkT SemWeb.Inference.RDFS.SchemaSinkUSemWeb.Inference.RDFS.ExpandV"SemWeb.Inference.RDFS.ExpandDomRanWSemWeb.Inference.RDFS.Expand3XSemWeb.Inference.RDFS.PredMapY"SemWeb.Inference.RDFS.LiteralDTMap - - @ @ @ @ @   Z SemWeb.Stores.SQLStore2.Importer [ SemWeb.Stores.SQLStore2.MultiRes\ SemWeb.Stores.SQLStore2.MultiRes] SemWeb.Stores.SQLStore2.MultiRes^ SemWeb.Stores.SQLStore2.MultiRes_ SemWeb.Stores.SQLStore2.MultiRes` SemWeb.Stores.SQLStore2.MultiResa SemWeb.Stores.SQLStore2.MultiResb SemWeb.Stores.SQLStore2.MultiResc SemWeb.Stores.SQLStore2.MultiResd SemWeb.Stores.SQLStore2.MultiRese SemWeb.Stores.SQLStore2.MultiResf SemWeb.Stores.SQLStore2.MultiResg SemWeb.Stores.SQLStore2.MultiRes h SemWeb.Stores.SQLStore2.Importeri SemWeb.Stores.SQLStore2.Importerj SemWeb.Stores.SQLStore2.Importerk SemWeb.Stores.SQLStore2.Importerl SemWeb.Stores.SQLStore2.Importerm SemWeb.Stores.SQLStore2.Importern SemWeb.Stores.SQLStore2.Importero SemWeb.Stores.SQLStore2.Importerp SemWeb.Stores.SQLStore2.Importerq SemWeb.Stores.SQLStore2.Importerr SemWeb.Stores.SQLStore2.Importers SemWeb.Stores.SQLStore2.Importert SemWeb.Stores.SQLStore2.Importeru SemWeb.Stores.SQLStore2.Importerv SemWeb.Stores.SQLStore2.Importerw SemWeb.Stores.SQLStore2.Importerx SemWeb.Stores.SQLStore2.Importery SemWeb.Stores.SQLStore2.Importerz SemWeb.Stores.SQLStore2.Importer{ SemWeb.Stores.SQLStore2.Importer| SemWeb.Stores.SQLStore2.Importer} SemWeb.Stores.SQLStore2.Importer~ SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer  SemWeb.Stores.SQLStore2.Importer  SemWeb.Stores.SQLStore2.Importer  SemWeb.Stores.SQLStore2.Importer  SemWeb.Stores.SQLStore2.Importer  SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer%SemWeb.Algos.SubtractionSource.TesterSemWeb.Algos.Lean.SinkSemWeb.Algos.MSG.SinkSemWeb.Algos.MSG.Graph.SinkSemWeb.Algos.MSG.FindMSGsSinkSemWeb.Algos.Connectivity.Sink SemWeb.Inference.RDFS.SchemaSinkSemWeb.Inference.RDFS.Expand"SemWeb.Inference.RDFS.ExpandDomRanSemWeb.Inference.RDFS.Expand3SemWeb.Inference.RDFS.PredMap"SemWeb.Inference.RDFS.LiteralDTMap!SemWeb.Inference.Euler.RemoveMeta SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer  SemWeb.Stores.SQLStore2.Importer! SemWeb.Stores.SQLStore2.Importer" SemWeb.Stores.SQLStore2.Importer# SemWeb.Stores.SQLStore2.Importer$ SemWeb.Stores.SQLStore2.Importer% SemWeb.Stores.SQLStore2.Importer& SemWeb.Stores.SQLStore2.Importer' SemWeb.Stores.SQLStore2.Importer( SemWeb.Stores.SQLStore2.Importer) SemWeb.Stores.SQLStore2.Importer* SemWeb.Stores.SQLStore2.Importer+ SemWeb.Stores.SQLStore2.Importer, SemWeb.Stores.SQLStore2.Importer- SemWeb.Stores.SQLStore2.Importer. SemWeb.Stores.SQLStore2.Importer/ SemWeb.Stores.SQLStore2.Importer0 SemWeb.Stores.SQLStore2.Importer1 SemWeb.Stores.SQLStore2.Importer2 SemWeb.Stores.SQLStore2.Importer3 SemWeb.Stores.SQLStore2.Importer4 SemWeb.Stores.SQLStore2.Importer5 SemWeb.Stores.SQLStore2.Importer6 SemWeb.Stores.SQLStore2.Importer7 SemWeb.Stores.SQLStore2.Importer8 SemWeb.Stores.SQLStore2.Importer9 SemWeb.Stores.SQLStore2.Importer: SemWeb.Stores.SQLStore2.Importer; SemWeb.Stores.SQLStore2.Importer< SemWeb.Stores.SQLStore2.Importer= SemWeb.Stores.SQLStore2.Importer> SemWeb.Stores.SQLStore2.Importer? SemWeb.Stores.SQLStore2.Importer@ SemWeb.Stores.SQLStore2.ImporterA SemWeb.Stores.SQLStore2.ImporterB SemWeb.Stores.SQLStore2.ImporterC SemWeb.Stores.SQLStore2.ImporterD SemWeb.Stores.SQLStore2.ImporterE SemWeb.Stores.SQLStore2.ImporterF SemWeb.Stores.SQLStore2.ImporterG SemWeb.Stores.SQLStore2.ImporterH SemWeb.Stores.SQLStore2.ImporterI SemWeb.Stores.SQLStore2.ImporterJ SemWeb.Stores.SQLStore2.ImporterK SemWeb.Stores.SQLStore2.ImporterL SemWeb.Stores.SQLStore2.ImporterM SemWeb.Stores.SQLStore2.ImporterN SemWeb.Stores.SQLStore2.ImporterO SemWeb.Stores.SQLStore2.ImporterP SemWeb.Stores.SQLStore2.ImporterQ SemWeb.Stores.SQLStore2.ImporterR SemWeb.Stores.SQLStore2.ImporterS SemWeb.Stores.SQLStore2.ImporterT SemWeb.Stores.SQLStore2.ImporterU SemWeb.Stores.SQLStore2.ImporterV SemWeb.Stores.SQLStore2.ImporterW SemWeb.Stores.SQLStore2.ImporterX SemWeb.Stores.SQLStore2.ImporterY SemWeb.Stores.SQLStore2.ImporterZ SemWeb.Stores.SQLStore2.Importer[ SemWeb.Stores.SQLStore2.Importer\ SemWeb.Stores.SQLStore2.Importer] SemWeb.Stores.SQLStore2.Importer^ SemWeb.Stores.SQLStore2.Importer_ SemWeb.Stores.SQLStore2.Importer` SemWeb.Stores.SQLStore2.Importera SemWeb.Stores.SQLStore2.Importerb SemWeb.Stores.SQLStore2.Importerc SemWeb.Stores.SQLStore2.Importerd SemWeb.Stores.SQLStore2.Importere SemWeb.Stores.SQLStore2.Importerf SemWeb.Stores.SQLStore2.Importerg SemWeb.Stores.SQLStore2.Importerh SemWeb.Stores.SQLStore2.Importeri SemWeb.Stores.SQLStore2.Importerj SemWeb.Stores.SQLStore2.Importerk SemWeb.Stores.SQLStore2.Importerl SemWeb.Stores.SQLStore2.Importerm SemWeb.Stores.SQLStore2.Importern SemWeb.Stores.SQLStore2.Importero SemWeb.Stores.SQLStore2.Importerp SemWeb.Stores.SQLStore2.Importerq SemWeb.Stores.SQLStore2.Importerr SemWeb.Stores.SQLStore2.Importers SemWeb.Stores.SQLStore2.Importert SemWeb.Stores.SQLStore2.Importeru SemWeb.Stores.SQLStore2.Importerv SemWeb.Stores.SQLStore2.Importerw SemWeb.Stores.SQLStore2.Importerx SemWeb.Stores.SQLStore2.Importery SemWeb.Stores.SQLStore2.Importerz SemWeb.Stores.SQLStore2.Importer{ SemWeb.Stores.SQLStore2.Importer| SemWeb.Stores.SQLStore2.Importer} SemWeb.Stores.SQLStore2.Importer~ SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer  SemWeb.Stores.SQLStore2.Importer  SemWeb.Stores.SQLStore2.Importer  SemWeb.Stores.SQLStore2.Importer  SemWeb.Stores.SQLStore2.Importer  SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer  SemWeb.Stores.SQLStore2.Importer! SemWeb.Stores.SQLStore2.Importer" SemWeb.Stores.SQLStore2.Importer# SemWeb.Stores.SQLStore2.Importer$ SemWeb.Stores.SQLStore2.Importer% SemWeb.Stores.SQLStore2.Importer& SemWeb.Stores.SQLStore2.Importer' SemWeb.Stores.SQLStore2.Importer( SemWeb.Stores.SQLStore2.Importer) SemWeb.Stores.SQLStore2.Importer* SemWeb.Stores.SQLStore2.Importer+ SemWeb.Stores.SQLStore2.Importer, SemWeb.Stores.SQLStore2.Importer- SemWeb.Stores.SQLStore2.Importer. SemWeb.Stores.SQLStore2.Importer/ SemWeb.Stores.SQLStore2.Importer0 SemWeb.Stores.SQLStore2.Importer1 SemWeb.Stores.SQLStore2.Importer2 SemWeb.Stores.SQLStore2.Importer3 SemWeb.Stores.SQLStore2.Importer4 SemWeb.Stores.SQLStore2.Importer5 SemWeb.Stores.SQLStore2.Importer6 SemWeb.Stores.SQLStore2.Importer7 SemWeb.Stores.SQLStore2.Importer8 SemWeb.Stores.SQLStore2.Importer9 SemWeb.Stores.SQLStore2.Importer: SemWeb.Stores.SQLStore2.Importer; SemWeb.Stores.SQLStore2.Importer< SemWeb.Stores.SQLStore2.Importer= SemWeb.Stores.SQLStore2.Importer> SemWeb.Stores.SQLStore2.Importer? SemWeb.Stores.SQLStore2.Importer@ SemWeb.Stores.SQLStore2.ImporterA SemWeb.Stores.SQLStore2.ImporterB SemWeb.Stores.SQLStore2.ImporterC SemWeb.Stores.SQLStore2.ImporterD SemWeb.Stores.SQLStore2.ImporterE SemWeb.Stores.SQLStore2.ImporterF SemWeb.Stores.SQLStore2.ImporterG SemWeb.Stores.SQLStore2.ImporterH SemWeb.Stores.SQLStore2.ImporterI SemWeb.Stores.SQLStore2.ImporterJ SemWeb.Stores.SQLStore2.ImporterK SemWeb.Stores.SQLStore2.ImporterL SemWeb.Stores.SQLStore2.ImporterM SemWeb.Stores.SQLStore2.ImporterN SemWeb.Stores.SQLStore2.ImporterO SemWeb.Stores.SQLStore2.ImporterP SemWeb.Stores.SQLStore2.ImporterQ SemWeb.Stores.SQLStore2.ImporterR SemWeb.Stores.SQLStore2.ImporterS SemWeb.Stores.SQLStore2.ImporterT SemWeb.Stores.SQLStore2.ImporterU SemWeb.Stores.SQLStore2.ImporterV SemWeb.Stores.SQLStore2.ImporterW SemWeb.Stores.SQLStore2.ImporterX SemWeb.Stores.SQLStore2.ImporterY SemWeb.Stores.SQLStore2.ImporterZ SemWeb.Stores.SQLStore2.Importer[ SemWeb.Stores.SQLStore2.Importer\ SemWeb.Stores.SQLStore2.Importer] SemWeb.Stores.SQLStore2.Importer^ SemWeb.Stores.SQLStore2.Importer_ SemWeb.Stores.SQLStore2.Importer` SemWeb.Stores.SQLStore2.Importera SemWeb.Stores.SQLStore2.Importerb SemWeb.Stores.SQLStore2.Importerc SemWeb.Stores.SQLStore2.Importerd SemWeb.Stores.SQLStore2.Importere SemWeb.Stores.SQLStore2.Importerf SemWeb.Stores.SQLStore2.Importerg SemWeb.Stores.SQLStore2.Importerh SemWeb.Stores.SQLStore2.Importeri SemWeb.Stores.SQLStore2.Importerj SemWeb.Stores.SQLStore2.Importerk SemWeb.Stores.SQLStore2.Importerl SemWeb.Stores.SQLStore2.Importerm SemWeb.Stores.SQLStore2.Importern SemWeb.Stores.SQLStore2.Importero SemWeb.Stores.SQLStore2.Importerp SemWeb.Stores.SQLStore2.Importerq SemWeb.Stores.SQLStore2.Importerr SemWeb.Stores.SQLStore2.Importers SemWeb.Stores.SQLStore2.Importert SemWeb.Stores.SQLStore2.Importeru SemWeb.Stores.SQLStore2.Importerv SemWeb.Stores.SQLStore2.Importerw SemWeb.Stores.SQLStore2.Importerx SemWeb.Stores.SQLStore2.Importery SemWeb.Stores.SQLStore2.Importerz SemWeb.Stores.SQLStore2.Importer{ SemWeb.Stores.SQLStore2.Importer| SemWeb.Stores.SQLStore2.Importer} SemWeb.Stores.SQLStore2.Importer~ SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer SemWeb.Stores.SQLStore2.Importer!SemWeb.Inference.Euler.RemoveMeta%SemWeb.Algos.SubtractionSource.TesterSemWeb.Algos.Lean.SinkSemWeb.Algos.MSG.SinkSemWeb.Algos.MSG.Graph.SinkSemWeb.Algos.MSG.FindMSGsSinkSemWeb.Algos.Connectivity.Sink SemWeb.Inference.RDFS.SchemaSinkSemWeb.Inference.RDFS.Expand"SemWeb.Inference.RDFS.ExpandDomRanSemWeb.Inference.RDFS.Expand3SemWeb.Inference.RDFS.PredMap"SemWeb.Inference.RDFS.LiteralDTMap%SemWeb.Algos.SubtractionSource.TesterSemWeb.Algos.Lean.SinkSemWeb.Algos.MSG.SinkSemWeb.Algos.MSG.Graph.SinkSemWeb.Algos.MSG.FindMSGsSinkSemWeb.Algos.Connectivity.Sink SemWeb.Inference.RDFS.SchemaSinkSemWeb.Inference.RDFS.Expand"SemWeb.Inference.RDFS.ExpandDomRanSemWeb.Inference.RDFS.Expand3SemWeb.Inference.RDFS.PredMap"SemWeb.Inference.RDFS.LiteralDTMap!SemWeb.Inference.Euler.RemoveMetaSemWeb.Algos.MSG.Graph : : :!SemWeb.N3Writer.NamespaceManager2!SemWeb.N3Writer.NamespaceManager2!SemWeb.N3Writer.NamespaceManager2!SemWeb.N3Writer.NamespaceManager2SemWeb.Stores.SQLStore.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes"SemWeb.Stores.SQLStore2.I.MultiRes&SemWeb.Stores.SQLStore2.Impor.MultiRes)SemWeb.Stores.SQLStore2.Importer.MultiRes)SemWeb.Stores.SQLStore2.Importer.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes  SemWeb.Stores.SQLStore2.MultiRes  SemWeb.Stores.SQLStore2.MultiRes  SemWeb.Stores.SQLStore2.MultiRes  SemWeb.Stores.SQLStore2.MultiRes  SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes  SemWeb.Stores.SQLStore2.MultiRes! SemWeb.Stores.SQLStore2.MultiRes" SemWeb.Stores.SQLStore2.MultiRes# SemWeb.Stores.SQLStore2.MultiRes$ SemWeb.Stores.SQLStore2.MultiRes% SemWeb.Stores.SQLStore2.MultiRes& SemWeb.Stores.SQLStore2.MultiRes' SemWeb.Stores.SQLStore2.MultiRes( SemWeb.Stores.SQLStore2.MultiRes) SemWeb.Stores.SQLStore2.MultiRes* SemWeb.Stores.SQLStore2.MultiRes+ SemWeb.Stores.SQLStore2.MultiRes, SemWeb.Stores.SQLStore2.MultiRes- SemWeb.Stores.SQLStore2.MultiRes. SemWeb.Stores.SQLStore2.MultiRes/ SemWeb.Stores.SQLStore2.MultiRes0 SemWeb.Stores.SQLStore2.MultiRes1 SemWeb.Stores.SQLStore2.MultiRes2 SemWeb.Stores.SQLStore2.MultiRes3 SemWeb.Stores.SQLStore2.MultiRes4 SemWeb.Stores.SQLStore2.MultiRes5 SemWeb.Stores.SQLStore2.MultiRes6 SemWeb.Stores.SQLStore2.MultiRes7 SemWeb.Stores.SQLStore2.MultiRes8 SemWeb.Stores.SQLStore2.MultiRes9 SemWeb.Stores.SQLStore2.MultiRes: SemWeb.Stores.SQLStore2.MultiRes; SemWeb.Stores.SQLStore2.MultiRes< SemWeb.Stores.SQLStore2.MultiRes= SemWeb.Stores.SQLStore2.MultiRes> SemWeb.Stores.SQLStore2.MultiRes? SemWeb.Stores.SQLStore2.MultiRes@ SemWeb.Stores.SQLStore2.MultiResA SemWeb.Stores.SQLStore2.MultiResB SemWeb.Stores.SQLStore2.MultiResC SemWeb.Stores.SQLStore2.MultiResD SemWeb.Stores.SQLStore2.MultiResE SemWeb.Stores.SQLStore2.MultiResF SemWeb.Stores.SQLStore2.MultiResG SemWeb.Stores.SQLStore2.MultiResH SemWeb.Stores.SQLStore2.MultiResI SemWeb.Stores.SQLStore2.MultiResJ SemWeb.Stores.SQLStore2.MultiResK SemWeb.Stores.SQLStore2.MultiResL SemWeb.Stores.SQLStore2.MultiResM SemWeb.Stores.SQLStore2.MultiResN SemWeb.Stores.SQLStore2.MultiResO SemWeb.Stores.SQLStore2.MultiResP SemWeb.Stores.SQLStore2.MultiResQ SemWeb.Stores.SQLStore2.MultiResR SemWeb.Stores.SQLStore2.MultiResS SemWeb.Stores.SQLStore2.MultiResT SemWeb.Stores.SQLStore2.MultiResU SemWeb.Stores.SQLStore2.MultiResV SemWeb.Stores.SQLStore2.MultiResW SemWeb.Stores.SQLStore2.MultiResX SemWeb.Stores.SQLStore2.MultiResY SemWeb.Stores.SQLStore2.MultiResZ SemWeb.Stores.SQLStore2.MultiRes[ SemWeb.Stores.SQLStore2.MultiRes\ SemWeb.Stores.SQLStore2.MultiRes] SemWeb.Stores.SQLStore2.MultiRes^ SemWeb.Stores.SQLStore2.MultiRes_ SemWeb.Stores.SQLStore2.MultiRes` SemWeb.Stores.SQLStore2.MultiResa SemWeb.Stores.SQLStore2.MultiResb SemWeb.Stores.SQLStore2.MultiResc SemWeb.Stores.SQLStore2.MultiResd SemWeb.Stores.SQLStore2.MultiRese SemWeb.Stores.SQLStore2.MultiResf SemWeb.Stores.SQLStore2.MultiResg SemWeb.Stores.SQLStore2.MultiResh SemWeb.Stores.SQLStore2.MultiResi SemWeb.Stores.SQLStore2.MultiResj SemWeb.Stores.SQLStore2.MultiResk SemWeb.Stores.SQLStore2.MultiResl SemWeb.Stores.SQLStore2.MultiResm SemWeb.Stores.SQLStore2.MultiResn SemWeb.Stores.SQLStore2.MultiReso SemWeb.Stores.SQLStore2.MultiResp SemWeb.Stores.SQLStore2.MultiResq SemWeb.Stores.SQLStore2.MultiResr SemWeb.Stores.SQLStore2.MultiRess SemWeb.Stores.SQLStore2.MultiRest SemWeb.Stores.SQLStore2.MultiResu SemWeb.Stores.SQLStore2.MultiResv SemWeb.Stores.SQLStore2.MultiResw SemWeb.Stores.SQLStore2.MultiResx SemWeb.Stores.SQLStore2.MultiResy SemWeb.Stores.SQLStore2.MultiResz SemWeb.Stores.SQLStore2.MultiRes{ SemWeb.Stores.SQLStore2.MultiRes| SemWeb.Stores.SQLStore2.MultiRes} SemWeb.Stores.SQLStore2.MultiRes~ SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiResSemWeb.Stores.SQLStore.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes  SemWeb.Stores.SQLStore2.MultiRes  SemWeb.Stores.SQLStore2.MultiRes  SemWeb.Stores.SQLStore2.MultiRes  SemWeb.Stores.SQLStore2.MultiRes  SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes  SemWeb.Stores.SQLStore2.MultiRes! SemWeb.Stores.SQLStore2.MultiRes" SemWeb.Stores.SQLStore2.MultiRes# SemWeb.Stores.SQLStore2.MultiRes$ SemWeb.Stores.SQLStore2.MultiRes% SemWeb.Stores.SQLStore2.MultiRes& SemWeb.Stores.SQLStore2.MultiRes' SemWeb.Stores.SQLStore2.MultiRes( SemWeb.Stores.SQLStore2.MultiRes) SemWeb.Stores.SQLStore2.MultiRes* SemWeb.Stores.SQLStore2.MultiRes+ SemWeb.Stores.SQLStore2.MultiRes, SemWeb.Stores.SQLStore2.MultiRes- SemWeb.Stores.SQLStore2.MultiRes. SemWeb.Stores.SQLStore2.MultiRes/ SemWeb.Stores.SQLStore2.MultiRes0 SemWeb.Stores.SQLStore2.MultiRes1 SemWeb.Stores.SQLStore2.MultiRes2 SemWeb.Stores.SQLStore2.MultiRes3 SemWeb.Stores.SQLStore2.MultiRes4 SemWeb.Stores.SQLStore2.MultiRes5 SemWeb.Stores.SQLStore2.MultiRes6 SemWeb.Stores.SQLStore2.MultiRes7 SemWeb.Stores.SQLStore2.MultiRes8 SemWeb.Stores.SQLStore2.MultiRes9 SemWeb.Stores.SQLStore2.MultiRes: SemWeb.Stores.SQLStore2.MultiRes; SemWeb.Stores.SQLStore2.MultiRes< SemWeb.Stores.SQLStore2.MultiRes= SemWeb.Stores.SQLStore2.MultiRes> SemWeb.Stores.SQLStore2.MultiRes? SemWeb.Stores.SQLStore2.MultiRes@ SemWeb.Stores.SQLStore2.MultiResA SemWeb.Stores.SQLStore2.MultiResB SemWeb.Stores.SQLStore2.MultiResC SemWeb.Stores.SQLStore2.MultiResD SemWeb.Stores.SQLStore2.MultiResE SemWeb.Stores.SQLStore2.MultiResF SemWeb.Stores.SQLStore2.MultiResG SemWeb.Stores.SQLStore2.MultiResH SemWeb.Stores.SQLStore2.MultiResI SemWeb.Stores.SQLStore2.MultiResJ SemWeb.Stores.SQLStore2.MultiResK SemWeb.Stores.SQLStore2.MultiResL SemWeb.Stores.SQLStore2.MultiResM SemWeb.Stores.SQLStore2.MultiResN SemWeb.Stores.SQLStore2.MultiResO SemWeb.Stores.SQLStore2.MultiResP SemWeb.Stores.SQLStore2.MultiResQ SemWeb.Stores.SQLStore2.MultiResR SemWeb.Stores.SQLStore2.MultiResS SemWeb.Stores.SQLStore2.MultiResT SemWeb.Stores.SQLStore2.MultiResU SemWeb.Stores.SQLStore2.MultiResV SemWeb.Stores.SQLStore2.MultiResW SemWeb.Stores.SQLStore2.MultiResX SemWeb.Stores.SQLStore2.MultiResY SemWeb.Stores.SQLStore2.MultiResZ SemWeb.Stores.SQLStore2.MultiRes[ SemWeb.Stores.SQLStore2.MultiRes\ SemWeb.Stores.SQLStore2.MultiRes] SemWeb.Stores.SQLStore2.MultiRes^ SemWeb.Stores.SQLStore2.MultiRes_ SemWeb.Stores.SQLStore2.MultiRes` SemWeb.Stores.SQLStore2.MultiResa SemWeb.Stores.SQLStore2.MultiResb SemWeb.Stores.SQLStore2.MultiResc SemWeb.Stores.SQLStore2.MultiResd SemWeb.Stores.SQLStore2.MultiRese SemWeb.Stores.SQLStore2.MultiResf SemWeb.Stores.SQLStore2.MultiResg SemWeb.Stores.SQLStore2.MultiResh SemWeb.Stores.SQLStore2.MultiResi SemWeb.Stores.SQLStore2.MultiResj SemWeb.Stores.SQLStore2.MultiResk SemWeb.Stores.SQLStore2.MultiResl SemWeb.Stores.SQLStore2.MultiResm SemWeb.Stores.SQLStore2.MultiResn SemWeb.Stores.SQLStore2.MultiReso SemWeb.Stores.SQLStore2.MultiResp SemWeb.Stores.SQLStore2.MultiResq SemWeb.Stores.SQLStore2.MultiResr SemWeb.Stores.SQLStore2.MultiRess SemWeb.Stores.SQLStore2.MultiRest SemWeb.Stores.SQLStore2.MultiResu SemWeb.Stores.SQLStore2.MultiResv SemWeb.Stores.SQLStore2.MultiResw SemWeb.Stores.SQLStore2.MultiResx SemWeb.Stores.SQLStore2.MultiResy SemWeb.Stores.SQLStore2.MultiResz SemWeb.Stores.SQLStore2.MultiRes{ SemWeb.Stores.SQLStore2.MultiRes| SemWeb.Stores.SQLStore2.MultiRes} SemWeb.Stores.SQLStore2.MultiRes~ SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes)SemWeb.Stores.SQLStore2.Importer.MultiRes)SemWeb.Stores.SQLStore2.Importer.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes  SemWeb.Stores.SQLStore2.MultiRes  SemWeb.Stores.SQLStore2.MultiRes  SemWeb.Stores.SQLStore2.MultiRes  SemWeb.Stores.SQLStore2.MultiRes  SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes SemWeb.Stores.SQLStore2.MultiRes  SemWeb.Stores.SQLStore2.MultiRes! SemWeb.Stores.SQLStore2.MultiRes" SemWeb.Stores.SQLStore2.MultiRes# SemWeb.Stores.SQLStore2.MultiRes$ SemWeb.Stores.SQLStore2.MultiRes% SemWeb.Stores.SQLStore2.MultiRes& SemWeb.Stores.SQLStore2.MultiRes' SemWeb.Stores.SQLStore2.MultiRes( SemWeb.Stores.SQLStore2.MultiRes) SemWeb.Stores.SQLStore2.MultiRes* SemWeb.Stores.SQLStore2.MultiRes+ SemWeb.Stores.SQLStore2.MultiRes, SemWeb.Stores.SQLStore2.MultiRes- SemWeb.Stores.SQLStore2.MultiRes. SemWeb.Stores.SQLStore2.MultiRes/ SemWeb.Stores.SQLStore2.MultiRes0SemWeb.Stores.SQLStore.MultiRes1SemWeb.Stores.SQLStore.MultiRes2SemWeb.N3Writer.Formats3SemWeb.LiteralFilter.CompType4SemWeb.N3Writer.Formats5SemWeb.LiteralFilter.CompType6SemWeb.N3Writer.Formats7SemWeb.LiteralFilter.CompType8SemWeb.N3Writer.Formats9SemWeb.LiteralFilter.CompType  : SemWeb.Util.StatementList.Enumer;#SemWeb.Util.StatementMap.Enumerator< SemWeb.Util.StatementList.Enumer=#SemWeb.Util.StatementMap.Enumerator> SemWeb.Util.StatementList.Enumer?#SemWeb.Util.StatementMap.Enumerator@ SemWeb.Util.StatementList.EnumerA#SemWeb.Util.StatementMap.EnumeratorB SemWeb.Stores.SQLStore2.Importer  C0SemWeb.Remote.SparqlHttpSource.QueryToStatementsD0SemWeb.Remote.SparqlHttpSource.QueryToStatementsE0SemWeb.Remote.SparqlHttpSource.QueryToStatementsF0SemWeb.Remote.SparqlHttpSource.QueryToStatementsG0SemWeb.Remote.SparqlHttpSource.QueryToStatementsH0SemWeb.Remote.SparqlHttpSource.QueryToStatementsI0SemWeb.Remote.SparqlHttpSource.QueryToStatementsJ0SemWeb.Remote.SparqlHttpSource.QueryToStatementsK0SemWeb.Remote.SparqlHttpSource.QueryToStatementsL0SemWeb.Remote.SparqlHttpSource.QueryToStatementsM0SemWeb.Remote.SparqlHttpSource.QueryToStatementsN0SemWeb.Remote.SparqlHttpSource.QueryToStatementsO0SemWeb.Remote.SparqlHttpSource.QueryToStatementsP0SemWeb.Remote.SparqlHttpSource.QueryToStatementsQ0SemWeb.Remote.SparqlHttpSource.QueryToStatementsR0SemWeb.Remote.SparqlHttpSource.QueryToStatementsS0SemWeb.Remote.SparqlHttpSource.QueryToStatementsT0SemWeb.Remote.SparqlHttpSource.QueryToStatementsU0SemWeb.Remote.SparqlHttpSource.QueryToStatementsV0SemWeb.Remote.SparqlHttpSource.QueryToStatements @? m W X  Y zZUtil{S z[NS / \ ]^{~L z_NamespaceManager / `abc{  deAutoPrefixNamespaceManager / fgh i zjQuery k l m zn Inference o{ zpParserException 6 qrs{ zt RdfReader 6 uv:wx{j zyMultiRdfReader 6 z:{| } ~{"  SparqlSource 9 {& SparqlHttpSource 9 >{ SubtractionSource : >{; Lean : { MSG : {  Connectivity : { SubgraphIterator :    zStores{7  QueryOptions < {) MetaQueryResult <  {h QueryFormatException < {D QueryExecutionException < {'  RdfFunction < 2{} Query < 8{X QueryResultSink < { QueryResultBuffer < :{ VariableBindings < x {ކ ResSet ? :{ DistinctStatementsSink ? {M  StatementList ? ~{]  StatementMap ? ~{HZ MultiMap ? :{}r  Permutation ? { Reasoner @ 0{} SimpleEntailment @ 2{  RdfRelation A {g MathUnaryRelation A  {nW MathAbsoluteValueRelation A 2 {GZ MathCosRelation A 2 {9 MathDegreesRelation A 2 {{ MathEqualToRelation A 2 {YC MathNegationRelation A 2{u  MathRoundedRelation A  2  {NR  MathSinRelation A 2{@ MathSinhRelation A 2{h_ MathTanRelation A 2{7b MathTanhRelation A 2{e MathPairRelation A  !{x "MathAtan2Relation A #2$%{s &MathDifferenceRelation A '2(){j *MathExponentiationRelation A +2,-{O .MathIntegerQuotientRelation A /201{-F 2MathQuotientRelation A 3245{H 6MathRemainderRelation A 7289{9m :MathListRelation A ;<2=>{W6 ?MathSumRelation A @2AB{J CMathProductRelation A D2EF{Mp GMathComparisonRelation A HIJK{M LMathGreaterThanRelation A M2NO{:> PMathLessThanRelation A Q2RS {; TMathNotGreaterThanRelation A U2VW!{] XMathNotLessThanRelation A Y2Z["{U \MathNotEqualToRelation A ]2^_# `${V zaN3Reader B bcd%{Ԓ zeMyReader B f:gh&{ ziLocation B jkl' m,{VB zn LiteralFilter D opqr-{| st FilterSink D uvw.{o sxStringCompareFilter D yz{/{_ s|StringContainsFilter D }~0{ sStringStartsWithFilter D 1{ sNumericCompareFilter D 2{m sDateTimeCompareFilter D 3{^ sTimeSpanCompareFilter D 5 9{ zStatementSource F 2:{a zSelectableSource F ;{pI zQueryableSource F <{ z StaticSource F 2={ z StatementSink F >{ zModifiableSource F ?{@ zStatementCounterSink F :@{u zStatementExistsSink F :W! RdfXmlReaderN3Writer RdfXmlWriter ZMyReader StatementMultiRdfReaderAlgosModifiableSourceSelectableSource RdfReader StatementSink StaticSource RdfWriter nFiltersIO StatementExistsSink MemoryStoreStatementSourceLocationParserException jStoreRemoteStatementCounterSink LiteralFilterQueryableSourceNamespaceManagerNSResourceN3ReaderX!  %  > : = < s d @ 9 &  ? , ; $Y@?#   ` d  z i@?3 %   k  l  m@?   o  u }   ~      z  7  z    @?             Relations F *; H `  m   o *s  z     p N  .  StatementListMultiMap StatementMap PermutationUriMapDistinctStatementsSinkResSet     {   @?     QueryResultBuffer QueryExecutionException  QueryOptionsQuery GraphMatch RdfFunctionVariableBindingsQueryFormatExceptionQueryResultSinkMetaQueryResult } MonoDevelop.Projects.Parser.TagkeyComment+commentStringComment+region#MonoDevelop.Projects.Parser.IRegionTODO5: Make sure the local name (here and anywhere in this TODOI: Best to check also whether variables in the query are even known to us. ReasonerRDFS RdfRelationEuler SimpleEntailment     TODO!': Add Accept header for HTTP resources. " $ #TODO$#: Make some of the errors warnings. %&TODO'": Do we canonicalize according to: ()TODO*D: Change meta into named graphs. Anything but a null or DefaultMeta +,TODO-!: Pass literal filters to server. ./TODO0 : Get encoding from HTTP header. 1@? 2 3  @? 4 5 6TODO7: Optimize this. 89TODO:: Pool these into one array. ;<SQLStore    }        @?| % = >                          ! " ?TODO@: Turn these off with @keywords ABTODOC4: Look at the superproperty closure of the predicate DETODOFM: Because we add variables to the query when we replace things with closures, G . / 0 1 2 3 @?# H I  :  ; < >    > ? @  -   JAutoPrefixNamespaceManager  )MonoDevelop.Projects.Parser.DefaultRegion beginLineendLine beginColumn endColumnfileName  ST  "{|  %  (`a  +WX  .tu  13 2K SparqlSourceLSparqlHttpSource3 4MSubgraphIteratorNMSGO ConnectivityPSubtractionSourceQLean5 8WX  ;: =RMathSumRelationSMathDegreesRelationTMathNotGreaterThanRelationUMathLessThanRelationVMathSinhRelationWMathNegationRelationXMathQuotientRelationYMathRemainderRelationZMathProductRelation[MathGreaterThanRelation\MathIntegerQuotientRelation]MathSinRelation^MathNotEqualToRelation_MathAbsoluteValueRelation`MathCosRelationaMathNotLessThanRelationbMathTanRelationcMathTanhRelationdMathPairRelationeMathUnaryRelationfMathExponentiationRelationgMathListRelationhMathComparisonRelationiMathDifferenceRelationjMathRoundedRelationkMathAtan2RelationlMathEqualToRelation>             "   !           A%&  DVW Gvw  HmDateTimeCompareFilternTimeSpanCompareFilteroStringCompareFilterpStringContainsFilterqNumericCompareFilterrStringStartsWithFilters FilterSinkI 2 3 . / 1 0 - semweb-1.05+dfsg/src/SparqlProtocol.cs0000644000175000017500000001221410774502134017243 0ustar meebeymeebeyusing System; using System.Collections; using System.IO; using SemWeb; using SemWeb.Stores; namespace SemWeb.Query { public class SparqlProtocolServerHandler : System.Web.IHttpHandler { public int MaximumLimit = -1; Hashtable sources = new Hashtable(); bool System.Web.IHttpHandler.IsReusable { get { return true; } } public virtual void ProcessRequest(System.Web.HttpContext context) { try { string query = context.Request["query"]; if (query == null || query.Trim() == "") throw new QueryFormatException("No query provided."); // Buffer the response so that any errors while // executing don't get outputted after the response // has begun. MemoryStream buffer = new MemoryStream(); bool closeAfterQuery; SelectableSource source = GetDataSource(out closeAfterQuery); try { Query sparql = CreateQuery(query); // Try setting the preferred output MIME type based // on the HTTP Accept header, in the order that we // get them from System.Web (?). if (context.Request.AcceptTypes != null) foreach (string acceptType in context.Request.AcceptTypes) { // Setting the MIME type may throw, so we // break on the first successful set. try { sparql.MimeType = acceptType; break; } catch { } } TextWriter writer = new StreamWriter(buffer, System.Text.Encoding.UTF8); RunQuery(sparql, source, writer); writer.Flush(); if (context.Request["outputMimeType"] == null || context.Request["outputMimeType"].Trim() == "") context.Response.ContentType = sparql.MimeType; else context.Response.ContentType = context.Request["outputMimeType"]; context.Response.OutputStream.Write(buffer.GetBuffer(), 0, (int)buffer.Length); } finally { if (closeAfterQuery && source is IDisposable) ((IDisposable)source).Dispose(); } } catch (QueryFormatException e) { context.Response.ContentType = "text/plain"; context.Response.StatusCode = 400; context.Response.StatusDescription = e.Message; context.Response.Write(e.Message); } catch (QueryExecutionException e) { context.Response.ContentType = "text/plain"; context.Response.StatusCode = 500; context.Response.StatusDescription = e.Message; context.Response.Write(e.Message); } } protected virtual SelectableSource GetDataSource(out bool closeAfterQuery) { closeAfterQuery = false; if (System.Web.HttpContext.Current == null) throw new InvalidOperationException("This method is not valid outside of an ASP.NET request."); string path = System.Web.HttpContext.Current.Request.Path; lock (sources) { SelectableSource source = (SelectableSource)sources[path]; if (source != null) return source; System.Collections.Specialized.NameValueCollection config = (System.Collections.Specialized.NameValueCollection)System.Configuration.ConfigurationSettings.GetConfig("sparqlSources"); if (config == null) throw new InvalidOperationException("No sparqlSources config section is set up."); string spec = config[path]; if (spec == null) throw new InvalidOperationException("No data source is set for the path " + path + "."); bool reuse = true; if (spec.StartsWith("noreuse,")) { reuse = false; closeAfterQuery = true; spec = spec.Substring("noreuse,".Length); } Store src = Store.Create(spec); if (reuse) sources[path] = src; return (SelectableSource)src; } } protected virtual Query CreateQuery(string query) { Query sparql = new SparqlEngine(query); if (MaximumLimit != -1 && (sparql.ReturnLimit == -1 || sparql.ReturnLimit > MaximumLimit)) sparql.ReturnLimit = MaximumLimit; return sparql; } protected virtual void RunQuery(Query query, SelectableSource source, TextWriter output) { if (System.Web.HttpContext.Current != null && System.Web.HttpContext.Current.Request["outputMimeType"] != null && System.Web.HttpContext.Current.Request["outputMimeType"] == "text/html") { query.Run(source, new HTMLQuerySink(output)); return; } query.Run(source, output); } private class HTMLQuerySink : QueryResultSink { TextWriter output; public HTMLQuerySink(TextWriter output) { this.output = output; } public override void Init(Variable[] variables) { output.WriteLine(""); output.WriteLine(""); foreach (Variable var in variables) { if (var.LocalName == null) continue; output.WriteLine(""); } output.WriteLine(""); } public override void Finished() { output.WriteLine("
" + var.LocalName + "
"); } public override bool Add(VariableBindings result) { output.WriteLine(""); foreach (Variable var in result.Variables) { if (var.LocalName == null) continue; Resource varTarget = result[var]; string t = varTarget.ToString(); if (varTarget is Literal) t = ((Literal)varTarget).Value; t = t.Replace("&", "&"); t = t.Replace("<", "<"); output.WriteLine("" + t + ""); } output.WriteLine(""); return true; } } } } semweb-1.05+dfsg/src/Inference.cs0000644000175000017500000001372410774502134016164 0ustar meebeymeebeyusing System; #if !DOTNET2 using System.Collections; #else using System.Collections.Generic; #endif using SemWeb; using SemWeb.Query; namespace SemWeb.Inference { public abstract class Reasoner { public abstract bool Distinct { get; } // assume targetModel.Distinct is true, *then* would Select be distinct? public void Select(Statement template, SelectableSource targetModel, StatementSink sink) { Select(new SelectFilter(template), targetModel, sink); } public abstract void Select(SelectFilter filter, SelectableSource targetModel, StatementSink sink); public abstract MetaQueryResult MetaQuery(Statement[] graph, QueryOptions options, SelectableSource targetModel); public abstract void Query(Statement[] graph, QueryOptions options, SelectableSource targetModel, QueryResultSink result); } public class SimpleEntailment : Reasoner { public override bool Distinct { get { return true; } } public override void Select(SelectFilter filter, SelectableSource targetModel, StatementSink sink) { targetModel.Select(filter, sink); } public override MetaQueryResult MetaQuery(Statement[] graph, SemWeb.Query.QueryOptions options, SelectableSource source) { SemWeb.Query.MetaQueryResult ret = new SemWeb.Query.MetaQueryResult(); ret.QuerySupported = true; ret.NoData = new bool[graph.Length]; for (int i = 0; i < graph.Length; i++) { // Take this statement and replace variables by nulls // to make it a statement template. Statement st = graph[i]; for (int j = 0; j < 4; j++) { if (st.GetComponent(j) is Variable) st.SetComponent(j, null); } // See if the store contains this template. if (st != Statement.All && !source.Contains(st)) { ret.NoData[i] = true; continue; } // Process it further in case we have variables // with known values, in which case if none of the // known values is in the store, we also know this // statement is unanswerable. for (int j = 0; j < 4; j++) { Resource r = graph[i].GetComponent(j); // No need to check the following given the check above. //if (r != null && !(r is Variable) && !source.Contains(r)) // ret.NoData[i] = true; if (r != null && r is Variable && options.VariableKnownValues != null && #if !DOTNET2 options.VariableKnownValues.Contains((Variable)r) #else options.VariableKnownValues.ContainsKey((Variable)r) #endif ) { bool found = false; #if !DOTNET2 foreach (Resource s in (ICollection)options.VariableKnownValues[(Variable)r]) { #else foreach (Resource s in (ICollection)options.VariableKnownValues[(Variable)r]) { #endif if (source.Contains(s)) { found = true; break; } } if (!found) { ret.NoData[i] = true; } } } } return ret; } public override void Query(Statement[] graph, SemWeb.Query.QueryOptions options, SelectableSource targetModel, QueryResultSink result) { SemWeb.Query.GraphMatch q = new SemWeb.Query.GraphMatch(); foreach (Statement s in graph) q.AddGraphStatement(s); q.ReturnLimit = options.Limit; if (options.VariableKnownValues != null) { #if !DOTNET2 foreach (DictionaryEntry ent in options.VariableKnownValues) q.SetVariableRange((Variable)ent.Key, (ICollection)ent.Value); #else foreach (KeyValuePair> ent in options.VariableKnownValues) q.SetVariableRange(ent.Key, ent.Value); #endif } if (options.VariableLiteralFilters != null) { #if !DOTNET2 foreach (DictionaryEntry ent in options.VariableLiteralFilters) foreach (LiteralFilter filter in (ICollection)ent.Value) q.AddLiteralFilter((Variable)ent.Key, filter); #else foreach (KeyValuePair> ent in options.VariableLiteralFilters) foreach (LiteralFilter filter in ent.Value) q.AddLiteralFilter(ent.Key, filter); #endif } if (options.DistinguishedVariables != null) { foreach (Variable v in options.DistinguishedVariables) q.SetDistinguishedVariable(v); } q.Run(targetModel, result); } } public class Rule { public readonly Statement[] Antecedent; public readonly Statement[] Consequent; public Rule(Statement[] antecedent, Statement[] consequent) { Antecedent = antecedent; Consequent = consequent; } public override string ToString() { string ret = ""; if (Antecedent.Length == 0) { ret += "(axiom) "; } else { if (Antecedent.Length > 1) ret += "{"; foreach (Statement s in Antecedent) ret += " " + s.ToString(); if (Antecedent.Length > 1) ret += " }"; ret += " => "; } if (Consequent.Length > 1) ret += "{"; foreach (Statement s in Consequent) ret += " " + s.ToString(); if (Consequent.Length > 1) ret += " }"; return ret; } } public class ProofStep { public readonly Rule Rule; public readonly System.Collections.IDictionary Substitutions; public ProofStep(Rule rule, System.Collections.IDictionary substitutions) { Rule = rule; Substitutions = substitutions; } } public class Proof { public readonly Statement[] Proved; public readonly ProofStep[] Steps; public Proof(Statement[] proved, ProofStep[] steps) { Proved = proved; Steps = steps; } public override string ToString () { System.Text.StringBuilder ret = new System.Text.StringBuilder(); ret.Append("Proved: "); foreach (Statement s in Proved) ret.Append(s.ToString()); ret.Append("\n"); foreach (ProofStep step in Steps) { ret.Append("\t"); ret.Append(step.Rule.ToString()); ret.Append("\n"); System.Collections.ArrayList vars = new System.Collections.ArrayList(step.Substitutions.Keys); vars.Sort(); foreach (Variable v in vars) { ret.Append("\t\t"); ret.Append(v); ret.Append(" => "); ret.Append(step.Substitutions[v]); ret.Append("\n"); } } return ret.ToString(); } } } semweb-1.05+dfsg/src/RdfXmlReader.cs0000644000175000017500000005551610774502134016612 0ustar meebeymeebeyusing System; using System.Collections; using System.IO; using System.Text; using System.Xml; using SemWeb.Util; namespace SemWeb { public class RdfXmlReader : RdfReader { // TODO: Make some of the errors warnings. XmlReader xml; Hashtable blankNodes = new Hashtable(); UriMap namedNodes = new UriMap(); Hashtable seenIDs = new Hashtable(); StatementSink storage; static readonly Entity rdfType = "http://www.w3.org/1999/02/22-rdf-syntax-ns#type", rdfFirst = "http://www.w3.org/1999/02/22-rdf-syntax-ns#first", rdfRest = "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest", rdfNil = "http://www.w3.org/1999/02/22-rdf-syntax-ns#nil", rdfSubject = "http://www.w3.org/1999/02/22-rdf-syntax-ns#subject", rdfPredicate = "http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate", rdfObject = "http://www.w3.org/1999/02/22-rdf-syntax-ns#object", rdfStatement = "http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement"; #if !SILVERLIGHT public RdfXmlReader(XmlDocument document) { xml = new XmlBaseAwareReader(new XmlNodeReader(document)); LoadNamespaces(); } #endif public RdfXmlReader(XmlReader document) { XmlValidatingReader reader = new XmlValidatingReader(document); // decodes entity definitions reader.ValidationType = ValidationType.None; xml = new XmlBaseAwareReader(reader); LoadNamespaces(); } public RdfXmlReader(TextReader document) : this(new XmlTextReader(document)) { } public RdfXmlReader(Stream document) : this(new StreamReader(document)) { } public RdfXmlReader(TextReader document, string baseUri) : this(document) { BaseUri = baseUri; } public RdfXmlReader(Stream document, string baseUri) : this(new StreamReader(document), baseUri) { } public RdfXmlReader(string file, string baseUri) : this(GetReader(file), baseUri) { } public RdfXmlReader(string file) : this(GetReader(file), "file:///" + file) { } private void LoadNamespaces() { // Move to the document element and load any namespace // declarations on the node. while (xml.Read()) { if (xml.NodeType != XmlNodeType.Element) continue; if (xml.MoveToFirstAttribute()) { do { if (xml.Prefix == "xmlns") Namespaces.AddNamespace(xml.Value, xml.LocalName); } while (xml.MoveToNextAttribute()); xml.MoveToElement(); } break; } } public override void Select(StatementSink storage) { // Read past the processing instructions to // the document element. If it is rdf:RDF, // then process the description nodes within it. // Otherwise, the document element is itself a // description. this.storage = storage; bool first = true; // on the first iteration don't // advance to the next node -- we already did that while (first || xml.Read()) { first = false; if (xml.NodeType != XmlNodeType.Element) continue; if (xml.NamespaceURI == NS.RDF && xml.LocalName == "RDF" ) { // If there is an xml:base here, set BaseUri so // the application can recover it. It doesn't // affect parsing since the xml:base attribute // will override BaseUri. string xmlbase = xml.GetAttribute("xml:base"); if (xmlbase != null) BaseUri = xmlbase; while (xml.Read()) { if (xml.NodeType == XmlNodeType.Element) ParseDescription(); } } else { ParseDescription(); } break; } xml.Close(); } private string CurNode() { if (xml.NamespaceURI == "") OnWarning("Element node must be qualified (" + xml.Name + ")"); if (xml.Prefix != "") Namespaces.AddNamespace(xml.NamespaceURI, xml.Prefix); // This probably isn't quite right, but compensates // for a corresponding hash issue in XmlWriter. if (xml.NamespaceURI == "" && BaseUri == null) return "#" + xml.LocalName; return CheckUri(xml.NamespaceURI + xml.LocalName); } private string CheckUri(string uri) { string error = Entity.ValidateUri(uri); if (error != null) OnWarning("The URI <" + uri + "> is not valid: " + error); return uri; } private int isset(string attribute) { return attribute != null ? 1 : 0; } private string Unrelativize(string uri) { return CheckUri(GetAbsoluteUri(xml.BaseURI != "" ? xml.BaseURI : BaseUri, uri)); } private Entity GetBlankNode(string nodeID) { if (blankNodes.ContainsKey(nodeID)) return (Entity)blankNodes[nodeID]; Entity entity = new BNode(nodeID); blankNodes[nodeID] = entity; return entity; } private Entity GetNamedNode(string uri) { if (!ReuseEntities) return new Entity(uri); Entity ret = (Entity)namedNodes[uri]; if (ret != null) return ret; ret = new Entity(uri); namedNodes[uri] = ret; return ret; } private Entity ParseDescription() { // The XmlReader is positioned on an element node // that is a description of an entity. // On returning, the reader is positioned after the // end element of the description node. string nodeID = xml.GetAttribute("nodeID", NS.RDF); string about = xml.GetAttribute("about", NS.RDF); string ID = xml.GetAttribute("ID", NS.RDF); if (isset(nodeID) + isset(about) + isset(ID) > 1) OnError("An entity description cannot specify more than one of rdf:nodeID, rdf:about, and rdf:ID"); if (nodeID != null && !IsValidXmlName(nodeID)) OnWarning("'" + nodeID + "' is not a valid XML Name"); if (ID != null && !IsValidXmlName(ID)) OnWarning("'" + ID + "' is not a valid XML Name"); Entity entity; if (about != null) entity = GetNamedNode(Unrelativize(about)); else if (ID != null) { entity = GetNamedNode(Unrelativize("#" + ID)); if (seenIDs.ContainsKey(entity.Uri)) OnWarning("Two descriptions should not use the same rdf:ID: <" + entity.Uri + ">"); seenIDs[entity.Uri] = seenIDs; } else if (nodeID != null) entity = GetBlankNode(nodeID); else entity = new BNode(); // If the name of the element is not rdf:Description, // then the name gives its type. string curnode = CurNode(); if (curnode != NS.RDF + "Description") { if (IsRestrictedName(curnode) || IsDeprecatedName(curnode)) OnError(xml.Name + " cannot be the type of a resource."); if (curnode == NS.RDF + "li") OnError("rdf:li cannot be the type of a resource"); storage.Add(new Statement(entity, rdfType, (Entity)curnode, Meta)); } ParsePropertyAttributes(entity); ParsePropertyNodes(entity); return entity; } private bool ParsePropertyAttributes(Entity entity) { bool foundAttrs = false; if (!xml.MoveToFirstAttribute()) return false; do { // Propery attributes in the default namespace // should be ignored. if (xml.NamespaceURI == "") continue; string curnode = CurNode(); // rdf:type is interpreted with an entity object, // not a literal object. if (curnode == NS.RDF + "type") { storage.Add(new Statement(entity, rdfType, (Entity)xml.Value, Meta)); foundAttrs = true; continue; } // Properties which are not recognized as property // attributes and should be ignored. if (IsRestrictedName(curnode)) continue; if (IsDeprecatedName(curnode)) OnError(xml.Name + " is deprecated."); // Properties which are invalid as attributes. if (curnode == NS.RDF + "li") OnError("rdf:li is not a valid attribute"); if (curnode == NS.RDF + "aboutEach" || curnode == NS.RDF + "aboutEachPrefix") OnError("rdf:aboutEach has been removed from the RDF spec"); // Unrecognized attributes in the xml namespace should be ignored. if (xml.Prefix == "xml") continue; if (xml.Prefix == "xmlns") continue; if (curnode == "http://www.w3.org/2000/xmlns/xmlns") continue; // This is a literal property attribute. string lang = xml.XmlLang != "" ? xml.XmlLang : null; storage.Add(new Statement(entity, curnode, new Literal(xml.Value, lang, null), Meta)); Namespaces.AddNamespace(xml.NamespaceURI, xml.Prefix); foundAttrs = true; } while (xml.MoveToNextAttribute()); xml.MoveToElement(); return foundAttrs; } private void ParsePropertyNodes(Entity subject) { // The reader is positioned within a description node. // On returning, the reader is positioned after the // end element of the description node. if (xml.IsEmptyElement) return; int liIndex = 1; while (xml.Read()) { if (xml.NodeType == XmlNodeType.EndElement) break; if (xml.NodeType == XmlNodeType.Text) { OnWarning("Text \"" + xml.Value + "\" ignored in description node"); continue; } if (xml.NodeType != XmlNodeType.Element) continue; ParseProperty(subject, ref liIndex); } } private void ParseProperty(Entity subject, ref int liIndex) { // The reader is positioned on a propert node, // and on returning the reader is positioned past // that node. // Get all of the attributes before we move the reader forward. string nodeID = xml.GetAttribute("nodeID", NS.RDF); string resource = xml.GetAttribute("resource", NS.RDF); string parseType = xml.GetAttribute("parseType", NS.RDF); string datatype = xml.GetAttribute("datatype", NS.RDF); string lang = xml.XmlLang != "" ? xml.XmlLang : null; string predicate = CurNode(); if (predicate == NS.RDF + "li") predicate = NS.RDF + "_" + (liIndex++); if (IsRestrictedName(predicate)) OnError(xml.Name + " cannot be used as a property name."); if (IsDeprecatedName(predicate)) OnError(xml.Name + " has been deprecated and cannot be used as a property name."); string ID = xml.GetAttribute("ID", NS.RDF); if (nodeID != null && !IsValidXmlName(nodeID)) OnWarning("'" + nodeID + "' is not a valid XML Name"); if (ID != null && !IsValidXmlName(ID)) OnWarning("'" + ID + "' is not a valid XML Name"); Resource objct = null; if (nodeID != null || resource != null) { if (isset(nodeID) + isset(resource) > 1) OnError("A predicate node cannot specify more than one of rdf:nodeID and rdf:resource"); if (parseType != null || datatype != null) OnError("The attributes rdf:parseType and rdf:datatype are not valid on a predicate with a rdf:nodeID or rdf:resource attribute"); // Object is an entity given by nodeID or resource. if (nodeID != null) objct = GetBlankNode(nodeID); else if (resource != null) objct = GetNamedNode(Unrelativize(resource)); ParsePropertyAttributes((Entity)objct); // No children are allowed in this element. if (!xml.IsEmptyElement) while (xml.Read()) { if (xml.NodeType == XmlNodeType.EndElement) break; if (xml.NodeType == XmlNodeType.Whitespace) continue; if (xml.NodeType == XmlNodeType.Comment) continue; if (xml.NodeType == XmlNodeType.ProcessingInstruction) continue; OnError("Content is not allowed within a property with a rdf:nodeID or rdf:resource attribute"); } } else if (parseType != null && parseType == "Literal") { if (datatype != null) OnError("The attribute rdf:datatype is not valid on a predicate whose parseType is Literal."); datatype = "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral"; if (ParsePropertyAttributes(new BNode())) OnError("Property attributes are not valid when parseType is Literal"); // TODO: Do we canonicalize according to: // http://www.w3.org/TR/2002/REC-xml-exc-c14n-20020718/ ? objct = new Literal(xml.ReadInnerXml(), null, datatype); } else if (parseType != null && parseType == "Resource") { objct = new BNode(); ParsePropertyAttributes((Entity)objct); if (!xml.IsEmptyElement) ParsePropertyNodes((Entity)objct); } else if (parseType != null && parseType == "Collection") { Entity collection = new BNode(); Entity lastnode = collection; bool empty = true; ParsePropertyAttributes(collection); if (!xml.IsEmptyElement) while (xml.Read()) { if (xml.NodeType == XmlNodeType.EndElement) break; if (xml.NodeType != XmlNodeType.Element) continue; if (!empty) { Entity next = new BNode(); storage.Add(new Statement(lastnode, rdfRest, next, Meta)); lastnode = next; } Entity item = ParseDescription(); storage.Add(new Statement(lastnode, rdfFirst, item, Meta)); empty = false; } storage.Add(new Statement(lastnode, rdfRest, rdfNil, Meta)); if (empty) objct = rdfNil; else objct = collection; } else if (parseType != null) { OnError("Invalid value for parseType: '" + parseType + "'"); } else if (datatype != null) { // Note that any xml:lang is discarded. if (ParsePropertyAttributes(new BNode())) OnError("Property attributes are not valid when a datatype is given"); if (xml.IsEmptyElement) { objct = new Literal("", null, datatype); } else { objct = new Literal(xml.ReadString(), null, datatype); if (xml.NodeType != XmlNodeType.EndElement) OnError("XML markup may not appear in a datatyped literal property."); } } else { // We don't know whether the contents of this element // refer to a literal or an entity. If an element is // a child of this node, then it must be an entity. // If the property has predicate attributes, then it // is an anonymous entity. Otherwise the text content // is the literal value. objct = new BNode(); if (ParsePropertyAttributes((Entity)objct)) { // Found property attributes. There should be no other internal content? if (!xml.IsEmptyElement) while (xml.Read()) { if (xml.NodeType == XmlNodeType.EndElement) break; if (xml.NodeType == XmlNodeType.Whitespace) continue; if (xml.NodeType == XmlNodeType.Comment) continue; if (xml.NodeType == XmlNodeType.ProcessingInstruction) continue; OnError(xml.NodeType + " is not allowed within a property with property attributes"); } } else { StringBuilder textcontent = new StringBuilder(); bool hadText = false; bool hadElement = false; if (!xml.IsEmptyElement) while (xml.Read()) { if (xml.NodeType == XmlNodeType.EndElement) break; if (xml.NodeType == XmlNodeType.Element) { if (hadText) OnError("Both text and elements are present as a property value"); if (hadElement) OnError("A property node cannot contain more than one entity description. " + objct + " already found."); hadElement = true; objct = ParseDescription(); } else if (xml.NodeType == XmlNodeType.Text || xml.NodeType == XmlNodeType.SignificantWhitespace) { if (hadElement) OnError("Both text and elements are present as a property value"); textcontent.Append(xml.Value); hadText = true; } else { textcontent.Append(xml.Value); } } if (!hadElement) objct = new Literal(textcontent.ToString(), lang, null); } } storage.Add(new Statement(subject, predicate, objct, Meta)); if (ID != null) { // In addition to adding the statement as normal, also // add a reified statement. Entity statement = GetNamedNode(Unrelativize("#" + ID));; storage.Add(new Statement(statement, rdfType, rdfStatement, Meta)); storage.Add(new Statement(statement, rdfSubject, subject, Meta)); storage.Add(new Statement(statement, rdfPredicate, (Entity)predicate, Meta)); storage.Add(new Statement(statement, rdfObject, objct, Meta)); } } private bool IsRestrictedName(string name) { if (name == NS.RDF + "RDF") return true; if (name == NS.RDF + "Description") return true; if (name == NS.RDF + "ID") return true; if (name == NS.RDF + "about") return true; if (name == NS.RDF + "parseType") return true; if (name == NS.RDF + "resource") return true; if (name == NS.RDF + "nodeID") return true; if (name == NS.RDF + "datatype") return true; return false; } private bool IsDeprecatedName(string name) { if (name == NS.RDF + "bagID") return true; if (name == NS.RDF + "aboutEach") return true; if (name == NS.RDF + "aboutEachPrefix") return true; return false; } private bool IsValidXmlName(string name) { // I'm not sure what's supposed to be valid, but this is just for warnings anyway. // CombiningChar and Extender characters are omitted. if (name.Length == 0) return false; char f = name[0]; if (!char.IsLetter(f) && f != '_') return false; for (int i = 1; i < name.Length; i++) { f = name[i]; if (!char.IsLetter(f) && !char.IsDigit(f) && f != '.' && f != '-' && f != '_') return false; } return true; } private void OnError(string message) { if (xml is IXmlLineInfo && ((IXmlLineInfo)xml).HasLineInfo()) { IXmlLineInfo line = (IXmlLineInfo)xml; message += ", line " + line.LineNumber + " col " + line.LinePosition; } throw new ParserException(message); } private new void OnWarning(string message) { if (xml is IXmlLineInfo && ((IXmlLineInfo)xml).HasLineInfo()) { IXmlLineInfo line = (IXmlLineInfo)xml; message += ", line " + line.LineNumber + " col " + line.LinePosition; } base.OnWarning(message); } private class XmlBaseAwareReader : XmlReader { XmlReader _reader; Stack _bases = new Stack(); Uri _baseUri; bool temp = false; XmlResolver resolver = new XmlUrlResolver(); public XmlBaseAwareReader(XmlReader reader) { _reader = reader; if (_reader.BaseURI != "") _baseUri = new Uri(_reader.BaseURI); } public override string BaseURI { get { return _baseUri == null ? "" : _baseUri.AbsoluteUri; } } public override bool Read() { if (!_reader.Read()) return false; if (temp) { // last element was an empty element _baseUri = (Uri)_bases.Pop(); temp = false; } if (_reader.NodeType == XmlNodeType.EndElement) _baseUri = (Uri)_bases.Pop(); if (_reader.NodeType == XmlNodeType.Element) { string baseAttr = _reader.GetAttribute("xml:base"); if (_reader.IsEmptyElement && baseAttr == null) { // do nothing : there is no EndElement, so no pop } else { _bases.Push(_baseUri); // even if no change, there will be a pop if (baseAttr != null) _baseUri = resolver.ResolveUri(_baseUri, baseAttr); // if this is an empty element, there is no EndElement, // so we must do a pop before processing the next node. temp = _reader.IsEmptyElement; } } return true; } public override void Close () { _reader.Close(); } public override string GetAttribute (int i) { return _reader.GetAttribute(i); } public override string GetAttribute (string name) { return _reader.GetAttribute(name); } public override string GetAttribute (string localName, string namespaceName) { return _reader.GetAttribute(localName, namespaceName); } public override bool IsStartElement () { return _reader.IsStartElement(); } public override bool IsStartElement (string name) { return _reader.IsStartElement(name); } public override bool IsStartElement (string localName, string namespaceName) { return _reader.IsStartElement(localName, namespaceName); } public override string LookupNamespace (string prefix) { return _reader.LookupNamespace(prefix); } public override void MoveToAttribute (int i) { _reader.MoveToAttribute(i); } public override bool MoveToAttribute (string name) { return _reader.MoveToAttribute(name); } public override bool MoveToAttribute (string localName, string namespaceName) { return _reader.MoveToAttribute(localName, namespaceName); } public override XmlNodeType MoveToContent () { return _reader.MoveToContent(); } public override bool MoveToElement () { return _reader.MoveToElement(); } public override bool MoveToFirstAttribute () { return _reader.MoveToFirstAttribute(); } public override bool MoveToNextAttribute () { return _reader.MoveToNextAttribute(); } public override bool ReadAttributeValue () { return _reader.ReadAttributeValue(); } public override string ReadElementString () { return _reader.ReadElementString(); } public override string ReadElementString (string name) { return _reader.ReadElementString(name); } public override string ReadElementString (string localName, string namespaceName) { return _reader.ReadElementString(localName, namespaceName); } public override void ReadEndElement () { _reader.ReadEndElement(); } public override string ReadInnerXml () { return _reader.ReadInnerXml(); } public override string ReadOuterXml () { return _reader.ReadOuterXml(); } public override void ReadStartElement () { _reader.ReadStartElement(); } public override void ReadStartElement (string name) { _reader.ReadStartElement(name); } public override void ReadStartElement (string localName, string namespaceName) { _reader.ReadStartElement(localName, namespaceName); } public override string ReadString () { return _reader.ReadString(); } public override void ResolveEntity () { _reader.ResolveEntity(); } public override void Skip () { _reader.Skip(); } public override int AttributeCount { get { return _reader.AttributeCount; } } public override bool CanResolveEntity { get { return _reader.CanResolveEntity; } } public override int Depth { get { return _reader.Depth; } } public override bool EOF { get { return _reader.EOF; } } public override bool HasAttributes { get { return _reader.HasAttributes; } } public override bool HasValue { get { return _reader.HasValue; } } public override bool IsDefault { get { return _reader.IsDefault; } } public override bool IsEmptyElement { get { return _reader.IsEmptyElement; } } public override string this [int i] { get { return _reader[i]; } } public override string this [string name] { get { return _reader[name]; } } public override string this [string localName, string namespaceName] { get { return _reader[localName, namespaceName]; } } public override string LocalName { get { return _reader.LocalName; } } public override string Name { get { return _reader.Name; } } public override string NamespaceURI { get { return _reader.NamespaceURI; } } public override XmlNameTable NameTable { get { return _reader.NameTable; } } public override XmlNodeType NodeType { get { return _reader.NodeType; } } public override string Prefix { get { return _reader.Prefix; } } public override char QuoteChar { get { return _reader.QuoteChar; } } public override ReadState ReadState { get { return _reader.ReadState; } } public override string Value { get { return _reader.Value; } } public override string XmlLang { get { return _reader.XmlLang; } } public override XmlSpace XmlSpace { get { return _reader.XmlSpace; } } } } } semweb-1.05+dfsg/src/PostgreSQLStore.cs0000644000175000017500000001031410774502134017276 0ustar meebeymeebeyusing System; using System.Collections; using System.Data; using Npgsql; namespace SemWeb.Stores { public class PostgreSQLStore : SQLStore, IDisposable { NpgsqlConnection connection; string connectionString; static bool Debug = System.Environment.GetEnvironmentVariable("SEMWEB_DEBUG_SQL") != null; string[] CreateTableCommands; string[] CreateIndexCommands; public PostgreSQLStore(string connectionString, string table) : base(table) { this.CreateTableCommands = new string[] { "CREATE TABLE " + table + "_statements" + "(subject INTEGER NOT NULL, predicate INTEGER NOT NULL, objecttype INTEGER NOT NULL, object INTEGER NOT NULL, meta INTEGER NOT NULL);", "CREATE TABLE " + table + "_literals" + "(id INTEGER NOT NULL, value TEXT NOT NULL, language TEXT, datatype TEXT, hash bytea, PRIMARY KEY(id));", "CREATE TABLE " + table + "_entities" + "(id INTEGER NOT NULL, value TEXT NOT NULL, PRIMARY KEY(id));" }; this.CreateIndexCommands = new string[] { "CREATE INDEX subject_index ON " + table + "_statements(subject,predicate,object,meta);", "CREATE INDEX predicate_index ON " + table + "_statements(predicate);", "CREATE INDEX object_index ON " + table + "_statements(object);", "CREATE INDEX meta_index ON " + table + "_statements(meta);", "CREATE UNIQUE INDEX literal_index ON " + table + "_literals(hash);", "CREATE UNIQUE INDEX entity_index ON " + table + "_entities(value);" }; this.connectionString = connectionString; RefreshConnection(); } protected override bool HasUniqueStatementsConstraint { get { return false; } } protected override string InsertIgnoreCommand { get { return null; } } protected override bool SupportsInsertCombined { get { return false; } } protected override bool SupportsSubquery { get { return false; } } protected override void CreateNullTest(string column, System.Text.StringBuilder command) { command.Append(column); command.Append(" IS NULL"); } protected override void CreateLikeTest(string column, string match, int method, System.Text.StringBuilder command) { command.Append(column); command.Append(" LIKE '"); if (method == 1 || method == 2) command.Append("%"); // contains or ends-with // Postgres is weird. Because we will use the backslash to escape % and _, we have // to escape the string twice. Once regularly, and then again to escape all // backslashes and %'s and _'s. System.Text.StringBuilder bldr = new System.Text.StringBuilder(); EscapedAppend(bldr, match, false, false); EscapedAppend(command, match, false, true); if (method != 2) command.Append("%"); // contains or starts-with command.Append("'"); } public override void Close() { connection.Close(); } private void RefreshConnection() { if (connection != null) connection.Close(); connection = new NpgsqlConnection(connectionString); connection.Open(); } protected override void RunCommand(string sql) { if (Debug) Console.Error.WriteLine(sql); using (NpgsqlCommand cmd = new NpgsqlCommand(sql, connection)) cmd.ExecuteNonQuery(); } protected override object RunScalar(string sql) { using (NpgsqlCommand cmd = new NpgsqlCommand(sql, connection)) { object ret = cmd.ExecuteScalar(); if (Debug) Console.Error.WriteLine(sql + " => " + ret); return ret; } } protected override IDataReader RunReader(string sql) { if (Debug) Console.Error.WriteLine(sql); using (NpgsqlCommand cmd = new NpgsqlCommand(sql, connection)) { IDataReader reader = cmd.ExecuteReader(); return reader; } } protected override void BeginTransaction() { RunCommand("BEGIN"); } protected override void EndTransaction() { RunCommand("END"); } protected override void CreateTable() { foreach (string cmd in CreateTableCommands) { try { RunCommand(cmd); } catch (Exception e) { if (Debug) Console.Error.WriteLine(e); } } } protected override void CreateIndexes() { foreach (string cmd in CreateIndexCommands) { try { RunCommand(cmd); } catch (Exception e) { if (Debug) Console.Error.WriteLine(e); } } } protected override char GetQuoteChar() { return '\''; } } } semweb-1.05+dfsg/src/Store.cs0000644000175000017500000011171710774502134015363 0ustar meebeymeebeyusing System; #if !DOTNET2 using System.Collections; #else using System.Collections.Generic; #endif using System.Data; using SemWeb.Inference; using SemWeb.Util; #if !DOTNET2 using SourceList = System.Collections.ArrayList; using NamedSourceMap = System.Collections.Hashtable; using ReasonerList = System.Collections.ArrayList; #else using SourceList = System.Collections.Generic.List; using NamedSourceMap = System.Collections.Generic.Dictionary; using ReasonerList = System.Collections.Generic.List; #endif namespace SemWeb { public class Store : StatementSource, StatementSink, SelectableSource, QueryableSource, StaticSource, ModifiableSource, IDisposable { // Static helper methods for creating data sources and sinks // from spec strings. public static Store Create(string spec) { Store ret = new Store(); bool rdfs = false, euler = false; if (spec.StartsWith("rdfs+")) { rdfs = true; spec = spec.Substring(5); } if (spec.StartsWith("euler+")) { euler = true; spec = spec.Substring(6); } foreach (string spec2 in spec.Split('\n', '|')) { StatementSource s = CreateForInput(spec2.Trim()); if (s is SelectableSource) ret.AddSource((SelectableSource)s); else ret.AddSource(new MemoryStore(s)); } if (rdfs) ret.AddReasoner(new RDFS(ret)); if (euler) ret.AddReasoner(new Euler(ret)); // loads it all into memory! return ret; } public static StatementSource CreateForInput(string spec) { if (spec.StartsWith("debug+")) { StatementSource s = CreateForInput(spec.Substring(6)); if (!(s is SelectableSource)) s = new MemoryStore(s); return new SemWeb.Stores.DebuggedSource((SelectableSource)s, System.Console.Error); } return (StatementSource)Create(spec, false); } public static StatementSink CreateForOutput(string spec) { return (StatementSink)Create(spec, true); } private static object Create(string spec, bool output) { string type = spec; int c = spec.IndexOf(':'); if (c != -1) { type = spec.Substring(0, c); spec = spec.Substring(c+1); } else { spec = ""; } Type ttype; switch (type) { case "mem": return new MemoryStore(); case "xml": if (spec == "") throw new ArgumentException("Use: xml:filename"); if (output) { #if !SILVERLIGHT return new RdfXmlWriter(spec); #else throw new NotSupportedException("RDF/XML output is not supported in the Silverlight build of the SemWeb library."); #endif } else { return new RdfXmlReader(spec); } case "n3": case "ntriples": case "nt": case "turtle": if (spec == "") throw new ArgumentException("Use: format:filename"); if (output) { N3Writer ret = new N3Writer(spec); // turtle is default format switch (type) { case "nt": case "ntriples": ret.Format = N3Writer.Formats.NTriples; break; } return ret; } else { return new N3Reader(spec); } case "null": if (!output) throw new ArgumentException("The null sink does not support reading."); return new StatementCounterSink(); /*case "file": if (spec == "") throw new ArgumentException("Use: format:filename"); if (output) throw new ArgumentException("The FileStore does not support writing."); return new SemWeb.Stores.FileStore(spec);*/ case "sqlite": case "mysql": case "postgresql": case "sqlserver": if (spec == "") throw new ArgumentException("Use: sqlite|mysql|postgresql|sqlserver:table:connection-string"); c = spec.IndexOf(':'); if (c == -1) throw new ArgumentException("Invalid format for SQL spec parameter (table:constring)."); string table = spec.Substring(0, c); spec = spec.Substring(c+1); string classtype = null; if (type == "sqlite") { classtype = "SemWeb.Stores.SqliteStore, SemWeb.SqliteStore"; spec = spec.Replace(";", ","); } else if (type == "mysql") { classtype = "SemWeb.Stores.MySQLStore, SemWeb.MySQLStore"; } else if (type == "postgresql") { classtype = "SemWeb.Stores.PostgreSQLStore, SemWeb.PostgreSQLStore"; } else if( type == "sqlserver" ) { classtype = "SemWeb.Stores.SQLServerStore, SemWeb.SQLServerStore"; } ttype = Type.GetType(classtype); if (ttype == null) throw new NotSupportedException("The storage type in <" + classtype + "> could not be found."); return Activator.CreateInstance(ttype, new object[] { spec, table }); /*case "bdb": return new SemWeb.Stores.BDBStore(spec);*/ case "sparql-http": return new SemWeb.Remote.SparqlHttpSource(spec); case "class": ttype = Type.GetType(spec); if (ttype == null) throw new NotSupportedException("The class <" + spec + "> could not be found."); return Activator.CreateInstance(ttype); default: throw new ArgumentException("Unknown parser type: " + type); } } // START OF ACTUAL STORE IMPLEMENTATION readonly Entity rdfType = new Entity("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"); SourceList unnamedgraphs = new SourceList(); // a list of SelectableSources that aren't associated with graph URIs NamedSourceMap namedgraphs = new NamedSourceMap(); // a mapping from graph URIs to a selectable source that represents that graph SourceList allsources = new SourceList(); // a list of the sources in unnamed graphs and namedgraphs ReasonerList reasoners = new ReasonerList(); // a list of reasoning engines applied to this data model, which are run in order // GENERAL METHODS public Store() { } public Store(StatementSource source) { AddSource(new MemoryStore.StoreImpl(source)); } public Store(SelectableSource source) { AddSource(source); } #if !DOTNET2 public IList DataSources { get { return ArrayList.ReadOnly(allsources); } } #else public IList DataSources { get { return new List(allsources); } } #endif public virtual void AddSource(SelectableSource source) { if (source is MemoryStore) source = ((MemoryStore)source).impl; unnamedgraphs.Add(source); allsources.Add(source); } public virtual void AddSource(SelectableSource source, string uri) { if (namedgraphs.ContainsKey(uri)) throw new ArgumentException("URI has already been associated with a data source."); if (source is MemoryStore) source = ((MemoryStore)source).impl; namedgraphs[uri] = source; allsources.Add(source); } internal void AddSource2(SelectableSource store) { // Used by MemoryStore only! unnamedgraphs.Add(store); allsources.Add(store); } public virtual void AddReasoner(Reasoner reasoner) { reasoners.Add(reasoner); } public void Write(System.IO.TextWriter writer) { using (RdfWriter w = new N3Writer(writer)) { Select(w); } } // INTERFACE IMPLEMENTATIONS and related methods // IDisposable public void Dispose() { foreach (SelectableSource s in allsources) if (s is IDisposable) ((IDisposable)s).Dispose(); foreach (Reasoner r in reasoners) if (r is IDisposable) ((IDisposable)r).Dispose(); } // StatementSource public bool Distinct { get { if (allsources.Count > 1) return false; foreach (Reasoner r in reasoners) if (!r.Distinct) return false; if (allsources.Count == 0) return true; return ((SelectableSource)allsources[0]).Distinct; } } public void Select(StatementSink result) { Select(Statement.All, result); } // SelectableSource private SelectableSource[] GetSources(ref Entity graph) { if (graph == null || namedgraphs.Count == 0) #if !DOTNET2 return (SelectableSource[])allsources.ToArray(typeof(SelectableSource)); #else return allsources.ToArray(); #endif else if (graph == Statement.DefaultMeta) #if !DOTNET2 return (SelectableSource[])unnamedgraphs.ToArray(typeof(SelectableSource)); #else return unnamedgraphs.ToArray(); #endif else if (graph.Uri != null && namedgraphs.ContainsKey(graph.Uri)) { graph = Statement.DefaultMeta; return new SelectableSource[] { (SelectableSource)namedgraphs[graph.Uri] }; } else return null; } public bool Contains(Resource resource) { foreach (SelectableSource s in allsources) if (s.Contains(resource)) return true; return false; /*return (resource is Entity && Contains(new Statement((Entity)resource, null, null, null))) || (resource is Entity && Contains(new Statement(null, (Entity)resource, null, null))) || ( Contains(new Statement(null, null, resource, null))) || (resource is Entity && Contains(new Statement(null, null, null, (Entity)resource)));*/ } public bool Contains(Statement template) { // If reasoning is applied, use DefaultContains so that // we use a Select call which will delegate the query // to the reasoner. ReasoningHelper rh = GetReasoningHelper(null); if (rh != null) return DefaultContains(this, template); SelectableSource[] sources = GetSources(ref template.Meta); if (sources == null) return false; foreach (SelectableSource s in sources) if (s.Contains(template)) return true; return false; } public static bool DefaultContains(SelectableSource source, Statement template) { StatementExistsSink sink = new StatementExistsSink(); SelectFilter filter = new SelectFilter(template); filter.Limit = 1; source.Select(filter, sink); return sink.Exists; } private class ReasoningHelper { public Reasoner reasoner; public Store nextStore; } private ReasoningHelper GetReasoningHelper(SelectableSource[] sources) { if (reasoners.Count == 0) return null; ReasoningHelper ret = new ReasoningHelper(); ret.reasoner = (Reasoner)reasoners[reasoners.Count-1]; ret.nextStore = new Store(); if (sources == null) { ret.nextStore.unnamedgraphs = unnamedgraphs; // careful... ret.nextStore.namedgraphs = namedgraphs; ret.nextStore.allsources = allsources; } else { ret.nextStore.unnamedgraphs.AddRange(sources); ret.nextStore.allsources.AddRange(sources); } for (int i = 0; i < reasoners.Count-1; i++) ret.nextStore.reasoners.Add(reasoners[i]); return ret; } public void Select(Statement template, StatementSink result) { // If reasoning is applied, delegate this call to the last reasoner // and pass it a clone of this store but with itself removed. ReasoningHelper rh = GetReasoningHelper(null); if (rh != null) { rh.reasoner.Select(template, rh.nextStore, result); return; } SelectableSource[] sources = GetSources(ref template.Meta); if (sources == null) return; foreach (SelectableSource s in sources) s.Select(template, result); } public void Select(SelectFilter filter, StatementSink result) { Entity[] scanMetas = filter.Metas; if (scanMetas == null || namedgraphs.Count == 0) scanMetas = new Entity[] { null }; foreach (Entity meta in scanMetas) { Entity meta2 = meta; SelectableSource[] sources = GetSources(ref meta2); if (sources == null) continue; if (meta2 == null) filter.Metas = null; else filter.Metas = new Entity[] { meta2 }; // If reasoning is applied, delegate this call to the last reasoner // and pass it either: // a clone of this store but with itself removed, if the meta we are processing now is null, or // that, but only with the sources that apply to this meta ReasoningHelper rh = GetReasoningHelper(sources); if (rh != null) { rh.reasoner.Select(filter, rh.nextStore, result); continue; } foreach (SelectableSource s in sources) s.Select(filter, result); } } public static void DefaultSelect(SelectableSource source, SelectFilter filter, StatementSink sink) { // This method should really be avoided... if (filter.LiteralFilters != null) sink = new SemWeb.Filters.FilterSink(filter.LiteralFilters, sink, source); foreach (Entity subject in filter.Subjects == null ? new Entity[] { null } : filter.Subjects) foreach (Entity predicate in filter.Predicates == null ? new Entity[] { null } : filter.Predicates) foreach (Resource objct in filter.Objects == null ? new Resource[] { null } : filter.Objects) foreach (Entity meta in filter.Metas == null ? new Entity[] { null } : filter.Metas) source.Select(new Statement(subject, predicate, objct, meta), sink); } public SelectResult Select(Statement template) { return new SelectResult.Single(this, template); } public SelectResult Select(SelectFilter filter) { return new SelectResult.Multi(this, filter); } public Resource[] SelectObjects(Entity subject, Entity predicate) { if (predicate.Uri != null && predicate.Uri == NS.RDFS + "member") { ResourceCollector2 collector = new ResourceCollector2(); Select(new Statement(subject, predicate, null, null), collector); return collector.GetItems(); } else { ResSet resources = new ResSet(); ResourceCollector collector = new ResourceCollector(); collector.SPO = 2; collector.Table = resources; Select(new Statement(subject, predicate, null, null), collector); return resources.ToArray(); } } public Entity[] SelectSubjects(Entity predicate, Resource @object) { ResSet resources = new ResSet(); ResourceCollector collector = new ResourceCollector(); collector.SPO = 0; collector.Table = resources; Select(new Statement(null, predicate, @object, null), collector); return resources.ToEntityArray(); } class ResourceCollector : StatementSink { public ResSet Table; public int SPO; public bool Add(Statement s) { if (SPO == 0) Table.Add(s.Subject); if (SPO == 2) Table.Add(s.Object); return true; } } class ResourceCollector2 : StatementSink { System.Collections.ArrayList items = new System.Collections.ArrayList(); ResSet other = new ResSet(); public bool Add(Statement s) { if (s.Predicate.Uri == null || !s.Predicate.Uri.StartsWith(NS.RDF + "_")) { other.Add(s.Object); } else { string num = s.Predicate.Uri.Substring(NS.RDF.Length+1); try { int idx = int.Parse(num); items.Add(new Item(s.Object, idx)); } catch { other.Add(s.Object); } } return true; } public Resource[] GetItems() { items.Sort(); Resource[] ret = new Resource[items.Count + other.Count]; int ctr = 0; foreach (Item item in items) ret[ctr++] = item.r; foreach (Resource item in other) ret[ctr++] = item; return ret; } class Item : IComparable { public Resource r; int idx; public Item(Resource r, int idx) { this.r = r; this.idx = idx; } public int CompareTo(object other) { return idx.CompareTo(((Item)other).idx); } } } // QueryableSource public SemWeb.Query.MetaQueryResult MetaQuery(Statement[] graph, SemWeb.Query.QueryOptions options) { // If reasoning is applied, delegate this call to the last reasoner // and pass it a clone of this store but with itself removed. ReasoningHelper rh = GetReasoningHelper(null); if (rh != null) return rh.reasoner.MetaQuery(graph, options, rh.nextStore); // Special case for one wrapped data source that supports QueryableSource: if (allsources.Count == 1 && allsources[0] is QueryableSource) return ((QueryableSource)allsources[0]).MetaQuery(graph, options); return new SemWeb.Inference.SimpleEntailment().MetaQuery(graph, options, this); } public void Query(Statement[] graph, SemWeb.Query.QueryOptions options, SemWeb.Query.QueryResultSink sink) { // If reasoning is applied, delegate this call to the last reasoner // and pass it a clone of this store but with itself removed. ReasoningHelper rh = GetReasoningHelper(null); if (rh != null) { rh.reasoner.Query(graph, options, rh.nextStore, sink); return; } // Special case for one wrapped data source that supports QueryableSource: if (allsources.Count == 1 && allsources[0] is QueryableSource) { ((QueryableSource)allsources[0]).Query(graph, options, sink); return; } // Chunk the query graph as best we can. SemWeb.Query.GraphMatch.QueryPart[] chunks = ChunkQuery(graph, options, sink); // If we couldn't chunk the graph, then just use the default GraphMatch implementation. if (chunks == null) { new SemWeb.Inference.SimpleEntailment().Query(graph, options, this, sink); return; } SemWeb.Query.GraphMatch.RunGeneralQuery(chunks, options.VariableKnownValues, options.VariableLiteralFilters, options.DistinguishedVariables, 0, options.Limit, true, sink); } private SemWeb.Query.GraphMatch.QueryPart[] ChunkQuery(Statement[] query, SemWeb.Query.QueryOptions options, SemWeb.Query.QueryResultSink sink) { // MetaQuery the data sources to get their capabilities. SemWeb.Query.MetaQueryResult[] mq = new SemWeb.Query.MetaQueryResult[allsources.Count]; for (int i = 0; i < allsources.Count; i++) { if (!(allsources[i] is QueryableSource)) return null; mq[i] = ((QueryableSource)allsources[i]).MetaQuery(query, options); if (!mq[i].QuerySupported) return null; } System.Collections.ArrayList chunks = new System.Collections.ArrayList(); int curSource = -1; System.Collections.ArrayList curStatements = new System.Collections.ArrayList(); for (int j = 0; j < query.Length; j++) { if (curSource != -1) { // If we have a curSource and it definitively answers this // statement in the graph, include this statement in the // current chunk. if (mq[curSource].IsDefinitive != null && mq[curSource].IsDefinitive[j]) { sink.AddComments(allsources[curSource] + " answers definitively: " + query[j]); curStatements.Add(query[j]); continue; } // If we have a curSource and no other source answers this // statement, also include this statement in the current chunk. bool foundOther = false; for (int i = 0; i < mq.Length; i++) { if (i == curSource) continue; if (mq[i].NoData != null && mq[i].NoData[j]) continue; foundOther = true; break; } if (!foundOther) { curStatements.Add(query[j]); continue; } // Some other source could possibly answer this statement, // so we complete the chunk we started. SemWeb.Query.GraphMatch.QueryPart c = new SemWeb.Query.GraphMatch.QueryPart( (Statement[])curStatements.ToArray(typeof(Statement)), (QueryableSource)allsources[curSource] ); chunks.Add(c); curSource = -1; curStatements.Clear(); } // Find a definitive source for this statement for (int i = 0; i < mq.Length; i++) { if (mq[i].IsDefinitive != null && mq[i].IsDefinitive[j]) { curSource = i; curStatements.Add(query[j]); sink.AddComments(allsources[i] + " answers definitively: " + query[j]); break; } } if (curSource != -1) // found a definitive source continue; // See if only one source can answer this statement. // Also build a list of sources that can answer the // statement, so don't break out of this loop early. System.Collections.ArrayList answerables = new System.Collections.ArrayList(); int findSource = -1; for (int i = 0; i < mq.Length; i++) { if (mq[i].NoData != null && mq[i].NoData[j]) continue; answerables.Add(allsources[i]); if (findSource == -1) findSource = i; else findSource = -2; // found a second source that can answer this } if (findSource >= 0) { curSource = findSource; curStatements.Add(query[j]); continue; } if (answerables.Count == 0) { sink.AddComments("No data source could answer: " + query[j]); return null; } // More than one source can answer this, so make a one-statement chunk. SemWeb.Query.GraphMatch.QueryPart cc = new SemWeb.Query.GraphMatch.QueryPart( query[j], (QueryableSource[])answerables.ToArray(typeof(QueryableSource)) ); chunks.Add(cc); } if (curSource != -1) { SemWeb.Query.GraphMatch.QueryPart c = new SemWeb.Query.GraphMatch.QueryPart( (Statement[])curStatements.ToArray(typeof(Statement)), (QueryableSource)allsources[curSource] ); chunks.Add(c); } return (SemWeb.Query.GraphMatch.QueryPart[])chunks.ToArray(typeof(SemWeb.Query.GraphMatch.QueryPart)); } public #if !DOTNET2 ICollection #else ICollection #endif Query(Statement[] graph) { SemWeb.Query.QueryOptions options = new SemWeb.Query.QueryOptions(); options.Limit = 1; SemWeb.Query.QueryResultBuffer sink = new SemWeb.Query.QueryResultBuffer(); Query(graph, options, sink); return sink.Bindings; } // StaticSource public int StatementCount { get { int ret = 0; foreach (StatementSource s in allsources) { if (s is StaticSource) ret += ((StaticSource)s).StatementCount; else throw new InvalidOperationException("Not all data sources are support StatementCount."); } return ret; } } public Entity[] GetEntities() { ResSet h = new ResSet(); foreach (StatementSource s in allsources) { if (s is StaticSource) { foreach (Resource r in ((StaticSource)s).GetEntities()) h.Add(r); } else { throw new InvalidOperationException("Not all data sources support GetEntities."); } } return h.ToEntityArray(); } public Entity[] GetPredicates() { ResSet h = new ResSet(); foreach (StatementSource s in allsources) { if (s is StaticSource) { foreach (Resource r in ((StaticSource)s).GetPredicates()) h.Add(r); } else { throw new InvalidOperationException("Not data sources support GetPredicates."); } } return h.ToEntityArray(); } public Entity[] GetMetas() { ResSet h = new ResSet(); foreach (StatementSource s in allsources) { if (s is StaticSource) { foreach (Resource r in ((StaticSource)s).GetMetas()) h.Add(r); } else { throw new InvalidOperationException("Not all data sources support GetMetas."); } } return h.ToEntityArray(); } public Entity[] GetEntitiesOfType(Entity type) { return SelectSubjects(rdfType, type); } public string GetPersistentBNodeId(BNode node) { foreach (SelectableSource source in allsources) { if (source is StaticSource) { string id = ((StaticSource)source).GetPersistentBNodeId(node); if (id != null) return id; } } return null; } public BNode GetBNodeFromPersistentId(string persistentId) { foreach (SelectableSource source in allsources) { if (source is StaticSource) { BNode node = ((StaticSource)source).GetBNodeFromPersistentId(persistentId); if (node != null) return node; } } return null; } // StatementSink bool StatementSink.Add(Statement statement) { Add(statement); return true; } public void Add(Statement statement) { if (statement.AnyNull) throw new ArgumentNullException(); // We don't know where to put it unless we are wrapping just one store. SelectableSource[] sources = GetSources(ref statement.Meta); if (sources == null || sources.Length != 1) throw new InvalidOperationException("I don't know which data source to put the statement into."); if (!(sources[0] is ModifiableSource)) throw new InvalidOperationException("The data source is not modifiable."); ((ModifiableSource)sources[0]).Add(statement); } // ModifiableSource public void Clear() { if (allsources.Count > 1) throw new InvalidOperationException("The Clear() method is not supported when multiple data sources are added to a Store."); if (!(allsources[0] is ModifiableSource)) throw new InvalidOperationException("The data source is not modifiable."); ((ModifiableSource)allsources[0]).Clear(); } ModifiableSource[] GetModifiableSources(ref Entity graph) { SelectableSource[] sources = GetSources(ref graph); if (sources == null) return null; // check all are modifiable first foreach (SelectableSource source in sources) if (!(source is ModifiableSource)) throw new InvalidOperationException("Not all of the data sources are modifiable."); ModifiableSource[] sources2 = new ModifiableSource[sources.Length]; sources.CopyTo(sources2, 0); return sources2; } public void Remove(Statement template) { ModifiableSource[] sources = GetModifiableSources(ref template.Meta); if (sources == null) return; foreach (ModifiableSource source in sources) source.Remove(template); } public void Import(StatementSource source) { // We don't know where to put the data unless we are wrapping just one store. if (allsources.Count != 1) throw new InvalidOperationException("I don't know which data source to put the statements into."); if (!(allsources[0] is ModifiableSource)) throw new InvalidOperationException("The data source is not modifiable."); ((ModifiableSource)allsources[0]).Import(source); } public void RemoveAll(Statement[] templates) { // Not tested... System.Collections.ArrayList metas = new System.Collections.ArrayList(); foreach (Statement t in templates) if (!metas.Contains(t.Meta)) metas.Add(t.Meta); foreach (Entity meta in metas) { Entity meta2 = meta; ModifiableSource[] sources = GetModifiableSources(ref meta2); if (sources == null) continue; StatementList templates2 = new StatementList(); foreach (Statement t in templates) { if (t.Meta == meta) { Statement t2 = t; t2.Meta = meta2; templates2.Add(t2); } } foreach (ModifiableSource source in sources) source.RemoveAll(templates2); } } public void Replace(Entity find, Entity replacement) { foreach (SelectableSource source in allsources) if (!(source is ModifiableSource)) throw new InvalidOperationException("Not all of the data sources are modifiable."); foreach (ModifiableSource source in allsources) source.Replace(find, replacement); } public void Replace(Statement find, Statement replacement) { ModifiableSource[] sources = GetModifiableSources(ref find.Meta); if (sources == null) return; foreach (ModifiableSource source in sources) source.Replace(find, replacement); } public static void DefaultReplace(ModifiableSource source, Entity find, Entity replacement) { MemoryStore deletions = new MemoryStore(); MemoryStore additions = new MemoryStore(); source.Select(new Statement(find, null, null, null), deletions); source.Select(new Statement(null, find, null, null), deletions); source.Select(new Statement(null, null, find, null), deletions); source.Select(new Statement(null, null, null, find), deletions); foreach (Statement s in deletions) { source.Remove(s); additions.Add(s.Replace(find, replacement)); } foreach (Statement s in additions) { source.Add(s); } } public static void DefaultReplace(ModifiableSource source, Statement find, Statement replacement) { source.Remove(find); source.Add(replacement); } } public abstract class SelectResult : StatementSource, #if DOTNET2 System.Collections.Generic.IEnumerable #else IEnumerable #endif { internal Store source; MemoryStore ms; internal SelectResult(Store source) { this.source = source; } public bool Distinct { get { return source.Distinct; } } public abstract void Select(StatementSink sink); #if DOTNET2 System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { return ((System.Collections.Generic.IEnumerable)Buffer()).GetEnumerator(); } #endif System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { return ((System.Collections.IEnumerable)Buffer()).GetEnumerator(); } public long StatementCount { get { return Buffer().StatementCount; } } public MemoryStore Load() { return Buffer(); } public Statement[] ToArray() { return Load().ToArray(); } private MemoryStore Buffer() { if (ms != null) return ms; ms = new MemoryStore(); ms.allowIndexing = false; Select(ms); return ms; } internal class Single : SelectResult { Statement template; public Single(Store source, Statement template) : base(source) { this.template = template; } public override void Select(StatementSink sink) { source.Select(template, sink); } } internal class Multi : SelectResult { SelectFilter filter; public Multi(Store source, SelectFilter filter) : base(source) { this.filter = filter; } public override void Select(StatementSink sink) { source.Select(filter, sink); } } } } /////// AUXILIARY STORE WRAPPERS ///////// namespace SemWeb.Stores { #if DOTNET2 using System.Collections; #endif public abstract class SimpleSourceWrapper : SelectableSource { public virtual bool Distinct { get { return true; } } public virtual void Select(StatementSink sink) { // The default implementation does not return // anything for this call. } public abstract bool Contains(Resource resource); public virtual bool Contains(Statement template) { template.Object = null; // reduce to another case (else there would be recursion) return Store.DefaultContains(this, template); } protected virtual void SelectAllSubject(Entity subject, StatementSink sink) { } protected virtual void SelectAllObject(Resource @object, StatementSink sink) { } protected virtual void SelectRelationsBetween(Entity subject, Resource @object, StatementSink sink) { } protected virtual void SelectAllPairs(Entity predicate, StatementSink sink) { } protected virtual void SelectSubjects(Entity predicate, Resource @object, StatementSink sink) { } protected virtual void SelectObjects(Entity subject, Entity predicate, StatementSink sink) { } public void Select(Statement template, StatementSink sink) { if (template.Meta != null && template.Meta != Statement.DefaultMeta) return; if (template.Predicate != null && template.Predicate.Uri == null) return; if (template.Subject == null && template.Predicate == null && template.Object == null) { Select(sink); } else if (template.Subject != null && template.Predicate != null && template.Object != null) { template.Meta = Statement.DefaultMeta; if (Contains(template)) sink.Add(template); } else if (template.Predicate == null) { if (template.Subject == null) SelectAllObject(template.Object, sink); else if (template.Object == null) SelectAllSubject(template.Subject, sink); else SelectRelationsBetween(template.Subject, template.Object, sink); } else if (template.Subject != null && template.Object == null) { SelectObjects(template.Subject, template.Predicate, sink); } else if (template.Subject == null && template.Object != null) { SelectSubjects(template.Predicate, template.Object, sink); } else if (template.Subject == null && template.Object == null) { SelectAllPairs(template.Predicate, sink); } } public void Select(SelectFilter filter, StatementSink sink) { Store.DefaultSelect(this, filter, sink); } } public class DebuggedSource : QueryableSource { SelectableSource source; System.IO.TextWriter output; public DebuggedSource(SelectableSource source, System.IO.TextWriter output) { this.source = source; this.output = output; } public bool Distinct { get { return source.Distinct; } } public void Select(StatementSink sink) { Select(Statement.All, sink); } public bool Contains(Resource resource) { output.WriteLine("CONTAINS: " + resource); return source.Contains(resource); } public bool Contains(Statement template) { output.WriteLine("CONTAINS: " + template); return source.Contains(template); } public void Select(Statement template, StatementSink sink) { output.WriteLine("SELECT: " + template); source.Select(template, sink); } public void Select(SelectFilter filter, StatementSink sink) { output.WriteLine("SELECT: " + filter); source.Select(filter, sink); } public virtual SemWeb.Query.MetaQueryResult MetaQuery(Statement[] graph, SemWeb.Query.QueryOptions options) { if (source is QueryableSource) return ((QueryableSource)source).MetaQuery(graph, options); else return new SemWeb.Query.MetaQueryResult(); // QuerySupported is by default false } public void Query(Statement[] graph, SemWeb.Query.QueryOptions options, SemWeb.Query.QueryResultSink sink) { output.WriteLine("QUERY:"); foreach (Statement s in graph) output.WriteLine("\t" + s); if (options.VariableKnownValues != null) { #if !DOTNET2 foreach (System.Collections.DictionaryEntry ent in options.VariableKnownValues) #else foreach (KeyValuePair> ent in options.VariableKnownValues) #endif output.WriteLine("\twhere " + ent.Key + " in " + ToString((ICollection)ent.Value)); } if (source is QueryableSource) ((QueryableSource)source).Query(graph, options, sink); else throw new NotSupportedException("Underlying source " + source + " is not a QueryableSource."); } string ToString(ICollection resources) { ArrayList s = new ArrayList(); foreach (Resource r in resources) s.Add(r.ToString()); return String.Join(",", (string[])s.ToArray(typeof(string))); } } public class CachedSource : SelectableSource { SelectableSource source; Hashtable containsresource = new Hashtable(); StatementMap containsstmtresults = new StatementMap(); StatementMap selectresults = new StatementMap(); Hashtable selfilterresults = new Hashtable(); public CachedSource(SelectableSource s) { source = s; } public bool Distinct { get { return source.Distinct; } } public void Select(StatementSink sink) { Select(Statement.All, sink); } public bool Contains(Resource resource) { if (source == null) return false; if (!containsresource.ContainsKey(resource)) containsresource[resource] = source.Contains(resource); return (bool)containsresource[resource]; } public bool Contains(Statement template) { if (source == null) return false; if (!containsstmtresults.ContainsKey(template)) containsstmtresults[template] = source.Contains(template); return (bool)containsstmtresults[template]; } public void Select(Statement template, StatementSink sink) { if (source == null) return; if (!selectresults.ContainsKey(template)) { MemoryStore s = new MemoryStore(); source.Select(template, s); selectresults[template] = s; } ((MemoryStore)selectresults[template]).Select(sink); } public void Select(SelectFilter filter, StatementSink sink) { if (source == null) return; if (!selfilterresults.ContainsKey(filter)) { MemoryStore s = new MemoryStore(); source.Select(filter, s); selfilterresults[filter] = s; } ((MemoryStore)selfilterresults[filter]).Select(sink); } } internal class DecoupledStatementSource : StatementSource { StatementSource source; int minbuffersize = 2000; int maxbuffersize = 10000; bool bufferWanted = false; System.Threading.AutoResetEvent bufferMayAcquire = new System.Threading.AutoResetEvent(false); System.Threading.AutoResetEvent bufferReleased = new System.Threading.AutoResetEvent(false); System.Threading.Thread sourceThread; StatementList buffer = new StatementList(); bool sourceFinished = false; public DecoupledStatementSource(StatementSource source) { this.source = source; } public bool Distinct { get { return source.Distinct; } } public void Select(StatementSink sink) { bufferWanted = false; sourceThread = new System.Threading.Thread(Go); sourceThread.Start(); while (true) { bufferWanted = true; if (!sourceFinished) bufferMayAcquire.WaitOne(); // wait until we can have the buffer bufferWanted = false; Statement[] statements = buffer.ToArray(); buffer.Clear(); bufferReleased.Set(); // notify that we don't need the buffer anymore if (sourceFinished && statements.Length == 0) break; foreach (Statement s in statements) sink.Add(s); } } private void Go() { source.Select(new MySink(this)); sourceFinished = true; bufferMayAcquire.Set(); // for the last batch } private void SourceAdd(Statement s) { if ((bufferWanted && buffer.Count > minbuffersize) || buffer.Count >= maxbuffersize) { bufferMayAcquire.Set(); bufferReleased.WaitOne(); } buffer.Add(s); } private void SourceAdd(Statement[] s) { if ((bufferWanted && buffer.Count > minbuffersize) || buffer.Count >= maxbuffersize) { bufferMayAcquire.Set(); bufferReleased.WaitOne(); } foreach (Statement ss in s) buffer.Add(ss); } private class MySink : StatementSink { DecoupledStatementSource x; public MySink(DecoupledStatementSource x) { this.x = x; } public bool Add(Statement s) { x.SourceAdd(s); return true; } public bool Add(Statement[] s) { x.SourceAdd(s); return true; } } } } semweb-1.05+dfsg/src/sparql.pidb0000644000175000017500000140113210774502134016074 0ustar meebeymeebeySystem.Collections.Hashtable LoadFactorVersionComparerHashCodeProviderHashSizeKeysValuesequalityComparer @?"   LastValidTaskListTokensVersionLastValidTagCommentsFIXME:2;TODO:1;HACK:1;UNDONE:0  rywp SparqlEngine SemWeb.QuerySemWeb.Query.Query QueryType@Ask22 Construct33 Describe44 Select55 1616MyLogicFactory-name.levering.ryan.sparql.logic.StreamedLogicgetGroupConstraintLogic5name.levering.ryan.sparql.model.logic.ConstraintLogic8name.levering.ryan.sparql.model.data.GroupConstraintDataOOOQNRNRRdfSourceWrapper2name.levering.ryan.sparql.common.AdvancedRdfSource3name.levering.ryan.sparql.common.SPARQLValueFactoryStmt*name.levering.ryan.sparql.common.Statementsubject)name.levering.ryan.sparql.common.ResourcePP&7 predicate$name.levering.ryan.sparql.common.URIQQ&4(&name.levering.ryan.sparql.common.ValueRR&4ctorsubject)name.levering.ryan.sparql.common.Resource predicate$name.levering.ryan.sparql.common.URI(&name.levering.ryan.sparql.common.ValueSS SW getSubject)name.levering.ryan.sparql.common.ResourceXXBXXBV getPredicate$name.levering.ryan.sparql.common.URIYY?YY?U getObject&name.levering.ryan.sparql.common.ValueZZ>ZZ>Requals3otherM[[%[`%hashCodeHaaaaAObObsourceSemWeb.SelectableSourceWW,bnodes7XX' QueryMetaEntityYYsparqlSemWeb.Query.SparqlEngineZZlogSystem.Text.StringBuilder\\D-ctorsourceSemWeb.SelectableSourcemetaEntitysparqlSemWeb.Query.SparqlEngine^^ V^bVLogUQdd#dg#GetLogQiiim GetIteratorjava.util.Iterator statementSemWeb.Statement defaultGraph3limitHoo]ow] GetIteratorjava.util.IteratorsubjectsEntity predicatesEntityobjectsSemWeb.ResourcemetasEntity litFiltersM defaultGraph3limitHyyygetDefaultStatementsjava.util.Iteratorsubject&name.levering.ryan.sparql.common.Value predicate$name.levering.ryan.sparql.common.URI(&name.levering.ryan.sparql.common.ValuegetDefaultStatementsjava.util.Iteratorsubject&name.levering.ryan.sparql.common.Value predicate&name.levering.ryan.sparql.common.Value(&name.levering.ryan.sparql.common.Value litFiltersMlimitH getStatementsjava.util.Iteratorsubject&name.levering.ryan.sparql.common.Value predicate$name.levering.ryan.sparql.common.URI(&name.levering.ryan.sparql.common.Value getStatementsjava.util.Iteratorsubject&name.levering.ryan.sparql.common.Value predicate&name.levering.ryan.sparql.common.Value(&name.levering.ryan.sparql.common.Value litFiltersMlimitH getStatementsjava.util.Iteratorsubject&name.levering.ryan.sparql.common.Value predicate$name.levering.ryan.sparql.common.URI(&name.levering.ryan.sparql.common.Valuegraph$name.levering.ryan.sparql.common.URI getStatementsjava.util.Iteratorsubject&name.levering.ryan.sparql.common.Value predicate&name.levering.ryan.sparql.common.Value(&name.levering.ryan.sparql.common.Valuegraph$name.levering.ryan.sparql.common.URI litFiltersMlimitH getValueFactory3name.levering.ryan.sparql.common.SPARQLValueFactoryPPhas3 statementSemWeb.Statement))hasDefaultStatement3subject&name.levering.ryan.sparql.common.Value predicate$name.levering.ryan.sparql.common.URI(&name.levering.ryan.sparql.common.Value hasStatement3subject&name.levering.ryan.sparql.common.Value predicate$name.levering.ryan.sparql.common.URI(&name.levering.ryan.sparql.common.Value hasStatement3subject&name.levering.ryan.sparql.common.Value predicate$name.levering.ryan.sparql.common.URI(&name.levering.ryan.sparql.common.Valuegraph$name.levering.ryan.sparql.common.URIToEntityEntityent&name.levering.ryan.sparql.common.ValueFF ToResourceSemWeb.Resource`&name.levering.ryan.sparql.common.ValueLL ToEntitiesEntityents&name.levering.ryan.sparql.common.ValueMM ToResourcesSemWeb.Resourceents&name.levering.ryan.sparql.common.ValuePP ToResourcesSemWeb.Resourceents5name.levering.ryan.sparql.model.logic.ExpressionLogicbinding.name.levering.ryan.sparql.common.RdfBindingRow createValue&name.levering.ryan.sparql.common.Value`&name.levering.ryan.sparql.common.Valuekk createBNode&name.levering.ryan.sparql.common.BNode`&name.levering.ryan.sparql.common.BNodekk createLiteral(name.levering.ryan.sparql.common.Literal`(name.levering.ryan.sparql.common.Literalqq createURI$name.levering.ryan.sparql.common.URI`$name.levering.ryan.sparql.common.URIee createBNode&name.levering.ryan.sparql.common.BNode!!?!#? createBNode&name.levering.ryan.sparql.common.BNodeidQ$$H$&H createLiteral(name.levering.ryan.sparql.common.Literal`QlangQ''\')\ createLiteral(name.levering.ryan.sparql.common.Literal`Qdatatype$name.levering.ryan.sparql.common.URI**~*,~ createLiteral(name.levering.ryan.sparql.common.Literal`Q--O-/O createLiteral(name.levering.ryan.sparql.common.Literal`P00N02N createLiteral(name.levering.ryan.sparql.common.Literal`<33O35O createLiteral(name.levering.ryan.sparql.common.Literal`466M68M createLiteral(name.levering.ryan.sparql.common.Literal`G99N9;N createLiteral(name.levering.ryan.sparql.common.Literal`H<<L<>L createLiteral(name.levering.ryan.sparql.common.Literal`I??M?AM createLiteral(name.levering.ryan.sparql.common.Literal`3BBMBDM createURI$name.levering.ryan.sparql.common.URInsQlnQEEOEGO createURI$name.levering.ryan.sparql.common.URIuriQHHEHJEcreateStatement*name.levering.ryan.sparql.common.Statementsubject)name.levering.ryan.sparql.common.Resource predicate$name.levering.ryan.sparql.common.URI(&name.levering.ryan.sparql.common.ValueKKKM DepersistUrSemWeb.Resourcedd'dg' DepersistSemWeb.ResourcerSemWeb.Resourceii)iv)PersistSemWeb.ResourcerSemWeb.Resourcexx'x'Wrap&name.levering.ryan.sparql.common.ValueresSemWeb.Resourcecache7\\Wrap&name.levering.ryan.sparql.common.ValueresSemWeb.ResourceKKTT EmptyIteratorjava.util.IteratorhasNext3nextMremoveUStatementIteratorjava.util.IteratorsourceSemWeb.SelectableSourcefilter SelectFilterwrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper wantMetas3 statementsSemWeb.StatementcurindexHcache7&ctorsourceSemWeb.SelectableSourcefilter SelectFilterwrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper wantMetas3 tthasNext3nextMremoveUGraphStatementWrapper/name.levering.ryan.sparql.common.GraphStatement.SemWeb.Statement S&name.levering.ryan.sparql.common.Value%-P$name.levering.ryan.sparql.common.URI%+O&name.levering.ryan.sparql.common.Value%-G$name.levering.ryan.sparql.common.URI%+ctor statementSemWeb.Statementcache7 FF getGraphName$name.levering.ryan.sparql.common.URI>>L getSubject&name.levering.ryan.sparql.common.Value>>L getPredicate$name.levering.ryan.sparql.common.URI>>L getObject&name.levering.ryan.sparql.common.Value==K BNodeWrapperjava.lang.Object&name.levering.ryan.sparql.common.BNoder&name.levering.ryan.sparql.common.BNodectorres&name.levering.ryan.sparql.common.BNode ""/getIDQ@equals3otherM--hashCodeH""> getNativeM+ URIWrapperjava.lang.Object$name.levering.ryan.sparql.common.URIrEntityhcH ctorresEntity !!d getLocalNameQ  / getNamespaceQ  2getURIQ,toStringQ%%7equals3otherM--hashCodeH""1 getNativeM/  LiteralWrapperjava.lang.Object(name.levering.ryan.sparql.common.Literalr(name.levering.ryan.sparql.common.Literal  hcH   ctorres(name.levering.ryan.sparql.common.Literal &&k getDatatype$name.levering.ryan.sparql.common.URI==getLabelQ0 getLanguageQ6equals3otherM--hashCodeH""1 GetLiteral(name.levering.ryan.sparql.common.Literalliteral(name.levering.ryan.sparql.common.LiteralOO getNativeM+    ExtFuncWrapper@name.levering.ryan.sparql.logic.function.ExternalFunctionFactory9name.levering.ryan.sparql.logic.function.ExternalFunctionsource*SemWeb.Query.SparqlEngine.RdfSourceWrapper##funcSemWeb.Query.RdfFunction$$ctor.*SemWeb.Query.SparqlEngine.RdfSourceWrapperfSemWeb.Query.RdfFunction&& <&)<create9name.levering.ryan.sparql.logic.function.ExternalFunction logicfactory2name.levering.ryan.sparql.model.logic.LogicFactory valuefactory3name.levering.ryan.sparql.common.SPARQLValueFactory+++-evaluate&name.levering.ryan.sparql.common.Value arguments5name.levering.ryan.sparql.model.logic.ExpressionLogicbinding.name.levering.ryan.sparql.common.RdfBindingRow///6"7"7 RdfGroupLogicname.levering.ryan.sparql.model.logic.helper.SetIntersectLogic:;;<runTripleConstraints.name.levering.ryan.sparql.common.RdfBindingSettripleConstraintsjava.util.Listsource*name.levering.ryan.sparql.common.RdfSourcedefaultDatasetsjava.util.Collection namedDatasetsjava.util.Collection knownValues java.util.Map knownFilters java.util.MaplimitH>@I@yIToResSemWeb.ResourceexprM knownValues java.util.Mapentities3varMap17varMap27src*SemWeb.Query.SparqlEngine.RdfSourceWrapperoptsSemWeb.Query.QueryOptionsextractLiteralFiltersU%5name.levering.ryan.sparql.model.logic.ExpressionLogicliteralFilters java.util.Map RemoveCastM%M%%99 TestFunctionSemWeb.Query.RdfFunctionUri QcEvaluateSemWeb.ResourceSemWeb.Resource66 LCFunctionSemWeb.Query.RdfFunctionUri Q]EvaluateSemWeb.ResourceSemWeb.Resource66 UCFunctionSemWeb.Query.RdfFunctionUri Q    ]EvaluateSemWeb.ResourceSemWeb.Resource  6 6  BNodePersistUriQ''V queryStringQ))query0name.levering.ryan.sparql.parser.model.QueryNode***: extFunctions6++,AllowPersistBNodes3--*preferredMimeTypeQ//#Type #SemWeb.Query.SparqlEngine.QueryTypeTTT`MimeType`Qbb"b}#ctorquerySystem.IO.TextReader:; ;<ctorqueryQ>> $>P$AddExternalFunctionUfunctionSemWeb.Query.RdfFunction88GetExplanationQ**RunUsourceSemWeb.SelectableSourceoutputSystem.IO.TextWriterGGAsk3sourceSemWeb.SelectableSource++AskUsourceSemWeb.SelectableSourceoutputSystem.IO.TextWriter>> ConstructUsourceSemWeb.SelectableSourcesinkSemWeb.StatementSinkEEGetQueryPrefixesSemWeb.NamespaceManager-- WriteGraphUgraph)name.levering.ryan.sparql.common.RdfGraph sourcewrapper*SemWeb.Query.SparqlEngine.RdfSourceWrappersinkSemWeb.StatementSinkVV ConstructUsourceSemWeb.SelectableSourceoutputSystem.IO.TextWriterDDDescribeUsourceSemWeb.SelectableSourcesinkSemWeb.StatementSinkDDDescribeUsourceSemWeb.SelectableSourceoutputSystem.IO.TextWriterCCSelectUsourceSemWeb.SelectableSourceoutputSystem.IO.TextWriterAASelectUsourceSemWeb.SelectableSourcesinkSemWeb.Query.QueryResultSinkDDRunUsourceSemWeb.SelectableSource resultsinkSemWeb.Query.QueryResultSinkP<P BindLogic*SemWeb.Query.SparqlEngine.RdfSourceWrappersourceSemWeb.SelectableSource@@>@L>-/home/tauberer/dev/semweb/src/SparqlEngine.cs%-/home/tauberer/dev/semweb/src/SparqlEngine.cs%SparqlProtocolServerHandler SemWeb.QuerySystem.Web.IHttpHandler HTMLQuerySinkSemWeb.Query.QueryResultSinkoutputSystem.IO.TextWriterctoroutputSystem.IO.TextWriter ++EInitU variablesVariable33FinishedU##3-SemWeb.Query.VariableBindings55 MaximumLimitH  sources7 ' IsReusable 3*+CProcessRequest(U System.Web.HttpContextEUE GetDataSource$SemWeb.SelectableSourcecloseAfterQuery3WWMWxM CreateQuery$SemWeb.Query.QueryqueryQzz4z~4RunQuery$UquerySemWeb.Query.QuerysourceSemWeb.SelectableSourceoutputSystem.IO.TextWriter[[//home/tauberer/dev/semweb/src/SparqlProtocol.cs //home/tauberer/dev/semweb/src/SparqlProtocol.cs     System.Collections.ArrayList_size_items_version  MonoDevelop.Projects*MonoDevelop.Projects.Parser.NamespaceEntrycontentsparentnameSystem.Collections.Hashtable*MonoDevelop.Projects.Parser.NamespaceEntry  System.Collections.Hashtable LoadFactorVersionComparerHashCodeProviderHashSizeKeysValuesequalityComparer @? @?* m        @?    /home/tauberer/dev/semweb/src///home/tauberer/dev/semweb/src/SparqlProtocol.cs-/home/tauberer/dev/semweb/src/SparqlEngine.cs     )name.levering.ryan.sparqlSparqlBNname.levering.ryan&name.levering.ryan.sparql.common.BNode org.openrdf.model.BNode!System.Web.IHttpHandler?org.openrdf.model.ValueFactory@SemWeb.StatementA@name.levering.ryan.sparql.logic.function.ExternalFunctionFactoryB SparqlStatemeCSemWeb.Query.QueryResultSinkDorg.openrdf.model.Literal ) E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m *MonoDevelop.Projects.Parser.ReferenceEntry databaseUrinProject:semweb o?Assembly:/home/tauberer/dev/semweb/bin_generics/sparql-core.dll pFAssembly:/home/tauberer/dev/semweb/bin_generics/IKVM.GNU.Classpath.dll qVAssembly:System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 rVAssembly:System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a sRAssembly:System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 tTAssembly:mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089uSemWeb v%MonoDevelop.Projects.Parser.FileEntryfilePath parseTimeparseErrorRetries commentTasksclasses )MonoDevelop.Projects.Parser.TagCollection   4v; w oy; x yE zF {G |HV }I ~Jd !Kd !L MH Ne #O P Q Rl S T U V W X. g Y Zj [ \ F]D ^, c _ ` 7a bl cU d :e f g h i jd !k l dm @v  uw&MonoDevelop.Projects.Parser.ClassEntryposition namespaceRefname fileEntry subclassesflagsctype modifiers *MonoDevelop.Projects.Parser.NamespaceEntry%MonoDevelop.Projects.Parser.FileEntrySystem.Collections.ArrayList(MonoDevelop.Projects.Parser.ContentFlags%MonoDevelop.Projects.Parser.ClassType(MonoDevelop.Projects.Parser.ModifierEnumq SparqlProtocolServerHandler  (MonoDevelop.Projects.Parser.ContentFlagsvalue__>%MonoDevelop.Projects.Parser.ClassTypevalue__(MonoDevelop.Projects.Parser.ModifierEnumvalue__x)MonoDevelop.Projects.Parser.TagCollectionCollectionBase+listSystem.Collections.ArrayList yw<  SparqlEngine  >z/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt {/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt |/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt }&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper!&SemWeb.Query.SparqlEngine.BNodeWrapper"&SemWeb.Query.SparqlEngine.BNodeWrapper#&SemWeb.Query.SparqlEngine.BNodeWrapper$&SemWeb.Query.SparqlEngine.BNodeWrapper%&SemWeb.Query.SparqlEngine.BNodeWrapper&&SemWeb.Query.SparqlEngine.BNodeWrapper'&SemWeb.Query.SparqlEngine.BNodeWrapper(&SemWeb.Query.SparqlEngine.BNodeWrapper)&SemWeb.Query.SparqlEngine.BNodeWrapper*&SemWeb.Query.SparqlEngine.BNodeWrapper+&SemWeb.Query.SparqlEngine.BNodeWrapper,&SemWeb.Query.SparqlEngine.BNodeWrapper-&SemWeb.Query.SparqlEngine.BNodeWrapper.&SemWeb.Query.SparqlEngine.BNodeWrapper/&SemWeb.Query.SparqlEngine.BNodeWrapper0&SemWeb.Query.SparqlEngine.BNodeWrapper1&SemWeb.Query.SparqlEngine.BNodeWrapper2&SemWeb.Query.SparqlEngine.BNodeWrapper3&SemWeb.Query.SparqlEngine.BNodeWrapper4&SemWeb.Query.SparqlEngine.BNodeWrapper5&SemWeb.Query.SparqlEngine.BNodeWrapper6&SemWeb.Query.SparqlEngine.BNodeWrapper7&SemWeb.Query.SparqlEngine.BNodeWrapper8&SemWeb.Query.SparqlEngine.BNodeWrapper9&SemWeb.Query.SparqlEngine.BNodeWrapper:&SemWeb.Query.SparqlEngine.BNodeWrapper;&SemWeb.Query.SparqlEngine.BNodeWrapper<&SemWeb.Query.SparqlEngine.BNodeWrapper=&SemWeb.Query.SparqlEngine.BNodeWrapper>&SemWeb.Query.SparqlEngine.BNodeWrapper?&SemWeb.Query.SparqlEngine.BNodeWrapper@&SemWeb.Query.SparqlEngine.BNodeWrapperA&SemWeb.Query.SparqlEngine.BNodeWrapperB&SemWeb.Query.SparqlEngine.BNodeWrapperC&SemWeb.Query.SparqlEngine.BNodeWrapperD&SemWeb.Query.SparqlEngine.BNodeWrapperE&SemWeb.Query.SparqlEngine.BNodeWrapperF&SemWeb.Query.SparqlEngine.BNodeWrapperG&SemWeb.Query.SparqlEngine.BNodeWrapperH&SemWeb.Query.SparqlEngine.BNodeWrapperI&SemWeb.Query.SparqlEngine.BNodeWrapperJ&SemWeb.Query.SparqlEngine.BNodeWrapperK&SemWeb.Query.SparqlEngine.BNodeWrapperL&SemWeb.Query.SparqlEngine.BNodeWrapperM&SemWeb.Query.SparqlEngine.BNodeWrapperN&SemWeb.Query.SparqlEngine.BNodeWrapperO&SemWeb.Query.SparqlEngine.BNodeWrapperP&SemWeb.Query.SparqlEngine.BNodeWrapperQ&SemWeb.Query.SparqlEngine.BNodeWrapperR&SemWeb.Query.SparqlEngine.BNodeWrapperS&SemWeb.Query.SparqlEngine.BNodeWrapperT&SemWeb.Query.SparqlEngine.BNodeWrapperU&SemWeb.Query.SparqlEngine.BNodeWrapperV&SemWeb.Query.SparqlEngine.BNodeWrapperW&SemWeb.Query.SparqlEngine.BNodeWrapperX&SemWeb.Query.SparqlEngine.BNodeWrapperY&SemWeb.Query.SparqlEngine.BNodeWrapperZ&SemWeb.Query.SparqlEngine.BNodeWrapper[&SemWeb.Query.SparqlEngine.BNodeWrapper\&SemWeb.Query.SparqlEngine.BNodeWrapper]&SemWeb.Query.SparqlEngine.BNodeWrapper^&SemWeb.Query.SparqlEngine.BNodeWrapper_&SemWeb.Query.SparqlEngine.BNodeWrapper`&SemWeb.Query.SparqlEngine.BNodeWrappera&SemWeb.Query.SparqlEngine.BNodeWrapperb&SemWeb.Query.SparqlEngine.BNodeWrapperc&SemWeb.Query.SparqlEngine.BNodeWrapperd&SemWeb.Query.SparqlEngine.BNodeWrappere&SemWeb.Query.SparqlEngine.BNodeWrapperf&SemWeb.Query.SparqlEngine.BNodeWrapperg&SemWeb.Query.SparqlEngine.BNodeWrapperh&SemWeb.Query.SparqlEngine.BNodeWrapperi&SemWeb.Query.SparqlEngine.BNodeWrapperj&SemWeb.Query.SparqlEngine.BNodeWrapperk&SemWeb.Query.SparqlEngine.BNodeWrapperl&SemWeb.Query.SparqlEngine.BNodeWrapperm&SemWeb.Query.SparqlEngine.BNodeWrappern&SemWeb.Query.SparqlEngine.BNodeWrappero&SemWeb.Query.SparqlEngine.BNodeWrapperp&SemWeb.Query.SparqlEngine.BNodeWrapperq&SemWeb.Query.SparqlEngine.BNodeWrapperr&SemWeb.Query.SparqlEngine.BNodeWrappers&SemWeb.Query.SparqlEngine.BNodeWrappert&SemWeb.Query.SparqlEngine.BNodeWrapperu&SemWeb.Query.SparqlEngine.BNodeWrapperv&SemWeb.Query.SparqlEngine.BNodeWrapperw&SemWeb.Query.SparqlEngine.BNodeWrapperx&SemWeb.Query.SparqlEngine.BNodeWrappery&SemWeb.Query.SparqlEngine.BNodeWrapperz&SemWeb.Query.SparqlEngine.BNodeWrapper{&SemWeb.Query.SparqlEngine.BNodeWrapper|&SemWeb.Query.SparqlEngine.BNodeWrapper}&SemWeb.Query.SparqlEngine.BNodeWrapper~&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper ~&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper 'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic 'SemWeb.Query.SparqlEngine.RdfGroupLogic!'SemWeb.Query.SparqlEngine.RdfGroupLogic"'SemWeb.Query.SparqlEngine.RdfGroupLogic#'SemWeb.Query.SparqlEngine.RdfGroupLogic$'SemWeb.Query.SparqlEngine.RdfGroupLogic%'SemWeb.Query.SparqlEngine.RdfGroupLogic&'SemWeb.Query.SparqlEngine.RdfGroupLogic''SemWeb.Query.SparqlEngine.RdfGroupLogic('SemWeb.Query.SparqlEngine.RdfGroupLogic)'SemWeb.Query.SparqlEngine.RdfGroupLogic*'SemWeb.Query.SparqlEngine.RdfGroupLogic+'SemWeb.Query.SparqlEngine.RdfGroupLogic,'SemWeb.Query.SparqlEngine.RdfGroupLogic-'SemWeb.Query.SparqlEngine.RdfGroupLogic.'SemWeb.Query.SparqlEngine.RdfGroupLogic/'SemWeb.Query.SparqlEngine.RdfGroupLogic0'SemWeb.Query.SparqlEngine.RdfGroupLogic1'SemWeb.Query.SparqlEngine.RdfGroupLogic2'SemWeb.Query.SparqlEngine.RdfGroupLogic3'SemWeb.Query.SparqlEngine.RdfGroupLogic4'SemWeb.Query.SparqlEngine.RdfGroupLogic5'SemWeb.Query.SparqlEngine.RdfGroupLogic6'SemWeb.Query.SparqlEngine.RdfGroupLogic7'SemWeb.Query.SparqlEngine.RdfGroupLogic8'SemWeb.Query.SparqlEngine.RdfGroupLogic9'SemWeb.Query.SparqlEngine.RdfGroupLogic:'SemWeb.Query.SparqlEngine.RdfGroupLogic;'SemWeb.Query.SparqlEngine.RdfGroupLogic<'SemWeb.Query.SparqlEngine.RdfGroupLogic='SemWeb.Query.SparqlEngine.RdfGroupLogic>'SemWeb.Query.SparqlEngine.RdfGroupLogic?'SemWeb.Query.SparqlEngine.RdfGroupLogic@'SemWeb.Query.SparqlEngine.RdfGroupLogicA'SemWeb.Query.SparqlEngine.RdfGroupLogicB'SemWeb.Query.SparqlEngine.RdfGroupLogicC'SemWeb.Query.SparqlEngine.RdfGroupLogicD'SemWeb.Query.SparqlEngine.RdfGroupLogicE'SemWeb.Query.SparqlEngine.RdfGroupLogicF'SemWeb.Query.SparqlEngine.RdfGroupLogicG'SemWeb.Query.SparqlEngine.RdfGroupLogicH'SemWeb.Query.SparqlEngine.RdfGroupLogicI'SemWeb.Query.SparqlEngine.RdfGroupLogicJ'SemWeb.Query.SparqlEngine.RdfGroupLogicK'SemWeb.Query.SparqlEngine.RdfGroupLogicL'SemWeb.Query.SparqlEngine.RdfGroupLogicM'SemWeb.Query.SparqlEngine.RdfGroupLogicN'SemWeb.Query.SparqlEngine.RdfGroupLogicO'SemWeb.Query.SparqlEngine.RdfGroupLogicP'SemWeb.Query.SparqlEngine.RdfGroupLogicQ'SemWeb.Query.SparqlEngine.RdfGroupLogicR'SemWeb.Query.SparqlEngine.RdfGroupLogicS'SemWeb.Query.SparqlEngine.RdfGroupLogicT'SemWeb.Query.SparqlEngine.RdfGroupLogicU'SemWeb.Query.SparqlEngine.RdfGroupLogicV'SemWeb.Query.SparqlEngine.RdfGroupLogicW'SemWeb.Query.SparqlEngine.RdfGroupLogicX'SemWeb.Query.SparqlEngine.RdfGroupLogicY'SemWeb.Query.SparqlEngine.RdfGroupLogicZ'SemWeb.Query.SparqlEngine.RdfGroupLogic['SemWeb.Query.SparqlEngine.RdfGroupLogic\'SemWeb.Query.SparqlEngine.RdfGroupLogic]'SemWeb.Query.SparqlEngine.RdfGroupLogic^'SemWeb.Query.SparqlEngine.RdfGroupLogic_'SemWeb.Query.SparqlEngine.RdfGroupLogic`'SemWeb.Query.SparqlEngine.RdfGroupLogica'SemWeb.Query.SparqlEngine.RdfGroupLogicb'SemWeb.Query.SparqlEngine.RdfGroupLogicc'SemWeb.Query.SparqlEngine.RdfGroupLogicd'SemWeb.Query.SparqlEngine.RdfGroupLogice'SemWeb.Query.SparqlEngine.RdfGroupLogicf'SemWeb.Query.SparqlEngine.RdfGroupLogicg'SemWeb.Query.SparqlEngine.RdfGroupLogich'SemWeb.Query.SparqlEngine.RdfGroupLogici'SemWeb.Query.SparqlEngine.RdfGroupLogicj'SemWeb.Query.SparqlEngine.RdfGroupLogick'SemWeb.Query.SparqlEngine.RdfGroupLogicl'SemWeb.Query.SparqlEngine.RdfGroupLogicm'SemWeb.Query.SparqlEngine.RdfGroupLogicn'SemWeb.Query.SparqlEngine.RdfGroupLogico'SemWeb.Query.SparqlEngine.RdfGroupLogicp'SemWeb.Query.SparqlEngine.RdfGroupLogicq'SemWeb.Query.SparqlEngine.RdfGroupLogicr'SemWeb.Query.SparqlEngine.RdfGroupLogics'SemWeb.Query.SparqlEngine.RdfGroupLogict'SemWeb.Query.SparqlEngine.RdfGroupLogicu'SemWeb.Query.SparqlEngine.RdfGroupLogicv'SemWeb.Query.SparqlEngine.RdfGroupLogicw'SemWeb.Query.SparqlEngine.RdfGroupLogicx'SemWeb.Query.SparqlEngine.RdfGroupLogicy'SemWeb.Query.SparqlEngine.RdfGroupLogicz'SemWeb.Query.SparqlEngine.RdfGroupLogic{'SemWeb.Query.SparqlEngine.RdfGroupLogic|'SemWeb.Query.SparqlEngine.RdfGroupLogic}'SemWeb.Query.SparqlEngine.RdfGroupLogic~'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic4SemWeb.Query.SparqlEngine.BNodeWrapper.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic4SemWeb.Query.SparqlEngine.BNodeWrapper.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic 'SemWeb.Query.SparqlEngine.RdfGroupLogic 'SemWeb.Query.SparqlEngine.RdfGroupLogic 'SemWeb.Query.SparqlEngine.RdfGroupLogic 'SemWeb.Query.SparqlEngine.RdfGroupLogic 'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic'SemWeb.Query.SparqlEngine.RdfGroupLogic 'SemWeb.Query.SparqlEngine.RdfGroupLogic!'SemWeb.Query.SparqlEngine.RdfGroupLogic"'SemWeb.Query.SparqlEngine.RdfGroupLogic#'SemWeb.Query.SparqlEngine.RdfGroupLogic$'SemWeb.Query.SparqlEngine.RdfGroupLogic%'SemWeb.Query.SparqlEngine.RdfGroupLogic&'SemWeb.Query.SparqlEngine.RdfGroupLogic''SemWeb.Query.SparqlEngine.RdfGroupLogic('SemWeb.Query.SparqlEngine.RdfGroupLogic)'SemWeb.Query.SparqlEngine.RdfGroupLogic*'SemWeb.Query.SparqlEngine.RdfGroupLogic+'SemWeb.Query.SparqlEngine.RdfGroupLogic,'SemWeb.Query.SparqlEngine.RdfGroupLogic-'SemWeb.Query.SparqlEngine.RdfGroupLogic.'SemWeb.Query.SparqlEngine.RdfGroupLogic/'SemWeb.Query.SparqlEngine.RdfGroupLogic0'SemWeb.Query.SparqlEngine.RdfGroupLogic1'SemWeb.Query.SparqlEngine.RdfGroupLogic2'SemWeb.Query.SparqlEngine.RdfGroupLogic3'SemWeb.Query.SparqlEngine.RdfGroupLogic4'SemWeb.Query.SparqlEngine.RdfGroupLogic5'SemWeb.Query.SparqlEngine.RdfGroupLogic6'SemWeb.Query.SparqlEngine.RdfGroupLogic7'SemWeb.Query.SparqlEngine.RdfGroupLogic8'SemWeb.Query.SparqlEngine.RdfGroupLogic9'SemWeb.Query.SparqlEngine.RdfGroupLogic:'SemWeb.Query.SparqlEngine.RdfGroupLogic;'SemWeb.Query.SparqlEngine.RdfGroupLogic<'SemWeb.Query.SparqlEngine.RdfGroupLogic='SemWeb.Query.SparqlEngine.RdfGroupLogic>'SemWeb.Query.SparqlEngine.RdfGroupLogic?'SemWeb.Query.SparqlEngine.RdfGroupLogic@'SemWeb.Query.SparqlEngine.RdfGroupLogicA'SemWeb.Query.SparqlEngine.RdfGroupLogicB'SemWeb.Query.SparqlEngine.RdfGroupLogicC'SemWeb.Query.SparqlEngine.RdfGroupLogicD'SemWeb.Query.SparqlEngine.RdfGroupLogicE'SemWeb.Query.SparqlEngine.RdfGroupLogicF'SemWeb.Query.SparqlEngine.RdfGroupLogicG'SemWeb.Query.SparqlEngine.RdfGroupLogicH'SemWeb.Query.SparqlEngine.RdfGroupLogicI'SemWeb.Query.SparqlEngine.RdfGroupLogicJ'SemWeb.Query.SparqlEngine.RdfGroupLogicK'SemWeb.Query.SparqlEngine.RdfGroupLogicL'SemWeb.Query.SparqlEngine.RdfGroupLogicM'SemWeb.Query.SparqlEngine.RdfGroupLogicN'SemWeb.Query.SparqlEngine.RdfGroupLogicO'SemWeb.Query.SparqlEngine.RdfGroupLogicP'SemWeb.Query.SparqlEngine.RdfGroupLogicQ'SemWeb.Query.SparqlEngine.RdfGroupLogicR'SemWeb.Query.SparqlEngine.RdfGroupLogicS'SemWeb.Query.SparqlEngine.RdfGroupLogicT'SemWeb.Query.SparqlEngine.RdfGroupLogicU'SemWeb.Query.SparqlEngine.RdfGroupLogicV'SemWeb.Query.SparqlEngine.RdfGroupLogicW'SemWeb.Query.SparqlEngine.RdfGroupLogicX'SemWeb.Query.SparqlEngine.RdfGroupLogicY'SemWeb.Query.SparqlEngine.RdfGroupLogicZ'SemWeb.Query.SparqlEngine.RdfGroupLogic['SemWeb.Query.SparqlEngine.RdfGroupLogic\'SemWeb.Query.SparqlEngine.RdfGroupLogic]'SemWeb.Query.SparqlEngine.RdfGroupLogic^'SemWeb.Query.SparqlEngine.RdfGroupLogic_'SemWeb.Query.SparqlEngine.RdfGroupLogic`'SemWeb.Query.SparqlEngine.RdfGroupLogica'SemWeb.Query.SparqlEngine.RdfGroupLogicb'SemWeb.Query.SparqlEngine.RdfGroupLogicc'SemWeb.Query.SparqlEngine.RdfGroupLogicd'SemWeb.Query.SparqlEngine.RdfGroupLogice'SemWeb.Query.SparqlEngine.RdfGroupLogicf'SemWeb.Query.SparqlEngine.RdfGroupLogicg'SemWeb.Query.SparqlEngine.RdfGroupLogich'SemWeb.Query.SparqlEngine.RdfGroupLogici'SemWeb.Query.SparqlEngine.RdfGroupLogicj'SemWeb.Query.SparqlEngine.RdfGroupLogick'SemWeb.Query.SparqlEngine.RdfGroupLogicl'SemWeb.Query.SparqlEngine.RdfGroupLogicm'SemWeb.Query.SparqlEngine.RdfGroupLogicn'SemWeb.Query.SparqlEngine.RdfGroupLogico'SemWeb.Query.SparqlEngine.RdfGroupLogicp'SemWeb.Query.SparqlEngine.RdfGroupLogicq'SemWeb.Query.SparqlEngine.RdfGroupLogicr'SemWeb.Query.SparqlEngine.RdfGroupLogics'SemWeb.Query.SparqlEngine.RdfGroupLogict'SemWeb.Query.SparqlEngine.RdfGroupLogicu'SemWeb.Query.SparqlEngine.RdfGroupLogicv'SemWeb.Query.SparqlEngine.RdfGroupLogic w(SemWeb.Query.SparqlEngine.ExtFuncWrapperx(SemWeb.Query.SparqlEngine.ExtFuncWrappery(SemWeb.Query.SparqlEngine.ExtFuncWrapperz(SemWeb.Query.SparqlEngine.ExtFuncWrapper{(SemWeb.Query.SparqlEngine.ExtFuncWrapper|(SemWeb.Query.SparqlEngine.ExtFuncWrapper}(SemWeb.Query.SparqlEngine.ExtFuncWrapper~(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper (SemWeb.Query.SparqlEngine.ExtFuncWrapper (SemWeb.Query.SparqlEngine.ExtFuncWrapper (SemWeb.Query.SparqlEngine.ExtFuncWrapper (SemWeb.Query.SparqlEngine.ExtFuncWrapper (SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper (SemWeb.Query.SparqlEngine.ExtFuncWrapper!(SemWeb.Query.SparqlEngine.ExtFuncWrapper"(SemWeb.Query.SparqlEngine.ExtFuncWrapper#(SemWeb.Query.SparqlEngine.ExtFuncWrapper$(SemWeb.Query.SparqlEngine.ExtFuncWrapper%(SemWeb.Query.SparqlEngine.ExtFuncWrapper&(SemWeb.Query.SparqlEngine.ExtFuncWrapper'(SemWeb.Query.SparqlEngine.ExtFuncWrapper((SemWeb.Query.SparqlEngine.ExtFuncWrapper)(SemWeb.Query.SparqlEngine.ExtFuncWrapper*(SemWeb.Query.SparqlEngine.ExtFuncWrapper+(SemWeb.Query.SparqlEngine.ExtFuncWrapper,(SemWeb.Query.SparqlEngine.ExtFuncWrapper-5SemWeb.Query.SparqlEngine.BNodeWrapper.ExtFuncWrapper.(SemWeb.Query.SparqlEngine.ExtFuncWrapper/5SemWeb.Query.SparqlEngine.BNodeWrapper.ExtFuncWrapper0(SemWeb.Query.SparqlEngine.ExtFuncWrapper1(SemWeb.Query.SparqlEngine.ExtFuncWrapper2(SemWeb.Query.SparqlEngine.ExtFuncWrapper3(SemWeb.Query.SparqlEngine.ExtFuncWrapper4(SemWeb.Query.SparqlEngine.ExtFuncWrapper5(SemWeb.Query.SparqlEngine.ExtFuncWrapper6(SemWeb.Query.SparqlEngine.ExtFuncWrapper7(SemWeb.Query.SparqlEngine.ExtFuncWrapper8(SemWeb.Query.SparqlEngine.ExtFuncWrapper9(SemWeb.Query.SparqlEngine.ExtFuncWrapper:(SemWeb.Query.SparqlEngine.ExtFuncWrapper;(SemWeb.Query.SparqlEngine.ExtFuncWrapper<(SemWeb.Query.SparqlEngine.ExtFuncWrapper=(SemWeb.Query.SparqlEngine.ExtFuncWrapper>(SemWeb.Query.SparqlEngine.ExtFuncWrapper?(SemWeb.Query.SparqlEngine.ExtFuncWrapper@(SemWeb.Query.SparqlEngine.ExtFuncWrapperA(SemWeb.Query.SparqlEngine.ExtFuncWrapperB(SemWeb.Query.SparqlEngine.ExtFuncWrapperC(SemWeb.Query.SparqlEngine.ExtFuncWrapperD(SemWeb.Query.SparqlEngine.ExtFuncWrapperE(SemWeb.Query.SparqlEngine.ExtFuncWrapperF(SemWeb.Query.SparqlEngine.ExtFuncWrapperG(SemWeb.Query.SparqlEngine.ExtFuncWrapperH(SemWeb.Query.SparqlEngine.ExtFuncWrapperI(SemWeb.Query.SparqlEngine.ExtFuncWrapperJ(SemWeb.Query.SparqlEngine.ExtFuncWrapperK(SemWeb.Query.SparqlEngine.ExtFuncWrapperL(SemWeb.Query.SparqlEngine.ExtFuncWrapperM(SemWeb.Query.SparqlEngine.ExtFuncWrapperN(SemWeb.Query.SparqlEngine.ExtFuncWrapperO(SemWeb.Query.SparqlEngine.ExtFuncWrapperP(SemWeb.Query.SparqlEngine.ExtFuncWrapperQ(SemWeb.Query.SparqlEngine.ExtFuncWrapperR(SemWeb.Query.SparqlEngine.ExtFuncWrapperS(SemWeb.Query.SparqlEngine.ExtFuncWrapperT(SemWeb.Query.SparqlEngine.ExtFuncWrapperU(SemWeb.Query.SparqlEngine.ExtFuncWrapperV(SemWeb.Query.SparqlEngine.ExtFuncWrapperW(SemWeb.Query.SparqlEngine.ExtFuncWrapperX(SemWeb.Query.SparqlEngine.ExtFuncWrapperY(SemWeb.Query.SparqlEngine.ExtFuncWrapperZ(SemWeb.Query.SparqlEngine.ExtFuncWrapper[(SemWeb.Query.SparqlEngine.ExtFuncWrapper\(SemWeb.Query.SparqlEngine.ExtFuncWrapper](SemWeb.Query.SparqlEngine.ExtFuncWrapper^(SemWeb.Query.SparqlEngine.ExtFuncWrapper_(SemWeb.Query.SparqlEngine.ExtFuncWrapper`(SemWeb.Query.SparqlEngine.ExtFuncWrappera(SemWeb.Query.SparqlEngine.ExtFuncWrapperb(SemWeb.Query.SparqlEngine.ExtFuncWrapperc(SemWeb.Query.SparqlEngine.ExtFuncWrapperd(SemWeb.Query.SparqlEngine.ExtFuncWrappere(SemWeb.Query.SparqlEngine.ExtFuncWrapperf(SemWeb.Query.SparqlEngine.ExtFuncWrapperg(SemWeb.Query.SparqlEngine.ExtFuncWrapperh(SemWeb.Query.SparqlEngine.ExtFuncWrapperi(SemWeb.Query.SparqlEngine.ExtFuncWrapperj(SemWeb.Query.SparqlEngine.ExtFuncWrapperk(SemWeb.Query.SparqlEngine.ExtFuncWrapperl(SemWeb.Query.SparqlEngine.ExtFuncWrapperm(SemWeb.Query.SparqlEngine.ExtFuncWrappern(SemWeb.Query.SparqlEngine.ExtFuncWrappero(SemWeb.Query.SparqlEngine.ExtFuncWrapperp(SemWeb.Query.SparqlEngine.ExtFuncWrapperq(SemWeb.Query.SparqlEngine.ExtFuncWrapperr(SemWeb.Query.SparqlEngine.ExtFuncWrappers(SemWeb.Query.SparqlEngine.ExtFuncWrappert(SemWeb.Query.SparqlEngine.ExtFuncWrapperu(SemWeb.Query.SparqlEngine.ExtFuncWrapperv(SemWeb.Query.SparqlEngine.ExtFuncWrapperw(SemWeb.Query.SparqlEngine.ExtFuncWrapperx(SemWeb.Query.SparqlEngine.ExtFuncWrappery(SemWeb.Query.SparqlEngine.ExtFuncWrapperz(SemWeb.Query.SparqlEngine.ExtFuncWrapper{(SemWeb.Query.SparqlEngine.ExtFuncWrapper|(SemWeb.Query.SparqlEngine.ExtFuncWrapper}(SemWeb.Query.SparqlEngine.ExtFuncWrapper~(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt $SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper $SemWeb.Query.SparqlEngine.URIWrapper $SemWeb.Query.SparqlEngine.URIWrapper $SemWeb.Query.SparqlEngine.URIWrapper $SemWeb.Query.SparqlEngine.URIWrapper $SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper $SemWeb.Query.SparqlEngine.URIWrapper!$SemWeb.Query.SparqlEngine.URIWrapper"$SemWeb.Query.SparqlEngine.URIWrapper#$SemWeb.Query.SparqlEngine.URIWrapper$$SemWeb.Query.SparqlEngine.URIWrapper%$SemWeb.Query.SparqlEngine.URIWrapper&$SemWeb.Query.SparqlEngine.URIWrapper'$SemWeb.Query.SparqlEngine.URIWrapper($SemWeb.Query.SparqlEngine.URIWrapper)$SemWeb.Query.SparqlEngine.URIWrapper*$SemWeb.Query.SparqlEngine.URIWrapper+$SemWeb.Query.SparqlEngine.URIWrapper,$SemWeb.Query.SparqlEngine.URIWrapper-$SemWeb.Query.SparqlEngine.URIWrapper.$SemWeb.Query.SparqlEngine.URIWrapper/$SemWeb.Query.SparqlEngine.URIWrapper0$SemWeb.Query.SparqlEngine.URIWrapper1$SemWeb.Query.SparqlEngine.URIWrapper2$SemWeb.Query.SparqlEngine.URIWrapper3$SemWeb.Query.SparqlEngine.URIWrapper4$SemWeb.Query.SparqlEngine.URIWrapper5$SemWeb.Query.SparqlEngine.URIWrapper6$SemWeb.Query.SparqlEngine.URIWrapper7$SemWeb.Query.SparqlEngine.URIWrapper8$SemWeb.Query.SparqlEngine.URIWrapper9$SemWeb.Query.SparqlEngine.URIWrapper:$SemWeb.Query.SparqlEngine.URIWrapper;$SemWeb.Query.SparqlEngine.URIWrapper<$SemWeb.Query.SparqlEngine.URIWrapper=$SemWeb.Query.SparqlEngine.URIWrapper>$SemWeb.Query.SparqlEngine.URIWrapper?$SemWeb.Query.SparqlEngine.URIWrapper@$SemWeb.Query.SparqlEngine.URIWrapperA$SemWeb.Query.SparqlEngine.URIWrapperB$SemWeb.Query.SparqlEngine.URIWrapperC$SemWeb.Query.SparqlEngine.URIWrapperD$SemWeb.Query.SparqlEngine.URIWrapperE$SemWeb.Query.SparqlEngine.URIWrapperF$SemWeb.Query.SparqlEngine.URIWrapperG$SemWeb.Query.SparqlEngine.URIWrapperH$SemWeb.Query.SparqlEngine.URIWrapperI$SemWeb.Query.SparqlEngine.URIWrapperJ$SemWeb.Query.SparqlEngine.URIWrapperK$SemWeb.Query.SparqlEngine.URIWrapperL$SemWeb.Query.SparqlEngine.URIWrapperM$SemWeb.Query.SparqlEngine.URIWrapperN$SemWeb.Query.SparqlEngine.URIWrapperO$SemWeb.Query.SparqlEngine.URIWrapperP$SemWeb.Query.SparqlEngine.URIWrapperQ$SemWeb.Query.SparqlEngine.URIWrapperR$SemWeb.Query.SparqlEngine.URIWrapperS$SemWeb.Query.SparqlEngine.URIWrapperT$SemWeb.Query.SparqlEngine.URIWrapperU$SemWeb.Query.SparqlEngine.URIWrapperV$SemWeb.Query.SparqlEngine.URIWrapperW$SemWeb.Query.SparqlEngine.URIWrapperX$SemWeb.Query.SparqlEngine.URIWrapperY$SemWeb.Query.SparqlEngine.URIWrapperZ$SemWeb.Query.SparqlEngine.URIWrapper[$SemWeb.Query.SparqlEngine.URIWrapper\$SemWeb.Query.SparqlEngine.URIWrapper]$SemWeb.Query.SparqlEngine.URIWrapper^$SemWeb.Query.SparqlEngine.URIWrapper_$SemWeb.Query.SparqlEngine.URIWrapper`$SemWeb.Query.SparqlEngine.URIWrappera$SemWeb.Query.SparqlEngine.URIWrapperb$SemWeb.Query.SparqlEngine.URIWrapperc$SemWeb.Query.SparqlEngine.URIWrapperd$SemWeb.Query.SparqlEngine.URIWrappere$SemWeb.Query.SparqlEngine.URIWrapperf$SemWeb.Query.SparqlEngine.URIWrapperg$SemWeb.Query.SparqlEngine.URIWrapperh$SemWeb.Query.SparqlEngine.URIWrapperi$SemWeb.Query.SparqlEngine.URIWrapperj$SemWeb.Query.SparqlEngine.URIWrapperk$SemWeb.Query.SparqlEngine.URIWrapperl$SemWeb.Query.SparqlEngine.URIWrapperm$SemWeb.Query.SparqlEngine.URIWrappern$SemWeb.Query.SparqlEngine.URIWrappero$SemWeb.Query.SparqlEngine.URIWrapperp$SemWeb.Query.SparqlEngine.URIWrapperq$SemWeb.Query.SparqlEngine.URIWrapperr$SemWeb.Query.SparqlEngine.URIWrappers$SemWeb.Query.SparqlEngine.URIWrappert$SemWeb.Query.SparqlEngine.URIWrapperu$SemWeb.Query.SparqlEngine.URIWrapperv1SemWeb.Query.SparqlEngine.BNodeWrapper.URIWrapperw$SemWeb.Query.SparqlEngine.URIWrapperx1SemWeb.Query.SparqlEngine.BNodeWrapper.URIWrappery$SemWeb.Query.SparqlEngine.URIWrapperz$SemWeb.Query.SparqlEngine.URIWrapper{$SemWeb.Query.SparqlEngine.URIWrapper|$SemWeb.Query.SparqlEngine.URIWrapper}$SemWeb.Query.SparqlEngine.URIWrapper~$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper $SemWeb.Query.SparqlEngine.URIWrapper $SemWeb.Query.SparqlEngine.URIWrapper $SemWeb.Query.SparqlEngine.URIWrapper $SemWeb.Query.SparqlEngine.URIWrapper $SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper$SemWeb.Query.SparqlEngine.URIWrapper $SemWeb.Query.SparqlEngine.URIWrapper!$SemWeb.Query.SparqlEngine.URIWrapper"$SemWeb.Query.SparqlEngine.URIWrapper#$SemWeb.Query.SparqlEngine.URIWrapper $/SemWeb.Query.SparqlEngine.GraphStatementWrapper%/SemWeb.Query.SparqlEngine.GraphStatementWrapper&/SemWeb.Query.SparqlEngine.GraphStatementWrapper'/SemWeb.Query.SparqlEngine.GraphStatementWrapper(/SemWeb.Query.SparqlEngine.GraphStatementWrapper)/SemWeb.Query.SparqlEngine.GraphStatementWrapper*/SemWeb.Query.SparqlEngine.GraphStatementWrapper+/SemWeb.Query.SparqlEngine.GraphStatementWrapper,/SemWeb.Query.SparqlEngine.GraphStatementWrapper-/SemWeb.Query.SparqlEngine.GraphStatementWrapper./SemWeb.Query.SparqlEngine.GraphStatementWrapper//SemWeb.Query.SparqlEngine.GraphStatementWrapper0/SemWeb.Query.SparqlEngine.GraphStatementWrapper1/SemWeb.Query.SparqlEngine.GraphStatementWrapper2/SemWeb.Query.SparqlEngine.GraphStatementWrapper3/SemWeb.Query.SparqlEngine.GraphStatementWrapper4/SemWeb.Query.SparqlEngine.GraphStatementWrapper5/SemWeb.Query.SparqlEngine.GraphStatementWrapper6/SemWeb.Query.SparqlEngine.GraphStatementWrapper7/SemWeb.Query.SparqlEngine.GraphStatementWrapper8/SemWeb.Query.SparqlEngine.GraphStatementWrapper9/SemWeb.Query.SparqlEngine.GraphStatementWrapper:/SemWeb.Query.SparqlEngine.GraphStatementWrapper;/SemWeb.Query.SparqlEngine.GraphStatementWrapper</SemWeb.Query.SparqlEngine.GraphStatementWrapper=/SemWeb.Query.SparqlEngine.GraphStatementWrapper>/SemWeb.Query.SparqlEngine.GraphStatementWrapper?/SemWeb.Query.SparqlEngine.GraphStatementWrapper@/SemWeb.Query.SparqlEngine.GraphStatementWrapperA/SemWeb.Query.SparqlEngine.GraphStatementWrapperB/SemWeb.Query.SparqlEngine.GraphStatementWrapperC/SemWeb.Query.SparqlEngine.GraphStatementWrapperD/SemWeb.Query.SparqlEngine.GraphStatementWrapperE/SemWeb.Query.SparqlEngine.GraphStatementWrapperF/SemWeb.Query.SparqlEngine.GraphStatementWrapperG/SemWeb.Query.SparqlEngine.GraphStatementWrapperH/SemWeb.Query.SparqlEngine.GraphStatementWrapperI/SemWeb.Query.SparqlEngine.GraphStatementWrapperJ/SemWeb.Query.SparqlEngine.GraphStatementWrapperK/SemWeb.Query.SparqlEngine.GraphStatementWrapperL/SemWeb.Query.SparqlEngine.GraphStatementWrapperM/SemWeb.Query.SparqlEngine.GraphStatementWrapperN/SemWeb.Query.SparqlEngine.GraphStatementWrapperO/SemWeb.Query.SparqlEngine.GraphStatementWrapperP/SemWeb.Query.SparqlEngine.GraphStatementWrapperQ/SemWeb.Query.SparqlEngine.GraphStatementWrapperR/SemWeb.Query.SparqlEngine.GraphStatementWrapperS/SemWeb.Query.SparqlEngine.GraphStatementWrapperT/SemWeb.Query.SparqlEngine.GraphStatementWrapperU/SemWeb.Query.SparqlEngine.GraphStatementWrapperV/SemWeb.Query.SparqlEngine.GraphStatementWrapperW/SemWeb.Query.SparqlEngine.GraphStatementWrapperX/SemWeb.Query.SparqlEngine.GraphStatementWrapperY/SemWeb.Query.SparqlEngine.GraphStatementWrapperZ/SemWeb.Query.SparqlEngine.GraphStatementWrapper[/SemWeb.Query.SparqlEngine.GraphStatementWrapper\/SemWeb.Query.SparqlEngine.GraphStatementWrapper]/SemWeb.Query.SparqlEngine.GraphStatementWrapper^/SemWeb.Query.SparqlEngine.GraphStatementWrapper_/SemWeb.Query.SparqlEngine.GraphStatementWrapper`/SemWeb.Query.SparqlEngine.GraphStatementWrappera/SemWeb.Query.SparqlEngine.GraphStatementWrapperb/SemWeb.Query.SparqlEngine.GraphStatementWrapperc/SemWeb.Query.SparqlEngine.GraphStatementWrapperd/SemWeb.Query.SparqlEngine.GraphStatementWrappere/SemWeb.Query.SparqlEngine.GraphStatementWrapperf/SemWeb.Query.SparqlEngine.GraphStatementWrapperg/SemWeb.Query.SparqlEngine.GraphStatementWrapperh/SemWeb.Query.SparqlEngine.GraphStatementWrapperi/SemWeb.Query.SparqlEngine.GraphStatementWrapperj/SemWeb.Query.SparqlEngine.GraphStatementWrapperk/SemWeb.Query.SparqlEngine.GraphStatementWrapperl/SemWeb.Query.SparqlEngine.GraphStatementWrapperm/SemWeb.Query.SparqlEngine.GraphStatementWrappern/SemWeb.Query.SparqlEngine.GraphStatementWrappero/SemWeb.Query.SparqlEngine.GraphStatementWrapperp/SemWeb.Query.SparqlEngine.GraphStatementWrapperq/SemWeb.Query.SparqlEngine.GraphStatementWrapperr/SemWeb.Query.SparqlEngine.GraphStatementWrappers/SemWeb.Query.SparqlEngine.GraphStatementWrappert/SemWeb.Query.SparqlEngine.GraphStatementWrapperu/SemWeb.Query.SparqlEngine.GraphStatementWrapperv/SemWeb.Query.SparqlEngine.GraphStatementWrapperw/SemWeb.Query.SparqlEngine.GraphStatementWrapperx/SemWeb.Query.SparqlEngine.GraphStatementWrappery/SemWeb.Query.SparqlEngine.GraphStatementWrapperz/SemWeb.Query.SparqlEngine.GraphStatementWrapper{/SemWeb.Query.SparqlEngine.GraphStatementWrapper|/SemWeb.Query.SparqlEngine.GraphStatementWrapper}/SemWeb.Query.SparqlEngine.GraphStatementWrapper~/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper /SemWeb.Query.SparqlEngine.GraphStatementWrapper /SemWeb.Query.SparqlEngine.GraphStatementWrapper /SemWeb.Query.SparqlEngine.GraphStatementWrapper /SemWeb.Query.SparqlEngine.GraphStatementWrapper /SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper /SemWeb.Query.SparqlEngine.GraphStatementWrapper!/SemWeb.Query.SparqlEngine.GraphStatementWrapper"/SemWeb.Query.SparqlEngine.GraphStatementWrapper#/SemWeb.Query.SparqlEngine.GraphStatementWrapper$/SemWeb.Query.SparqlEngine.GraphStatementWrapper%/SemWeb.Query.SparqlEngine.GraphStatementWrapper&/SemWeb.Query.SparqlEngine.GraphStatementWrapper'/SemWeb.Query.SparqlEngine.GraphStatementWrapper(/SemWeb.Query.SparqlEngine.GraphStatementWrapper)/SemWeb.Query.SparqlEngine.GraphStatementWrapper*/SemWeb.Query.SparqlEngine.GraphStatementWrapper+/SemWeb.Query.SparqlEngine.GraphStatementWrapper,/SemWeb.Query.SparqlEngine.GraphStatementWrapper-/SemWeb.Query.SparqlEngine.GraphStatementWrapper./SemWeb.Query.SparqlEngine.GraphStatementWrapper//SemWeb.Query.SparqlEngine.GraphStatementWrapper0/SemWeb.Query.SparqlEngine.GraphStatementWrapper1/SemWeb.Query.SparqlEngine.GraphStatementWrapper2/SemWeb.Query.SparqlEngine.GraphStatementWrapper3/SemWeb.Query.SparqlEngine.GraphStatementWrapper4/SemWeb.Query.SparqlEngine.GraphStatementWrapper5/SemWeb.Query.SparqlEngine.GraphStatementWrapper6/SemWeb.Query.SparqlEngine.GraphStatementWrapper7/SemWeb.Query.SparqlEngine.GraphStatementWrapper8/SemWeb.Query.SparqlEngine.GraphStatementWrapper9/SemWeb.Query.SparqlEngine.GraphStatementWrapper:/SemWeb.Query.SparqlEngine.GraphStatementWrapper;/SemWeb.Query.SparqlEngine.GraphStatementWrapper</SemWeb.Query.SparqlEngine.GraphStatementWrapper=/SemWeb.Query.SparqlEngine.GraphStatementWrapper>/SemWeb.Query.SparqlEngine.GraphStatementWrapper?/SemWeb.Query.SparqlEngine.GraphStatementWrapper@/SemWeb.Query.SparqlEngine.GraphStatementWrapperA/SemWeb.Query.SparqlEngine.GraphStatementWrapperB/SemWeb.Query.SparqlEngine.GraphStatementWrapperC/SemWeb.Query.SparqlEngine.GraphStatementWrapperD/SemWeb.Query.SparqlEngine.GraphStatementWrapperE/SemWeb.Query.SparqlEngine.GraphStatementWrapperF/SemWeb.Query.SparqlEngine.GraphStatementWrapperG/SemWeb.Query.SparqlEngine.GraphStatementWrapperH/SemWeb.Query.SparqlEngine.GraphStatementWrapperI/SemWeb.Query.SparqlEngine.GraphStatementWrapperJ/SemWeb.Query.SparqlEngine.GraphStatementWrapperK/SemWeb.Query.SparqlEngine.GraphStatementWrapperL/SemWeb.Query.SparqlEngine.GraphStatementWrapperM/SemWeb.Query.SparqlEngine.GraphStatementWrapperN/SemWeb.Query.SparqlEngine.GraphStatementWrapperO/SemWeb.Query.SparqlEngine.GraphStatementWrapperP/SemWeb.Query.SparqlEngine.GraphStatementWrapperQ/SemWeb.Query.SparqlEngine.GraphStatementWrapperR/SemWeb.Query.SparqlEngine.GraphStatementWrapperS/SemWeb.Query.SparqlEngine.GraphStatementWrapperT/SemWeb.Query.SparqlEngine.GraphStatementWrapperU/SemWeb.Query.SparqlEngine.GraphStatementWrapperV/SemWeb.Query.SparqlEngine.GraphStatementWrapperW/SemWeb.Query.SparqlEngine.GraphStatementWrapperX/SemWeb.Query.SparqlEngine.GraphStatementWrapperY/SemWeb.Query.SparqlEngine.GraphStatementWrapperZ/SemWeb.Query.SparqlEngine.GraphStatementWrapper[/SemWeb.Query.SparqlEngine.GraphStatementWrapper\/SemWeb.Query.SparqlEngine.GraphStatementWrapper]/SemWeb.Query.SparqlEngine.GraphStatementWrapper^/SemWeb.Query.SparqlEngine.GraphStatementWrapper_/SemWeb.Query.SparqlEngine.GraphStatementWrapper`/SemWeb.Query.SparqlEngine.GraphStatementWrappera/SemWeb.Query.SparqlEngine.GraphStatementWrapperb/SemWeb.Query.SparqlEngine.GraphStatementWrapperc/SemWeb.Query.SparqlEngine.GraphStatementWrapperd/SemWeb.Query.SparqlEngine.GraphStatementWrappere/SemWeb.Query.SparqlEngine.GraphStatementWrapperf/SemWeb.Query.SparqlEngine.GraphStatementWrapperg/SemWeb.Query.SparqlEngine.GraphStatementWrapperh/SemWeb.Query.SparqlEngine.GraphStatementWrapperi/SemWeb.Query.SparqlEngine.GraphStatementWrapperj/SemWeb.Query.SparqlEngine.GraphStatementWrapperk/SemWeb.Query.SparqlEngine.GraphStatementWrapperl/SemWeb.Query.SparqlEngine.GraphStatementWrapperm/SemWeb.Query.SparqlEngine.GraphStatementWrappern/SemWeb.Query.SparqlEngine.GraphStatementWrappero/SemWeb.Query.SparqlEngine.GraphStatementWrapperp/SemWeb.Query.SparqlEngine.GraphStatementWrapperq/SemWeb.Query.SparqlEngine.GraphStatementWrapperr/SemWeb.Query.SparqlEngine.GraphStatementWrappers/SemWeb.Query.SparqlEngine.GraphStatementWrappert/SemWeb.Query.SparqlEngine.GraphStatementWrapperu/SemWeb.Query.SparqlEngine.GraphStatementWrapperv/SemWeb.Query.SparqlEngine.GraphStatementWrapperw/SemWeb.Query.SparqlEngine.GraphStatementWrapperx/SemWeb.Query.SparqlEngine.GraphStatementWrappery/SemWeb.Query.SparqlEngine.GraphStatementWrapperz/SemWeb.Query.SparqlEngine.GraphStatementWrapper{/SemWeb.Query.SparqlEngine.GraphStatementWrapper|/SemWeb.Query.SparqlEngine.GraphStatementWrapper}/SemWeb.Query.SparqlEngine.GraphStatementWrapper~/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper/SemWeb.Query.SparqlEngine.GraphStatementWrapper /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt (SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory (SemWeb.Query.SparqlEngine.MyLogicFactory (SemWeb.Query.SparqlEngine.MyLogicFactory (SemWeb.Query.SparqlEngine.MyLogicFactory (SemWeb.Query.SparqlEngine.MyLogicFactory (SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory (SemWeb.Query.SparqlEngine.MyLogicFactory!(SemWeb.Query.SparqlEngine.MyLogicFactory"(SemWeb.Query.SparqlEngine.MyLogicFactory#(SemWeb.Query.SparqlEngine.MyLogicFactory$(SemWeb.Query.SparqlEngine.MyLogicFactory%(SemWeb.Query.SparqlEngine.MyLogicFactory&(SemWeb.Query.SparqlEngine.MyLogicFactory'(SemWeb.Query.SparqlEngine.MyLogicFactory((SemWeb.Query.SparqlEngine.MyLogicFactory)(SemWeb.Query.SparqlEngine.MyLogicFactory*(SemWeb.Query.SparqlEngine.MyLogicFactory+(SemWeb.Query.SparqlEngine.MyLogicFactory,(SemWeb.Query.SparqlEngine.MyLogicFactory-(SemWeb.Query.SparqlEngine.MyLogicFactory.(SemWeb.Query.SparqlEngine.MyLogicFactory/(SemWeb.Query.SparqlEngine.MyLogicFactory0(SemWeb.Query.SparqlEngine.MyLogicFactory1(SemWeb.Query.SparqlEngine.MyLogicFactory2(SemWeb.Query.SparqlEngine.MyLogicFactory3(SemWeb.Query.SparqlEngine.MyLogicFactory4(SemWeb.Query.SparqlEngine.MyLogicFactory5(SemWeb.Query.SparqlEngine.MyLogicFactory6(SemWeb.Query.SparqlEngine.MyLogicFactory7(SemWeb.Query.SparqlEngine.MyLogicFactory8(SemWeb.Query.SparqlEngine.MyLogicFactory9(SemWeb.Query.SparqlEngine.MyLogicFactory:(SemWeb.Query.SparqlEngine.MyLogicFactory;(SemWeb.Query.SparqlEngine.MyLogicFactory<(SemWeb.Query.SparqlEngine.MyLogicFactory=(SemWeb.Query.SparqlEngine.MyLogicFactory>(SemWeb.Query.SparqlEngine.MyLogicFactory?(SemWeb.Query.SparqlEngine.MyLogicFactory@(SemWeb.Query.SparqlEngine.MyLogicFactoryA(SemWeb.Query.SparqlEngine.MyLogicFactoryB(SemWeb.Query.SparqlEngine.MyLogicFactoryC(SemWeb.Query.SparqlEngine.MyLogicFactoryD(SemWeb.Query.SparqlEngine.MyLogicFactoryE(SemWeb.Query.SparqlEngine.MyLogicFactoryF(SemWeb.Query.SparqlEngine.MyLogicFactoryG(SemWeb.Query.SparqlEngine.MyLogicFactoryH(SemWeb.Query.SparqlEngine.MyLogicFactoryI(SemWeb.Query.SparqlEngine.MyLogicFactoryJ(SemWeb.Query.SparqlEngine.MyLogicFactoryK(SemWeb.Query.SparqlEngine.MyLogicFactoryL(SemWeb.Query.SparqlEngine.MyLogicFactoryM(SemWeb.Query.SparqlEngine.MyLogicFactoryN(SemWeb.Query.SparqlEngine.MyLogicFactoryO(SemWeb.Query.SparqlEngine.MyLogicFactoryP(SemWeb.Query.SparqlEngine.MyLogicFactoryQ(SemWeb.Query.SparqlEngine.MyLogicFactoryR(SemWeb.Query.SparqlEngine.MyLogicFactoryS(SemWeb.Query.SparqlEngine.MyLogicFactoryT(SemWeb.Query.SparqlEngine.MyLogicFactoryU(SemWeb.Query.SparqlEngine.MyLogicFactoryV(SemWeb.Query.SparqlEngine.MyLogicFactoryW(SemWeb.Query.SparqlEngine.MyLogicFactoryX(SemWeb.Query.SparqlEngine.MyLogicFactoryY(SemWeb.Query.SparqlEngine.MyLogicFactoryZ(SemWeb.Query.SparqlEngine.MyLogicFactory[(SemWeb.Query.SparqlEngine.MyLogicFactory\(SemWeb.Query.SparqlEngine.MyLogicFactory](SemWeb.Query.SparqlEngine.MyLogicFactory^(SemWeb.Query.SparqlEngine.MyLogicFactory_(SemWeb.Query.SparqlEngine.MyLogicFactory`(SemWeb.Query.SparqlEngine.MyLogicFactorya(SemWeb.Query.SparqlEngine.MyLogicFactoryb(SemWeb.Query.SparqlEngine.MyLogicFactoryc(SemWeb.Query.SparqlEngine.MyLogicFactoryd(SemWeb.Query.SparqlEngine.MyLogicFactorye(SemWeb.Query.SparqlEngine.MyLogicFactoryf(SemWeb.Query.SparqlEngine.MyLogicFactoryg(SemWeb.Query.SparqlEngine.MyLogicFactoryh(SemWeb.Query.SparqlEngine.MyLogicFactoryi(SemWeb.Query.SparqlEngine.MyLogicFactoryj(SemWeb.Query.SparqlEngine.MyLogicFactoryk(SemWeb.Query.SparqlEngine.MyLogicFactoryl(SemWeb.Query.SparqlEngine.MyLogicFactorym(SemWeb.Query.SparqlEngine.MyLogicFactoryn(SemWeb.Query.SparqlEngine.MyLogicFactoryo(SemWeb.Query.SparqlEngine.MyLogicFactoryp(SemWeb.Query.SparqlEngine.MyLogicFactoryq(SemWeb.Query.SparqlEngine.MyLogicFactoryr(SemWeb.Query.SparqlEngine.MyLogicFactorys(SemWeb.Query.SparqlEngine.MyLogicFactoryt(SemWeb.Query.SparqlEngine.MyLogicFactoryu(SemWeb.Query.SparqlEngine.MyLogicFactoryv(SemWeb.Query.SparqlEngine.MyLogicFactoryw(SemWeb.Query.SparqlEngine.MyLogicFactoryx(SemWeb.Query.SparqlEngine.MyLogicFactoryy(SemWeb.Query.SparqlEngine.MyLogicFactoryz(SemWeb.Query.SparqlEngine.MyLogicFactory{(SemWeb.Query.SparqlEngine.MyLogicFactory|(SemWeb.Query.SparqlEngine.MyLogicFactory}(SemWeb.Query.SparqlEngine.MyLogicFactory~(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory(SemWeb.Query.SparqlEngine.MyLogicFactory &SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper&SemWeb.Query.SparqlEngine.BNodeWrapper /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt  /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt  /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt  *SemWeb.Query.SparqlEngine.RdfSourceWrapper  &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper! $SemWeb.Query.SparqlEngine.URIWrapper" (SemWeb.Query.SparqlEngine.LiteralWrapper# &SemWeb.Query.SparqlEngine.BNodeWrapper$ $SemWeb.Query.SparqlEngine.URIWrapper% (SemWeb.Query.SparqlEngine.LiteralWrapper& &SemWeb.Query.SparqlEngine.BNodeWrapper' $SemWeb.Query.SparqlEngine.URIWrapper( (SemWeb.Query.SparqlEngine.LiteralWrapper) &SemWeb.Query.SparqlEngine.BNodeWrapper* $SemWeb.Query.SparqlEngine.URIWrapper+ (SemWeb.Query.SparqlEngine.LiteralWrapper, &SemWeb.Query.SparqlEngine.BNodeWrapper- $SemWeb.Query.SparqlEngine.URIWrapper. (SemWeb.Query.SparqlEngine.LiteralWrapper/ &SemWeb.Query.SparqlEngine.BNodeWrapper0 $SemWeb.Query.SparqlEngine.URIWrapper1 (SemWeb.Query.SparqlEngine.LiteralWrapper2 &SemWeb.Query.SparqlEngine.BNodeWrapper3 $SemWeb.Query.SparqlEngine.URIWrapper4 (SemWeb.Query.SparqlEngine.LiteralWrapper5 &SemWeb.Query.SparqlEngine.BNodeWrapper6 $SemWeb.Query.SparqlEngine.URIWrapper7 (SemWeb.Query.SparqlEngine.LiteralWrapper8 &SemWeb.Query.SparqlEngine.BNodeWrapper9 $SemWeb.Query.SparqlEngine.URIWrapper: (SemWeb.Query.SparqlEngine.LiteralWrapper; &SemWeb.Query.SparqlEngine.BNodeWrapper< $SemWeb.Query.SparqlEngine.URIWrapper= (SemWeb.Query.SparqlEngine.LiteralWrapper> &SemWeb.Query.SparqlEngine.BNodeWrapper? $SemWeb.Query.SparqlEngine.URIWrapper@ (SemWeb.Query.SparqlEngine.LiteralWrapperA &SemWeb.Query.SparqlEngine.BNodeWrapperB $SemWeb.Query.SparqlEngine.URIWrapperC (SemWeb.Query.SparqlEngine.LiteralWrapperD &SemWeb.Query.SparqlEngine.BNodeWrapperE $SemWeb.Query.SparqlEngine.URIWrapperF (SemWeb.Query.SparqlEngine.LiteralWrapperG &SemWeb.Query.SparqlEngine.BNodeWrapperH $SemWeb.Query.SparqlEngine.URIWrapperI (SemWeb.Query.SparqlEngine.LiteralWrapperJ &SemWeb.Query.SparqlEngine.BNodeWrapperK $SemWeb.Query.SparqlEngine.URIWrapperL (SemWeb.Query.SparqlEngine.LiteralWrapperM &SemWeb.Query.SparqlEngine.BNodeWrapperN $SemWeb.Query.SparqlEngine.URIWrapperO (SemWeb.Query.SparqlEngine.LiteralWrapperP &SemWeb.Query.SparqlEngine.BNodeWrapperQ $SemWeb.Query.SparqlEngine.URIWrapperR (SemWeb.Query.SparqlEngine.LiteralWrapperS &SemWeb.Query.SparqlEngine.BNodeWrapperT $SemWeb.Query.SparqlEngine.URIWrapperU (SemWeb.Query.SparqlEngine.LiteralWrapperV &SemWeb.Query.SparqlEngine.BNodeWrapperW $SemWeb.Query.SparqlEngine.URIWrapperX (SemWeb.Query.SparqlEngine.LiteralWrapperY &SemWeb.Query.SparqlEngine.BNodeWrapperZ $SemWeb.Query.SparqlEngine.URIWrapper[ (SemWeb.Query.SparqlEngine.LiteralWrapper\ &SemWeb.Query.SparqlEngine.BNodeWrapper] $SemWeb.Query.SparqlEngine.URIWrapper^ (SemWeb.Query.SparqlEngine.LiteralWrapper_ &SemWeb.Query.SparqlEngine.BNodeWrapper` $SemWeb.Query.SparqlEngine.URIWrappera (SemWeb.Query.SparqlEngine.LiteralWrapperb &SemWeb.Query.SparqlEngine.BNodeWrapperc $SemWeb.Query.SparqlEngine.URIWrapperd (SemWeb.Query.SparqlEngine.LiteralWrappere &SemWeb.Query.SparqlEngine.BNodeWrapperf $SemWeb.Query.SparqlEngine.URIWrapperg (SemWeb.Query.SparqlEngine.LiteralWrapperh &SemWeb.Query.SparqlEngine.BNodeWrapperi $SemWeb.Query.SparqlEngine.URIWrapperj (SemWeb.Query.SparqlEngine.LiteralWrapperk &SemWeb.Query.SparqlEngine.BNodeWrapperl $SemWeb.Query.SparqlEngine.URIWrapperm &SemWeb.Query.SparqlEngine.BNodeWrappern $SemWeb.Query.SparqlEngine.URIWrappero (SemWeb.Query.SparqlEngine.LiteralWrapperp &SemWeb.Query.SparqlEngine.BNodeWrapperq $SemWeb.Query.SparqlEngine.URIWrapperr (SemWeb.Query.SparqlEngine.LiteralWrappers &SemWeb.Query.SparqlEngine.BNodeWrappert $SemWeb.Query.SparqlEngine.URIWrapperu (SemWeb.Query.SparqlEngine.LiteralWrapperv &SemWeb.Query.SparqlEngine.BNodeWrapperw $SemWeb.Query.SparqlEngine.URIWrapperx (SemWeb.Query.SparqlEngine.LiteralWrappery &SemWeb.Query.SparqlEngine.BNodeWrapperz $SemWeb.Query.SparqlEngine.URIWrapper{ (SemWeb.Query.SparqlEngine.LiteralWrapper| &SemWeb.Query.SparqlEngine.BNodeWrapper} $SemWeb.Query.SparqlEngine.URIWrapper~ (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper! &SemWeb.Query.SparqlEngine.BNodeWrapper" $SemWeb.Query.SparqlEngine.URIWrapper# (SemWeb.Query.SparqlEngine.LiteralWrapper$ &SemWeb.Query.SparqlEngine.BNodeWrapper% $SemWeb.Query.SparqlEngine.URIWrapper& (SemWeb.Query.SparqlEngine.LiteralWrapper' &SemWeb.Query.SparqlEngine.BNodeWrapper( $SemWeb.Query.SparqlEngine.URIWrapper) (SemWeb.Query.SparqlEngine.LiteralWrapper* &SemWeb.Query.SparqlEngine.BNodeWrapper+ $SemWeb.Query.SparqlEngine.URIWrapper, (SemWeb.Query.SparqlEngine.LiteralWrapper- &SemWeb.Query.SparqlEngine.BNodeWrapper. $SemWeb.Query.SparqlEngine.URIWrapper/ (SemWeb.Query.SparqlEngine.LiteralWrapper0 &SemWeb.Query.SparqlEngine.BNodeWrapper1 $SemWeb.Query.SparqlEngine.URIWrapper2 (SemWeb.Query.SparqlEngine.LiteralWrapper3 &SemWeb.Query.SparqlEngine.BNodeWrapper4 $SemWeb.Query.SparqlEngine.URIWrapper5 (SemWeb.Query.SparqlEngine.LiteralWrapper6 &SemWeb.Query.SparqlEngine.BNodeWrapper7 $SemWeb.Query.SparqlEngine.URIWrapper8 (SemWeb.Query.SparqlEngine.LiteralWrapper9 &SemWeb.Query.SparqlEngine.BNodeWrapper: $SemWeb.Query.SparqlEngine.URIWrapper; (SemWeb.Query.SparqlEngine.LiteralWrapper< &SemWeb.Query.SparqlEngine.BNodeWrapper= $SemWeb.Query.SparqlEngine.URIWrapper> (SemWeb.Query.SparqlEngine.LiteralWrapper? &SemWeb.Query.SparqlEngine.BNodeWrapper@ $SemWeb.Query.SparqlEngine.URIWrapperA (SemWeb.Query.SparqlEngine.LiteralWrapperB &SemWeb.Query.SparqlEngine.BNodeWrapperC $SemWeb.Query.SparqlEngine.URIWrapperD (SemWeb.Query.SparqlEngine.LiteralWrapperE &SemWeb.Query.SparqlEngine.BNodeWrapperF $SemWeb.Query.SparqlEngine.URIWrapperG (SemWeb.Query.SparqlEngine.LiteralWrapperH &SemWeb.Query.SparqlEngine.BNodeWrapperI $SemWeb.Query.SparqlEngine.URIWrapperJ (SemWeb.Query.SparqlEngine.LiteralWrapperK &SemWeb.Query.SparqlEngine.BNodeWrapperL $SemWeb.Query.SparqlEngine.URIWrapperM (SemWeb.Query.SparqlEngine.LiteralWrapperN &SemWeb.Query.SparqlEngine.BNodeWrapperO $SemWeb.Query.SparqlEngine.URIWrapperP (SemWeb.Query.SparqlEngine.LiteralWrapperQ &SemWeb.Query.SparqlEngine.BNodeWrapperR $SemWeb.Query.SparqlEngine.URIWrapperS (SemWeb.Query.SparqlEngine.LiteralWrapperT &SemWeb.Query.SparqlEngine.BNodeWrapperU $SemWeb.Query.SparqlEngine.URIWrapperV (SemWeb.Query.SparqlEngine.LiteralWrapperW &SemWeb.Query.SparqlEngine.BNodeWrapperX $SemWeb.Query.SparqlEngine.URIWrapperY (SemWeb.Query.SparqlEngine.LiteralWrapperZ &SemWeb.Query.SparqlEngine.BNodeWrapper[ $SemWeb.Query.SparqlEngine.URIWrapper\ (SemWeb.Query.SparqlEngine.LiteralWrapper] &SemWeb.Query.SparqlEngine.BNodeWrapper^ $SemWeb.Query.SparqlEngine.URIWrapper_ (SemWeb.Query.SparqlEngine.LiteralWrapper` &SemWeb.Query.SparqlEngine.BNodeWrappera $SemWeb.Query.SparqlEngine.URIWrapperb (SemWeb.Query.SparqlEngine.LiteralWrapperc &SemWeb.Query.SparqlEngine.BNodeWrapperd $SemWeb.Query.SparqlEngine.URIWrappere (SemWeb.Query.SparqlEngine.LiteralWrapperf &SemWeb.Query.SparqlEngine.BNodeWrapperg $SemWeb.Query.SparqlEngine.URIWrapperh (SemWeb.Query.SparqlEngine.LiteralWrapperi &SemWeb.Query.SparqlEngine.BNodeWrapperj $SemWeb.Query.SparqlEngine.URIWrapperk (SemWeb.Query.SparqlEngine.LiteralWrapperl &SemWeb.Query.SparqlEngine.BNodeWrapperm $SemWeb.Query.SparqlEngine.URIWrappern (SemWeb.Query.SparqlEngine.LiteralWrappero &SemWeb.Query.SparqlEngine.BNodeWrapperp $SemWeb.Query.SparqlEngine.URIWrapperq (SemWeb.Query.SparqlEngine.LiteralWrapperr &SemWeb.Query.SparqlEngine.BNodeWrappers $SemWeb.Query.SparqlEngine.URIWrappert (SemWeb.Query.SparqlEngine.LiteralWrapperu &SemWeb.Query.SparqlEngine.BNodeWrapperv $SemWeb.Query.SparqlEngine.URIWrapperw (SemWeb.Query.SparqlEngine.LiteralWrapperx &SemWeb.Query.SparqlEngine.BNodeWrappery $SemWeb.Query.SparqlEngine.URIWrapperz (SemWeb.Query.SparqlEngine.LiteralWrapper{ &SemWeb.Query.SparqlEngine.BNodeWrapper| $SemWeb.Query.SparqlEngine.URIWrapper} (SemWeb.Query.SparqlEngine.LiteralWrapper~ &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper! $SemWeb.Query.SparqlEngine.URIWrapper" (SemWeb.Query.SparqlEngine.LiteralWrapper# &SemWeb.Query.SparqlEngine.BNodeWrapper$ $SemWeb.Query.SparqlEngine.URIWrapper% (SemWeb.Query.SparqlEngine.LiteralWrapper& &SemWeb.Query.SparqlEngine.BNodeWrapper' $SemWeb.Query.SparqlEngine.URIWrapper( (SemWeb.Query.SparqlEngine.LiteralWrapper) &SemWeb.Query.SparqlEngine.BNodeWrapper* 1SemWeb.Query.SparqlEngine.BNodeWrapper.URIWrapper+ 5SemWeb.Query.SparqlEngine.BNodeWrapper.LiteralWrapper, &SemWeb.Query.SparqlEngine.BNodeWrapper- $SemWeb.Query.SparqlEngine.URIWrapper. (SemWeb.Query.SparqlEngine.LiteralWrapper/ &SemWeb.Query.SparqlEngine.BNodeWrapper0 1SemWeb.Query.SparqlEngine.BNodeWrapper.URIWrapper1 5SemWeb.Query.SparqlEngine.BNodeWrapper.LiteralWrapper2 &SemWeb.Query.SparqlEngine.BNodeWrapper3 $SemWeb.Query.SparqlEngine.URIWrapper4 (SemWeb.Query.SparqlEngine.LiteralWrapper5 &SemWeb.Query.SparqlEngine.BNodeWrapper6 $SemWeb.Query.SparqlEngine.URIWrapper7 (SemWeb.Query.SparqlEngine.LiteralWrapper8 &SemWeb.Query.SparqlEngine.BNodeWrapper9 $SemWeb.Query.SparqlEngine.URIWrapper: (SemWeb.Query.SparqlEngine.LiteralWrapper; &SemWeb.Query.SparqlEngine.BNodeWrapper< $SemWeb.Query.SparqlEngine.URIWrapper= (SemWeb.Query.SparqlEngine.LiteralWrapper> &SemWeb.Query.SparqlEngine.BNodeWrapper? $SemWeb.Query.SparqlEngine.URIWrapper@ (SemWeb.Query.SparqlEngine.LiteralWrapperA &SemWeb.Query.SparqlEngine.BNodeWrapperB $SemWeb.Query.SparqlEngine.URIWrapperC (SemWeb.Query.SparqlEngine.LiteralWrapperD &SemWeb.Query.SparqlEngine.BNodeWrapperE $SemWeb.Query.SparqlEngine.URIWrapperF (SemWeb.Query.SparqlEngine.LiteralWrapperG &SemWeb.Query.SparqlEngine.BNodeWrapperH $SemWeb.Query.SparqlEngine.URIWrapperI (SemWeb.Query.SparqlEngine.LiteralWrapperJ &SemWeb.Query.SparqlEngine.BNodeWrapperK $SemWeb.Query.SparqlEngine.URIWrapperL (SemWeb.Query.SparqlEngine.LiteralWrapperM &SemWeb.Query.SparqlEngine.BNodeWrapperN $SemWeb.Query.SparqlEngine.URIWrapperO (SemWeb.Query.SparqlEngine.LiteralWrapperP &SemWeb.Query.SparqlEngine.BNodeWrapperQ $SemWeb.Query.SparqlEngine.URIWrapperR (SemWeb.Query.SparqlEngine.LiteralWrapperS &SemWeb.Query.SparqlEngine.BNodeWrapperT $SemWeb.Query.SparqlEngine.URIWrapperU (SemWeb.Query.SparqlEngine.LiteralWrapperV &SemWeb.Query.SparqlEngine.BNodeWrapperW $SemWeb.Query.SparqlEngine.URIWrapperX (SemWeb.Query.SparqlEngine.LiteralWrapperY &SemWeb.Query.SparqlEngine.BNodeWrapperZ $SemWeb.Query.SparqlEngine.URIWrapper[ (SemWeb.Query.SparqlEngine.LiteralWrapper\ &SemWeb.Query.SparqlEngine.BNodeWrapper] $SemWeb.Query.SparqlEngine.URIWrapper^ (SemWeb.Query.SparqlEngine.LiteralWrapper_ &SemWeb.Query.SparqlEngine.BNodeWrapper` $SemWeb.Query.SparqlEngine.URIWrappera (SemWeb.Query.SparqlEngine.LiteralWrapperb &SemWeb.Query.SparqlEngine.BNodeWrapperc $SemWeb.Query.SparqlEngine.URIWrapperd (SemWeb.Query.SparqlEngine.LiteralWrappere &SemWeb.Query.SparqlEngine.BNodeWrapperf $SemWeb.Query.SparqlEngine.URIWrapperg (SemWeb.Query.SparqlEngine.LiteralWrapperh &SemWeb.Query.SparqlEngine.BNodeWrapperi $SemWeb.Query.SparqlEngine.URIWrapperj (SemWeb.Query.SparqlEngine.LiteralWrapperk &SemWeb.Query.SparqlEngine.BNodeWrapperl $SemWeb.Query.SparqlEngine.URIWrapperm (SemWeb.Query.SparqlEngine.LiteralWrappern &SemWeb.Query.SparqlEngine.BNodeWrappero $SemWeb.Query.SparqlEngine.URIWrapperp (SemWeb.Query.SparqlEngine.LiteralWrapperq &SemWeb.Query.SparqlEngine.BNodeWrapperr $SemWeb.Query.SparqlEngine.URIWrappers (SemWeb.Query.SparqlEngine.LiteralWrappert &SemWeb.Query.SparqlEngine.BNodeWrapperu $SemWeb.Query.SparqlEngine.URIWrapperv (SemWeb.Query.SparqlEngine.LiteralWrapperw &SemWeb.Query.SparqlEngine.BNodeWrapperx $SemWeb.Query.SparqlEngine.URIWrappery (SemWeb.Query.SparqlEngine.LiteralWrapperz &SemWeb.Query.SparqlEngine.BNodeWrapper{ $SemWeb.Query.SparqlEngine.URIWrapper| (SemWeb.Query.SparqlEngine.LiteralWrapper} &SemWeb.Query.SparqlEngine.BNodeWrapper~ $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper! (SemWeb.Query.SparqlEngine.LiteralWrapper" &SemWeb.Query.SparqlEngine.BNodeWrapper# $SemWeb.Query.SparqlEngine.URIWrapper$ (SemWeb.Query.SparqlEngine.LiteralWrapper% &SemWeb.Query.SparqlEngine.BNodeWrapper& $SemWeb.Query.SparqlEngine.URIWrapper' (SemWeb.Query.SparqlEngine.LiteralWrapper( &SemWeb.Query.SparqlEngine.BNodeWrapper) $SemWeb.Query.SparqlEngine.URIWrapper* (SemWeb.Query.SparqlEngine.LiteralWrapper+ &SemWeb.Query.SparqlEngine.BNodeWrapper, $SemWeb.Query.SparqlEngine.URIWrapper- (SemWeb.Query.SparqlEngine.LiteralWrapper. &SemWeb.Query.SparqlEngine.BNodeWrapper/ $SemWeb.Query.SparqlEngine.URIWrapper0 (SemWeb.Query.SparqlEngine.LiteralWrapper1 &SemWeb.Query.SparqlEngine.BNodeWrapper2 $SemWeb.Query.SparqlEngine.URIWrapper3 (SemWeb.Query.SparqlEngine.LiteralWrapper4 &SemWeb.Query.SparqlEngine.BNodeWrapper5 $SemWeb.Query.SparqlEngine.URIWrapper6 (SemWeb.Query.SparqlEngine.LiteralWrapper7 &SemWeb.Query.SparqlEngine.BNodeWrapper8 $SemWeb.Query.SparqlEngine.URIWrapper9 (SemWeb.Query.SparqlEngine.LiteralWrapper: &SemWeb.Query.SparqlEngine.BNodeWrapper; $SemWeb.Query.SparqlEngine.URIWrapper< (SemWeb.Query.SparqlEngine.LiteralWrapper= &SemWeb.Query.SparqlEngine.BNodeWrapper> $SemWeb.Query.SparqlEngine.URIWrapper? (SemWeb.Query.SparqlEngine.LiteralWrapper@ &SemWeb.Query.SparqlEngine.BNodeWrapperA $SemWeb.Query.SparqlEngine.URIWrapperB (SemWeb.Query.SparqlEngine.LiteralWrapperC &SemWeb.Query.SparqlEngine.BNodeWrapperD $SemWeb.Query.SparqlEngine.URIWrapperE (SemWeb.Query.SparqlEngine.LiteralWrapperF &SemWeb.Query.SparqlEngine.BNodeWrapperG $SemWeb.Query.SparqlEngine.URIWrapperH (SemWeb.Query.SparqlEngine.LiteralWrapperI &SemWeb.Query.SparqlEngine.BNodeWrapperJ $SemWeb.Query.SparqlEngine.URIWrapperK (SemWeb.Query.SparqlEngine.LiteralWrapperL &SemWeb.Query.SparqlEngine.BNodeWrapperM $SemWeb.Query.SparqlEngine.URIWrapperN (SemWeb.Query.SparqlEngine.LiteralWrapperO &SemWeb.Query.SparqlEngine.BNodeWrapperP $SemWeb.Query.SparqlEngine.URIWrapperQ (SemWeb.Query.SparqlEngine.LiteralWrapperR &SemWeb.Query.SparqlEngine.BNodeWrapperS $SemWeb.Query.SparqlEngine.URIWrapperT (SemWeb.Query.SparqlEngine.LiteralWrapperU &SemWeb.Query.SparqlEngine.BNodeWrapperV $SemWeb.Query.SparqlEngine.URIWrapperW (SemWeb.Query.SparqlEngine.LiteralWrapperX &SemWeb.Query.SparqlEngine.BNodeWrapperY $SemWeb.Query.SparqlEngine.URIWrapperZ (SemWeb.Query.SparqlEngine.LiteralWrapper[ &SemWeb.Query.SparqlEngine.BNodeWrapper\ $SemWeb.Query.SparqlEngine.URIWrapper] (SemWeb.Query.SparqlEngine.LiteralWrapper^ &SemWeb.Query.SparqlEngine.BNodeWrapper_ $SemWeb.Query.SparqlEngine.URIWrapper` (SemWeb.Query.SparqlEngine.LiteralWrappera &SemWeb.Query.SparqlEngine.BNodeWrapperb $SemWeb.Query.SparqlEngine.URIWrapperc (SemWeb.Query.SparqlEngine.LiteralWrapperd &SemWeb.Query.SparqlEngine.BNodeWrappere $SemWeb.Query.SparqlEngine.URIWrapperf (SemWeb.Query.SparqlEngine.LiteralWrapperg &SemWeb.Query.SparqlEngine.BNodeWrapperh $SemWeb.Query.SparqlEngine.URIWrapperi (SemWeb.Query.SparqlEngine.LiteralWrapperj &SemWeb.Query.SparqlEngine.BNodeWrapperk $SemWeb.Query.SparqlEngine.URIWrapperl (SemWeb.Query.SparqlEngine.LiteralWrapperm &SemWeb.Query.SparqlEngine.BNodeWrappern $SemWeb.Query.SparqlEngine.URIWrappero (SemWeb.Query.SparqlEngine.LiteralWrapperp &SemWeb.Query.SparqlEngine.BNodeWrapperq $SemWeb.Query.SparqlEngine.URIWrapperr (SemWeb.Query.SparqlEngine.LiteralWrappers &SemWeb.Query.SparqlEngine.BNodeWrappert $SemWeb.Query.SparqlEngine.URIWrapperu (SemWeb.Query.SparqlEngine.LiteralWrapperv &SemWeb.Query.SparqlEngine.BNodeWrapperw $SemWeb.Query.SparqlEngine.URIWrapperx (SemWeb.Query.SparqlEngine.LiteralWrappery &SemWeb.Query.SparqlEngine.BNodeWrapperz $SemWeb.Query.SparqlEngine.URIWrapper{ (SemWeb.Query.SparqlEngine.LiteralWrapper| &SemWeb.Query.SparqlEngine.BNodeWrapper} $SemWeb.Query.SparqlEngine.URIWrapper~ (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.BNodeWrapper $SemWeb.Query.SparqlEngine.URIWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper! &SemWeb.Query.SparqlEngine.BNodeWrapper" $SemWeb.Query.SparqlEngine.URIWrapper# (SemWeb.Query.SparqlEngine.LiteralWrapper$ &SemWeb.Query.SparqlEngine.BNodeWrapper% $SemWeb.Query.SparqlEngine.URIWrapper& (SemWeb.Query.SparqlEngine.LiteralWrapper' &SemWeb.Query.SparqlEngine.BNodeWrapper( $SemWeb.Query.SparqlEngine.URIWrapper) (SemWeb.Query.SparqlEngine.LiteralWrapper* &SemWeb.Query.SparqlEngine.BNodeWrapper+ $SemWeb.Query.SparqlEngine.URIWrapper, (SemWeb.Query.SparqlEngine.LiteralWrapper- &SemWeb.Query.SparqlEngine.BNodeWrapper. $SemWeb.Query.SparqlEngine.URIWrapper/ (SemWeb.Query.SparqlEngine.LiteralWrapper0 &SemWeb.Query.SparqlEngine.BNodeWrapper1 $SemWeb.Query.SparqlEngine.URIWrapper2 (SemWeb.Query.SparqlEngine.LiteralWrapper3 &SemWeb.Query.SparqlEngine.BNodeWrapper 4 /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt5 /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt6 /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt7 /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt8 /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt9 /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt: /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt; /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt< /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt= /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt> /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt? /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt@ /SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtA /SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtB /SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtC /SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtD /SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtE /SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtF /SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtG /SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtH /SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtI /SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtJ /SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtK /SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtL /SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtM /SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtN /SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtO /SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtP /SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtQ /SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtR /SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtS /SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtT /SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtU /SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtV /SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtW /SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtX /SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtY /SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtZ /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt[ /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt\ /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt] /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt^ /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt_ /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt` /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmta /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmtb /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmtc /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmtd /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmte /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmtf /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmtg /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmth /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmti /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmtj /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmtk /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmtl /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmtm /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmtn /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmto /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmtp /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmtq /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmtr /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmts /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmtt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmtu /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmtv /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmtw /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmtx /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmty /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmtz /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt{ /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt| /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt} /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt~ /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt SemWeb.Query.SparqlEngine.Stmt SemWeb.Query.SparqlEngine.Stmt SemWeb.Query.SparqlEngine.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt SemWeb.Query.SparqlEngine.Stmt SemWeb.Query.SparqlEngine.Stmt SemWeb.Query.SparqlEngine.Stmt SemWeb.Query.SparqlEngine.Stmt SemWeb.Query.SparqlEngine.Stmt SemWeb.Query.SparqlEngine.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt/SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtSemWeb.Query.SparqlEngine.StmtSemWeb.Query.SparqlEngine.StmtSemWeb.Query.SparqlEngine.StmtSemWeb.Query.SparqlEngine.StmtSemWeb.Query.SparqlEngine.StmtSemWeb.Query.SparqlEngine.StmtSemWeb.Query.SparqlEngine.Stmt SemWeb.Query.SparqlEngine.Stmt SemWeb.Query.SparqlEngine.Stmt SemWeb.Query.SparqlEngine.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt/SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtSemWeb.Query.SparqlEngine.StmtSemWeb.Query.SparqlEngine.StmtSemWeb.Query.SparqlEngine.StmtSemWeb.Query.SparqlEngine.StmtSemWeb.Query.SparqlEngine.StmtSemWeb.Query.SparqlEngine.StmtSemWeb.Query.SparqlEngine.StmtSemWeb.Query.SparqlEngine.StmtSemWeb.Query.SparqlEngine.StmtSemWeb.Query.SparqlEngine.StmtSemWeb.Query.SparqlEngine.Stmt/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt!/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt"/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt#/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt$/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt%/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt&/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt'/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt(/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt)/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt*/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt+/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt,/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt-/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt./SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt//SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt0/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt1/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt2/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt3/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt4/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt5/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt6/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt7/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt8/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt9/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt:/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt;/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt</SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt=/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt>/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt?/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt@/SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtA/SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtB/SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtC/SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtD/SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtE/SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtF/SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtG/SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtH/SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtI/SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtJ/SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtK/SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtL/SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtM/SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtN/SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtO/SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtP/SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtQ/SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtR/SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtS/SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtT/SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtU/SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtV/SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtW/SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtX/SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtY/SemWeb.Query.SparqlEngine.RdfSourceWrapper.StmtZ/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt[/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt\/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt]/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt^/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt_/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt`/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmta/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmtb/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmtc/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmtd/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmte/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmtf/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmtg/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmth/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmti/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmtj/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmtk/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmtl/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmtm/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmtn/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmto/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmtp/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmtq/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmtr/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmts/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmtt/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmtu/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmtv/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmtw/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmtx/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmty/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmtz/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt{/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt|/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt}/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt~/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt  y 'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator +SemWeb.Query.SparqlEngine.StatementIterator 'SemWeb.Query.SparqlEngine.EmptyIterator +SemWeb.Query.SparqlEngine.StatementIterator 'SemWeb.Query.SparqlEngine.EmptyIterator +SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator 'SemWeb.Query.SparqlEngine.EmptyIterator!+SemWeb.Query.SparqlEngine.StatementIterator"'SemWeb.Query.SparqlEngine.EmptyIterator#+SemWeb.Query.SparqlEngine.StatementIterator$'SemWeb.Query.SparqlEngine.EmptyIterator%+SemWeb.Query.SparqlEngine.StatementIterator&'SemWeb.Query.SparqlEngine.EmptyIterator'+SemWeb.Query.SparqlEngine.StatementIterator('SemWeb.Query.SparqlEngine.EmptyIterator)+SemWeb.Query.SparqlEngine.StatementIterator*'SemWeb.Query.SparqlEngine.EmptyIterator++SemWeb.Query.SparqlEngine.StatementIterator,'SemWeb.Query.SparqlEngine.EmptyIterator-+SemWeb.Query.SparqlEngine.StatementIterator.'SemWeb.Query.SparqlEngine.EmptyIterator/+SemWeb.Query.SparqlEngine.StatementIterator0'SemWeb.Query.SparqlEngine.EmptyIterator1+SemWeb.Query.SparqlEngine.StatementIterator2'SemWeb.Query.SparqlEngine.EmptyIterator3+SemWeb.Query.SparqlEngine.StatementIterator4'SemWeb.Query.SparqlEngine.EmptyIterator5+SemWeb.Query.SparqlEngine.StatementIterator6'SemWeb.Query.SparqlEngine.EmptyIterator7+SemWeb.Query.SparqlEngine.StatementIterator8'SemWeb.Query.SparqlEngine.EmptyIterator9+SemWeb.Query.SparqlEngine.StatementIterator:'SemWeb.Query.SparqlEngine.EmptyIterator;+SemWeb.Query.SparqlEngine.StatementIterator<'SemWeb.Query.SparqlEngine.EmptyIterator=+SemWeb.Query.SparqlEngine.StatementIterator>'SemWeb.Query.SparqlEngine.EmptyIterator?+SemWeb.Query.SparqlEngine.StatementIterator@'SemWeb.Query.SparqlEngine.EmptyIteratorA+SemWeb.Query.SparqlEngine.StatementIteratorB'SemWeb.Query.SparqlEngine.EmptyIteratorC+SemWeb.Query.SparqlEngine.StatementIteratorD'SemWeb.Query.SparqlEngine.EmptyIteratorE+SemWeb.Query.SparqlEngine.StatementIteratorF'SemWeb.Query.SparqlEngine.EmptyIteratorG+SemWeb.Query.SparqlEngine.StatementIteratorH'SemWeb.Query.SparqlEngine.EmptyIteratorI+SemWeb.Query.SparqlEngine.StatementIteratorJ'SemWeb.Query.SparqlEngine.EmptyIteratorK+SemWeb.Query.SparqlEngine.StatementIteratorL'SemWeb.Query.SparqlEngine.EmptyIteratorM+SemWeb.Query.SparqlEngine.StatementIteratorN'SemWeb.Query.SparqlEngine.EmptyIteratorO+SemWeb.Query.SparqlEngine.StatementIteratorP'SemWeb.Query.SparqlEngine.EmptyIteratorQ+SemWeb.Query.SparqlEngine.StatementIteratorR'SemWeb.Query.SparqlEngine.EmptyIteratorS+SemWeb.Query.SparqlEngine.StatementIteratorT'SemWeb.Query.SparqlEngine.EmptyIteratorU+SemWeb.Query.SparqlEngine.StatementIteratorV'SemWeb.Query.SparqlEngine.EmptyIteratorW+SemWeb.Query.SparqlEngine.StatementIteratorX'SemWeb.Query.SparqlEngine.EmptyIteratorY+SemWeb.Query.SparqlEngine.StatementIteratorZ'SemWeb.Query.SparqlEngine.EmptyIterator[+SemWeb.Query.SparqlEngine.StatementIterator\'SemWeb.Query.SparqlEngine.EmptyIterator]+SemWeb.Query.SparqlEngine.StatementIterator^'SemWeb.Query.SparqlEngine.EmptyIterator_+SemWeb.Query.SparqlEngine.StatementIterator`'SemWeb.Query.SparqlEngine.EmptyIteratora+SemWeb.Query.SparqlEngine.StatementIteratorb'SemWeb.Query.SparqlEngine.EmptyIteratorc+SemWeb.Query.SparqlEngine.StatementIteratord'SemWeb.Query.SparqlEngine.EmptyIteratore+SemWeb.Query.SparqlEngine.StatementIteratorf'SemWeb.Query.SparqlEngine.EmptyIteratorg+SemWeb.Query.SparqlEngine.StatementIteratorh'SemWeb.Query.SparqlEngine.EmptyIteratori+SemWeb.Query.SparqlEngine.StatementIteratorj'SemWeb.Query.SparqlEngine.EmptyIteratork+SemWeb.Query.SparqlEngine.StatementIteratorl'SemWeb.Query.SparqlEngine.EmptyIteratorm+SemWeb.Query.SparqlEngine.StatementIteratorn'SemWeb.Query.SparqlEngine.EmptyIteratoro+SemWeb.Query.SparqlEngine.StatementIteratorp'SemWeb.Query.SparqlEngine.EmptyIteratorq+SemWeb.Query.SparqlEngine.StatementIteratorr'SemWeb.Query.SparqlEngine.EmptyIterators+SemWeb.Query.SparqlEngine.StatementIteratort'SemWeb.Query.SparqlEngine.EmptyIteratoru+SemWeb.Query.SparqlEngine.StatementIteratorv'SemWeb.Query.SparqlEngine.EmptyIteratorw+SemWeb.Query.SparqlEngine.StatementIteratorx'SemWeb.Query.SparqlEngine.EmptyIteratory+SemWeb.Query.SparqlEngine.StatementIteratorz'SemWeb.Query.SparqlEngine.EmptyIterator{+SemWeb.Query.SparqlEngine.StatementIterator|'SemWeb.Query.SparqlEngine.EmptyIterator}+SemWeb.Query.SparqlEngine.StatementIterator~'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator +SemWeb.Query.SparqlEngine.StatementIterator 'SemWeb.Query.SparqlEngine.EmptyIterator +SemWeb.Query.SparqlEngine.StatementIterator 'SemWeb.Query.SparqlEngine.EmptyIterator +SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator 'SemWeb.Query.SparqlEngine.EmptyIterator!+SemWeb.Query.SparqlEngine.StatementIterator"'SemWeb.Query.SparqlEngine.EmptyIterator#+SemWeb.Query.SparqlEngine.StatementIterator$'SemWeb.Query.SparqlEngine.EmptyIterator%+SemWeb.Query.SparqlEngine.StatementIterator&'SemWeb.Query.SparqlEngine.EmptyIterator'+SemWeb.Query.SparqlEngine.StatementIterator('SemWeb.Query.SparqlEngine.EmptyIterator)+SemWeb.Query.SparqlEngine.StatementIterator*'SemWeb.Query.SparqlEngine.EmptyIterator++SemWeb.Query.SparqlEngine.StatementIterator,'SemWeb.Query.SparqlEngine.EmptyIterator-+SemWeb.Query.SparqlEngine.StatementIterator.'SemWeb.Query.SparqlEngine.EmptyIterator/+SemWeb.Query.SparqlEngine.StatementIterator0'SemWeb.Query.SparqlEngine.EmptyIterator1+SemWeb.Query.SparqlEngine.StatementIterator2'SemWeb.Query.SparqlEngine.EmptyIterator3+SemWeb.Query.SparqlEngine.StatementIterator4'SemWeb.Query.SparqlEngine.EmptyIterator5+SemWeb.Query.SparqlEngine.StatementIterator6'SemWeb.Query.SparqlEngine.EmptyIterator7+SemWeb.Query.SparqlEngine.StatementIterator8'SemWeb.Query.SparqlEngine.EmptyIterator9+SemWeb.Query.SparqlEngine.StatementIterator:'SemWeb.Query.SparqlEngine.EmptyIterator;+SemWeb.Query.SparqlEngine.StatementIterator<'SemWeb.Query.SparqlEngine.EmptyIterator=+SemWeb.Query.SparqlEngine.StatementIterator>'SemWeb.Query.SparqlEngine.EmptyIterator?+SemWeb.Query.SparqlEngine.StatementIterator@'SemWeb.Query.SparqlEngine.EmptyIteratorA+SemWeb.Query.SparqlEngine.StatementIteratorB'SemWeb.Query.SparqlEngine.EmptyIteratorC+SemWeb.Query.SparqlEngine.StatementIteratorD'SemWeb.Query.SparqlEngine.EmptyIteratorE+SemWeb.Query.SparqlEngine.StatementIteratorF'SemWeb.Query.SparqlEngine.EmptyIteratorG+SemWeb.Query.SparqlEngine.StatementIteratorH'SemWeb.Query.SparqlEngine.EmptyIteratorI+SemWeb.Query.SparqlEngine.StatementIteratorJ'SemWeb.Query.SparqlEngine.EmptyIteratorK+SemWeb.Query.SparqlEngine.StatementIteratorL'SemWeb.Query.SparqlEngine.EmptyIteratorM+SemWeb.Query.SparqlEngine.StatementIteratorN'SemWeb.Query.SparqlEngine.EmptyIteratorO+SemWeb.Query.SparqlEngine.StatementIteratorP'SemWeb.Query.SparqlEngine.EmptyIteratorQ+SemWeb.Query.SparqlEngine.StatementIteratorR'SemWeb.Query.SparqlEngine.EmptyIteratorS+SemWeb.Query.SparqlEngine.StatementIteratorT'SemWeb.Query.SparqlEngine.EmptyIteratorU+SemWeb.Query.SparqlEngine.StatementIteratorV'SemWeb.Query.SparqlEngine.EmptyIteratorW+SemWeb.Query.SparqlEngine.StatementIteratorX'SemWeb.Query.SparqlEngine.EmptyIteratorY+SemWeb.Query.SparqlEngine.StatementIteratorZ'SemWeb.Query.SparqlEngine.EmptyIterator[+SemWeb.Query.SparqlEngine.StatementIterator\'SemWeb.Query.SparqlEngine.EmptyIterator]+SemWeb.Query.SparqlEngine.StatementIterator^'SemWeb.Query.SparqlEngine.EmptyIterator_+SemWeb.Query.SparqlEngine.StatementIterator`'SemWeb.Query.SparqlEngine.EmptyIteratora+SemWeb.Query.SparqlEngine.StatementIteratorb'SemWeb.Query.SparqlEngine.EmptyIteratorc+SemWeb.Query.SparqlEngine.StatementIteratord'SemWeb.Query.SparqlEngine.EmptyIteratore+SemWeb.Query.SparqlEngine.StatementIteratorf'SemWeb.Query.SparqlEngine.EmptyIteratorg+SemWeb.Query.SparqlEngine.StatementIteratorh'SemWeb.Query.SparqlEngine.EmptyIteratori+SemWeb.Query.SparqlEngine.StatementIteratorj'SemWeb.Query.SparqlEngine.EmptyIteratork+SemWeb.Query.SparqlEngine.StatementIteratorl'SemWeb.Query.SparqlEngine.EmptyIteratorm+SemWeb.Query.SparqlEngine.StatementIteratorn'SemWeb.Query.SparqlEngine.EmptyIteratoro+SemWeb.Query.SparqlEngine.StatementIteratorp'SemWeb.Query.SparqlEngine.EmptyIteratorq+SemWeb.Query.SparqlEngine.StatementIteratorr'SemWeb.Query.SparqlEngine.EmptyIterators+SemWeb.Query.SparqlEngine.StatementIteratort'SemWeb.Query.SparqlEngine.EmptyIteratoru+SemWeb.Query.SparqlEngine.StatementIteratorv'SemWeb.Query.SparqlEngine.EmptyIteratorw+SemWeb.Query.SparqlEngine.StatementIteratorx'SemWeb.Query.SparqlEngine.EmptyIteratory+SemWeb.Query.SparqlEngine.StatementIteratorz'SemWeb.Query.SparqlEngine.EmptyIterator{+SemWeb.Query.SparqlEngine.StatementIterator|'SemWeb.Query.SparqlEngine.EmptyIterator}+SemWeb.Query.SparqlEngine.StatementIterator~'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator +SemWeb.Query.SparqlEngine.StatementIterator 'SemWeb.Query.SparqlEngine.EmptyIterator +SemWeb.Query.SparqlEngine.StatementIterator 'SemWeb.Query.SparqlEngine.EmptyIterator +SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator'SemWeb.Query.SparqlEngine.EmptyIterator+SemWeb.Query.SparqlEngine.StatementIterator 'SemWeb.Query.SparqlEngine.EmptyIterator!+SemWeb.Query.SparqlEngine.StatementIterator"'SemWeb.Query.SparqlEngine.EmptyIterator#+SemWeb.Query.SparqlEngine.StatementIterator$'SemWeb.Query.SparqlEngine.EmptyIterator%+SemWeb.Query.SparqlEngine.StatementIterator&'SemWeb.Query.SparqlEngine.EmptyIterator'+SemWeb.Query.SparqlEngine.StatementIterator('SemWeb.Query.SparqlEngine.EmptyIterator)+SemWeb.Query.SparqlEngine.StatementIterator*'SemWeb.Query.SparqlEngine.EmptyIterator++SemWeb.Query.SparqlEngine.StatementIterator,'SemWeb.Query.SparqlEngine.EmptyIterator-+SemWeb.Query.SparqlEngine.StatementIterator.'SemWeb.Query.SparqlEngine.EmptyIterator/+SemWeb.Query.SparqlEngine.StatementIterator0'SemWeb.Query.SparqlEngine.EmptyIterator1+SemWeb.Query.SparqlEngine.StatementIterator2'SemWeb.Query.SparqlEngine.EmptyIterator3+SemWeb.Query.SparqlEngine.StatementIterator4'SemWeb.Query.SparqlEngine.EmptyIterator5+SemWeb.Query.SparqlEngine.StatementIterator6'SemWeb.Query.SparqlEngine.EmptyIterator7+SemWeb.Query.SparqlEngine.StatementIterator8'SemWeb.Query.SparqlEngine.EmptyIterator9+SemWeb.Query.SparqlEngine.StatementIterator:'SemWeb.Query.SparqlEngine.EmptyIterator;+SemWeb.Query.SparqlEngine.StatementIterator<'SemWeb.Query.SparqlEngine.EmptyIterator=+SemWeb.Query.SparqlEngine.StatementIterator>'SemWeb.Query.SparqlEngine.EmptyIterator?+SemWeb.Query.SparqlEngine.StatementIterator@'SemWeb.Query.SparqlEngine.EmptyIteratorA+SemWeb.Query.SparqlEngine.StatementIteratorB'SemWeb.Query.SparqlEngine.EmptyIteratorC+SemWeb.Query.SparqlEngine.StatementIteratorD'SemWeb.Query.SparqlEngine.EmptyIteratorE+SemWeb.Query.SparqlEngine.StatementIteratorF'SemWeb.Query.SparqlEngine.EmptyIteratorG+SemWeb.Query.SparqlEngine.StatementIteratorH'SemWeb.Query.SparqlEngine.EmptyIteratorI+SemWeb.Query.SparqlEngine.StatementIteratorJ'SemWeb.Query.SparqlEngine.EmptyIteratorK+SemWeb.Query.SparqlEngine.StatementIteratorL'SemWeb.Query.SparqlEngine.EmptyIteratorM+SemWeb.Query.SparqlEngine.StatementIteratorN'SemWeb.Query.SparqlEngine.EmptyIteratorO+SemWeb.Query.SparqlEngine.StatementIteratorP'SemWeb.Query.SparqlEngine.EmptyIteratorQ+SemWeb.Query.SparqlEngine.StatementIteratorR'SemWeb.Query.SparqlEngine.EmptyIteratorS+SemWeb.Query.SparqlEngine.StatementIteratorT'SemWeb.Query.SparqlEngine.EmptyIteratorU+SemWeb.Query.SparqlEngine.StatementIteratorV'SemWeb.Query.SparqlEngine.EmptyIteratorW+SemWeb.Query.SparqlEngine.StatementIteratorX'SemWeb.Query.SparqlEngine.EmptyIteratorY+SemWeb.Query.SparqlEngine.StatementIteratorZ'SemWeb.Query.SparqlEngine.EmptyIterator[+SemWeb.Query.SparqlEngine.StatementIterator\'SemWeb.Query.SparqlEngine.EmptyIterator]+SemWeb.Query.SparqlEngine.StatementIterator^'SemWeb.Query.SparqlEngine.EmptyIterator_+SemWeb.Query.SparqlEngine.StatementIterator`'SemWeb.Query.SparqlEngine.EmptyIteratora+SemWeb.Query.SparqlEngine.StatementIteratorb'SemWeb.Query.SparqlEngine.EmptyIteratorc+SemWeb.Query.SparqlEngine.StatementIteratord'SemWeb.Query.SparqlEngine.EmptyIteratore+SemWeb.Query.SparqlEngine.StatementIteratorf'SemWeb.Query.SparqlEngine.EmptyIteratorg+SemWeb.Query.SparqlEngine.StatementIterator6h(SemWeb.Query.SparqlEngine.LiteralWrapperi(SemWeb.Query.SparqlEngine.LiteralWrapperj(SemWeb.Query.SparqlEngine.LiteralWrapperk(SemWeb.Query.SparqlEngine.LiteralWrapperl(SemWeb.Query.SparqlEngine.LiteralWrapperm(SemWeb.Query.SparqlEngine.LiteralWrappern(SemWeb.Query.SparqlEngine.LiteralWrappero(SemWeb.Query.SparqlEngine.LiteralWrapperp(SemWeb.Query.SparqlEngine.LiteralWrapperq(SemWeb.Query.SparqlEngine.LiteralWrapperr(SemWeb.Query.SparqlEngine.LiteralWrappers(SemWeb.Query.SparqlEngine.LiteralWrappert(SemWeb.Query.SparqlEngine.LiteralWrapperu(SemWeb.Query.SparqlEngine.LiteralWrapperv(SemWeb.Query.SparqlEngine.LiteralWrapperw(SemWeb.Query.SparqlEngine.LiteralWrapperx(SemWeb.Query.SparqlEngine.LiteralWrappery(SemWeb.Query.SparqlEngine.LiteralWrapperz(SemWeb.Query.SparqlEngine.LiteralWrapper{(SemWeb.Query.SparqlEngine.LiteralWrapper|(SemWeb.Query.SparqlEngine.LiteralWrapper}(SemWeb.Query.SparqlEngine.LiteralWrapper~(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper5SemWeb.Query.SparqlEngine.BNodeWrapper.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper5SemWeb.Query.SparqlEngine.BNodeWrapper.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper (SemWeb.Query.SparqlEngine.LiteralWrapper!(SemWeb.Query.SparqlEngine.LiteralWrapper"(SemWeb.Query.SparqlEngine.LiteralWrapper#(SemWeb.Query.SparqlEngine.LiteralWrapper$(SemWeb.Query.SparqlEngine.LiteralWrapper%(SemWeb.Query.SparqlEngine.LiteralWrapper&(SemWeb.Query.SparqlEngine.LiteralWrapper'(SemWeb.Query.SparqlEngine.LiteralWrapper((SemWeb.Query.SparqlEngine.LiteralWrapper)(SemWeb.Query.SparqlEngine.LiteralWrapper*(SemWeb.Query.SparqlEngine.LiteralWrapper+(SemWeb.Query.SparqlEngine.LiteralWrapper,(SemWeb.Query.SparqlEngine.LiteralWrapper-(SemWeb.Query.SparqlEngine.LiteralWrapper.(SemWeb.Query.SparqlEngine.LiteralWrapper/(SemWeb.Query.SparqlEngine.LiteralWrapper0(SemWeb.Query.SparqlEngine.LiteralWrapper1(SemWeb.Query.SparqlEngine.LiteralWrapper2(SemWeb.Query.SparqlEngine.LiteralWrapper3(SemWeb.Query.SparqlEngine.LiteralWrapper4(SemWeb.Query.SparqlEngine.LiteralWrapper5(SemWeb.Query.SparqlEngine.LiteralWrapper6(SemWeb.Query.SparqlEngine.LiteralWrapper7(SemWeb.Query.SparqlEngine.LiteralWrapper8(SemWeb.Query.SparqlEngine.LiteralWrapper9(SemWeb.Query.SparqlEngine.LiteralWrapper:(SemWeb.Query.SparqlEngine.LiteralWrapper;(SemWeb.Query.SparqlEngine.LiteralWrapper<(SemWeb.Query.SparqlEngine.LiteralWrapper=(SemWeb.Query.SparqlEngine.LiteralWrapper>(SemWeb.Query.SparqlEngine.LiteralWrapper?(SemWeb.Query.SparqlEngine.LiteralWrapper@(SemWeb.Query.SparqlEngine.LiteralWrapperA(SemWeb.Query.SparqlEngine.LiteralWrapperB(SemWeb.Query.SparqlEngine.LiteralWrapperC(SemWeb.Query.SparqlEngine.LiteralWrapperD(SemWeb.Query.SparqlEngine.LiteralWrapperE(SemWeb.Query.SparqlEngine.LiteralWrapperF(SemWeb.Query.SparqlEngine.LiteralWrapperG(SemWeb.Query.SparqlEngine.LiteralWrapperH(SemWeb.Query.SparqlEngine.LiteralWrapperI(SemWeb.Query.SparqlEngine.LiteralWrapperJ(SemWeb.Query.SparqlEngine.LiteralWrapperK(SemWeb.Query.SparqlEngine.LiteralWrapperL(SemWeb.Query.SparqlEngine.LiteralWrapperM(SemWeb.Query.SparqlEngine.LiteralWrapperN(SemWeb.Query.SparqlEngine.LiteralWrapperO(SemWeb.Query.SparqlEngine.LiteralWrapperP(SemWeb.Query.SparqlEngine.LiteralWrapperQ(SemWeb.Query.SparqlEngine.LiteralWrapperR(SemWeb.Query.SparqlEngine.LiteralWrapperS(SemWeb.Query.SparqlEngine.LiteralWrapperT(SemWeb.Query.SparqlEngine.LiteralWrapperU(SemWeb.Query.SparqlEngine.LiteralWrapperV(SemWeb.Query.SparqlEngine.LiteralWrapperW(SemWeb.Query.SparqlEngine.LiteralWrapperX(SemWeb.Query.SparqlEngine.LiteralWrapperY(SemWeb.Query.SparqlEngine.LiteralWrapperZ(SemWeb.Query.SparqlEngine.LiteralWrapper[(SemWeb.Query.SparqlEngine.LiteralWrapper\(SemWeb.Query.SparqlEngine.LiteralWrapper](SemWeb.Query.SparqlEngine.LiteralWrapper^(SemWeb.Query.SparqlEngine.LiteralWrapper_(SemWeb.Query.SparqlEngine.LiteralWrapper`(SemWeb.Query.SparqlEngine.LiteralWrappera(SemWeb.Query.SparqlEngine.LiteralWrapperb(SemWeb.Query.SparqlEngine.LiteralWrapperc(SemWeb.Query.SparqlEngine.LiteralWrapperd(SemWeb.Query.SparqlEngine.LiteralWrappere(SemWeb.Query.SparqlEngine.LiteralWrapperf(SemWeb.Query.SparqlEngine.LiteralWrapperg(SemWeb.Query.SparqlEngine.LiteralWrapperh(SemWeb.Query.SparqlEngine.LiteralWrapperi(SemWeb.Query.SparqlEngine.LiteralWrapperj(SemWeb.Query.SparqlEngine.LiteralWrapperk(SemWeb.Query.SparqlEngine.LiteralWrapperl(SemWeb.Query.SparqlEngine.LiteralWrapperm(SemWeb.Query.SparqlEngine.LiteralWrappern(SemWeb.Query.SparqlEngine.LiteralWrappero(SemWeb.Query.SparqlEngine.LiteralWrapperp(SemWeb.Query.SparqlEngine.LiteralWrapperq(SemWeb.Query.SparqlEngine.LiteralWrapperr(SemWeb.Query.SparqlEngine.LiteralWrappers(SemWeb.Query.SparqlEngine.LiteralWrappert(SemWeb.Query.SparqlEngine.LiteralWrapperu(SemWeb.Query.SparqlEngine.LiteralWrapperv(SemWeb.Query.SparqlEngine.LiteralWrapperw(SemWeb.Query.SparqlEngine.LiteralWrapperx(SemWeb.Query.SparqlEngine.LiteralWrappery(SemWeb.Query.SparqlEngine.LiteralWrapperz(SemWeb.Query.SparqlEngine.LiteralWrapper{(SemWeb.Query.SparqlEngine.LiteralWrapper|(SemWeb.Query.SparqlEngine.LiteralWrapper}(SemWeb.Query.SparqlEngine.LiteralWrapper~(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper &SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction &SemWeb.Query.SparqlEngine.TestFunction $SemWeb.Query.SparqlEngine.LCFunction $SemWeb.Query.SparqlEngine.UCFunction &SemWeb.Query.SparqlEngine.TestFunction $SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction $SemWeb.Query.SparqlEngine.UCFunction!&SemWeb.Query.SparqlEngine.TestFunction"$SemWeb.Query.SparqlEngine.LCFunction#$SemWeb.Query.SparqlEngine.UCFunction$&SemWeb.Query.SparqlEngine.TestFunction%$SemWeb.Query.SparqlEngine.LCFunction&$SemWeb.Query.SparqlEngine.UCFunction'&SemWeb.Query.SparqlEngine.TestFunction($SemWeb.Query.SparqlEngine.LCFunction)$SemWeb.Query.SparqlEngine.UCFunction*&SemWeb.Query.SparqlEngine.TestFunction+$SemWeb.Query.SparqlEngine.LCFunction,$SemWeb.Query.SparqlEngine.UCFunction-&SemWeb.Query.SparqlEngine.TestFunction.$SemWeb.Query.SparqlEngine.LCFunction/$SemWeb.Query.SparqlEngine.UCFunction0&SemWeb.Query.SparqlEngine.TestFunction1$SemWeb.Query.SparqlEngine.LCFunction2$SemWeb.Query.SparqlEngine.UCFunction3&SemWeb.Query.SparqlEngine.TestFunction4$SemWeb.Query.SparqlEngine.LCFunction5$SemWeb.Query.SparqlEngine.UCFunction6&SemWeb.Query.SparqlEngine.TestFunction7$SemWeb.Query.SparqlEngine.LCFunction8$SemWeb.Query.SparqlEngine.UCFunction9&SemWeb.Query.SparqlEngine.TestFunction:$SemWeb.Query.SparqlEngine.LCFunction;$SemWeb.Query.SparqlEngine.UCFunction<&SemWeb.Query.SparqlEngine.TestFunction=$SemWeb.Query.SparqlEngine.LCFunction>$SemWeb.Query.SparqlEngine.UCFunction?&SemWeb.Query.SparqlEngine.TestFunction@$SemWeb.Query.SparqlEngine.LCFunctionA$SemWeb.Query.SparqlEngine.UCFunctionB&SemWeb.Query.SparqlEngine.TestFunctionC$SemWeb.Query.SparqlEngine.LCFunctionD$SemWeb.Query.SparqlEngine.UCFunctionE&SemWeb.Query.SparqlEngine.TestFunctionF$SemWeb.Query.SparqlEngine.LCFunctionG$SemWeb.Query.SparqlEngine.UCFunctionH&SemWeb.Query.SparqlEngine.TestFunctionI$SemWeb.Query.SparqlEngine.LCFunctionJ$SemWeb.Query.SparqlEngine.UCFunctionK&SemWeb.Query.SparqlEngine.TestFunctionL$SemWeb.Query.SparqlEngine.LCFunctionM$SemWeb.Query.SparqlEngine.UCFunctionN&SemWeb.Query.SparqlEngine.TestFunctionO$SemWeb.Query.SparqlEngine.LCFunctionP$SemWeb.Query.SparqlEngine.UCFunctionQ&SemWeb.Query.SparqlEngine.TestFunctionR$SemWeb.Query.SparqlEngine.LCFunctionS$SemWeb.Query.SparqlEngine.UCFunctionT&SemWeb.Query.SparqlEngine.TestFunctionU$SemWeb.Query.SparqlEngine.LCFunctionV$SemWeb.Query.SparqlEngine.UCFunctionW&SemWeb.Query.SparqlEngine.TestFunctionX$SemWeb.Query.SparqlEngine.LCFunctionY$SemWeb.Query.SparqlEngine.UCFunctionZ&SemWeb.Query.SparqlEngine.TestFunction[$SemWeb.Query.SparqlEngine.LCFunction\$SemWeb.Query.SparqlEngine.UCFunction]&SemWeb.Query.SparqlEngine.TestFunction^$SemWeb.Query.SparqlEngine.LCFunction_$SemWeb.Query.SparqlEngine.UCFunction`&SemWeb.Query.SparqlEngine.TestFunctiona$SemWeb.Query.SparqlEngine.LCFunctionb$SemWeb.Query.SparqlEngine.UCFunctionc&SemWeb.Query.SparqlEngine.TestFunctiond$SemWeb.Query.SparqlEngine.LCFunctione$SemWeb.Query.SparqlEngine.UCFunctionf&SemWeb.Query.SparqlEngine.TestFunctiong$SemWeb.Query.SparqlEngine.LCFunctionh$SemWeb.Query.SparqlEngine.UCFunctioni&SemWeb.Query.SparqlEngine.TestFunctionj$SemWeb.Query.SparqlEngine.LCFunctionk$SemWeb.Query.SparqlEngine.UCFunctionl&SemWeb.Query.SparqlEngine.TestFunctionm$SemWeb.Query.SparqlEngine.LCFunctionn$SemWeb.Query.SparqlEngine.UCFunctiono&SemWeb.Query.SparqlEngine.TestFunctionp$SemWeb.Query.SparqlEngine.LCFunctionq$SemWeb.Query.SparqlEngine.UCFunctionr&SemWeb.Query.SparqlEngine.TestFunctions$SemWeb.Query.SparqlEngine.LCFunctiont$SemWeb.Query.SparqlEngine.UCFunctionu&SemWeb.Query.SparqlEngine.TestFunctionv$SemWeb.Query.SparqlEngine.LCFunctionw$SemWeb.Query.SparqlEngine.UCFunctionx&SemWeb.Query.SparqlEngine.TestFunctiony$SemWeb.Query.SparqlEngine.LCFunctionz$SemWeb.Query.SparqlEngine.UCFunction{&SemWeb.Query.SparqlEngine.TestFunction|$SemWeb.Query.SparqlEngine.LCFunction}$SemWeb.Query.SparqlEngine.UCFunction~&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction $SemWeb.Query.SparqlEngine.LCFunction $SemWeb.Query.SparqlEngine.UCFunction &SemWeb.Query.SparqlEngine.TestFunction $SemWeb.Query.SparqlEngine.LCFunction $SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction &SemWeb.Query.SparqlEngine.TestFunction!$SemWeb.Query.SparqlEngine.LCFunction"$SemWeb.Query.SparqlEngine.UCFunction#&SemWeb.Query.SparqlEngine.TestFunction$$SemWeb.Query.SparqlEngine.LCFunction%$SemWeb.Query.SparqlEngine.UCFunction&&SemWeb.Query.SparqlEngine.TestFunction'$SemWeb.Query.SparqlEngine.LCFunction($SemWeb.Query.SparqlEngine.UCFunction)&SemWeb.Query.SparqlEngine.TestFunction*$SemWeb.Query.SparqlEngine.LCFunction+$SemWeb.Query.SparqlEngine.UCFunction,&SemWeb.Query.SparqlEngine.TestFunction-$SemWeb.Query.SparqlEngine.LCFunction.$SemWeb.Query.SparqlEngine.UCFunction/&SemWeb.Query.SparqlEngine.TestFunction0$SemWeb.Query.SparqlEngine.LCFunction1$SemWeb.Query.SparqlEngine.UCFunction2&SemWeb.Query.SparqlEngine.TestFunction3$SemWeb.Query.SparqlEngine.LCFunction4$SemWeb.Query.SparqlEngine.UCFunction5&SemWeb.Query.SparqlEngine.TestFunction6$SemWeb.Query.SparqlEngine.LCFunction7$SemWeb.Query.SparqlEngine.UCFunction8&SemWeb.Query.SparqlEngine.TestFunction9$SemWeb.Query.SparqlEngine.LCFunction:$SemWeb.Query.SparqlEngine.UCFunction;&SemWeb.Query.SparqlEngine.TestFunction<$SemWeb.Query.SparqlEngine.LCFunction=$SemWeb.Query.SparqlEngine.UCFunction>&SemWeb.Query.SparqlEngine.TestFunction?$SemWeb.Query.SparqlEngine.LCFunction@$SemWeb.Query.SparqlEngine.UCFunctionA&SemWeb.Query.SparqlEngine.TestFunctionB$SemWeb.Query.SparqlEngine.LCFunctionC$SemWeb.Query.SparqlEngine.UCFunctionD&SemWeb.Query.SparqlEngine.TestFunctionE$SemWeb.Query.SparqlEngine.LCFunctionF$SemWeb.Query.SparqlEngine.UCFunctionG&SemWeb.Query.SparqlEngine.TestFunctionH$SemWeb.Query.SparqlEngine.LCFunctionI$SemWeb.Query.SparqlEngine.UCFunctionJ&SemWeb.Query.SparqlEngine.TestFunctionK$SemWeb.Query.SparqlEngine.LCFunctionL$SemWeb.Query.SparqlEngine.UCFunctionM&SemWeb.Query.SparqlEngine.TestFunctionN$SemWeb.Query.SparqlEngine.LCFunctionO$SemWeb.Query.SparqlEngine.UCFunctionP&SemWeb.Query.SparqlEngine.TestFunctionQ$SemWeb.Query.SparqlEngine.LCFunctionR$SemWeb.Query.SparqlEngine.UCFunctionS&SemWeb.Query.SparqlEngine.TestFunctionT$SemWeb.Query.SparqlEngine.LCFunctionU$SemWeb.Query.SparqlEngine.UCFunctionV&SemWeb.Query.SparqlEngine.TestFunctionW$SemWeb.Query.SparqlEngine.LCFunctionX$SemWeb.Query.SparqlEngine.UCFunctionY&SemWeb.Query.SparqlEngine.TestFunctionZ$SemWeb.Query.SparqlEngine.LCFunction[$SemWeb.Query.SparqlEngine.UCFunction\&SemWeb.Query.SparqlEngine.TestFunction]$SemWeb.Query.SparqlEngine.LCFunction^$SemWeb.Query.SparqlEngine.UCFunction_&SemWeb.Query.SparqlEngine.TestFunction`$SemWeb.Query.SparqlEngine.LCFunctiona$SemWeb.Query.SparqlEngine.UCFunctionb&SemWeb.Query.SparqlEngine.TestFunctionc$SemWeb.Query.SparqlEngine.LCFunctiond$SemWeb.Query.SparqlEngine.UCFunctione&SemWeb.Query.SparqlEngine.TestFunctionf$SemWeb.Query.SparqlEngine.LCFunctiong$SemWeb.Query.SparqlEngine.UCFunctionh&SemWeb.Query.SparqlEngine.TestFunctioni$SemWeb.Query.SparqlEngine.LCFunctionj$SemWeb.Query.SparqlEngine.UCFunctionk&SemWeb.Query.SparqlEngine.TestFunctionl$SemWeb.Query.SparqlEngine.LCFunctionm$SemWeb.Query.SparqlEngine.UCFunctionn&SemWeb.Query.SparqlEngine.TestFunctiono$SemWeb.Query.SparqlEngine.LCFunctionp$SemWeb.Query.SparqlEngine.UCFunctionq&SemWeb.Query.SparqlEngine.TestFunctionr$SemWeb.Query.SparqlEngine.LCFunctions$SemWeb.Query.SparqlEngine.UCFunctiont&SemWeb.Query.SparqlEngine.TestFunctionu$SemWeb.Query.SparqlEngine.LCFunctionv$SemWeb.Query.SparqlEngine.UCFunctionw&SemWeb.Query.SparqlEngine.TestFunctionx$SemWeb.Query.SparqlEngine.LCFunctiony$SemWeb.Query.SparqlEngine.UCFunctionz&SemWeb.Query.SparqlEngine.TestFunction{$SemWeb.Query.SparqlEngine.LCFunction|$SemWeb.Query.SparqlEngine.UCFunction}&SemWeb.Query.SparqlEngine.TestFunction~$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction3SemWeb.Query.SparqlEngine.BNodeWrapper.TestFunction1SemWeb.Query.SparqlEngine.BNodeWrapper.LCFunction1SemWeb.Query.SparqlEngine.BNodeWrapper.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction3SemWeb.Query.SparqlEngine.BNodeWrapper.TestFunction1SemWeb.Query.SparqlEngine.BNodeWrapper.LCFunction1SemWeb.Query.SparqlEngine.BNodeWrapper.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction $SemWeb.Query.SparqlEngine.UCFunction &SemWeb.Query.SparqlEngine.TestFunction $SemWeb.Query.SparqlEngine.LCFunction $SemWeb.Query.SparqlEngine.UCFunction &SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction $SemWeb.Query.SparqlEngine.LCFunction!$SemWeb.Query.SparqlEngine.UCFunction"&SemWeb.Query.SparqlEngine.TestFunction#$SemWeb.Query.SparqlEngine.LCFunction$$SemWeb.Query.SparqlEngine.UCFunction%&SemWeb.Query.SparqlEngine.TestFunction&$SemWeb.Query.SparqlEngine.LCFunction'$SemWeb.Query.SparqlEngine.UCFunction(&SemWeb.Query.SparqlEngine.TestFunction)$SemWeb.Query.SparqlEngine.LCFunction*$SemWeb.Query.SparqlEngine.UCFunction+&SemWeb.Query.SparqlEngine.TestFunction,$SemWeb.Query.SparqlEngine.LCFunction-$SemWeb.Query.SparqlEngine.UCFunction.&SemWeb.Query.SparqlEngine.TestFunction/$SemWeb.Query.SparqlEngine.LCFunction0$SemWeb.Query.SparqlEngine.UCFunction1&SemWeb.Query.SparqlEngine.TestFunction2$SemWeb.Query.SparqlEngine.LCFunction3$SemWeb.Query.SparqlEngine.UCFunction4&SemWeb.Query.SparqlEngine.TestFunction5$SemWeb.Query.SparqlEngine.LCFunction6$SemWeb.Query.SparqlEngine.UCFunction7&SemWeb.Query.SparqlEngine.TestFunction8$SemWeb.Query.SparqlEngine.LCFunction9$SemWeb.Query.SparqlEngine.UCFunction:&SemWeb.Query.SparqlEngine.TestFunction;$SemWeb.Query.SparqlEngine.LCFunction<$SemWeb.Query.SparqlEngine.UCFunction=&SemWeb.Query.SparqlEngine.TestFunction>$SemWeb.Query.SparqlEngine.LCFunction?$SemWeb.Query.SparqlEngine.UCFunction@&SemWeb.Query.SparqlEngine.TestFunctionA$SemWeb.Query.SparqlEngine.LCFunctionB$SemWeb.Query.SparqlEngine.UCFunctionC&SemWeb.Query.SparqlEngine.TestFunctionD$SemWeb.Query.SparqlEngine.LCFunctionE$SemWeb.Query.SparqlEngine.UCFunctionF&SemWeb.Query.SparqlEngine.TestFunctionG$SemWeb.Query.SparqlEngine.LCFunctionH$SemWeb.Query.SparqlEngine.UCFunctionI&SemWeb.Query.SparqlEngine.TestFunctionJ$SemWeb.Query.SparqlEngine.LCFunctionK$SemWeb.Query.SparqlEngine.UCFunctionL&SemWeb.Query.SparqlEngine.TestFunctionM$SemWeb.Query.SparqlEngine.LCFunctionN$SemWeb.Query.SparqlEngine.UCFunctionO&SemWeb.Query.SparqlEngine.TestFunctionP$SemWeb.Query.SparqlEngine.LCFunctionQ$SemWeb.Query.SparqlEngine.UCFunctionR&SemWeb.Query.SparqlEngine.TestFunctionS$SemWeb.Query.SparqlEngine.LCFunctionT$SemWeb.Query.SparqlEngine.UCFunctionU&SemWeb.Query.SparqlEngine.TestFunctionV$SemWeb.Query.SparqlEngine.LCFunctionW$SemWeb.Query.SparqlEngine.UCFunctionX&SemWeb.Query.SparqlEngine.TestFunctionY$SemWeb.Query.SparqlEngine.LCFunctionZ$SemWeb.Query.SparqlEngine.UCFunction[&SemWeb.Query.SparqlEngine.TestFunction\$SemWeb.Query.SparqlEngine.LCFunction]$SemWeb.Query.SparqlEngine.UCFunction^&SemWeb.Query.SparqlEngine.TestFunction_$SemWeb.Query.SparqlEngine.LCFunction`$SemWeb.Query.SparqlEngine.UCFunctiona&SemWeb.Query.SparqlEngine.TestFunctionb$SemWeb.Query.SparqlEngine.LCFunctionc$SemWeb.Query.SparqlEngine.UCFunctiond&SemWeb.Query.SparqlEngine.TestFunctione$SemWeb.Query.SparqlEngine.LCFunctionf$SemWeb.Query.SparqlEngine.UCFunctiong&SemWeb.Query.SparqlEngine.TestFunctionh$SemWeb.Query.SparqlEngine.LCFunctioni$SemWeb.Query.SparqlEngine.UCFunctionj&SemWeb.Query.SparqlEngine.TestFunctionk$SemWeb.Query.SparqlEngine.LCFunctionl$SemWeb.Query.SparqlEngine.UCFunctionm&SemWeb.Query.SparqlEngine.TestFunctionn$SemWeb.Query.SparqlEngine.LCFunctiono$SemWeb.Query.SparqlEngine.UCFunctionp&SemWeb.Query.SparqlEngine.TestFunctionq$SemWeb.Query.SparqlEngine.LCFunctionr$SemWeb.Query.SparqlEngine.UCFunctions&SemWeb.Query.SparqlEngine.TestFunctiont$SemWeb.Query.SparqlEngine.LCFunctionu$SemWeb.Query.SparqlEngine.UCFunctionv&SemWeb.Query.SparqlEngine.TestFunctionw$SemWeb.Query.SparqlEngine.LCFunctionx$SemWeb.Query.SparqlEngine.UCFunctiony&SemWeb.Query.SparqlEngine.TestFunctionz$SemWeb.Query.SparqlEngine.LCFunction{$SemWeb.Query.SparqlEngine.UCFunction|&SemWeb.Query.SparqlEngine.TestFunction}$SemWeb.Query.SparqlEngine.LCFunction~$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction &SemWeb.Query.SparqlEngine.TestFunction $SemWeb.Query.SparqlEngine.LCFunction $SemWeb.Query.SparqlEngine.UCFunction &SemWeb.Query.SparqlEngine.TestFunction $SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction $SemWeb.Query.SparqlEngine.UCFunction!&SemWeb.Query.SparqlEngine.TestFunction"$SemWeb.Query.SparqlEngine.LCFunction#$SemWeb.Query.SparqlEngine.UCFunction$&SemWeb.Query.SparqlEngine.TestFunction%$SemWeb.Query.SparqlEngine.LCFunction&$SemWeb.Query.SparqlEngine.UCFunction'&SemWeb.Query.SparqlEngine.TestFunction($SemWeb.Query.SparqlEngine.LCFunction)$SemWeb.Query.SparqlEngine.UCFunction*&SemWeb.Query.SparqlEngine.TestFunction+$SemWeb.Query.SparqlEngine.LCFunction,$SemWeb.Query.SparqlEngine.UCFunction-&SemWeb.Query.SparqlEngine.TestFunction.$SemWeb.Query.SparqlEngine.LCFunction/$SemWeb.Query.SparqlEngine.UCFunction0&SemWeb.Query.SparqlEngine.TestFunction1$SemWeb.Query.SparqlEngine.LCFunction2$SemWeb.Query.SparqlEngine.UCFunction3&SemWeb.Query.SparqlEngine.TestFunction4$SemWeb.Query.SparqlEngine.LCFunction5$SemWeb.Query.SparqlEngine.UCFunction6&SemWeb.Query.SparqlEngine.TestFunction7$SemWeb.Query.SparqlEngine.LCFunction8$SemWeb.Query.SparqlEngine.UCFunction9&SemWeb.Query.SparqlEngine.TestFunction:$SemWeb.Query.SparqlEngine.LCFunction;$SemWeb.Query.SparqlEngine.UCFunction<&SemWeb.Query.SparqlEngine.TestFunction=$SemWeb.Query.SparqlEngine.LCFunction>$SemWeb.Query.SparqlEngine.UCFunction?&SemWeb.Query.SparqlEngine.TestFunction@$SemWeb.Query.SparqlEngine.LCFunctionA$SemWeb.Query.SparqlEngine.UCFunctionB&SemWeb.Query.SparqlEngine.TestFunctionC$SemWeb.Query.SparqlEngine.LCFunctionD$SemWeb.Query.SparqlEngine.UCFunctionE&SemWeb.Query.SparqlEngine.TestFunctionF$SemWeb.Query.SparqlEngine.LCFunctionG$SemWeb.Query.SparqlEngine.UCFunctionH&SemWeb.Query.SparqlEngine.TestFunctionI$SemWeb.Query.SparqlEngine.LCFunctionJ$SemWeb.Query.SparqlEngine.UCFunctionK&SemWeb.Query.SparqlEngine.TestFunctionL$SemWeb.Query.SparqlEngine.LCFunctionM$SemWeb.Query.SparqlEngine.UCFunctionN&SemWeb.Query.SparqlEngine.TestFunctionO$SemWeb.Query.SparqlEngine.LCFunctionP$SemWeb.Query.SparqlEngine.UCFunctionQ&SemWeb.Query.SparqlEngine.TestFunctionR$SemWeb.Query.SparqlEngine.LCFunctionS$SemWeb.Query.SparqlEngine.UCFunctionT&SemWeb.Query.SparqlEngine.TestFunctionU$SemWeb.Query.SparqlEngine.LCFunctionV$SemWeb.Query.SparqlEngine.UCFunctionW&SemWeb.Query.SparqlEngine.TestFunctionX$SemWeb.Query.SparqlEngine.LCFunctionY$SemWeb.Query.SparqlEngine.UCFunctionZ&SemWeb.Query.SparqlEngine.TestFunction[$SemWeb.Query.SparqlEngine.LCFunction\$SemWeb.Query.SparqlEngine.UCFunction]&SemWeb.Query.SparqlEngine.TestFunction^$SemWeb.Query.SparqlEngine.LCFunction_$SemWeb.Query.SparqlEngine.UCFunction`&SemWeb.Query.SparqlEngine.TestFunctiona$SemWeb.Query.SparqlEngine.LCFunctionb$SemWeb.Query.SparqlEngine.UCFunctionc&SemWeb.Query.SparqlEngine.TestFunctiond$SemWeb.Query.SparqlEngine.LCFunctione$SemWeb.Query.SparqlEngine.UCFunctionf&SemWeb.Query.SparqlEngine.TestFunctiong$SemWeb.Query.SparqlEngine.LCFunctionh$SemWeb.Query.SparqlEngine.UCFunctioni&SemWeb.Query.SparqlEngine.TestFunctionj$SemWeb.Query.SparqlEngine.LCFunctionk$SemWeb.Query.SparqlEngine.UCFunctionl&SemWeb.Query.SparqlEngine.TestFunctionm$SemWeb.Query.SparqlEngine.LCFunctionn$SemWeb.Query.SparqlEngine.UCFunctiono&SemWeb.Query.SparqlEngine.TestFunctionp$SemWeb.Query.SparqlEngine.LCFunctionq$SemWeb.Query.SparqlEngine.UCFunctionr&SemWeb.Query.SparqlEngine.TestFunctions$SemWeb.Query.SparqlEngine.LCFunctiont$SemWeb.Query.SparqlEngine.UCFunctionu&SemWeb.Query.SparqlEngine.TestFunctionv$SemWeb.Query.SparqlEngine.LCFunctionw$SemWeb.Query.SparqlEngine.UCFunctionx&SemWeb.Query.SparqlEngine.TestFunctiony$SemWeb.Query.SparqlEngine.LCFunctionz$SemWeb.Query.SparqlEngine.UCFunction{&SemWeb.Query.SparqlEngine.TestFunction|$SemWeb.Query.SparqlEngine.LCFunction}$SemWeb.Query.SparqlEngine.UCFunction~&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction&SemWeb.Query.SparqlEngine.TestFunction$SemWeb.Query.SparqlEngine.LCFunction$SemWeb.Query.SparqlEngine.UCFunction*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper #SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType #SemWeb.Query.SparqlEngine.QueryType #SemWeb.Query.SparqlEngine.QueryType #SemWeb.Query.SparqlEngine.QueryType #SemWeb.Query.SparqlEngine.QueryType #SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType #SemWeb.Query.SparqlEngine.QueryType!#SemWeb.Query.SparqlEngine.QueryType"#SemWeb.Query.SparqlEngine.QueryType##SemWeb.Query.SparqlEngine.QueryType$#SemWeb.Query.SparqlEngine.QueryType%#SemWeb.Query.SparqlEngine.QueryType&#SemWeb.Query.SparqlEngine.QueryType'#SemWeb.Query.SparqlEngine.QueryType(#SemWeb.Query.SparqlEngine.QueryType)#SemWeb.Query.SparqlEngine.QueryType*#SemWeb.Query.SparqlEngine.QueryType+#SemWeb.Query.SparqlEngine.QueryType,#SemWeb.Query.SparqlEngine.QueryType-#SemWeb.Query.SparqlEngine.QueryType.#SemWeb.Query.SparqlEngine.QueryType/#SemWeb.Query.SparqlEngine.QueryType0#SemWeb.Query.SparqlEngine.QueryType1#SemWeb.Query.SparqlEngine.QueryType2#SemWeb.Query.SparqlEngine.QueryType3#SemWeb.Query.SparqlEngine.QueryType4#SemWeb.Query.SparqlEngine.QueryType5#SemWeb.Query.SparqlEngine.QueryType6#SemWeb.Query.SparqlEngine.QueryType7#SemWeb.Query.SparqlEngine.QueryType8#SemWeb.Query.SparqlEngine.QueryType9#SemWeb.Query.SparqlEngine.QueryType:#SemWeb.Query.SparqlEngine.QueryType;#SemWeb.Query.SparqlEngine.QueryType<#SemWeb.Query.SparqlEngine.QueryType=#SemWeb.Query.SparqlEngine.QueryType>#SemWeb.Query.SparqlEngine.QueryType?#SemWeb.Query.SparqlEngine.QueryType@#SemWeb.Query.SparqlEngine.QueryTypeA#SemWeb.Query.SparqlEngine.QueryTypeB#SemWeb.Query.SparqlEngine.QueryTypeC#SemWeb.Query.SparqlEngine.QueryTypeD#SemWeb.Query.SparqlEngine.QueryTypeE#SemWeb.Query.SparqlEngine.QueryTypeF#SemWeb.Query.SparqlEngine.QueryTypeG#SemWeb.Query.SparqlEngine.QueryTypeH#SemWeb.Query.SparqlEngine.QueryTypeI#SemWeb.Query.SparqlEngine.QueryTypeJ#SemWeb.Query.SparqlEngine.QueryTypeK#SemWeb.Query.SparqlEngine.QueryTypeL#SemWeb.Query.SparqlEngine.QueryTypeM#SemWeb.Query.SparqlEngine.QueryTypeN#SemWeb.Query.SparqlEngine.QueryTypeO#SemWeb.Query.SparqlEngine.QueryTypeP#SemWeb.Query.SparqlEngine.QueryTypeQ#SemWeb.Query.SparqlEngine.QueryTypeR#SemWeb.Query.SparqlEngine.QueryTypeS#SemWeb.Query.SparqlEngine.QueryTypeT#SemWeb.Query.SparqlEngine.QueryTypeU#SemWeb.Query.SparqlEngine.QueryTypeV#SemWeb.Query.SparqlEngine.QueryTypeW#SemWeb.Query.SparqlEngine.QueryTypeX#SemWeb.Query.SparqlEngine.QueryTypeY#SemWeb.Query.SparqlEngine.QueryTypeZ#SemWeb.Query.SparqlEngine.QueryType[#SemWeb.Query.SparqlEngine.QueryType\#SemWeb.Query.SparqlEngine.QueryType]#SemWeb.Query.SparqlEngine.QueryType^#SemWeb.Query.SparqlEngine.QueryType_#SemWeb.Query.SparqlEngine.QueryType`#SemWeb.Query.SparqlEngine.QueryTypea#SemWeb.Query.SparqlEngine.QueryTypeb#SemWeb.Query.SparqlEngine.QueryTypec#SemWeb.Query.SparqlEngine.QueryTyped#SemWeb.Query.SparqlEngine.QueryTypee#SemWeb.Query.SparqlEngine.QueryTypef#SemWeb.Query.SparqlEngine.QueryTypeg#SemWeb.Query.SparqlEngine.QueryTypeh#SemWeb.Query.SparqlEngine.QueryTypei#SemWeb.Query.SparqlEngine.QueryTypej#SemWeb.Query.SparqlEngine.QueryTypek#SemWeb.Query.SparqlEngine.QueryTypel#SemWeb.Query.SparqlEngine.QueryTypem#SemWeb.Query.SparqlEngine.QueryTypen#SemWeb.Query.SparqlEngine.QueryTypeo#SemWeb.Query.SparqlEngine.QueryTypep#SemWeb.Query.SparqlEngine.QueryTypeq#SemWeb.Query.SparqlEngine.QueryTyper#SemWeb.Query.SparqlEngine.QueryTypes#SemWeb.Query.SparqlEngine.QueryTypet#SemWeb.Query.SparqlEngine.QueryTypeu#SemWeb.Query.SparqlEngine.QueryTypev#SemWeb.Query.SparqlEngine.QueryTypew#SemWeb.Query.SparqlEngine.QueryTypex#SemWeb.Query.SparqlEngine.QueryTypey#SemWeb.Query.SparqlEngine.QueryTypez#SemWeb.Query.SparqlEngine.QueryType{#SemWeb.Query.SparqlEngine.QueryType|#SemWeb.Query.SparqlEngine.QueryType}#SemWeb.Query.SparqlEngine.QueryType~#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType #SemWeb.Query.SparqlEngine.QueryType #SemWeb.Query.SparqlEngine.QueryType #SemWeb.Query.SparqlEngine.QueryType #SemWeb.Query.SparqlEngine.QueryType #SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType#SemWeb.Query.SparqlEngine.QueryType #SemWeb.Query.SparqlEngine.QueryType!#SemWeb.Query.SparqlEngine.QueryType"#SemWeb.Query.SparqlEngine.QueryType##SemWeb.Query.SparqlEngine.QueryType$#SemWeb.Query.SparqlEngine.QueryType%#SemWeb.Query.SparqlEngine.QueryType&#SemWeb.Query.SparqlEngine.QueryType'#SemWeb.Query.SparqlEngine.QueryType(#SemWeb.Query.SparqlEngine.QueryType)#SemWeb.Query.SparqlEngine.QueryType*#SemWeb.Query.SparqlEngine.QueryType+#SemWeb.Query.SparqlEngine.QueryType,#SemWeb.Query.SparqlEngine.QueryType-#SemWeb.Query.SparqlEngine.QueryType.#SemWeb.Query.SparqlEngine.QueryType/#SemWeb.Query.SparqlEngine.QueryType0#SemWeb.Query.SparqlEngine.QueryType1#SemWeb.Query.SparqlEngine.QueryType2#SemWeb.Query.SparqlEngine.QueryType3#SemWeb.Query.SparqlEngine.QueryType4#SemWeb.Query.SparqlEngine.QueryType5#SemWeb.Query.SparqlEngine.QueryType6#SemWeb.Query.SparqlEngine.QueryType7#SemWeb.Query.SparqlEngine.QueryType8#SemWeb.Query.SparqlEngine.QueryType9#SemWeb.Query.SparqlEngine.QueryType:#SemWeb.Query.SparqlEngine.QueryType;#SemWeb.Query.SparqlEngine.QueryType<#SemWeb.Query.SparqlEngine.QueryType=#SemWeb.Query.SparqlEngine.QueryType>#SemWeb.Query.SparqlEngine.QueryType?#SemWeb.Query.SparqlEngine.QueryType@#SemWeb.Query.SparqlEngine.QueryTypeA#SemWeb.Query.SparqlEngine.QueryTypeB#SemWeb.Query.SparqlEngine.QueryTypeC#SemWeb.Query.SparqlEngine.QueryTypeD#SemWeb.Query.SparqlEngine.QueryTypeE#SemWeb.Query.SparqlEngine.QueryTypeF#SemWeb.Query.SparqlEngine.QueryTypeG#SemWeb.Query.SparqlEngine.QueryTypeH#SemWeb.Query.SparqlEngine.QueryTypeI#SemWeb.Query.SparqlEngine.QueryTypeJ#SemWeb.Query.SparqlEngine.QueryTypeK#SemWeb.Query.SparqlEngine.QueryTypeL#SemWeb.Query.SparqlEngine.QueryTypeM#SemWeb.Query.SparqlEngine.QueryTypeN#SemWeb.Query.SparqlEngine.QueryTypeO#SemWeb.Query.SparqlEngine.QueryTypeP#SemWeb.Query.SparqlEngine.QueryTypeQ#SemWeb.Query.SparqlEngine.QueryTypeR#SemWeb.Query.SparqlEngine.QueryTypeS#SemWeb.Query.SparqlEngine.QueryTypeT#SemWeb.Query.SparqlEngine.QueryTypeU#SemWeb.Query.SparqlEngine.QueryTypeV#SemWeb.Query.SparqlEngine.QueryTypeW#SemWeb.Query.SparqlEngine.QueryTypeX#SemWeb.Query.SparqlEngine.QueryTypeY#SemWeb.Query.SparqlEngine.QueryTypeZ#SemWeb.Query.SparqlEngine.QueryType[#SemWeb.Query.SparqlEngine.QueryType\#SemWeb.Query.SparqlEngine.QueryType]#SemWeb.Query.SparqlEngine.QueryType^#SemWeb.Query.SparqlEngine.QueryType_#SemWeb.Query.SparqlEngine.QueryType`#SemWeb.Query.SparqlEngine.QueryTypea#SemWeb.Query.SparqlEngine.QueryTypeb#SemWeb.Query.SparqlEngine.QueryTypec#SemWeb.Query.SparqlEngine.QueryTyped#SemWeb.Query.SparqlEngine.QueryTypee#SemWeb.Query.SparqlEngine.QueryTypef#SemWeb.Query.SparqlEngine.QueryTypeg#SemWeb.Query.SparqlEngine.QueryTypeh#SemWeb.Query.SparqlEngine.QueryTypei#SemWeb.Query.SparqlEngine.QueryTypej#SemWeb.Query.SparqlEngine.QueryTypek#SemWeb.Query.SparqlEngine.QueryTypel#SemWeb.Query.SparqlEngine.QueryTypem#SemWeb.Query.SparqlEngine.QueryTypen#SemWeb.Query.SparqlEngine.QueryTypeo#SemWeb.Query.SparqlEngine.QueryTypep#SemWeb.Query.SparqlEngine.QueryTypeq#SemWeb.Query.SparqlEngine.QueryTyper#SemWeb.Query.SparqlEngine.QueryTypes#SemWeb.Query.SparqlEngine.QueryTypet#SemWeb.Query.SparqlEngine.QueryTypeu#SemWeb.Query.SparqlEngine.QueryType dv/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt w*SemWeb.Query.SparqlEngine.RdfSourceWrapperx*SemWeb.Query.SparqlEngine.RdfSourceWrappery*SemWeb.Query.SparqlEngine.RdfSourceWrapperz*SemWeb.Query.SparqlEngine.RdfSourceWrapper{*SemWeb.Query.SparqlEngine.RdfSourceWrapper|*SemWeb.Query.SparqlEngine.RdfSourceWrapper}*SemWeb.Query.SparqlEngine.RdfSourceWrapper~*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper *SemWeb.Query.SparqlEngine.RdfSourceWrapper *SemWeb.Query.SparqlEngine.RdfSourceWrapper *SemWeb.Query.SparqlEngine.RdfSourceWrapper *SemWeb.Query.SparqlEngine.RdfSourceWrapper *SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper *SemWeb.Query.SparqlEngine.RdfSourceWrapper!*SemWeb.Query.SparqlEngine.RdfSourceWrapper"*SemWeb.Query.SparqlEngine.RdfSourceWrapper#*SemWeb.Query.SparqlEngine.RdfSourceWrapper$*SemWeb.Query.SparqlEngine.RdfSourceWrapper%*SemWeb.Query.SparqlEngine.RdfSourceWrapper&*SemWeb.Query.SparqlEngine.RdfSourceWrapper'*SemWeb.Query.SparqlEngine.RdfSourceWrapper(*SemWeb.Query.SparqlEngine.RdfSourceWrapper)*SemWeb.Query.SparqlEngine.RdfSourceWrapper**SemWeb.Query.SparqlEngine.RdfSourceWrapper+*SemWeb.Query.SparqlEngine.RdfSourceWrapper,*SemWeb.Query.SparqlEngine.RdfSourceWrapper-*SemWeb.Query.SparqlEngine.RdfSourceWrapper.*SemWeb.Query.SparqlEngine.RdfSourceWrapper/*SemWeb.Query.SparqlEngine.RdfSourceWrapper0*SemWeb.Query.SparqlEngine.RdfSourceWrapper1*SemWeb.Query.SparqlEngine.RdfSourceWrapper2*SemWeb.Query.SparqlEngine.RdfSourceWrapper3*SemWeb.Query.SparqlEngine.RdfSourceWrapper4*SemWeb.Query.SparqlEngine.RdfSourceWrapper5*SemWeb.Query.SparqlEngine.RdfSourceWrapper6*SemWeb.Query.SparqlEngine.RdfSourceWrapper7*SemWeb.Query.SparqlEngine.RdfSourceWrapper8*SemWeb.Query.SparqlEngine.RdfSourceWrapper9*SemWeb.Query.SparqlEngine.RdfSourceWrapper:*SemWeb.Query.SparqlEngine.RdfSourceWrapper;*SemWeb.Query.SparqlEngine.RdfSourceWrapper<*SemWeb.Query.SparqlEngine.RdfSourceWrapper=*SemWeb.Query.SparqlEngine.RdfSourceWrapper>*SemWeb.Query.SparqlEngine.RdfSourceWrapper?*SemWeb.Query.SparqlEngine.RdfSourceWrapper@*SemWeb.Query.SparqlEngine.RdfSourceWrapperA*SemWeb.Query.SparqlEngine.RdfSourceWrapperB*SemWeb.Query.SparqlEngine.RdfSourceWrapperC*SemWeb.Query.SparqlEngine.RdfSourceWrapperD*SemWeb.Query.SparqlEngine.RdfSourceWrapperE*SemWeb.Query.SparqlEngine.RdfSourceWrapperF*SemWeb.Query.SparqlEngine.RdfSourceWrapperG*SemWeb.Query.SparqlEngine.RdfSourceWrapperH*SemWeb.Query.SparqlEngine.RdfSourceWrapperI*SemWeb.Query.SparqlEngine.RdfSourceWrapperJ*SemWeb.Query.SparqlEngine.RdfSourceWrapperK*SemWeb.Query.SparqlEngine.RdfSourceWrapperL*SemWeb.Query.SparqlEngine.RdfSourceWrapperM*SemWeb.Query.SparqlEngine.RdfSourceWrapperN*SemWeb.Query.SparqlEngine.RdfSourceWrapperO*SemWeb.Query.SparqlEngine.RdfSourceWrapperP*SemWeb.Query.SparqlEngine.RdfSourceWrapperQ*SemWeb.Query.SparqlEngine.RdfSourceWrapperR*SemWeb.Query.SparqlEngine.RdfSourceWrapperS*SemWeb.Query.SparqlEngine.RdfSourceWrapperT*SemWeb.Query.SparqlEngine.RdfSourceWrapperU*SemWeb.Query.SparqlEngine.RdfSourceWrapperV*SemWeb.Query.SparqlEngine.RdfSourceWrapperW*SemWeb.Query.SparqlEngine.RdfSourceWrapperX*SemWeb.Query.SparqlEngine.RdfSourceWrapperY*SemWeb.Query.SparqlEngine.RdfSourceWrapperZ*SemWeb.Query.SparqlEngine.RdfSourceWrapper[*SemWeb.Query.SparqlEngine.RdfSourceWrapper\*SemWeb.Query.SparqlEngine.RdfSourceWrapper]*SemWeb.Query.SparqlEngine.RdfSourceWrapper^*SemWeb.Query.SparqlEngine.RdfSourceWrapper_*SemWeb.Query.SparqlEngine.RdfSourceWrapper`*SemWeb.Query.SparqlEngine.RdfSourceWrappera*SemWeb.Query.SparqlEngine.RdfSourceWrapperb*SemWeb.Query.SparqlEngine.RdfSourceWrapperc*SemWeb.Query.SparqlEngine.RdfSourceWrapperd*SemWeb.Query.SparqlEngine.RdfSourceWrappere*SemWeb.Query.SparqlEngine.RdfSourceWrapperf*SemWeb.Query.SparqlEngine.RdfSourceWrapperg*SemWeb.Query.SparqlEngine.RdfSourceWrapperh*SemWeb.Query.SparqlEngine.RdfSourceWrapperi*SemWeb.Query.SparqlEngine.RdfSourceWrapperj*SemWeb.Query.SparqlEngine.RdfSourceWrapperk*SemWeb.Query.SparqlEngine.RdfSourceWrapperl*SemWeb.Query.SparqlEngine.RdfSourceWrapperm*SemWeb.Query.SparqlEngine.RdfSourceWrappern*SemWeb.Query.SparqlEngine.RdfSourceWrappero*SemWeb.Query.SparqlEngine.RdfSourceWrapperp*SemWeb.Query.SparqlEngine.RdfSourceWrapperq*SemWeb.Query.SparqlEngine.RdfSourceWrapperr*SemWeb.Query.SparqlEngine.RdfSourceWrappers*SemWeb.Query.SparqlEngine.RdfSourceWrappert*SemWeb.Query.SparqlEngine.RdfSourceWrapperu*SemWeb.Query.SparqlEngine.RdfSourceWrapperv*SemWeb.Query.SparqlEngine.RdfSourceWrapperw*SemWeb.Query.SparqlEngine.RdfSourceWrapperx*SemWeb.Query.SparqlEngine.RdfSourceWrappery*SemWeb.Query.SparqlEngine.RdfSourceWrapperz*SemWeb.Query.SparqlEngine.RdfSourceWrapper{*SemWeb.Query.SparqlEngine.RdfSourceWrapper|*SemWeb.Query.SparqlEngine.RdfSourceWrapper}*SemWeb.Query.SparqlEngine.RdfSourceWrapper~*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper *SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper *SemWeb.Query.SparqlEngine.RdfSourceWrapper *SemWeb.Query.SparqlEngine.RdfSourceWrapper *SemWeb.Query.SparqlEngine.RdfSourceWrapper *SemWeb.Query.SparqlEngine.RdfSourceWrapper *SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper *SemWeb.Query.SparqlEngine.RdfSourceWrapper!*SemWeb.Query.SparqlEngine.RdfSourceWrapper"*SemWeb.Query.SparqlEngine.RdfSourceWrapper#*SemWeb.Query.SparqlEngine.RdfSourceWrapper$*SemWeb.Query.SparqlEngine.RdfSourceWrapper%*SemWeb.Query.SparqlEngine.RdfSourceWrapper&*SemWeb.Query.SparqlEngine.RdfSourceWrapper'*SemWeb.Query.SparqlEngine.RdfSourceWrapper(*SemWeb.Query.SparqlEngine.RdfSourceWrapper)*SemWeb.Query.SparqlEngine.RdfSourceWrapper**SemWeb.Query.SparqlEngine.RdfSourceWrapper+*SemWeb.Query.SparqlEngine.RdfSourceWrapper,*SemWeb.Query.SparqlEngine.RdfSourceWrapper-*SemWeb.Query.SparqlEngine.RdfSourceWrapper.*SemWeb.Query.SparqlEngine.RdfSourceWrapper/*SemWeb.Query.SparqlEngine.RdfSourceWrapper0*SemWeb.Query.SparqlEngine.RdfSourceWrapper1*SemWeb.Query.SparqlEngine.RdfSourceWrapper2*SemWeb.Query.SparqlEngine.RdfSourceWrapper3*SemWeb.Query.SparqlEngine.RdfSourceWrapper4*SemWeb.Query.SparqlEngine.RdfSourceWrapper5*SemWeb.Query.SparqlEngine.RdfSourceWrapper6*SemWeb.Query.SparqlEngine.RdfSourceWrapper7*SemWeb.Query.SparqlEngine.RdfSourceWrapper8*SemWeb.Query.SparqlEngine.RdfSourceWrapper9*SemWeb.Query.SparqlEngine.RdfSourceWrapper:*SemWeb.Query.SparqlEngine.RdfSourceWrapper;*SemWeb.Query.SparqlEngine.RdfSourceWrapper<*SemWeb.Query.SparqlEngine.RdfSourceWrapper=*SemWeb.Query.SparqlEngine.RdfSourceWrapper>*SemWeb.Query.SparqlEngine.RdfSourceWrapper?*SemWeb.Query.SparqlEngine.RdfSourceWrapper@*SemWeb.Query.SparqlEngine.RdfSourceWrapperA*SemWeb.Query.SparqlEngine.RdfSourceWrapperB*SemWeb.Query.SparqlEngine.RdfSourceWrapperC*SemWeb.Query.SparqlEngine.RdfSourceWrapperD*SemWeb.Query.SparqlEngine.RdfSourceWrapperE*SemWeb.Query.SparqlEngine.RdfSourceWrapperF*SemWeb.Query.SparqlEngine.RdfSourceWrapperG*SemWeb.Query.SparqlEngine.RdfSourceWrapperH*SemWeb.Query.SparqlEngine.RdfSourceWrapperI*SemWeb.Query.SparqlEngine.RdfSourceWrapperJ*SemWeb.Query.SparqlEngine.RdfSourceWrapperK*SemWeb.Query.SparqlEngine.RdfSourceWrapperL*SemWeb.Query.SparqlEngine.RdfSourceWrapperM*SemWeb.Query.SparqlEngine.RdfSourceWrapperN*SemWeb.Query.SparqlEngine.RdfSourceWrapperO*SemWeb.Query.SparqlEngine.RdfSourceWrapperP*SemWeb.Query.SparqlEngine.RdfSourceWrapperQ*SemWeb.Query.SparqlEngine.RdfSourceWrapperR*SemWeb.Query.SparqlEngine.RdfSourceWrapperS*SemWeb.Query.SparqlEngine.RdfSourceWrapperT*SemWeb.Query.SparqlEngine.RdfSourceWrapperU*SemWeb.Query.SparqlEngine.RdfSourceWrapperV*SemWeb.Query.SparqlEngine.RdfSourceWrapperW*SemWeb.Query.SparqlEngine.RdfSourceWrapperX*SemWeb.Query.SparqlEngine.RdfSourceWrapperY*SemWeb.Query.SparqlEngine.RdfSourceWrapperZ*SemWeb.Query.SparqlEngine.RdfSourceWrapper[*SemWeb.Query.SparqlEngine.RdfSourceWrapper\*SemWeb.Query.SparqlEngine.RdfSourceWrapper]*SemWeb.Query.SparqlEngine.RdfSourceWrapper^*SemWeb.Query.SparqlEngine.RdfSourceWrapper_*SemWeb.Query.SparqlEngine.RdfSourceWrapper`*SemWeb.Query.SparqlEngine.RdfSourceWrappera*SemWeb.Query.SparqlEngine.RdfSourceWrapperb*SemWeb.Query.SparqlEngine.RdfSourceWrapperc*SemWeb.Query.SparqlEngine.RdfSourceWrapperd*SemWeb.Query.SparqlEngine.RdfSourceWrappere*SemWeb.Query.SparqlEngine.RdfSourceWrapperf*SemWeb.Query.SparqlEngine.RdfSourceWrapperg*SemWeb.Query.SparqlEngine.RdfSourceWrapperh*SemWeb.Query.SparqlEngine.RdfSourceWrapperi*SemWeb.Query.SparqlEngine.RdfSourceWrapperj*SemWeb.Query.SparqlEngine.RdfSourceWrapperk*SemWeb.Query.SparqlEngine.RdfSourceWrapperl*SemWeb.Query.SparqlEngine.RdfSourceWrapperm*SemWeb.Query.SparqlEngine.RdfSourceWrappern*SemWeb.Query.SparqlEngine.RdfSourceWrappero*SemWeb.Query.SparqlEngine.RdfSourceWrapperp*SemWeb.Query.SparqlEngine.RdfSourceWrapperq*SemWeb.Query.SparqlEngine.RdfSourceWrapperr*SemWeb.Query.SparqlEngine.RdfSourceWrappers*SemWeb.Query.SparqlEngine.RdfSourceWrappert*SemWeb.Query.SparqlEngine.RdfSourceWrapperu*SemWeb.Query.SparqlEngine.RdfSourceWrapperv*SemWeb.Query.SparqlEngine.RdfSourceWrapperw*SemWeb.Query.SparqlEngine.RdfSourceWrapperx*SemWeb.Query.SparqlEngine.RdfSourceWrappery*SemWeb.Query.SparqlEngine.RdfSourceWrapperz*SemWeb.Query.SparqlEngine.RdfSourceWrapper{*SemWeb.Query.SparqlEngine.RdfSourceWrapper|*SemWeb.Query.SparqlEngine.RdfSourceWrapper}*SemWeb.Query.SparqlEngine.RdfSourceWrapper~*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper *SemWeb.Query.SparqlEngine.RdfSourceWrapper *SemWeb.Query.SparqlEngine.RdfSourceWrapper *SemWeb.Query.SparqlEngine.RdfSourceWrapper *SemWeb.Query.SparqlEngine.RdfSourceWrapper *SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper*SemWeb.Query.SparqlEngine.RdfSourceWrapper *SemWeb.Query.SparqlEngine.RdfSourceWrapper!*SemWeb.Query.SparqlEngine.RdfSourceWrapper"*SemWeb.Query.SparqlEngine.RdfSourceWrapper#*SemWeb.Query.SparqlEngine.RdfSourceWrapper$*SemWeb.Query.SparqlEngine.RdfSourceWrapper%*SemWeb.Query.SparqlEngine.RdfSourceWrapper&*SemWeb.Query.SparqlEngine.RdfSourceWrapper'*SemWeb.Query.SparqlEngine.RdfSourceWrapper(*SemWeb.Query.SparqlEngine.RdfSourceWrapper)*SemWeb.Query.SparqlEngine.RdfSourceWrapper**SemWeb.Query.SparqlEngine.RdfSourceWrapper+*SemWeb.Query.SparqlEngine.RdfSourceWrapper,*SemWeb.Query.SparqlEngine.RdfSourceWrapper-*SemWeb.Query.SparqlEngine.RdfSourceWrapper.*SemWeb.Query.SparqlEngine.RdfSourceWrapper/*SemWeb.Query.SparqlEngine.RdfSourceWrapper0*SemWeb.Query.SparqlEngine.RdfSourceWrapper1*SemWeb.Query.SparqlEngine.RdfSourceWrapper2*SemWeb.Query.SparqlEngine.RdfSourceWrapper3*SemWeb.Query.SparqlEngine.RdfSourceWrapper4*SemWeb.Query.SparqlEngine.RdfSourceWrapper5*SemWeb.Query.SparqlEngine.RdfSourceWrapper6*SemWeb.Query.SparqlEngine.RdfSourceWrapper7*SemWeb.Query.SparqlEngine.RdfSourceWrapper  8$SemWeb.Query.SparqlEngine.URIWrapper9$SemWeb.Query.SparqlEngine.URIWrapper:$SemWeb.Query.SparqlEngine.URIWrapper;$SemWeb.Query.SparqlEngine.URIWrapper<$SemWeb.Query.SparqlEngine.URIWrapper=$SemWeb.Query.SparqlEngine.URIWrapper>$SemWeb.Query.SparqlEngine.URIWrapper?$SemWeb.Query.SparqlEngine.URIWrapper@$SemWeb.Query.SparqlEngine.URIWrapperA$SemWeb.Query.SparqlEngine.URIWrapperB$SemWeb.Query.SparqlEngine.URIWrapperC$SemWeb.Query.SparqlEngine.URIWrapperD$SemWeb.Query.SparqlEngine.URIWrapperE$SemWeb.Query.SparqlEngine.URIWrapperF$SemWeb.Query.SparqlEngine.URIWrapperG$SemWeb.Query.SparqlEngine.URIWrapperH$SemWeb.Query.SparqlEngine.URIWrapperI$SemWeb.Query.SparqlEngine.URIWrapperJ$SemWeb.Query.SparqlEngine.URIWrapperK$SemWeb.Query.SparqlEngine.URIWrapperL$SemWeb.Query.SparqlEngine.URIWrapperM$SemWeb.Query.SparqlEngine.URIWrapperN$SemWeb.Query.SparqlEngine.URIWrapperO$SemWeb.Query.SparqlEngine.URIWrapperP$SemWeb.Query.SparqlEngine.URIWrapperQ$SemWeb.Query.SparqlEngine.URIWrapperR$SemWeb.Query.SparqlEngine.URIWrapperS$SemWeb.Query.SparqlEngine.URIWrapperT$SemWeb.Query.SparqlEngine.URIWrapper U/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt V/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt  w W*SemWeb.Query.SparqlEngine.RdfSourceWrapperX*SemWeb.Query.SparqlEngine.RdfSourceWrapperY*SemWeb.Query.SparqlEngine.RdfSourceWrapper Z/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt[/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt\/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt]/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt^/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt_/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt`/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmta/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmtb/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmtc/SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt d(SemWeb.Query.SparqlEngine.ExtFuncWrappere(SemWeb.Query.SparqlEngine.ExtFuncWrapperf(SemWeb.Query.SparqlEngine.ExtFuncWrapperg(SemWeb.Query.SparqlEngine.ExtFuncWrapperh(SemWeb.Query.SparqlEngine.ExtFuncWrapperi(SemWeb.Query.SparqlEngine.ExtFuncWrapperj(SemWeb.Query.SparqlEngine.ExtFuncWrapperk(SemWeb.Query.SparqlEngine.ExtFuncWrapperl(SemWeb.Query.SparqlEngine.ExtFuncWrapperm(SemWeb.Query.SparqlEngine.ExtFuncWrappern(SemWeb.Query.SparqlEngine.ExtFuncWrappero(SemWeb.Query.SparqlEngine.ExtFuncWrapperp(SemWeb.Query.SparqlEngine.ExtFuncWrapperq(SemWeb.Query.SparqlEngine.ExtFuncWrapperr(SemWeb.Query.SparqlEngine.ExtFuncWrappers(SemWeb.Query.SparqlEngine.ExtFuncWrappert(SemWeb.Query.SparqlEngine.ExtFuncWrapperu(SemWeb.Query.SparqlEngine.ExtFuncWrapperv(SemWeb.Query.SparqlEngine.ExtFuncWrapperw(SemWeb.Query.SparqlEngine.ExtFuncWrapperx(SemWeb.Query.SparqlEngine.ExtFuncWrappery(SemWeb.Query.SparqlEngine.ExtFuncWrapperz(SemWeb.Query.SparqlEngine.ExtFuncWrapper{(SemWeb.Query.SparqlEngine.ExtFuncWrapper|(SemWeb.Query.SparqlEngine.ExtFuncWrapper}(SemWeb.Query.SparqlEngine.ExtFuncWrapper~(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper (SemWeb.Query.SparqlEngine.ExtFuncWrapper (SemWeb.Query.SparqlEngine.ExtFuncWrapper (SemWeb.Query.SparqlEngine.ExtFuncWrapper (SemWeb.Query.SparqlEngine.ExtFuncWrapper (SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper5SemWeb.Query.SparqlEngine.BNodeWrapper.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper5SemWeb.Query.SparqlEngine.BNodeWrapper.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper (SemWeb.Query.SparqlEngine.ExtFuncWrapper!(SemWeb.Query.SparqlEngine.ExtFuncWrapper"(SemWeb.Query.SparqlEngine.ExtFuncWrapper#(SemWeb.Query.SparqlEngine.ExtFuncWrapper$(SemWeb.Query.SparqlEngine.ExtFuncWrapper%(SemWeb.Query.SparqlEngine.ExtFuncWrapper&(SemWeb.Query.SparqlEngine.ExtFuncWrapper'(SemWeb.Query.SparqlEngine.ExtFuncWrapper((SemWeb.Query.SparqlEngine.ExtFuncWrapper)(SemWeb.Query.SparqlEngine.ExtFuncWrapper*(SemWeb.Query.SparqlEngine.ExtFuncWrapper+(SemWeb.Query.SparqlEngine.ExtFuncWrapper,(SemWeb.Query.SparqlEngine.ExtFuncWrapper-(SemWeb.Query.SparqlEngine.ExtFuncWrapper.(SemWeb.Query.SparqlEngine.ExtFuncWrapper/(SemWeb.Query.SparqlEngine.ExtFuncWrapper0(SemWeb.Query.SparqlEngine.ExtFuncWrapper1(SemWeb.Query.SparqlEngine.ExtFuncWrapper2(SemWeb.Query.SparqlEngine.ExtFuncWrapper3(SemWeb.Query.SparqlEngine.ExtFuncWrapper4(SemWeb.Query.SparqlEngine.ExtFuncWrapper5(SemWeb.Query.SparqlEngine.ExtFuncWrapper6(SemWeb.Query.SparqlEngine.ExtFuncWrapper7(SemWeb.Query.SparqlEngine.ExtFuncWrapper8(SemWeb.Query.SparqlEngine.ExtFuncWrapper9(SemWeb.Query.SparqlEngine.ExtFuncWrapper:(SemWeb.Query.SparqlEngine.ExtFuncWrapper;(SemWeb.Query.SparqlEngine.ExtFuncWrapper<(SemWeb.Query.SparqlEngine.ExtFuncWrapper=(SemWeb.Query.SparqlEngine.ExtFuncWrapper>(SemWeb.Query.SparqlEngine.ExtFuncWrapper?(SemWeb.Query.SparqlEngine.ExtFuncWrapper@(SemWeb.Query.SparqlEngine.ExtFuncWrapperA(SemWeb.Query.SparqlEngine.ExtFuncWrapperB(SemWeb.Query.SparqlEngine.ExtFuncWrapperC(SemWeb.Query.SparqlEngine.ExtFuncWrapperD(SemWeb.Query.SparqlEngine.ExtFuncWrapperE(SemWeb.Query.SparqlEngine.ExtFuncWrapperF(SemWeb.Query.SparqlEngine.ExtFuncWrapperG(SemWeb.Query.SparqlEngine.ExtFuncWrapperH(SemWeb.Query.SparqlEngine.ExtFuncWrapperI(SemWeb.Query.SparqlEngine.ExtFuncWrapperJ(SemWeb.Query.SparqlEngine.ExtFuncWrapperK(SemWeb.Query.SparqlEngine.ExtFuncWrapperL(SemWeb.Query.SparqlEngine.ExtFuncWrapperM(SemWeb.Query.SparqlEngine.ExtFuncWrapperN(SemWeb.Query.SparqlEngine.ExtFuncWrapperO(SemWeb.Query.SparqlEngine.ExtFuncWrapperP(SemWeb.Query.SparqlEngine.ExtFuncWrapperQ(SemWeb.Query.SparqlEngine.ExtFuncWrapperR(SemWeb.Query.SparqlEngine.ExtFuncWrapperS(SemWeb.Query.SparqlEngine.ExtFuncWrapperT(SemWeb.Query.SparqlEngine.ExtFuncWrapperU(SemWeb.Query.SparqlEngine.ExtFuncWrapperV(SemWeb.Query.SparqlEngine.ExtFuncWrapperW(SemWeb.Query.SparqlEngine.ExtFuncWrapperX(SemWeb.Query.SparqlEngine.ExtFuncWrapperY(SemWeb.Query.SparqlEngine.ExtFuncWrapperZ(SemWeb.Query.SparqlEngine.ExtFuncWrapper[(SemWeb.Query.SparqlEngine.ExtFuncWrapper\(SemWeb.Query.SparqlEngine.ExtFuncWrapper](SemWeb.Query.SparqlEngine.ExtFuncWrapper^(SemWeb.Query.SparqlEngine.ExtFuncWrapper_(SemWeb.Query.SparqlEngine.ExtFuncWrapper`(SemWeb.Query.SparqlEngine.ExtFuncWrappera(SemWeb.Query.SparqlEngine.ExtFuncWrapperb(SemWeb.Query.SparqlEngine.ExtFuncWrapperc(SemWeb.Query.SparqlEngine.ExtFuncWrapperd(SemWeb.Query.SparqlEngine.ExtFuncWrappere(SemWeb.Query.SparqlEngine.ExtFuncWrapperf(SemWeb.Query.SparqlEngine.ExtFuncWrapperg(SemWeb.Query.SparqlEngine.ExtFuncWrapperh(SemWeb.Query.SparqlEngine.ExtFuncWrapperi(SemWeb.Query.SparqlEngine.ExtFuncWrapperj(SemWeb.Query.SparqlEngine.ExtFuncWrapperk(SemWeb.Query.SparqlEngine.ExtFuncWrapperl(SemWeb.Query.SparqlEngine.ExtFuncWrapperm(SemWeb.Query.SparqlEngine.ExtFuncWrappern(SemWeb.Query.SparqlEngine.ExtFuncWrappero(SemWeb.Query.SparqlEngine.ExtFuncWrapperp(SemWeb.Query.SparqlEngine.ExtFuncWrapperq(SemWeb.Query.SparqlEngine.ExtFuncWrapperr(SemWeb.Query.SparqlEngine.ExtFuncWrappers(SemWeb.Query.SparqlEngine.ExtFuncWrappert(SemWeb.Query.SparqlEngine.ExtFuncWrapperu(SemWeb.Query.SparqlEngine.ExtFuncWrapperv(SemWeb.Query.SparqlEngine.ExtFuncWrapperw(SemWeb.Query.SparqlEngine.ExtFuncWrapperx(SemWeb.Query.SparqlEngine.ExtFuncWrappery(SemWeb.Query.SparqlEngine.ExtFuncWrapperz(SemWeb.Query.SparqlEngine.ExtFuncWrapper{(SemWeb.Query.SparqlEngine.ExtFuncWrapper|(SemWeb.Query.SparqlEngine.ExtFuncWrapper}(SemWeb.Query.SparqlEngine.ExtFuncWrapper~(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper(SemWeb.Query.SparqlEngine.ExtFuncWrapper /SemWeb.Query.SparqlEngine.RdfSourceWrapper.Stmt 6SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySink:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder6SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySink:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder6SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySink:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder6SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySink:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder :SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder :SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder :SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder :SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder :SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder :SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder!:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder":SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder#:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder$:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder%:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder&:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder':SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder(:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder):SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder*:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder+:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder,:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder-:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder.:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder/:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder0:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder1:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder2:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder3:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder4:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder5:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder6:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder7:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder8:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder9:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder::SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder;:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder<:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder=:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder>:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder?:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder@:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderA:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderB:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderC:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderD:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderE:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderF:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderG:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderH:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderI:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderJ:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderK:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderL:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderM:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderN:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderO:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderP:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderQ:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderR:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderS:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderT:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderU:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderV:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderW:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderX:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderY:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderZ:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder[:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder\:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder]:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder^:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder_:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder`:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuildera:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderb:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderc:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderd:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuildere:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderf:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderg:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderh:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderi:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderj:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderk:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderl:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderm:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuildern:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuildero:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderp:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderq:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderr:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilders:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuildert:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderu:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderv:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderw:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderx:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuildery:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderz:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder{:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder|:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder}:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder~:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderGSemWeb.Query.SparqlEngine.BNodeWrapper.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderGSemWeb.Query.SparqlEngine.BNodeWrapper.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder-SemWeb.Query.RdfGroupLogic.QueryResultBuilder-SemWeb.Query.RdfGroupLogic.QueryResultBuilder-SemWeb.Query.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder-SemWeb.Query.RdfGroupLogic.QueryResultBuilder-SemWeb.Query.RdfGroupLogic.QueryResultBuilder-SemWeb.Query.RdfGroupLogic.QueryResultBuilder-SemWeb.Query.RdfGroupLogic.QueryResultBuilder-SemWeb.Query.RdfGroupLogic.QueryResultBuilder-SemWeb.Query.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder-SemWeb.Query.RdfGroupLogic.QueryResultBuilder-SemWeb.Query.RdfGroupLogic.QueryResultBuilder-SemWeb.Query.RdfGroupLogic.QueryResultBuilder-SemWeb.Query.RdfGroupLogic.QueryResultBuilder-SemWeb.Query.RdfGroupLogic.QueryResultBuilder-SemWeb.Query.RdfGroupLogic.QueryResultBuilder-SemWeb.Query.RdfGroupLogic.QueryResultBuilder-SemWeb.Query.RdfGroupLogic.QueryResultBuilder-SemWeb.Query.RdfGroupLogic.QueryResultBuilder-SemWeb.Query.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder-SemWeb.Query.RdfGroupLogic.QueryResultBuilder-SemWeb.Query.RdfGroupLogic.QueryResultBuilder-SemWeb.Query.RdfGroupLogic.QueryResultBuilder-SemWeb.Query.RdfGroupLogic.QueryResultBuilder-SemWeb.Query.RdfGroupLogic.QueryResultBuilder-SemWeb.Query.RdfGroupLogic.QueryResultBuilder-SemWeb.Query.RdfGroupLogic.QueryResultBuilder-SemWeb.Query.RdfGroupLogic.QueryResultBuilder-SemWeb.Query.RdfGroupLogic.QueryResultBuilder-SemWeb.Query.RdfGroupLogic.QueryResultBuilder-SemWeb.Query.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder :SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder :SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder :SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder :SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder :SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder :SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder!:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder":SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder#:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder$:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder%:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder&:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder':SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder(:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder):SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder*:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder+:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder,:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder-:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder.:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder/:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder0:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder1:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder2:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder3:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder4:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder5:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder6:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder76SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySink86SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySink96SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySink:6SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySink;6SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySink<6SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySink=6SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySink>6SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySink?6SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySink@6SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySinkA6SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySinkB6SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySinkC6SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySinkD6SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySinkE6SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySinkF6SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySinkG6SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySinkH6SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySinkI6SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySinkJ6SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySinkK6SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySinkL6SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySinkM6SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySinkN6SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySinkO6SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySinkP6SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySinkQ6SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySinkR6SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySinkS6SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySinkT6SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySinkU6SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySinkV6SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySinkW6SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySinkX6SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySinkY6SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySinkZ6SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySink[6SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySink\6SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySink]6SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySink^6SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySink_6SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySink`6SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySinka6SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySinkb:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderc:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderd:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuildere:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderf:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderg6SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySinkh6SemWeb.Query.SparqlProtocolServerHandler.HTMLQuerySinki:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderj:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderk:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderl:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderm:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuildern:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuildero:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderp:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderq:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderr:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilders:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuildert:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderu:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderv:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderw:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderx:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuildery:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilderz:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder{:SemWeb.Query.SparqlEngine.RdfGroupLogic.QueryResultBuilder M |(SemWeb.Query.SparqlEngine.LiteralWrapper}(SemWeb.Query.SparqlEngine.LiteralWrapper~(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper(SemWeb.Query.SparqlEngine.LiteralWrapper@?     vQuery   @?c %      SparqlEngineSparqlProtocolServerHandler y wMonoDevelop.Projects.Parser.TagkeyComment+commentStringComment+region#MonoDevelop.Projects.Parser.IRegionTODOP: We could also check if any part has NoData, we can abandon the query entirely )MonoDevelop.Projects.Parser.DefaultRegion beginLineendLine beginColumn endColumnfileNameop! semweb-1.05+dfsg/src/MemoryStore.cs0000644000175000017500000002370310774502134016551 0ustar meebeymeebeyusing System; using System.Collections; using SemWeb; using SemWeb.Stores; using SemWeb.Util; namespace SemWeb { public class MemoryStore : Store, #if DOTNET2 System.Collections.Generic.IEnumerable #else IEnumerable #endif { internal StoreImpl impl; public MemoryStore() : this(new StoreImpl()) { } public MemoryStore(StatementSource source) : this() { Import(source); } public MemoryStore(Statement[] statements) : this(new StoreImpl(statements)) { } private MemoryStore(StoreImpl impl) { this.impl = impl; AddSource2(impl); } public override void AddSource(SelectableSource store) { throw new InvalidOperationException("AddSource is not valid on the MemoryStore."); } public override void AddSource(SelectableSource store, string uri) { throw new InvalidOperationException("AddSource is not valid on the MemoryStore."); } public Statement this[int index] { get { return impl[index]; } } public Statement[] ToArray() { return impl.ToArray(); } #if DOTNET2 System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { return ((System.Collections.Generic.IEnumerable)impl).GetEnumerator(); } #endif IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable)impl).GetEnumerator(); } internal bool allowIndexing { set { impl.allowIndexing = value; } } internal bool checkForDuplicates { set { impl.checkForDuplicates = value; } } internal class StoreImpl : SelectableSource, StaticSource, ModifiableSource, #if DOTNET2 System.Collections.Generic.IEnumerable #else IEnumerable #endif { #if DOTNET2 private class StatementList : System.Collections.Generic.List { public StatementList() : base() { } public StatementList(Statement[] statements) : base(statements) { } } #endif StatementList statements; Hashtable statementsAboutSubject = new Hashtable(); Hashtable statementsAboutObject = new Hashtable(); bool isIndexed = false; internal bool allowIndexing = true; internal bool checkForDuplicates = false; bool distinct = true; string guid = null; Hashtable pbnodeToId = null; Hashtable pbnodeFromId = null; const string rdfli = NS.RDF + "_"; public StoreImpl() { statements = new StatementList(); } public StoreImpl(StatementSource source) : this() { Import(source); } public StoreImpl(Statement[] statements) { this.statements = new StatementList(statements); } public Statement[] ToArray() { #if DOTNET2 return statements.ToArray(); #else return (Statement[])statements.ToArray(typeof(Statement)); #endif } public bool Distinct { get { return distinct; } } public int StatementCount { get { return statements.Count; } } public Statement this[int index] { get { return statements[index]; } } #if DOTNET2 System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { return statements.GetEnumerator(); } #endif IEnumerator IEnumerable.GetEnumerator() { return statements.GetEnumerator(); } public void Clear() { statements.Clear(); statementsAboutSubject.Clear(); statementsAboutObject.Clear(); distinct = true; } private StatementList GetIndexArray(Hashtable from, Resource entity) { StatementList ret = (StatementList)from[entity]; if (ret == null) { ret = new StatementList(); from[entity] = ret; } return ret; } bool StatementSink.Add(Statement statement) { Add(statement); return true; } public void Add(Statement statement) { if (statement.AnyNull) throw new ArgumentNullException(); if (checkForDuplicates && Contains(statement)) return; statements.Add(statement); if (isIndexed) { GetIndexArray(statementsAboutSubject, statement.Subject).Add(statement); GetIndexArray(statementsAboutObject, statement.Object).Add(statement); } if (!checkForDuplicates) distinct = false; } public void Import(StatementSource source) { bool newDistinct = checkForDuplicates || ((StatementCount==0) && source.Distinct); source.Select(this); distinct = newDistinct; } public void Remove(Statement statement) { if (statement.AnyNull) { for (int i = 0; i < statements.Count; i++) { Statement s = (Statement)statements[i]; if (statement.Matches(s)) { statements.RemoveAt(i); i--; if (isIndexed) { GetIndexArray(statementsAboutSubject, s.Subject).Remove(s); GetIndexArray(statementsAboutObject, s.Object).Remove(s); } } } } else { statements.Remove(statement); if (isIndexed) { GetIndexArray(statementsAboutSubject, statement.Subject).Remove(statement); GetIndexArray(statementsAboutObject, statement.Object).Remove(statement); } } } public void RemoveAll(Statement[] statements) { foreach (Statement t in statements) Remove(t); } public Entity[] GetEntities() { Hashtable h = new Hashtable(); foreach (Statement s in statements) { if (s.Subject != null) h[s.Subject] = h; if (s.Predicate != null) h[s.Predicate] = h; if (s.Object != null && s.Object is Entity) h[s.Object] = h; if (s.Meta != null && s.Meta != Statement.DefaultMeta) h[s.Meta] = h; } return (Entity[])new ArrayList(h.Keys).ToArray(typeof(Entity)); } public Entity[] GetPredicates() { Hashtable h = new Hashtable(); foreach (Statement s in statements) h[s.Predicate] = h; return (Entity[])new ArrayList(h.Keys).ToArray(typeof(Entity)); } public Entity[] GetMetas() { Hashtable h = new Hashtable(); foreach (Statement s in statements) h[s.Meta] = h; return (Entity[])new ArrayList(h.Keys).ToArray(typeof(Entity)); } private void ShorterList(ref StatementList list1, StatementList list2) { if (list2.Count < list1.Count) list1 = list2; } public void Select(StatementSink result) { Select(Statement.All, result); } public void Select(Statement template, StatementSink result) { StatementList source = statements; // The first time select is called, turn indexing on for the store. // TODO: Perform this index in a background thread if there are a lot // of statements. if (!isIndexed && allowIndexing) { isIndexed = true; for (int i = 0; i < StatementCount; i++) { Statement statement = this[i]; GetIndexArray(statementsAboutSubject, statement.Subject).Add(statement); GetIndexArray(statementsAboutObject, statement.Object).Add(statement); } } if (template.Subject != null) ShorterList(ref source, GetIndexArray(statementsAboutSubject, template.Subject)); else if (template.Object != null) ShorterList(ref source, GetIndexArray(statementsAboutObject, template.Object)); if (source == null) return; bool isRdfsMemberPredicate = (template.Predicate != null && template.Predicate.Uri != null && template.Predicate.Uri == NS.RDFS + "member"); if (isRdfsMemberPredicate) template.Predicate = null; for (int i = 0; i < source.Count; i++) { Statement statement = source[i]; if (!template.Matches(statement)) continue; if (isRdfsMemberPredicate && (statement.Predicate.Uri == null || !statement.Predicate.Uri.StartsWith(rdfli))) continue; if (!result.Add(statement)) return; } } public void Select(SelectFilter filter, StatementSink result) { ResSet s = filter.Subjects == null ? null : new ResSet(filter.Subjects), p = filter.Predicates == null ? null : new ResSet(filter.Predicates), o = filter.Objects == null ? null : new ResSet(filter.Objects), m = filter.Metas == null ? null : new ResSet(filter.Metas); foreach (Statement st in statements) { if (s != null && !s.Contains(st.Subject)) continue; if (p != null && !p.Contains(st.Predicate)) continue; if (o != null && !o.Contains(st.Object)) continue; if (m != null && !m.Contains(st.Meta)) continue; if (filter.LiteralFilters != null && !LiteralFilter.MatchesFilters(st.Object, filter.LiteralFilters, this)) continue; if (!result.Add(st)) return; } } public bool Contains(Resource r) { foreach (Statement s in statements) { if (s.Subject == r) return true; if (s.Predicate == r) return true; if (s.Object == r) return true; if (s.Meta == r) return true; } return false; } public bool Contains(Statement template) { return Store.DefaultContains(this, template); } public void Replace(Entity a, Entity b) { MemoryStore removals = new MemoryStore(); MemoryStore additions = new MemoryStore(); foreach (Statement statement in statements) { if ((statement.Subject != null && statement.Subject == a) || (statement.Predicate != null && statement.Predicate == a) || (statement.Object != null && statement.Object == a) || (statement.Meta != null && statement.Meta == a)) { removals.Add(statement); additions.Add(statement.Replace(a, b)); } } RemoveAll(removals.ToArray()); Import(additions); } public void Replace(Statement find, Statement replacement) { Remove(find); Add(replacement); } private string GetStoreGuid() { if (guid == null) guid = Guid.NewGuid().ToString("N");; return guid; } public string GetPersistentBNodeId(BNode node) { if (pbnodeToId == null) { pbnodeToId = new Hashtable(); pbnodeFromId = new Hashtable(); } if (pbnodeToId.ContainsKey(node)) return (string)pbnodeToId[node]; string id = GetStoreGuid() + ":" + pbnodeToId.Count.ToString(); pbnodeToId[node] = id; pbnodeFromId[id] = node; return id; } public BNode GetBNodeFromPersistentId(string persistentId) { if (pbnodeFromId == null) return null; return (BNode)pbnodeFromId[persistentId]; } } } } semweb-1.05+dfsg/src/Statement.cs0000644000175000017500000002364310774502134016233 0ustar meebeymeebeyusing System; using System.Collections; using SemWeb.Util; namespace SemWeb { public struct Statement : #if DOTNET2 IEquatable, IComparable #else IComparable #endif { public Entity Subject; public Entity Predicate; public Resource Object; public Entity Meta; public static Entity DefaultMeta = new BNode(); public static Statement All = new Statement(null, null, null, null); public Statement(Entity subject, Entity predicate, Resource @object) : this(subject, predicate, @object, DefaultMeta) { } public Statement(Entity subject, Entity predicate, Resource @object, Entity meta) { Subject = subject; Predicate = predicate; Object = @object; Meta = meta; } public bool AnyNull { get { return Subject == null || Predicate == null || Object == null || Meta == null; } } public Statement Invert() { if (!(Object is Entity)) throw new ArgumentException("The object of the statement must be an entity."); return new Statement((Entity)Object, Predicate, Subject, Meta); } public bool Matches(Statement statement) { if (Subject != null && Subject != statement.Subject && statement.Subject != null) return false; if (Predicate != null && Predicate != statement.Predicate && statement.Predicate != null) return false; if (Object != null && Object != statement.Object && statement.Object != null) return false; if (Meta != null && Meta != statement.Meta && statement.Meta != null) return false; return true; } public override string ToString() { string ret = ""; if (Subject != null) ret += Subject.ToString(); else ret += "?"; ret += " "; if (Predicate != null) ret += Predicate.ToString(); else ret += "?"; ret += " "; if (Object != null) ret += Object.ToString(); else ret += "?"; ret += " "; if (Meta != null && Meta != DefaultMeta) ret += "meta=" + Meta.ToString(); return ret + "."; } public Statement Replace(Resource find, Resource replacement) { if (replacement is Literal) { if (find == Object) return new Statement(Subject, Predicate, replacement, Meta); return this; } else { Entity ent = (Entity)replacement; return new Statement( Subject == find ? ent : Subject, Predicate == find ? ent : Predicate, Object == find ? ent : Object, Meta == find ? ent : Meta ); } } public Statement Replace(Hashtable resourceMap) { return new Statement( !resourceMap.ContainsKey(Subject) ? Subject : (Entity)resourceMap[Subject], !resourceMap.ContainsKey(Predicate) ? Predicate : (Entity)resourceMap[Predicate], !resourceMap.ContainsKey(Object) ? Object : (Resource)resourceMap[Object], !resourceMap.ContainsKey(Meta) ? Meta : (Entity)resourceMap[Meta] ); } public override bool Equals(object other) { return (Statement)other == this; } #if DOTNET2 bool IEquatable.Equals(Statement other) { return other == this; } #endif public override int GetHashCode() { int ret = 0; if (Subject != null) ret = unchecked(ret + Subject.GetHashCode()); if (Predicate != null) ret = unchecked(ret + Predicate.GetHashCode()); if (Object != null) ret = unchecked(ret + Object.GetHashCode()); if (Meta != null) ret = unchecked(ret + Meta.GetHashCode()); return ret; } public static bool operator ==(Statement a, Statement b) { if ((a.Subject == null) != (b.Subject == null)) return false; if ((a.Predicate == null) != (b.Predicate == null)) return false; if ((a.Object == null) != (b.Object == null)) return false; if ((a.Meta == null) != (b.Meta == null)) return false; if (a.Subject != null && !a.Subject.Equals(b.Subject)) return false; if (a.Predicate != null && !a.Predicate.Equals(b.Predicate)) return false; if (a.Object != null && !a.Object.Equals(b.Object)) return false; if (a.Meta != null && !a.Meta.Equals(b.Meta)) return false; return true; } public static bool operator !=(Statement a, Statement b) { return !(a == b); } #if !DOTNET2 int IComparable.CompareTo(object other) { return CompareTo((Statement)other); } #endif public int CompareTo(Statement s) { int x; x = cmp(Subject, s.Subject); if (x != 0) return x; x = cmp(Predicate, s.Predicate); if (x != 0) return x; x = cmp(Object, s.Object); if (x != 0) return x; x = cmp(Meta, s.Meta); if (x != 0) return x; return 0; } int cmp(Resource a, Resource b) { if (a == null && b == null) return 0; if (a == null) return -1; if (b == null) return 1; return ((IComparable)a).CompareTo(b); } internal Resource GetComponent(int index) { switch (index) { case 0: return Subject; case 1: return Predicate; case 2: return Object; case 3: return Meta; } throw new ArgumentException("index"); } internal void SetComponent(int index, Resource r) { switch (index) { case 0: Subject = (Entity)r; break; case 1: Predicate = (Entity)r; break; case 2: Object = r; break; case 3: Meta = (Entity)r; break; default: throw new ArgumentException("index"); } } } public struct SelectFilter : IEnumerable { public Entity[] Subjects; public Entity[] Predicates; public Resource[] Objects; public Entity[] Metas; public LiteralFilter[] LiteralFilters; public int Limit; public static SelectFilter All = new SelectFilter(null, null, null, null); public SelectFilter(Statement statement) { Subjects = null; Predicates = null; Objects = null; Metas = null; LiteralFilters = null; Limit = 0; if (statement.Subject != null) Subjects = new Entity[] { statement.Subject }; if (statement.Predicate != null) Predicates = new Entity[] { statement.Predicate }; if (statement.Object != null) Objects = new Resource[] { statement.Object }; if (statement.Meta != null) Metas = new Entity[] { statement.Meta }; } public SelectFilter(Entity[] subjects, Entity[] predicates, Resource[] objects, Entity[] metas) { Subjects = null; Predicates = null; Objects = null; Metas = null; LiteralFilters = null; Limit = 0; Subjects = subjects; Predicates = predicates; Objects = objects; Metas = metas; } internal Resource[] GetComponent(int index) { switch (index) { case 0: return Subjects; case 1: return Predicates; case 2: return Objects; case 3: return Metas; } throw new ArgumentException("index"); } internal void SetComponent(int index, Resource[] res) { switch (index) { case 0: Subjects = (Entity[])res; break; case 1: Predicates = (Entity[])res; break; case 2: Objects = res; break; case 3: Metas = (Entity[])res; break; default: throw new ArgumentException("index"); } } public override string ToString() { string ret = ToString(Subjects) + " " + ToString(Predicates) + " " + ToString(Objects); if (Metas == null || Metas.Length > 1 || Metas[0] != Statement.DefaultMeta) ret += " meta=" + ToString(Metas); return ret; } private string ToString(Resource[] res) { if (res == null) return "?"; if (res.Length == 1) return res[0].ToString(); System.Text.StringBuilder b = new System.Text.StringBuilder(); b.Append("{ "); bool first = true; bool cutoff = false; foreach (Resource r in res) { if (!first) b.Append(", "); first = false; if (b.Length > 50) { b.Append("..."); cutoff = true; break; } b.Append(r.ToString()); } b.Append(" }"); if (cutoff) b.Insert(2, "(" + res.Length +") "); return b.ToString(); } public override bool Equals(object other) { return this == (SelectFilter)other; } public override int GetHashCode() { int hc = 0; if (Subjects != null) hc ^= Subjects[0].GetHashCode(); if (Predicates != null) hc ^= Predicates[0].GetHashCode(); if (Objects != null) hc ^= Objects[0].GetHashCode(); if (Metas != null) hc ^= Metas[0].GetHashCode(); return hc; } public static bool operator ==(SelectFilter a, SelectFilter b) { return eq(a.Subjects, b.Subjects) && eq(a.Predicates, b.Predicates) && eq(a.Objects, b.Objects) && eq(a.Metas, b.Metas) && a.LiteralFilters == b.LiteralFilters && a.Limit == b.Limit; } public static bool operator !=(SelectFilter a, SelectFilter b) { return !(a == b); } static bool eq(Resource[] a, Resource[] b) { if (a == b) return true; if (a == null || b == null) return false; if (a.Length != b.Length) return false; bool alleq = true; for (int i = 0; i < a.Length; i++) if (!a[i].Equals(b[i])) alleq = false; if (alleq) return true; ResSet xa = new ResSet(a); ResSet xb = new ResSet(b); xa.RetainAll(xb); return xa.Count == xb.Count; } public static SelectFilter[] FromGraph(Statement[] graph) { SelectFilter[] ret = new SelectFilter[graph.Length]; for (int i = 0; i < ret.Length; i++) ret[i] = new SelectFilter(graph[i]); return ret; } public IEnumerator GetEnumerator() { return new StatementIterator(this); } class StatementIterator : IEnumerator { SelectFilter f; SemWeb.Util.Permutation p; int[] cur; public StatementIterator(SelectFilter filter) { f = filter; p = new SemWeb.Util.Permutation(new int[] { f.Subjects == null ? 1 : f.Subjects.Length, f.Predicates == null ? 1 : f.Predicates.Length, f.Objects == null ? 1 : f.Objects.Length, f.Metas == null ? 1 : f.Metas.Length, } ); } public object Current { get { if (cur == null) throw new InvalidOperationException("Call MoveNext!"); return new Statement( f.Subjects == null ? null : f.Subjects[cur[0]], f.Predicates == null ? null : f.Predicates[cur[1]], f.Objects == null ? null : f.Objects[cur[2]], f.Metas == null ? null : f.Metas[cur[3]] ); } } public bool MoveNext() { cur = p.Next(); return cur != null; } public void Reset() { cur = null; p.Reset(); } } } } semweb-1.05+dfsg/src/Euler.cs0000644000175000017500000005753310774502134015350 0ustar meebeymeebey// Adapted from: // --------------------------------------------------------------- // Euler proof mechanism -- Jos De Roo // version = '$Id: euler.js,v 1.35 2006/12/17 01:25:01 josd Exp $' // http://eulersharp.cvs.sourceforge.net/eulersharp/2006/02swap/euler.js?view=log // --------------------------------------------------------------- // The original Euler code is licensed under the W3C Software License. // This is a very liberal translation of the original code into C#. using System; using System.Collections; using SemWeb; using SemWeb.Util; namespace SemWeb.Inference { public class Euler : Reasoner { static bool Debug = System.Environment.GetEnvironmentVariable("SEMWEB_DEBUG_EULER") != null; Hashtable rules; static Hashtable builtInRelations; static Euler() { RdfRelation[] rs = new RdfRelation[] { new SemWeb.Inference.Relations.MathAbsoluteValueRelation(), new SemWeb.Inference.Relations.MathCosRelation(), new SemWeb.Inference.Relations.MathDegreesRelation(), new SemWeb.Inference.Relations.MathEqualToRelation(), new SemWeb.Inference.Relations.MathNegationRelation(), new SemWeb.Inference.Relations.MathRoundedRelation(), new SemWeb.Inference.Relations.MathSinRelation(), new SemWeb.Inference.Relations.MathSinhRelation(), new SemWeb.Inference.Relations.MathTanRelation(), new SemWeb.Inference.Relations.MathTanhRelation(), new SemWeb.Inference.Relations.MathAtan2Relation(), new SemWeb.Inference.Relations.MathDifferenceRelation(), new SemWeb.Inference.Relations.MathExponentiationRelation(), new SemWeb.Inference.Relations.MathIntegerQuotientRelation(), new SemWeb.Inference.Relations.MathQuotientRelation(), new SemWeb.Inference.Relations.MathRemainderRelation(), new SemWeb.Inference.Relations.MathSumRelation(), new SemWeb.Inference.Relations.MathProductRelation(), new SemWeb.Inference.Relations.MathGreaterThanRelation(), new SemWeb.Inference.Relations.MathLessThanRelation(), new SemWeb.Inference.Relations.MathNotGreaterThanRelation(), new SemWeb.Inference.Relations.MathNotLessThanRelation(), new SemWeb.Inference.Relations.MathNotEqualToRelation() }; builtInRelations = new Hashtable(); foreach (RdfRelation r in rs) builtInRelations[r.Uri] = r; } public Euler(StatementSource rules) { this.rules = RulesToCases(rules); } public override bool Distinct { get { return false; } } // not sure... public override void Select(SelectFilter filter, SelectableSource targetModel, StatementSink sink) { if (filter.Subjects == null) filter.Subjects = new Entity[] { new Variable("subject") }; if (filter.Predicates == null) filter.Predicates = new Entity[] { new Variable("predicate") }; if (filter.Objects == null) filter.Objects = new Entity[] { new Variable("object") }; if (filter.Metas == null) filter.Metas = new Entity[] { Statement.DefaultMeta }; foreach (Statement s in filter) { // until we can operate on filter directly ArrayList evidence = prove(rules, targetModel, new Statement[] { s }, -1); if (evidence == null) continue; // not provable (in max number of steps, if that were given) foreach (EvidenceItem ei in evidence) { foreach (Statement h in ei.head) { // better be just one statement if (filter.LiteralFilters != null && !LiteralFilter.MatchesFilters(h.Object, filter.LiteralFilters, targetModel)) continue; sink.Add(h); } } } } private void QueryCheckArg(Statement[] graph) { if (graph == null) throw new ArgumentNullException("graph"); foreach (Statement s in graph) { if (s.Subject == null || s.Predicate == null || s.Object == null || s.Meta == null) throw new ArgumentNullException("Graph statements cannot contain a null subject, predicate, or object. Use a Variable instance instead."); if (s.Meta != Statement.DefaultMeta && !(s.Meta is Variable)) throw new NotSupportedException("Graph statements' meta fields must be Statement.DefaultMeta. Other values of meta are not currently supported."); } } public override SemWeb.Query.MetaQueryResult MetaQuery(Statement[] graph, SemWeb.Query.QueryOptions options, SelectableSource targetModel) { QueryCheckArg(graph); SemWeb.Query.MetaQueryResult ret = new SemWeb.Query.MetaQueryResult(); ret.QuerySupported = true; // TODO: Best to check also whether variables in the query are even known to us. return ret; } public override void Query(Statement[] graph, SemWeb.Query.QueryOptions options, SelectableSource targetModel, SemWeb.Query.QueryResultSink sink) { QueryCheckArg(graph); // Try to do the inferencing. ArrayList evidence = prove(rules, targetModel, graph, -1); if (evidence == null) return; // not provable (in max number of steps, if that were given) // Then send the possible bindings to the QueryResultSink. // Map variables to indexes. Hashtable vars = new Hashtable(); foreach (Statement s in graph) { if (s.Subject is Variable && !vars.ContainsKey(s.Subject)) vars[s.Subject] = vars.Count; if (s.Predicate is Variable && !vars.ContainsKey(s.Predicate)) vars[s.Predicate] = vars.Count; if (s.Object is Variable && !vars.ContainsKey(s.Object)) vars[s.Object] = vars.Count; } // Prepare the bindings array. Variable[] varOrder = new Variable[vars.Count]; foreach (Variable v in vars.Keys) varOrder[(int)vars[v]] = v; // Initialize the sink. sink.Init(varOrder); // Send a binding set for each piece of evidence. foreach (EvidenceItem ei in evidence) { // Write a comment to the results with the actual proof. (nifty actually) sink.AddComments(ei.ToProof().ToString()); // Create the binding array and send it on Resource[] variableBindings = new Resource[varOrder.Length]; foreach (Variable v in vars.Keys) if (ei.env.ContainsKey(v)) variableBindings[(int)vars[v]] = (Resource)ei.env[v]; sink.Add(new SemWeb.Query.VariableBindings(varOrder, variableBindings)); } // Close the sink. sink.Finished(); } // Static methods that wrap the Euler engine private static readonly Entity entLOGIMPLIES = "http://www.w3.org/2000/10/swap/log#implies"; private static readonly Entity entRDFFIRST = "http://www.w3.org/1999/02/22-rdf-syntax-ns#first"; private static readonly Entity entRDFREST = "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"; private static readonly Entity entRDFNIL = "http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"; private class Sequent { public Statement head; // consequent public Statement[] body; // antecedent public Hashtable callArgs; // encapsulates (...) arguments to user predicates public Sequent(Statement head, Statement[] body, Hashtable callArgs) { this.head = head; this.body = body; this.callArgs = callArgs; } public Sequent(Statement head) { this.head = head; this.body = new Statement[0]; } public Rule ToRule() { return new Rule(body, new Statement[] { head }); } // override to satisfy a warning about overloading == public override bool Equals(object o) { return this == (Sequent)o; } // override to satisfy a warning about overloading == public override int GetHashCode() { return base.GetHashCode(); } public override string ToString() { string ret = "{ "; foreach (Statement b in body) { if (ret != "{ ") ret += ", "; ret += b.ToString(); } ret += " } => " + head; return ret; } public static bool operator ==(Sequent a, Sequent b) { if (object.ReferenceEquals(a, b)) return true; if (object.ReferenceEquals(a, null) && object.ReferenceEquals(b, null)) return true; if (object.ReferenceEquals(a, null) || object.ReferenceEquals(b, null)) return false; if (a.head != b.head) return false; if (a.body.Length != b.body.Length) return false; for (int i = 0; i < a.body.Length; i++) if (a.body[i] != b.body[i]) return false; return true; } public static bool operator !=(Sequent a, Sequent b) { return !(a == b); } } private class Ground { public Sequent src; // evidence public Hashtable env; // substitution environment: Resource => Resource public Ground(Sequent src, Hashtable env) { this.src = src; this.env = env; } public ProofStep ToProofStep() { return new ProofStep(src.ToRule(), env); } } private class EvidenceItem { public Statement[] head; public ArrayList body; // of Ground public Hashtable env; // substitutions of goal-level variables public Proof ToProof() { ProofStep[] steps = new ProofStep[body.Count]; for (int i = 0; i < body.Count; i++) steps[i] = ((Ground)body[i]).ToProofStep(); return new Proof(head, steps); } public override string ToString() { string ret = ""; foreach (DictionaryEntry kv in env) ret += "\t" + kv.Key + "=>" + kv.Value + "\n"; return ret; } } private class QueueItem { public Sequent rule; public Sequent src; public int ind; public QueueItem parent; public Hashtable env; // substitution environment: Resource => Resource public ArrayList ground; public QueueItem Clone() { return (QueueItem)MemberwiseClone(); } public override string ToString() { string ret = ""; foreach (DictionaryEntry kv in env) ret += kv.Key + "=>" + kv.Value + "; "; ret += rule.ToString() + " @ " + ind + "/" + rule.body.Length; return ret; } } public Proof[] Prove(SelectableSource world, Statement[] goal) { ArrayList evidence = prove(rules, world, goal, -1); if (evidence == null) throw new Exception("Could not complete proof within the maximum number of steps allowed."); ArrayList ret = new ArrayList(); foreach (EvidenceItem ei in evidence) ret.Add(ei.ToProof()); return (Proof[])ret.ToArray(typeof(Proof)); } private static ArrayList prove(Hashtable cases, SelectableSource world, Statement[] goal, int maxNumberOfSteps) { // This is the main routine from euler.js. // cases: Resource (predicate) => IList of Sequent if (world != null) // cache our queries to the world, if a world is provided world = new SemWeb.Stores.CachedSource(world); // Create the queue and add the first item. ArrayList queue = new ArrayList(); { QueueItem start = new QueueItem(); start.env = new Hashtable(); start.rule = new Sequent(Statement.All, goal, null); start.src = null; start.ind = 0; start.parent = null; start.ground = new ArrayList(); queue.Add(start); if (Debug) Console.Error.WriteLine("Euler: Queue: " + start); } // The evidence array holds the results of this proof. ArrayList evidence = new ArrayList(); // Track how many steps we take to not go over the limit. int step = 0; // Process the queue until it's empty or we reach our step limit. while (queue.Count > 0) { // deal with the QueueItem at the top of the queue QueueItem c = (QueueItem)queue[queue.Count-1]; queue.RemoveAt(queue.Count-1); ArrayList g = new ArrayList(c.ground); // have we done too much? step++; if (maxNumberOfSteps != -1 && step >= maxNumberOfSteps) { if (Debug) Console.Error.WriteLine("Euler: Maximum number of steps exceeded. Giving up."); return null; } // if each statement in the body of the sequent has been proved if (c.ind == c.rule.body.Length) { // if this is the top-level sequent being proved; we've found a complete evidence for the goal if (c.parent == null) { EvidenceItem ev = new EvidenceItem(); ev.head = new Statement[c.rule.body.Length]; bool canRepresentHead = true; for (int i = 0; i < c.rule.body.Length; i++) { ev.head[i] = evaluate(c.rule.body[i], c.env); if (ev.head[i].AnyNull) // can't represent it: literal in subject position, for instance canRepresentHead = false; } ev.body = c.ground; ev.env = c.env; if (Debug) Console.Error.WriteLine("Euler: Found Evidence: " + ev); if (!canRepresentHead) continue; evidence.Add(ev); // this is a subproof of something; whatever it is a subgroup for can // be incremented } else { // if the rule had no body, it was just an axiom and we represent that with Ground if (c.rule.body.Length != 0) g.Add(new Ground(c.rule, c.env)); // advance the parent being proved and put the advanced // parent into the queue; unify the parent variable assignments // with this one's QueueItem r = new QueueItem(); r.rule = c.parent.rule; r.src = c.parent.src; r.ind = c.parent.ind; r.parent = c.parent.parent != null ? c.parent.parent.Clone() : null; r.env = (Hashtable)c.parent.env.Clone(); r.ground = g; unify(c.rule.head, c.env, r.rule.body[r.ind], r.env, true); r.ind++; queue.Add(r); if (Debug) Console.Error.WriteLine("Euler: Queue Advancement: " + r); } // this sequent still has parts of the body left to be proved; try to // find evidence for the next statement in the body, and if we find // evidence, queue up that evidence } else { // this is the next part of the body that we need to try to prove Statement t = c.rule.body[c.ind]; // Try to process this predicate with a user-provided custom // function that resolves things like mathematical relations. // euler.js provides similar functionality, but the system // of user predicates is completely different here. RdfRelation b = FindUserPredicate(t.Predicate); if (b != null) { Resource[] args; Variable[] unifyResult; Resource value = evaluate(t.Object, c.env); if (!c.rule.callArgs.ContainsKey(t.Subject)) { // The array of arguments to this relation is just the subject of the triple itself args = new Resource[] { evaluate(t.Subject, c.env) }; unifyResult = new Variable[1]; if (t.Subject is Variable) unifyResult[0] = (Variable)t.Subject; } else { // The array of arguments to this relation comes from a pre-grouped arg list. args = (Resource[])c.rule.callArgs[t.Subject]; unifyResult = new Variable[args.Length]; for (int i = 0; i < args.Length; i++) { if (args[i] is Variable) { unifyResult[i] = (Variable)args[i]; args[i] = evaluate(args[i], c.env); } } } // Run the user relation on the array of arguments (subject) and on the object. if (b.Evaluate(args, ref value)) { // If it succeeds, we press on. // The user predicate may update the 'value' variable and the argument // list array, and so we want to unify any variables in the subject // or object of this user predicate with the values given to us // by the user predicate. Hashtable newenv = (Hashtable)c.env.Clone(); if (t.Object is Variable) unify(value, null, t.Object, newenv, true); for (int i = 0; i < args.Length; i++) if (unifyResult[i] != null) unify(args[i], null, unifyResult[i], newenv, true); Statement grnd = evaluate(t, newenv); if (grnd != Statement.All) // sometimes not representable, like if literal as subject g.Add(new Ground(new Sequent(grnd, new Statement[0], null), new Hashtable())); QueueItem r = new QueueItem(); r.rule = c.rule; r.src = c.src; r.ind = c.ind; r.parent = c.parent; r.env = newenv; r.ground = g; r.ind++; queue.Add(r); } continue; } // t can be proved either by the use of a rule // or if t literally exists in the world Statement t_resolved = evaluate(t, c.env); // If resolving this statement requires putting a // literal in subject or predicate position, we // can't prove it. if (t_resolved == Statement.All) continue; ArrayList tcases = new ArrayList(); // get all of the rules that apply to the predicate in question if (t_resolved.Predicate != null && cases.ContainsKey(t_resolved.Predicate)) tcases.AddRange((IList)cases[t_resolved.Predicate]); /*if (cases.ContainsKey("WILDCARD")) // not supported yet -- infinite regress not handled tcases.AddRange((IList)cases["WILDCARD"]);*/ // if t has no unbound variables and we've matched something from // the axioms, don't bother looking at the world, and don't bother // proving it any other way than by the axiom. bool lookAtWorld = true; foreach (Sequent seq in tcases) { if (seq.body.Length == 0 && seq.head == t_resolved) { lookAtWorld = false; tcases.Clear(); tcases.Add(seq); break; } } // if there is a seprate world, get all of the world // statements that witness t if (world != null && lookAtWorld) { MemoryStore w = new MemoryStore(); if (Debug) Console.WriteLine("Euler: Ask World: " + t_resolved); world.Select(t_resolved, w); foreach (Statement s in w) { if (Debug) Console.WriteLine("Euler: World Select Response: " + s); Sequent seq = new Sequent(s); tcases.Add(seq); } } // If there is no evidence or potential evidence (i.e. rules) // for t, then we will dump this QueueItem by not queuing any // subproofs. // Otherwise we try each piece of evidence in turn. foreach (Sequent rl in tcases) { ArrayList g2 = (ArrayList)c.ground.Clone(); if (rl.body.Length == 0) g2.Add(new Ground(rl, new Hashtable())); QueueItem r = new QueueItem(); r.rule = rl; r.src = rl; r.ind = 0; r.parent = c; r.env = new Hashtable(); r.ground = g2; if (unify(t, c.env, rl.head, r.env, true)) { QueueItem ep = c; // euler path while ((ep = ep.parent) != null) if (ep.src == c.src && unify(ep.rule.head, ep.env, c.rule.head, c.env, false)) break; if (ep == null) { queue.Insert(0, r); if (Debug) Console.Error.WriteLine("Euler: Queue from Axiom: " + r); } } } } } return evidence; } private static bool unify(Resource s, Hashtable senv, Resource d, Hashtable denv, bool f) { if (s is Variable) { Resource sval = evaluate(s, senv); if (sval != null) return unify(sval, senv, d, denv, f); else return true; } else if (d is Variable) { Resource dval = evaluate(d, denv); if (dval != null) { return unify(s, senv, dval, denv, f); } else { if (f) denv[d] = evaluate(s, senv); return true; } } else if (s.Equals(d)) { return true; } else { return false; } } private static bool unify(Statement s, Hashtable senv, Statement d, Hashtable denv, bool f) { if (s == Statement.All) return false; if (!unify(s.Subject, senv, d.Subject, denv, f)) return false; if (!unify(s.Predicate, senv, d.Predicate, denv, f)) return false; if (!unify(s.Object, senv, d.Object, denv, f)) return false; return true; } private static Resource evaluate(Resource t, Hashtable env) { if (t is Variable) { Resource val = (Resource)env[t]; if (val != null) return evaluate(val, env); else return null; } return t; } private static Statement evaluate(Statement t, Hashtable env) { Resource s = evaluate(t.Subject, env); Resource p = evaluate(t.Predicate, env); Resource o = evaluate(t.Object, env); // If we can't represent this statement because it requires // putting a literal in subject or predicate position, // return Statement.All (i.e. null S/P/O). if (s is Literal || p is Literal) return Statement.All; return new Statement((Entity)s, (Entity)p, o, Statement.DefaultMeta); } // The next few routines convert a set of axioms from a StatementSource // into a data structure of use for the algorithm, with Sequents and things. private static Hashtable RulesToCases(StatementSource rules) { Hashtable cases = new Hashtable(); MemoryStore rules_store = new MemoryStore(rules); foreach (Statement p in rules_store) { if (p.Meta == Statement.DefaultMeta) { if (p.Predicate == entLOGIMPLIES && p.Object is Entity) { MemoryStore body = new MemoryStore(); MemoryStore head = new MemoryStore(); rules_store.Select(new Statement(null, null, null, (Entity)p.Subject), new RemoveMeta(body)); rules_store.Select(new Statement(null, null, null, (Entity)p.Object), new RemoveMeta(head)); // Any variables in the head not bound in the body represent existentially closed bnodes. // (Euler's OWL test case does this. Wish they had used bnodes instead of vars...) ResSet bodyvars = new ResSet(); foreach (Statement b in body) { if (b.Subject is Variable) bodyvars.Add(b.Subject); if (b.Predicate is Variable) bodyvars.Add(b.Predicate); if (b.Object is Variable) bodyvars.Add(b.Object); } foreach (Entity v in head.GetEntities()) { if (v is Variable && !bodyvars.Contains(v)) head.Replace(v, new BNode(((Variable)v).LocalName)); } // Replace (...) lists in the body that are tied to the subjects // of user predicates with callArgs objects. Hashtable callArgs = new Hashtable(); CollectCallArgs(body, callArgs); // Rules can't have more than one statement in their // consequent. The best we can do is break up // the consequent into multiple rules. (Since all head // variables are bound in body, it's equivalent...?) foreach (Statement h in head) AddSequent(cases, new Sequent(h, body.ToArray(), callArgs)); } else { AddSequent(cases, new Sequent(p, new Statement[0], null)); } } } return cases; } private class RemoveMeta : StatementSink { StatementSink sink; public RemoveMeta(StatementSink s) { sink = s; } public bool Add(Statement s) { s.Meta = Statement.DefaultMeta; return sink.Add(s); } } private static void CollectCallArgs(MemoryStore body, Hashtable callArgs) { foreach (Statement s in new MemoryStore(body)) { // make a copy since we remove statements from b within if (FindUserPredicate(s.Predicate) == null) continue; Entity subj = s.Subject; if (!(subj is BNode)) continue; // it would be nice to exclude variables, but we've already converted bnodes to variables BNode head = (BNode)subj; ArrayList argList = new ArrayList(); while (true) { Resource[] objs = body.SelectObjects(subj, entRDFFIRST); if (objs.Length == 0) break; // if this is the first iteration, then we're just not looking at a list // on later iterations, the list must not be well-formed, so we'll just // stop reading it here argList.Add(objs[0]); // assume a properly formed list body.Remove(new Statement(subj, entRDFFIRST, null)); Resource[] rests = body.SelectObjects(subj, entRDFREST); if (rests.Length == 0) break; // not well formed body.Remove(new Statement(subj, entRDFREST, null)); if (rests[0] == entRDFNIL) break; // that's the end of the list if (!(rests[0] is Entity)) break; // also not well formed subj = (Entity)rests[0]; } if (argList.Count > 0) callArgs[head] = argList.ToArray(typeof(Resource)); } } private static void AddSequent(Hashtable cases, Sequent s) { object key = s.head.Predicate; if (key is Variable) key = "WILDCARD"; ArrayList list = (ArrayList)cases[key]; if (list == null) { list = new ArrayList(); cases[key] = list; } list.Add(s); } // Lastly, we have special and built-in predicates. private static RdfRelation FindUserPredicate(Entity predicate) { if (predicate.Uri == null) return null; if (builtInRelations.ContainsKey(predicate.Uri)) return (RdfRelation)builtInRelations[predicate.Uri]; return null; } } } semweb-1.05+dfsg/src/Query.cs0000644000175000017500000002163610774502134015374 0ustar meebeymeebeyusing System; using System.IO; using SemWeb; using SemWeb.Filters; using SemWeb.Stores; using SemWeb.Util; #if !DOTNET2 using System.Collections; #else using System.Collections.Generic; #endif #if !DOTNET2 using ResList = System.Collections.ICollection; using LitFilterMap = System.Collections.Hashtable; using LitFilterList = System.Collections.ArrayList; #else using ResList = System.Collections.Generic.ICollection; using LitFilterMap = System.Collections.Generic.Dictionary>; using LitFilterList = System.Collections.Generic.List; #endif namespace SemWeb.Query { public struct QueryOptions { public int Limit; // 0 means no limit, otherwise the maximum number of results to give #if !DOTNET2 public ICollection DistinguishedVariables; // if null, all variables are reported back in bindings; otherwise, a list of just the variables whose bindings are to be reported public IDictionary VariableKnownValues; // a map from variables to lists of values that the variable must be drawn from public IDictionary VariableLiteralFilters; // a map from variables to lists of literal value filters that its values must match #else public ICollection DistinguishedVariables; public IDictionary> VariableKnownValues; public IDictionary> VariableLiteralFilters; #endif public void AddDistinguishedVariable(Variable variable) { if (DistinguishedVariables == null) #if !DOTNET2 DistinguishedVariables = new ArrayList(); #else DistinguishedVariables = new List(); #endif #if !DOTNET2 ((IList)DistinguishedVariables).Add(variable); #else ((IList)DistinguishedVariables).Add(variable); #endif } public void SetVariableKnownValues(Variable variable, ResList knownValues) { if (VariableKnownValues == null) #if !DOTNET2 VariableKnownValues = new Hashtable(); #else VariableKnownValues = new Dictionary>(); #endif VariableKnownValues[variable] = knownValues; } public void AddLiteralFilter(Variable variable, LiteralFilter filter) { if (VariableLiteralFilters == null) VariableLiteralFilters = new LitFilterMap(); LitFilterList list = null; #if DOTNET2 if (VariableLiteralFilters.ContainsKey(variable)) #endif list = (LitFilterList)VariableLiteralFilters[variable]; if (list == null) { list = new LitFilterList(); VariableLiteralFilters[variable] = list; } list.Add(filter); } internal QueryOptions Clone() { QueryOptions ret = new QueryOptions(); ret.Limit = Limit; #if !DOTNET2 if (DistinguishedVariables != null) ret.DistinguishedVariables = new ArrayList(DistinguishedVariables); if (VariableKnownValues != null) { ret.VariableKnownValues = new Hashtable(); foreach (Variable v in VariableKnownValues.Keys) ret.VariableKnownValues[v] = new ArrayList((ICollection)VariableKnownValues[v]); } if (VariableLiteralFilters != null) { ret.VariableLiteralFilters = new Hashtable(); foreach (Variable v in VariableLiteralFilters.Keys) ret.VariableLiteralFilters[v] = new ArrayList((ICollection)VariableLiteralFilters[v]); } #else if (DistinguishedVariables != null) ret.DistinguishedVariables = new List(DistinguishedVariables); if (VariableKnownValues != null) { ret.VariableKnownValues = new Dictionary>(); foreach (Variable v in VariableKnownValues.Keys) ret.VariableKnownValues[v] = new List(VariableKnownValues[v]); } if (VariableLiteralFilters != null) { ret.VariableLiteralFilters = new Dictionary>(); foreach (Variable v in VariableLiteralFilters.Keys) ret.VariableLiteralFilters[v] = new List(VariableLiteralFilters[v]); } #endif return ret; } } public struct MetaQueryResult { public bool QuerySupported; public bool[] NoData; public bool[] IsDefinitive; } public class QueryFormatException : ApplicationException { public QueryFormatException(string message) : base(message) { } public QueryFormatException(string message, Exception cause) : base(message, cause) { } } public class QueryExecutionException : ApplicationException { public QueryExecutionException(string message) : base(message) { } public QueryExecutionException(string message, Exception cause) : base(message, cause) { } } public abstract class RdfFunction { public abstract string Uri { get; } public abstract Resource Evaluate(Resource[] args); } public abstract class Query { int start = 0; int limit = -1; Entity queryMeta = null; public int ReturnStart { get { return start; } set { start = value; if (start < 0) start = 0; } } public int ReturnLimit { get { return limit; } set { limit = value; } } public Entity QueryMeta { get { return queryMeta; } set { queryMeta = value; } } public virtual string MimeType { get { return SparqlXmlQuerySink.MimeType; } set { throw new NotSupportedException(); } } public virtual void Run(SelectableSource source, TextWriter output) { Run(source, new SparqlXmlQuerySink(output)); } public abstract void Run(SelectableSource source, QueryResultSink resultsink); public abstract string GetExplanation(); } public abstract class QueryResultSink { public virtual void Init(Variable[] variables) { } public abstract bool Add(VariableBindings result); public virtual void Finished() { } public virtual void AddComments(string comments) { } } public class QueryResultBuffer : QueryResultSink #if !DOTNET2 , IEnumerable #else , IEnumerable #endif { Variable[] variables; #if !DOTNET2 ArrayList bindings = new ArrayList(); ArrayList comments = new ArrayList(); #else List bindings = new List(); List comments = new List(); #endif public override void Init(Variable[] variables) { this.variables = new Variable[variables.Length]; variables.CopyTo(this.variables, 0); } public override bool Add(VariableBindings result) { bindings.Add(result); return true; } public override void AddComments(string comment) { comments.Add(comment); } public Variable[] Variables { get { return variables; } } #if !DOTNET2 public IList Bindings { get { return bindings; } } public IList Comments { get { return comments; } } #else public List Bindings { get { return bindings; } } public List Comments { get { return comments; } } #endif System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { return Bindings.GetEnumerator(); } #if DOTNET2 IEnumerator IEnumerable.GetEnumerator() { return Bindings.GetEnumerator(); } #endif } public class VariableBindings { Variable[] vars; Resource[] vals; public VariableBindings(Variable[] vars, Resource[] vals) { this.vars = vars; this.vals = vals; if (vars.Length != vals.Length) throw new ArgumentException("Arrays do not have the same length."); } public int Count { get { return vars.Length; } } #if !DOTNET2 public Variable[] Variables { get { return vars; } } public Resource[] Values { get { return vals; } } #else public IList Variables { get { return vars; } } public IList Values { get { return vals; } } #endif public Resource this[Variable variable] { get { for (int i = 0; i < vars.Length; i++) if (vars[i] == variable) return vals[i]; throw new ArgumentException(); } } public Resource this[string variableName] { get { for (int i = 0; i < vars.Length; i++) if (vars[i].LocalName != null && vars[i].LocalName == variableName) return vals[i]; throw new ArgumentException(); } } public Statement Substitute(Statement template) { // This may throw an InvalidCastException if a variable binds // to a literal but was used as the subject, predicate, or meta // of the template. for (int i = 0; i < vars.Length; i++) { if (vars[i] == template.Subject) template = new Statement((Entity)vals[i], template.Predicate, template.Object, template.Meta); if (vars[i] == template.Predicate) template = new Statement(template.Subject, (Entity)vals[i], template.Object, template.Meta); if (vars[i] == template.Object) template = new Statement(template.Subject, template.Predicate, vals[i], template.Meta); if (vars[i] == template.Meta) template = new Statement(template.Subject, template.Predicate, template.Object, (Entity)vals[i]); } return template; } public override string ToString() { String ret = ""; for (int i = 0; i < vars.Length; i++) { ret += vars[i] + "=>" + vals[i] + "; "; } return ret; } } } semweb-1.05+dfsg/src/UriMap.cs0000644000175000017500000000761510774502134015465 0ustar meebeymeebeyusing System; using System.Collections; using System.Collections.Specialized; namespace SemWeb.Util { internal class UriMap : IDictionary { private static char[] splitchars = { '\\', '/', '#' }; Node Root; int count; public UriMap() { Clear(); } bool ICollection.IsSynchronized { get { return false; } } object ICollection.SyncRoot { get { return null; } } bool IDictionary.IsFixedSize { get { return false; } } bool IDictionary.IsReadOnly { get { return false; } } object IDictionary.this[object key] { get { return this[(string)key]; } set { this[(string)key] = value; } } void IDictionary.Add(object key, object value) { this[(string)key] = value; } bool IDictionary.Contains(object key) { return Contains((string)key); } ICollection IDictionary.Keys { get { throw new NotImplementedException(); } } ICollection IDictionary.Values { get { throw new NotImplementedException(); } } IDictionaryEnumerator IDictionary.GetEnumerator() { throw new NotImplementedException(); } void IDictionary.Remove(object key) { Remove((string)key); } void ICollection.CopyTo(Array dest, int index) { throw new NotImplementedException(); } IEnumerator IEnumerable.GetEnumerator() { throw new NotImplementedException(); } public object this[string uri] { get { Node node = FindNode(uri, false); if (node == null) return null; return node.Value; } set { Node node = FindNode(uri, true); node.Value = value; } } public void Clear() { Root = new Node(); count = 0; } public bool Contains(string uri) { Node node = FindNode(uri, false); return node != null; } public int Count { get { return count; } } Node FindNode(string uri, bool create) { Node node = Root; int pos; string piece; NextPieceStart(out pos); while ((piece = NextPiece(uri, ref pos)) != null) { bool created; node = node.FindChild(piece, create, out created); if (created) count++; if (node == null) return null; } return node; } public void Remove(string uri) { Node node = Root; int pos; NextPieceStart(out pos); string piece = NextPiece(uri, ref pos); string next = NextPiece(uri, ref pos); while (piece != null) { if (next != null) { bool created; node = node.FindChild(piece, false, out created); if (node == null) return; } else { if (node.RemoveChild(piece)) count--; } piece = next; next = NextPiece(uri, ref pos); } } void NextPieceStart(out int position) { position = 0; } string NextPiece(string uri, ref int position) { if (position == uri.Length) return null; // Get the next stopping position int look = position; if (position == 0 && uri.Length > 15) look = 15; int next = uri.IndexOfAny(splitchars, look); if (next == -1) { string r = uri.Substring(position); position = uri.Length; return r; } // Grab sequences of the same character in a row. while (next != uri.Length-1 && uri[next] == uri[next+1]) next++; string ret = uri.Substring(position, next-position+1); position = next+1; return ret; } private class Node { public IDictionary Children; public object Value; public Node FindChild(string name, bool create, out bool created) { if (Children == null && !create) { created = false; return null; } if (Children == null) Children = new HybridDictionary(); Node ret = (Node)Children[name]; if (ret != null || !create) { created = false; return ret; } else { created = true; ret = new Node(); Children[name] = ret; return ret; } } public bool RemoveChild(string name) { if (Children != null && Children.Contains(name)) { Children.Remove(name); return true; } return false; } } } } semweb-1.05+dfsg/src/SemWeb.SqlServerStore.csproj0000644000175000017500000000424010774502134021276 0ustar meebeymeebey Debug AnyCPU 8.0.50727 2.0 {7E919504-7916-4E98-8430-D331B20F4F7F} Library Properties SemWeb.Stores SemWeb.SQLServerStore true full false ..\bin_generics\ DEBUG;TRACE prompt 4 pdbonly true ..\bin_generics\ TRACE;DOTNET2 prompt 4 {98EA8780-0045-41A4-BAA1-575582B92BCC} SemWeb semweb-1.05+dfsg/src/XPathSemWebNavigator.cs0000644000175000017500000002351610774502134020270 0ustar meebeymeebeyusing System; using System.Collections; using System.Xml; using System.Xml.Xsl; using System.Xml.XPath; using SemWeb; namespace SemWeb.Util { public class XPathSemWebNavigator : XPathNavigator { Store model; NamespaceManager nsmgr; NSWrap nswrap; ArrayList stack = new ArrayList(); Position current; private static Entity ExpandEntitiesOfType = new BNode(); Entity rdfType = NS.RDF+"type"; private class Position { public int Index; public bool FirstChild, LastChild; public Entity Predicate; public Resource Object; public Position[] Children; } private class NSWrap : XsltContext { NamespaceManager nsmgr; public NSWrap(NamespaceManager nsmgr) : base(new NameTable()) { this.nsmgr = nsmgr; } public override bool HasNamespace (string prefix) { return LookupNamespace(prefix) != null; } public override string LookupNamespace (string prefix) { return nsmgr.GetNamespace(prefix); } public override string LookupPrefix (string uri) { return nsmgr.GetPrefix(uri); } // These don't really do anything (yet?). public override bool Whitespace { get { return false; } } public override int CompareDocument (string baseUri, string nextbaseUri) { return baseUri.CompareTo(nextbaseUri); } public override bool PreserveWhitespace (System.Xml.XPath.XPathNavigator node) { return false; } public override IXsltContextFunction ResolveFunction (string prefix, string name, System.Xml.XPath.XPathResultType[] ArgTypes) { return null; } public override IXsltContextVariable ResolveVariable (string prefix, string name) { return null; } } public XPathSemWebNavigator(Store model, NamespaceManager namespaces) : this(ExpandEntitiesOfType, model, namespaces, null) { } public XPathSemWebNavigator(Entity root, Store model, NamespaceManager namespaces) : this(root, model, namespaces, null) { } private XPathSemWebNavigator(Entity root, Store model, NamespaceManager namespaces, string exapandThisPredicate) { this.model = model; if (!(namespaces is SemWeb.IO.AutoPrefixNamespaceManager)) namespaces = new SemWeb.IO.AutoPrefixNamespaceManager(namespaces); this.nsmgr = namespaces; nswrap = new NSWrap(nsmgr); Position start = new Position(); start.FirstChild = true; start.LastChild = true; start.Predicate = root; // a trick to make sure the URI info for the root reflects the root start.Object = root; if (exapandThisPredicate != null) Expand(start, exapandThisPredicate); current = start; } private XPathSemWebNavigator(XPathSemWebNavigator clone) { MoveTo(clone); } private void Expand(Position p) { Expand(p, null); } private void Expand(Position p, string expandOnlyThisPredicate) { if (!(p.Object is Entity)) { p.Children = new Position[0]; return; } ArrayList children = new ArrayList(); int ctr = 0; if (p.Object == ExpandEntitiesOfType) { if (expandOnlyThisPredicate == null) { // Get a list of entities and their types. foreach (Statement s in model.Select(new Statement(null, rdfType, null))) { if (!(s.Object is Entity)) continue; Position c = new Position(); c.Index = ctr++; c.Predicate = (Entity)s.Object; c.Object = s.Subject; children.Add(c); } } else { foreach (Entity e in model.GetEntitiesOfType(expandOnlyThisPredicate)) { Position c = new Position(); c.Predicate = expandOnlyThisPredicate; c.Index = ctr++; c.Object = e; children.Add(c); } } } else { if (expandOnlyThisPredicate == null || !expandOnlyThisPredicate.StartsWith("!")) { Statement q = new Statement( (Entity)p.Object, expandOnlyThisPredicate == null ? (Entity)null : (Entity)expandOnlyThisPredicate, null); foreach (Statement s in model.Select(q)) { Position c = new Position(); c.Index = ctr++; c.Predicate = s.Predicate; c.Object = s.Object; children.Add(c); } } if (expandOnlyThisPredicate == null || expandOnlyThisPredicate.StartsWith("!")) { Statement q = new Statement( null, expandOnlyThisPredicate == null ? (Entity)null : (Entity)expandOnlyThisPredicate.Substring(1), p.Object); foreach (Statement s in model.Select(q)) { Position c = new Position(); c.Index = ctr++; c.Predicate = "!" + s.Predicate; c.Object = s.Subject; children.Add(c); } } } p.Children = (Position[])children.ToArray(typeof(Position)); if (p.Children.Length > 0) { p.Children[0].FirstChild = true; p.Children[p.Children.Length-1].LastChild = true; } } public override string BaseURI { get { return ""; } } public override bool HasAttributes { get { return false; } } public override bool HasChildren { get { return true; } } public override bool IsEmptyElement { get { return false; } } public override string LocalName { get { string p, l; if (current.Predicate == ExpandEntitiesOfType) return "root"; if (current.Predicate.Uri == null) return "anonymous"; if (nsmgr.Normalize(current.Predicate.Uri, out p, out l)) return l; throw new InvalidOperationException("The local name of " + current.Predicate.Uri + " could not be determined."); } } public override string Name { get { if (current.Predicate == ExpandEntitiesOfType) return "root"; if (current.Predicate.Uri == null) return "anonymous"; return nsmgr.Normalize(current.Predicate.Uri); } } public override string NamespaceURI { get { string p, l; if (current.Predicate.Uri == null) return "anonymous"; if (nsmgr.Normalize(current.Predicate.Uri, out p, out l)) return nsmgr.GetNamespace(p); throw new InvalidOperationException("The namespace URI of " + current.Predicate.Uri + " could not be determined."); } } public override XmlNameTable NameTable { get { return null; } } public override XPathNodeType NodeType { get { if (stack.Count == 0) return XPathNodeType.Root; return XPathNodeType.Element; } } public override string Prefix { get { string p, l; if (nsmgr.Normalize(current.Predicate.Uri, out p, out l)) return p; throw new InvalidOperationException("The prefix of " + current.Predicate.Uri + " could not be determined."); } } public override string Value { get { if (current.Predicate == ExpandEntitiesOfType) return "root"; if (current.Object is Literal) return ((Literal)current.Object).Value; if (current.Object.Uri == null) return ""; return current.Object.Uri; } } public override string XmlLang { get { return ""; } } public override XPathNavigator Clone () { return new XPathSemWebNavigator(this); } //public virtual XmlNodeOrder ComparePosition (XPathNavigator nav) public override string GetAttribute (string localName, string namespaceURI) { return ""; } public override string GetNamespace (string name) { return nsmgr.GetNamespace(name); } public override bool IsSamePosition (XPathNavigator other) { if (!(other is XPathSemWebNavigator)) return false; XPathSemWebNavigator o = (XPathSemWebNavigator)other; return (o.current == current); } public override bool MoveTo (XPathNavigator other) { XPathSemWebNavigator clone = other as XPathSemWebNavigator; if (clone == null) return false; this.model = clone.model; this.nsmgr = clone.nsmgr; this.nswrap = clone.nswrap; this.stack = (ArrayList)clone.stack.Clone(); this.current = clone.current; return true; } public override bool MoveToAttribute (string localName, string namespaceURI) { return false; } public override bool MoveToNamespace (string name) { return false; } public override bool MoveToFirst () { return MoveToFirstChild(); } public override void MoveToRoot () { if (stack.Count == 0) return; current = (Position)stack[0]; stack.Clear(); } public override bool MoveToFirstAttribute () { return false; } public override bool MoveToFirstChild () { if (current.Children == null) Expand(current); if (current.Children.Length == 0) return false; stack.Add(current); current = current.Children[0]; return true; } public override bool MoveToFirstNamespace (XPathNamespaceScope namespaceScope) { return false; } public override bool MoveToId (string id) { return false; } public override bool MoveToNext () { if (current.LastChild) return false; current = ((Position)stack[stack.Count-1]).Children[current.Index+1]; return true; } public override bool MoveToNextAttribute () { return false; } public override bool MoveToNextNamespace (XPathNamespaceScope namespaceScope) { return false; } public override bool MoveToParent () { if (stack.Count == 0) return false; current = (Position)stack[stack.Count-1]; stack.RemoveAt(stack.Count-1); return true; } public override bool MoveToPrevious () { if (current.FirstChild) return false; current = ((Position)stack[stack.Count-1]).Children[current.Index-1]; return true; } public override XPathNodeIterator SelectChildren (string name, string namespaceURI) { if (current.Object is Literal) throw new InvalidOperationException("The navigator is positioned on a literal element."); return new XPathSemWebNavigator((Entity)current.Object, model, nsmgr, namespaceURI + name).SelectChildren(XPathNodeType.All); } public override XPathNodeIterator Select (XPathExpression expr) { expr.SetContext(nswrap); return base.Select(expr); } public override object Evaluate (XPathExpression expr) { expr.SetContext(nswrap); return base.Evaluate(expr); } public override object Evaluate (XPathExpression expr, XPathNodeIterator context) { expr.SetContext(nswrap); return base.Evaluate(expr, context); } } } semweb-1.05+dfsg/src/SparqlEngine.cs0000644000175000017500000013054610774502134016660 0ustar meebeymeebeyusing System; using System.Collections; using System.IO; using SemWeb; using SemWeb.Stores; using name.levering.ryan.sparql.parser; using name.levering.ryan.sparql.parser.model; using name.levering.ryan.sparql.model; using name.levering.ryan.sparql.model.data; using name.levering.ryan.sparql.common; using name.levering.ryan.sparql.common.impl; using name.levering.ryan.sparql.logic.expression; using name.levering.ryan.sparql.logic.function; using SemWebVariable = SemWeb.Variable; using SparqlVariable = name.levering.ryan.sparql.common.Variable; using ExpressionLogic = name.levering.ryan.sparql.model.logic.ExpressionLogic; #if !DOTNET2 using VariableList = System.Collections.ArrayList; using VarKnownValuesType = System.Collections.Hashtable; using VarKnownValuesList = System.Collections.ArrayList; using LitFilterList = System.Collections.ArrayList; using LitFilterMap = System.Collections.Hashtable; #else using VariableList = System.Collections.Generic.List; using VarKnownValuesType = System.Collections.Generic.Dictionary>; using VarKnownValuesList = System.Collections.Generic.List; using LitFilterList = System.Collections.Generic.List; using LitFilterMap = System.Collections.Generic.Dictionary>; #endif namespace SemWeb.Query { public class SparqlEngine : SemWeb.Query.Query { private const string BNodePersistUri = "tag:taubz.for.net,2005:bnode_persist_uri/"; string queryString; name.levering.ryan.sparql.parser.model.QueryNode query; ArrayList extFunctions = new ArrayList(); public bool AllowPersistBNodes = false; string preferredMimeType = null; public enum QueryType { Ask, Construct, Describe, Select } /* CONSTRUCTORS */ public SparqlEngine(TextReader query) : this(query.ReadToEnd()) { } public SparqlEngine(string query) { queryString = query; if (queryString.Trim().Length == 0) throw new QueryFormatException("SPARQL syntax error: Empty query."); try { this.query = (name.levering.ryan.sparql.parser.model.QueryNode)SPARQLParser.parse(new java.io.StringReader(query)); if (this.query is SelectQuery) { SelectQuery sq = (SelectQuery)this.query; ReturnLimit = sq.getLimit(); ReturnStart = sq.getOffset(); } } catch (TokenMgrError e) { throw new QueryFormatException("SPARQL syntax error at: " + e.Message); } catch (ParseException e) { throw new QueryFormatException("SPARQL syntax error: " + e.getMessage()); } catch (java.util.EmptyStackException e) { throw new QueryFormatException("SPARQL syntax error: Unknown error. (java.util.EmptyStackException)"); } extFunctions.Add(new TestFunction()); extFunctions.Add(new LCFunction()); extFunctions.Add(new UCFunction()); } /* QUERY TYPE AND OUTPUT CONTROL PROPERTIES */ public QueryType Type { get { if (query is AskQuery) return QueryType.Ask; if (query is ConstructQuery) return QueryType.Construct; if (query is DescribeQuery) return QueryType.Describe; if (query is SelectQuery) return QueryType.Select; throw new NotSupportedException("Query is of an unsupported type."); } } public override string MimeType { get { if (preferredMimeType == null) { if (query is AskQuery) return SparqlXmlQuerySink.MimeType; if (query is ConstructQuery) return "application/rdf+xml"; if (query is DescribeQuery) return "application/rdf+xml"; if (query is SelectQuery) return SparqlXmlQuerySink.MimeType; throw new NotSupportedException("Query is of an unsupported type."); } else { return preferredMimeType; } } set { if ((query is AskQuery || query is SelectQuery) && value != SparqlXmlQuerySink.MimeType) throw new NotSupportedException("That MIME type is not supported for ASK or SELECT queries."); if (query is ConstructQuery || query is DescribeQuery) { // this throws if we don't recognize the type RdfWriter.Create(value, TextWriter.Null); } preferredMimeType = value; } } /* QUERY EXECUTION CONTROL METHODS */ public void AddExternalFunction(RdfFunction function) { extFunctions.Add(function); } public override string GetExplanation() { return query.ToString(); } /* QUERY EXECUTION METHODS */ public override void Run(SelectableSource source, TextWriter output) { if (query is AskQuery) Ask(source, output); else if (query is ConstructQuery) Construct(source, output); else if (query is DescribeQuery) Describe(source, output); else if (query is SelectQuery) Select(source, output); else throw new NotSupportedException("Query is of an unsupported type."); } public bool Ask(SelectableSource source) { if (!(query is AskQuery)) throw new InvalidOperationException("Only ASK queries are supported by this method (" + query.GetType() + ")."); AskQuery q = (AskQuery)query; RdfSourceWrapper sourcewrapper = BindLogic(source); try { return q.execute(sourcewrapper); } catch (name.levering.ryan.sparql.common.QueryException e) { throw new QueryExecutionException("Error executing query: " + e.Message, e); } } public void Ask(SelectableSource source, TextWriter output) { bool result = Ask(source); System.Xml.XmlTextWriter w = new System.Xml.XmlTextWriter(output); w.Formatting = System.Xml.Formatting.Indented; w.WriteStartElement("sparql"); w.WriteAttributeString("xmlns", "http://www.w3.org/2001/sw/DataAccess/rf1/result"); w.WriteStartElement("head"); w.WriteEndElement(); w.WriteStartElement("boolean"); w.WriteString(result ? "true" : "false"); w.WriteEndElement(); w.WriteEndElement(); w.Flush(); } public void Construct(SelectableSource source, StatementSink sink) { if (!(query is ConstructQuery)) throw new InvalidOperationException("Only CONSTRUCT queries are supported by this method (" + query.GetType() + ")."); ConstructQuery q = (ConstructQuery)query; RdfSourceWrapper sourcewrapper = BindLogic(source); try { RdfGraph graph = q.execute(sourcewrapper); WriteGraph(graph, sourcewrapper, sink); } catch (name.levering.ryan.sparql.common.QueryException e) { throw new QueryExecutionException("Error executing query: " + e.Message, e); } } public NamespaceManager GetQueryPrefixes() { NamespaceManager ns = new NamespaceManager(); java.util.Map prefixes = ((QueryData)query).getPrefixExpansions(); for (java.util.Iterator i = prefixes.keySet().iterator(); i.hasNext(); ) { string prefix = (string)i.next(); string uri = prefixes.get(prefix).ToString(); // surrounded in < > uri = uri.Substring(1, uri.Length-2); // not sure how to get this directly ns.AddNamespace(uri, prefix); } return ns; } void WriteGraph(RdfGraph graph, RdfSourceWrapper sourcewrapper, StatementSink sink) { if (sink is RdfWriter) ((RdfWriter)sink).Namespaces.AddFrom(GetQueryPrefixes()); java.util.Iterator iter = graph.iterator(); while (iter.hasNext()) { GraphStatement stmt = (GraphStatement)iter.next(); Statement s; if (stmt is GraphStatementWrapper) { s = ((GraphStatementWrapper)stmt).s; } else { s = new Statement( sourcewrapper.ToEntity(stmt.getSubject()), sourcewrapper.ToEntity(stmt.getPredicate()), sourcewrapper.ToResource(stmt.getObject()), stmt.getGraphName() == null ? Statement.DefaultMeta : sourcewrapper.ToEntity(stmt.getGraphName())); } if (s.AnyNull) continue; // unbound variable, or literal in bad position sink.Add(s); } } public void Construct(SelectableSource source, TextWriter output) { using (RdfWriter w = RdfWriter.Create(MimeType, output)) Construct(source, w); } public void Describe(SelectableSource source, StatementSink sink) { if (!(query is DescribeQuery)) throw new InvalidOperationException("Only DESCRIBE queries are supported by this method (" + query.GetType() + ")."); DescribeQuery q = (DescribeQuery)query; RdfSourceWrapper sourcewrapper = BindLogic(source); try { RdfGraph graph = q.execute(sourcewrapper); WriteGraph(graph, sourcewrapper, sink); } catch (name.levering.ryan.sparql.common.QueryException e) { throw new QueryExecutionException("Error executing query: " + e.Message, e); } } public void Describe(SelectableSource source, TextWriter output) { using (RdfWriter w = RdfWriter.Create(MimeType, output)) Describe(source, w); } public void Select(SelectableSource source, TextWriter output) { Select(source, new SparqlXmlQuerySink(output)); } public void Select(SelectableSource source, QueryResultSink sink) { if (!(query is SelectQuery)) throw new InvalidOperationException("Only SELECT queries are supported by this method (" + query.GetType() + ")."); Run(source, sink); } public override void Run(SelectableSource source, QueryResultSink resultsink) { if (!(query is SelectQuery)) throw new InvalidOperationException("Only SELECT queries are supported by this method (" + query.GetType() + ")."); // Perform the query SelectQuery squery = (SelectQuery)query; RdfSourceWrapper sourcewrapper = BindLogic(source); RdfBindingSet results; try { results = squery.execute(sourcewrapper); } catch (name.levering.ryan.sparql.common.QueryException e) { throw new QueryExecutionException("Error executing query: " + e.Message, e); } // Prepare binding objects java.util.List vars = results.getVariables(); SparqlVariable[] svars = new SparqlVariable[vars.size()]; SemWebVariable[] vars2 = new SemWebVariable[vars.size()]; for (int i = 0; i < svars.Length; i++) { svars[i] = (SparqlVariable)vars.get(i); vars2[i] = new SemWebVariable(svars[i].getName()); } // Initialize the result sink resultsink.Init(vars2); // set distinct and ordered // Set the comments resultsink.AddComments(queryString + "\n"); resultsink.AddComments(sourcewrapper.GetLog()); // Iterate the bindings java.util.Iterator iter = results.iterator(); long ctr = -1, ctr2 = 0; while (iter.hasNext()) { RdfBindingRow row = (RdfBindingRow)iter.next(); // Since SPARQL processing may be lazy-delayed, // add any new comments that might have been logged. resultsink.AddComments(sourcewrapper.GetLog()); ctr++; if (ctr < ReturnStart && ReturnStart != -1) continue; Resource[] bindings = new Resource[vars2.Length]; for (int i = 0; i < bindings.Length; i++) { Resource r = sourcewrapper.ToResource(row.getValue(svars[i])); r = sourcewrapper.Persist(r); bindings[i] = r; } resultsink.AddComments(sourcewrapper.GetLog()); resultsink.Add(new VariableBindings(vars2, bindings)); ctr2++; if (ctr2 >= ReturnLimit && ReturnLimit != -1) break; } resultsink.AddComments(sourcewrapper.GetLog()); // Close the result sink. resultsink.Finished(); } /* INTERNAL METHODS TO CONTROL QUERY EXECUTION */ private RdfSourceWrapper BindLogic(SelectableSource source) { RdfSourceWrapper sourcewrapper = new RdfSourceWrapper(source, QueryMeta, this); MyLogicFactory logic = new MyLogicFactory(); foreach (RdfFunction f in extFunctions) logic.registerExternalFunction( new URIWrapper(f.Uri), new ExtFuncWrapper(sourcewrapper, f)); query.prepare(sourcewrapper, logic); return sourcewrapper; } class MyLogicFactory : name.levering.ryan.sparql.logic.StreamedLogic { public override name.levering.ryan.sparql.model.logic.ConstraintLogic getGroupConstraintLogic(name.levering.ryan.sparql.model.data.GroupConstraintData data) { return new RdfGroupLogic(data, new name.levering.ryan.sparql.logic.streamed.IndexedSetIntersectLogic()); } } class RdfSourceWrapper : AdvancedRdfSource, SPARQLValueFactory { public readonly SelectableSource source; Hashtable bnodes = new Hashtable(); Entity QueryMeta; SparqlEngine sparql; System.Text.StringBuilder log = new System.Text.StringBuilder(); public RdfSourceWrapper(SelectableSource source, Entity meta, SparqlEngine sparql) { this.source = source; QueryMeta = meta; this.sparql = sparql; } public void Log(string message) { log.Append(message); log.Append('\n'); } public string GetLog() { string ret = log.ToString(); log.Length = 0; return ret; } private java.util.Iterator GetIterator(Statement statement, bool defaultGraph, int limit) { return GetIterator(statement.Subject == null ? null : new Entity[] { statement.Subject }, statement.Predicate == null ? null : new Entity[] { statement.Predicate }, statement.Object == null ? null : new Resource[] { statement.Object }, statement.Meta == null ? null : new Entity[] { statement.Meta }, null, defaultGraph, limit); } private java.util.Iterator GetIterator(Entity[] subjects, Entity[] predicates, Resource[] objects, Entity[] metas, object[] litFilters, bool defaultGraph, int limit) { if (subjects == null && predicates == null && objects == null && limit == -1) throw new QueryExecutionException("Query would select all statements in the store."); if (subjects != null) Depersist(subjects); if (predicates != null) Depersist(predicates); if (objects != null) Depersist(objects); if (metas != null) Depersist(metas); if (subjects != null && subjects.Length == 0) return new EmptyIterator(); if (predicates != null && predicates.Length == 0) return new EmptyIterator(); if (objects != null && objects.Length == 0) return new EmptyIterator(); if (metas != null && metas.Length == 0) return new EmptyIterator(); SelectFilter filter = new SelectFilter(subjects, predicates, objects, metas); if (litFilters != null) { filter.LiteralFilters = new LiteralFilter[litFilters.Length]; for (int i = 0; i < litFilters.Length; i++) filter.LiteralFilters[i] = (LiteralFilter)litFilters[i]; } if (limit == 0) filter.Limit = 1; else if (limit > 0) filter.Limit = limit; return new StatementIterator(source, filter, this, defaultGraph && metas == null); } /** * Gets all the statements that come from the default graph and have a * certain subject, predicate, and object. Any of the parameters can be * null, in which case it assumes these are "wildcards" and all statements * that match the remainding parameters will be returned. */ public java.util.Iterator getDefaultStatements (name.levering.ryan.sparql.common.Value subject, name.levering.ryan.sparql.common.URI predicate, name.levering.ryan.sparql.common.Value @object) { return GetIterator( new Statement(ToEntity(subject), ToEntity(predicate), ToResource(@object), QueryMeta), true, -1 ); } public java.util.Iterator getDefaultStatements (name.levering.ryan.sparql.common.Value[] subject, name.levering.ryan.sparql.common.Value[] predicate, name.levering.ryan.sparql.common.Value[] @object, object[] litFilters, int limit) { return GetIterator( ToEntities(subject), ToEntities(predicate), ToResources(@object), QueryMeta == null ? null : new Entity[] { QueryMeta }, litFilters, true, limit ); } /** * Gets all the statements that come from any graph and have a certain * subject, predicate, and object. Any of the parameters can be null, in * which case it assumes these are "wildcards" and all statements that match * the remainding parameters will be returned. * * @param the subj the subject to match statements against * @param pred the predicate to match statements against * @param obj the object to match statements against * @return an Iterator over the matching statements */ public java.util.Iterator getStatements (name.levering.ryan.sparql.common.Value subject, name.levering.ryan.sparql.common.URI predicate, name.levering.ryan.sparql.common.Value @object) { return GetIterator( new Statement(ToEntity(subject), ToEntity(predicate), ToResource(@object), null), false, -1 ); } public java.util.Iterator getStatements (name.levering.ryan.sparql.common.Value[] subject, name.levering.ryan.sparql.common.Value[] predicate, name.levering.ryan.sparql.common.Value[] @object, object[] litFilters, int limit) { return GetIterator( ToEntities(subject), ToEntities(predicate), ToResources(@object), null, litFilters, false, limit ); } /** * Gets all the statements that come from a particular named graph and have * a certain subject, predicate, and object. Any of the parameters can be * null, in which case it assumes these are "wildcards" and all statements * that match the remainding parameters will be returned. */ public java.util.Iterator getStatements (name.levering.ryan.sparql.common.Value subject, name.levering.ryan.sparql.common.URI predicate, name.levering.ryan.sparql.common.Value @object, name.levering.ryan.sparql.common.URI graph) { return GetIterator( new Statement(ToEntity(subject), ToEntity(predicate), ToResource(@object), ToEntity(graph)), false, -1 ); } public java.util.Iterator getStatements (name.levering.ryan.sparql.common.Value[] subject, name.levering.ryan.sparql.common.Value[] predicate, name.levering.ryan.sparql.common.Value[] @object, name.levering.ryan.sparql.common.URI[] graph, object[] litFilters, int limit) { return GetIterator( ToEntities(subject), ToEntities(predicate), ToResources(@object), ToEntities(graph), litFilters, false, limit ); } public name.levering.ryan.sparql.common.SPARQLValueFactory getValueFactory() { return this; } private bool has(Statement statement) { bool ret = source.Contains(statement); Log("CONTAINS: " + statement + " (" + ret + ")"); return ret; } public bool hasDefaultStatement (name.levering.ryan.sparql.common.Value subject, name.levering.ryan.sparql.common.URI @predicate, name.levering.ryan.sparql.common.Value @object) { return has(new Statement(ToEntity(subject), ToEntity(predicate), ToResource(@object), QueryMeta)); } public bool hasStatement (name.levering.ryan.sparql.common.Value subject, name.levering.ryan.sparql.common.URI @predicate, name.levering.ryan.sparql.common.Value @object) { return has(new Statement(ToEntity(subject), ToEntity(predicate), ToResource(@object), null)); } public bool hasStatement (name.levering.ryan.sparql.common.Value subject, name.levering.ryan.sparql.common.URI @predicate, name.levering.ryan.sparql.common.Value @object, name.levering.ryan.sparql.common.URI graph) { return has(new Statement(ToEntity(subject), ToEntity(predicate), ToResource(@object), ToEntity(graph))); } public Entity ToEntity(name.levering.ryan.sparql.common.Value ent) { if (ent == null) return null; if (ent is BNodeWrapper) return ((BNodeWrapper)ent).r; if (ent is URIWrapper) return ((URIWrapper)ent).r; if (ent is name.levering.ryan.sparql.common.BNode) { name.levering.ryan.sparql.common.BNode bnode = (name.levering.ryan.sparql.common.BNode)ent; Entity r = (Entity)bnodes[bnode.getID()]; if (r == null) { r = new BNode(); bnodes[bnode.getID()] = r; } return r; } else if (ent is name.levering.ryan.sparql.common.URI) { name.levering.ryan.sparql.common.URI uri = (name.levering.ryan.sparql.common.URI)ent; return new Entity(uri.getURI()); } else { return null; } } public Resource ToResource(name.levering.ryan.sparql.common.Value value) { if (value == null) return null; if (value is LiteralWrapper) return ((LiteralWrapper)value).r; if (value is name.levering.ryan.sparql.common.Literal) { name.levering.ryan.sparql.common.Literal literal = (name.levering.ryan.sparql.common.Literal)value; return new Literal(literal.getLabel(), literal.getLanguage(), literal.getDatatype() == null ? null : literal.getDatatype().getURI()); } else { return ToEntity(value); } } public Entity[] ToEntities(name.levering.ryan.sparql.common.Value[] ents) { if (ents == null) return null; ArrayList ret = new ArrayList(); for (int i = 0; i < ents.Length; i++) if (!(ents[i] is name.levering.ryan.sparql.common.Literal)) ret.Add( ToEntity(ents[i]) ); return (Entity[])ret.ToArray(typeof(Entity)); } public Resource[] ToResources(name.levering.ryan.sparql.common.Value[] ents) { if (ents == null) return null; Resource[] ret = new Resource[ents.Length]; for (int i = 0; i < ents.Length; i++) ret[i] = ToResource(ents[i]); return ret; } public Resource[] ToResources(name.levering.ryan.sparql.model.logic.ExpressionLogic[] ents, name.levering.ryan.sparql.common.RdfBindingRow binding) { if (ents == null) return null; Resource[] ret = new Resource[ents.Length]; for (int i = 0; i < ents.Length; i++) { if (ents[i] is SparqlVariable) ret[i] = ToResource(binding.getValue((SparqlVariable)ents[i])); else ret[i] = ToResource((name.levering.ryan.sparql.common.Value)ents[i]); } return ret; } public name.levering.ryan.sparql.common.Value createValue(name.levering.ryan.sparql.common.Value value) { if (value is BNodeWrapper) return value; if (value is LiteralWrapper) return value; if (value is URIWrapper) return value; return Wrap(ToResource(value)); } public name.levering.ryan.sparql.common.BNode createBNode(name.levering.ryan.sparql.common.BNode value) { return (name.levering.ryan.sparql.common.BNode)createValue(value); } public name.levering.ryan.sparql.common.Literal createLiteral(name.levering.ryan.sparql.common.Literal value) { return (name.levering.ryan.sparql.common.Literal)createValue(value); } public name.levering.ryan.sparql.common.URI createURI(name.levering.ryan.sparql.common.URI value) { return (name.levering.ryan.sparql.common.URI)createValue(value); } public name.levering.ryan.sparql.common.BNode createBNode() { return new BNodeWrapper(new BNode()); } public name.levering.ryan.sparql.common.BNode createBNode(string id) { return new BNodeWrapper(new BNode(id)); } public name.levering.ryan.sparql.common.Literal createLiteral(string value, string lang) { return new LiteralWrapper(new Literal(value, lang, null)); } public name.levering.ryan.sparql.common.Literal createLiteral(string value, name.levering.ryan.sparql.common.URI datatype) { return new LiteralWrapper(new Literal(value, null, datatype.getURI())); } public name.levering.ryan.sparql.common.Literal createLiteral(string value) { return new LiteralWrapper(new Literal(value)); } public name.levering.ryan.sparql.common.Literal createLiteral(float value) { return new LiteralWrapper(Literal.FromValue(value)); } public name.levering.ryan.sparql.common.Literal createLiteral(double value) { return new LiteralWrapper(Literal.FromValue(value)); } public name.levering.ryan.sparql.common.Literal createLiteral(byte value) { return new LiteralWrapper(Literal.FromValue(value)); } public name.levering.ryan.sparql.common.Literal createLiteral(short value) { return new LiteralWrapper(Literal.FromValue(value)); } public name.levering.ryan.sparql.common.Literal createLiteral(int value) { return new LiteralWrapper(Literal.FromValue(value)); } public name.levering.ryan.sparql.common.Literal createLiteral(long value) { return new LiteralWrapper(Literal.FromValue(value)); } public name.levering.ryan.sparql.common.Literal createLiteral(bool value) { return new LiteralWrapper(Literal.FromValue(value)); } public name.levering.ryan.sparql.common.URI createURI(string ns, string ln) { return createURI(ns + ln); } public name.levering.ryan.sparql.common.URI createURI(string uri) { return new URIWrapper(new Entity(uri)); } public name.levering.ryan.sparql.common.Statement createStatement (name.levering.ryan.sparql.common.Resource subject, name.levering.ryan.sparql.common.URI @predicate, name.levering.ryan.sparql.common.Value @object) { return new Stmt(subject, predicate, @object); } class Stmt : name.levering.ryan.sparql.common.Statement { name.levering.ryan.sparql.common.Resource subject; name.levering.ryan.sparql.common.URI predicate; name.levering.ryan.sparql.common.Value @object; public Stmt(name.levering.ryan.sparql.common.Resource subject, name.levering.ryan.sparql.common.URI @predicate, name.levering.ryan.sparql.common.Value @object) { this.subject = subject; this.predicate = predicate; this.@object = @object; } public name.levering.ryan.sparql.common.Resource getSubject() { return subject; } public name.levering.ryan.sparql.common.URI getPredicate() { return predicate; } public name.levering.ryan.sparql.common.Value getObject() { return @object; } public bool equals(object other) { name.levering.ryan.sparql.common.Statement s = (name.levering.ryan.sparql.common.Statement)other; return getSubject().Equals(s.getSubject()) && getPredicate().Equals(s.getPredicate()) && getObject().Equals(s.getObject()); } public int hashCode() { return getSubject().GetHashCode(); } } public void Depersist(Resource[] r) { for (int i = 0; i < r.Length; i++) r[i] = Depersist(r[i]); } public Resource Depersist(Resource r) { if (r.Uri == null || !sparql.AllowPersistBNodes) return r; if (!(source is StaticSource)) return r; if (!r.Uri.StartsWith(SparqlEngine.BNodePersistUri)) return r; StaticSource spb = (StaticSource)source; string uri = r.Uri; string id = uri.Substring(SparqlEngine.BNodePersistUri.Length); BNode node = spb.GetBNodeFromPersistentId(id); if (node != null) return node; return r; } public Resource Persist(Resource r) { if (!(r is BNode) || !sparql.AllowPersistBNodes) return r; if (!(source is StaticSource)) return r; StaticSource spb = (StaticSource)source; string id = spb.GetPersistentBNodeId((BNode)r); if (id == null) return r; return new Entity(SparqlEngine.BNodePersistUri + ":" + id); } public static name.levering.ryan.sparql.common.Value Wrap(Resource res, Hashtable cache) { if (cache.ContainsKey(res)) return (name.levering.ryan.sparql.common.Value)cache[res]; name.levering.ryan.sparql.common.Value value = Wrap(res); cache[res] = value; return value; } public static name.levering.ryan.sparql.common.Value Wrap(Resource res) { if (res is Literal) return new LiteralWrapper((Literal)res); else if (res.Uri == null) return new BNodeWrapper((BNode)res); else return new URIWrapper((Entity)res); } } class EmptyIterator : java.util.Iterator { public bool hasNext() { return false; } public object next() { throw new InvalidOperationException(); } public void remove() { throw new InvalidOperationException(); } } class StatementIterator : java.util.Iterator { SelectableSource source; SelectFilter filter; RdfSourceWrapper wrapper; bool wantMetas; Statement[] statements; int curindex = -1; Hashtable cache = new Hashtable(); public StatementIterator(SelectableSource source, SelectFilter filter, RdfSourceWrapper wrapper, bool wantMetas) { this.source = source; this.filter = filter; this.wrapper = wrapper; this.wantMetas = wantMetas; } public bool hasNext() { if (statements == null) { System.DateTime start = System.DateTime.Now; MemoryStore results = new MemoryStore(); StatementSink sink = results; if (!source.Distinct) sink = new SemWeb.Util.DistinctStatementsSink(results, !wantMetas); source.Select(filter, sink); wrapper.Log("SELECT: " + filter + " => " + results.StatementCount + " statements [" + (System.DateTime.Now-start) + "s]"); statements = results.ToArray(); } return curindex + 1 < statements.Length; } public object next() { curindex++; return new GraphStatementWrapper(statements[curindex], cache); } public void remove() { throw new InvalidOperationException(); } } class GraphStatementWrapper : GraphStatement { public readonly Statement s; name.levering.ryan.sparql.common.Value S; name.levering.ryan.sparql.common.URI P; name.levering.ryan.sparql.common.Value O; name.levering.ryan.sparql.common.URI G; public GraphStatementWrapper(Statement statement, Hashtable cache) { s = statement; S = RdfSourceWrapper.Wrap(s.Subject, cache); if (s.Predicate.Uri == null) throw new QueryExecutionException("Statement's predicate is a blank node."); P = RdfSourceWrapper.Wrap(s.Predicate, cache) as name.levering.ryan.sparql.common.URI; O = RdfSourceWrapper.Wrap(s.Object, cache); G = RdfSourceWrapper.Wrap(s.Meta, cache) as name.levering.ryan.sparql.common.URI; } public name.levering.ryan.sparql.common.URI getGraphName() { return G; } public name.levering.ryan.sparql.common.Value getSubject() { return S; } public name.levering.ryan.sparql.common.URI getPredicate() { return P; } public name.levering.ryan.sparql.common.Value getObject() { return O; } } class BNodeWrapper : java.lang.Object, name.levering.ryan.sparql.common.BNode { public BNode r; public BNodeWrapper(BNode res) { r = res; } public string getID() { if (r.LocalName != null) return r.LocalName; return r.GetHashCode().ToString(); } public override bool equals(object other) { if (other is BNodeWrapper) return r.Equals(((BNodeWrapper)other).r); if (other is name.levering.ryan.sparql.common.BNode) return getID().Equals(((name.levering.ryan.sparql.common.BNode)other).getID()); return false; } public override int hashCode() { if (r.LocalName != null) java.lang.String.instancehelper_hashCode(getID()); return r.GetHashCode(); } public object getNative() { return r; } } class URIWrapper : java.lang.Object, name.levering.ryan.sparql.common.URI { public Entity r; int hc; public URIWrapper(Entity res) { r = res; hc = java.lang.String.instancehelper_hashCode(r.Uri); } public string getURI() { return r.Uri; } public override string toString() { return r.Uri; } public override bool equals(object other) { if (other is URIWrapper) return r.Equals(((URIWrapper)other).r); else if (other is name.levering.ryan.sparql.common.URI) return r.Uri == ((name.levering.ryan.sparql.common.URI)other).getURI(); else return false; } public override int hashCode() { return hc; } public object getNative() { return r.Uri; } } class LiteralWrapper : java.lang.Object, name.levering.ryan.sparql.common.Literal { public Literal r; int hc; public LiteralWrapper(Literal res) { r = res; hc = java.lang.String.instancehelper_hashCode(r.Value); } public name.levering.ryan.sparql.common.URI getDatatype() { if (r.DataType == null) return null; return new URIWrapper(r.DataType); } public string getLabel() { return r.Value; } public string getLanguage() { return r.Language; } public override bool equals(object other) { if (other is LiteralWrapper) return r.Equals(((LiteralWrapper)other).r); else if (other is name.levering.ryan.sparql.common.Literal) return r.Equals(GetLiteral((name.levering.ryan.sparql.common.Literal)other)); return false; } public override int hashCode() { return hc; } static Literal GetLiteral(name.levering.ryan.sparql.common.Literal literal) { return new Literal(literal.getLabel(), literal.getLanguage(), literal.getDatatype() == null ? null : literal.getDatatype().getURI()); } public object getNative() { return r; } } class ExtFuncWrapper : name.levering.ryan.sparql.logic.function.ExternalFunctionFactory, name.levering.ryan.sparql.logic.function.ExternalFunction { RdfSourceWrapper source; RdfFunction func; public ExtFuncWrapper(RdfSourceWrapper s, RdfFunction f) { source = s; func = f; } public name.levering.ryan.sparql.logic.function.ExternalFunction create(name.levering.ryan.sparql.model.logic.LogicFactory logicfactory, name.levering.ryan.sparql.common.SPARQLValueFactory valuefactory) { return this; } public name.levering.ryan.sparql.common.Value evaluate(name.levering.ryan.sparql.model.logic.ExpressionLogic[] arguments, name.levering.ryan.sparql.common.RdfBindingRow binding) { try { Resource ret = func.Evaluate(source.ToResources(arguments, binding)); return RdfSourceWrapper.Wrap(ret); } catch (Exception e) { throw new name.levering.ryan.sparql.logic.function.ExternalFunctionException(e); } } } class RdfGroupLogic : name.levering.ryan.sparql.logic.AdvancedGroupConstraintLogic { public RdfGroupLogic(name.levering.ryan.sparql.model.data.GroupConstraintData data, name.levering.ryan.sparql.model.logic.helper.SetIntersectLogic logic) : base(data, logic) { } protected override RdfBindingSet runTripleConstraints(java.util.List tripleConstraints, name.levering.ryan.sparql.model.logic.ConstraintLogic.CallParams p) { RdfSourceWrapper s = (RdfSourceWrapper)p.source; if (s.source is QueryableSource) { QueryableSource qs = (QueryableSource)s.source; QueryOptions opts = new QueryOptions(); opts.Limit = p.limit; VariableList distinguishedVars = new VariableList(); VariableList undistinguishedVars = new VariableList(); opts.VariableKnownValues = new VarKnownValuesType(); Statement[] graph = new Statement[tripleConstraints.size()]; Hashtable varMap1 = new Hashtable(); Hashtable varMap2 = new Hashtable(); for (int i = 0; i < tripleConstraints.size(); i++) { TripleConstraintData triple = tripleConstraints.get(i) as TripleConstraintData; if (triple == null) return null; graph[i] = new Statement(null, null, null, null); // I don't understand why this should be necessary for a struct, but I get a null reference exception otherwise (yet, that didn't happen initially) graph[i].Subject = ToRes(triple.getSubjectExpression(), p.knownValues, true, varMap1, varMap2, s, opts, distinguishedVars, undistinguishedVars, p.distinguishedVariables) as Entity; graph[i].Predicate = ToRes(triple.getPredicateExpression(), p.knownValues, true, varMap1, varMap2, s, opts, distinguishedVars, undistinguishedVars, p.distinguishedVariables) as Entity; graph[i].Object = ToRes(triple.getObjectExpression(), p.knownValues, false, varMap1, varMap2, s, opts, distinguishedVars, undistinguishedVars, p.distinguishedVariables); graph[i].Meta = new Variable(); // each part of the statement can have difference provenance if (graph[i].AnyNull) return new RdfBindingSetImpl(); if (!(graph[i].Subject is Variable) && !(graph[i].Predicate is Variable) && !(graph[i].Object is Variable)) return null; // we could use Contains(), but we'll just abandon the Query() path altogether } if (p.distinguishedVariables == null) { opts.DistinguishedVariables = null; } else if (distinguishedVars.Count > 0) { opts.DistinguishedVariables = distinguishedVars; } else if (undistinguishedVars.Count > 0) { // we don't mean to make it distinguished, but we need at least one, // and for now we'll just take the first opts.DistinguishedVariables = new VariableList(); ((VariableList)opts.DistinguishedVariables).Add(undistinguishedVars[0]); } else { // no variables! return null; } opts.VariableLiteralFilters = new LitFilterMap(); foreach (DictionaryEntry kv in varMap1) { if (p.knownFilters != null && p.knownFilters.containsKey(kv.Key)) { LitFilterList filters = new LitFilterList(); for (java.util.Iterator iter = ((java.util.List)p.knownFilters.get(kv.Key)).iterator(); iter.hasNext(); ) filters.Add((LiteralFilter)iter.next()); opts.VariableLiteralFilters[(Variable)kv.Value] = filters; } } // too expensive to do... //if (!qs.MetaQuery(graph, opts).QuerySupported) // return null; // TODO: We could also check if any part has NoData, we can abandon the query entirely QueryResultBuilder builder = new QueryResultBuilder(); builder.varMap = varMap2; builder.source = s; qs.Query(graph, opts, builder); return builder.bindings; } return null; } class QueryResultBuilder : QueryResultSink { public Hashtable varMap; public RdfSourceWrapper source; public RdfBindingSetImpl bindings; public override void Init(Variable[] variables) { java.util.ArrayList vars = new java.util.ArrayList(); foreach (Variable b in variables) if (varMap[b] != null) // because of bad treatment of meta vars.add((SparqlVariable)varMap[b]); bindings = new RdfBindingSetImpl(vars); } public override bool Add(VariableBindings result) { RdfBindingRowImpl row = new RdfBindingRowImpl(bindings); for (int i = 0; i < result.Count; i++) { if (varMap[result.Variables[i]] == null) continue; // because of the bad treatment of meta row.addBinding( (SparqlVariable)varMap[result.Variables[i]], RdfSourceWrapper.Wrap(result.Values[i]) ); } bindings.addRow(row); return true; } public override void AddComments(string comments) { source.Log(comments); } } Resource ToRes(object expr, java.util.Map knownValues, bool entities, Hashtable varMap1, Hashtable varMap2, RdfSourceWrapper src, QueryOptions opts, VariableList distinguishedVars, VariableList undistinguishedVars, java.util.Set sparqlDistinguished) { if (expr is SparqlVariable) { Variable v; if (varMap1.ContainsKey(expr)) { v = (Variable)varMap1[expr]; } else { v = new Variable(expr.ToString()); varMap1[expr] = v; varMap2[v] = expr; if (knownValues != null && knownValues.get(expr) != null) { java.util.Set values = (java.util.Set)knownValues.get(expr); VarKnownValuesList values2 = new VarKnownValuesList(); for (java.util.Iterator iter = values.iterator(); iter.hasNext(); ) { Resource r = src.ToResource((name.levering.ryan.sparql.common.Value)iter.next()); if (r != null) values2.Add(r); } opts.VariableKnownValues[v] = values2; } if (sparqlDistinguished != null && sparqlDistinguished.contains(expr)) distinguishedVars.Add(v); else undistinguishedVars.Add(v); } return v; } return entities ? src.ToEntity((name.levering.ryan.sparql.common.Value)expr) : src.ToResource((name.levering.ryan.sparql.common.Value)expr); } protected override void extractLiteralFilters(name.levering.ryan.sparql.model.logic.ExpressionLogic node, java.util.Map literalFilters) { //Console.Error.WriteLine(node + " " + node.GetType()); base.extractLiteralFilters(node, literalFilters); if (node is BinaryExpressionNode) { BinaryExpressionNode b = (BinaryExpressionNode)node; LiteralFilter.CompType comp; if (node is ASTEqualsNode) comp = LiteralFilter.CompType.EQ; else if (node is ASTNotEqualsNode) comp = LiteralFilter.CompType.NE; else if (node is ASTGreaterThanNode) comp = LiteralFilter.CompType.GT; else if (node is ASTGreaterThanEqualsNode) comp = LiteralFilter.CompType.GE; else if (node is ASTLessThanNode) comp = LiteralFilter.CompType.LT; else if (node is ASTLessThanEqualsNode) comp = LiteralFilter.CompType.LE; else return; SparqlVariable var; name.levering.ryan.sparql.common.Literal val; object left = RemoveCast(b.getLeftExpression()); object right = RemoveCast(b.getRightExpression()); if (left is ASTVar && right is name.levering.ryan.sparql.common.Literal) { var = (SparqlVariable)left; val = (name.levering.ryan.sparql.common.Literal)right; } else if (right is ASTVar && left is name.levering.ryan.sparql.common.Literal) { var = (SparqlVariable)right; val = (name.levering.ryan.sparql.common.Literal)left; switch (comp) { case LiteralFilter.CompType.LT: comp = LiteralFilter.CompType.GE; break; case LiteralFilter.CompType.LE: comp = LiteralFilter.CompType.GT; break; case LiteralFilter.CompType.GT: comp = LiteralFilter.CompType.LE; break; case LiteralFilter.CompType.GE: comp = LiteralFilter.CompType.LT; break; } } else { return; } object parsedvalue = new Literal(val.getLabel(), null, val.getDatatype() == null ? null : val.getDatatype().getURI()).ParseValue(); LiteralFilter filter = LiteralFilter.Create(comp, parsedvalue); addLiteralFilter(var, filter, literalFilters); } else if (node is ASTRegexFuncNode) { ASTRegexFuncNode renode = (ASTRegexFuncNode)node; SparqlVariable var = RemoveCast(renode.getArguments().get(0)) as ASTVar; name.levering.ryan.sparql.common.Literal relit = RemoveCast(renode.getArguments().get(1)) as name.levering.ryan.sparql.common.Literal; if (var == null || relit == null) return; string re = relit.getLabel(); if (re.Length == 0) return; bool startsW = removeChar(ref re, '^', 0); // chop of ^ from start, return whether it was there bool endsW = removeChar(ref re, '$', 1); // chop of $ from end, return whether it was there // make sure the re that's left has no special re characters foreach (char c in re) if (c == '(' || c == '[' || c == '{' || c == '*' || c == '?' || c == '+' || c == '\\' || c == '|' || c == '.') return; LiteralFilter filter; if (startsW && endsW) { filter = LiteralFilter.Create(LiteralFilter.CompType.EQ, re); } else if (startsW) { filter = new SemWeb.Filters.StringStartsWithFilter(re); } else if (endsW) { filter = new SemWeb.Filters.StringEndsWithFilter(re); } else { filter = new SemWeb.Filters.StringContainsFilter(re); } addLiteralFilter(var, filter, literalFilters); } } bool removeChar(ref string re, char c, int end) { bool ret = re[(end == 0 ? 0 : re.Length-1)] == c; if (ret) { if (end == 0) re = re.Substring(1); else re = re.Substring(0, re.Length-1); } return ret; } object RemoveCast(object node) { if (node is ASTFunctionCall) { string name = ((ASTFunctionCall)node).getName(null).ToString(); if (name.StartsWith("http://www.w3.org/2001/XMLSchema#")) return RemoveCast(((ASTFunctionCall)node).getArguments().get(0)); } if (node is ASTMinusNode) { object inside = RemoveCast(((ASTMinusNode)node).getExpression()); if (inside is ASTLiteral) { string value = ((ASTLiteral)inside).getLabel(); double doublevalue = double.Parse(value); return new LiteralWrapper(new Literal((-doublevalue).ToString(), null, ((ASTLiteral)inside).getDatatype().getURI())); } } return node; } } class TestFunction : RdfFunction { public override string Uri { get { return "http://taubz.for.net/code/semweb/test/function"; } } public override Resource Evaluate(Resource[] args) { return Literal.FromValue(args.Length == 2 && args[0].Equals(args[1])); } } class LCFunction : RdfFunction { public override string Uri { get { return "http://taubz.for.net/code/semweb/test/lc"; } } public override Resource Evaluate(Resource[] args) { if (args.Length != 1 || !(args[0] is Literal)) throw new InvalidOperationException(); return new Literal(((Literal)args[0]).Value.ToLower()); } } class UCFunction : RdfFunction { public override string Uri { get { return "http://taubz.for.net/code/semweb/test/uc"; } } public override Resource Evaluate(Resource[] args) { if (args.Length != 1 || !(args[0] is Literal)) throw new InvalidOperationException(); return new Literal(((Literal)args[0]).Value.ToUpper()); } } } } semweb-1.05+dfsg/Makefile0000644000175000017500000001322110774502134014600 0ustar meebeymeebeyVERSION=1.05 # don't forget to update src/AssemblyInfo.cs!! ######################## # Some checks to see if dependenies are available for # optional assemblies. npgsql_available := $(shell gacutil -l Npgsql | grep -c PublicKeyToken) sqlite_available := $(shell gacutil -l Mono.Data.SqliteClient | grep -c PublicKeyToken) mysql_available := $(shell gacutil -l MySql.Data | grep -c PublicKeyToken) ######################## # If PROFILE is empty, then our default target is to # shell out a make for each profile. Otherwise, we # just build the profile we're given. Since we can't # build any of the .NET target files without a PROFILE, # those targets are in the else condition. ifeq "$(PROFILE)" "" all: PROFILE=DOTNET1 make PROFILE=DOTNET2 make # PROFILE=SILVERLIGHT make # PROFILE=DOTNET3 make # If we have a PROFILE specified. else ifeq "$(PROFILE)" "DOTNET1" BIN=bin MCS=mcs -d:DOTNET1 endif ifeq "$(PROFILE)" "DOTNET2" BIN=bin_generics MCS=gmcs -d:DOTNET2 endif ifeq "$(PROFILE)" "DOTNET3" BIN=bin_linq MCS=gmcs -d:DOTNET3 -langversion:linq endif ifeq "$(PROFILE)" "SILVERLIGHT" BIN=bin_silverlight MCS=smcs -d:SILVERLIGHT endif all: $(BIN)/SemWeb.dll $(BIN)/SemWeb.PostgreSQLStore.dll $(BIN)/SemWeb.MySQLStore.dll $(BIN)/SemWeb.SqliteStore.dll $(BIN)/SemWeb.SQLServerStore.dll $(BIN)/SemWeb.Sparql.dll $(BIN)/rdfstorage.exe $(BIN)/rdfquery.exe $(BIN)/euler.exe # Core Library MAIN_SOURCES = \ src/AssemblyInfo.cs \ src/NamespaceManager.cs src/Util.cs src/UriMap.cs \ src/Resource.cs src/Statement.cs \ src/Interfaces.cs \ src/Store.cs src/MemoryStore.cs src/SQLStore.cs \ src/RdfReader.cs src/RdfXmlReader.cs src/N3Reader.cs \ src/RdfWriter.cs src/RdfXmlWriter.cs src/N3Writer.cs \ src/Query.cs src/GraphMatch.cs src/LiteralFilters.cs \ src/Inference.cs src/RDFS.cs src/Euler.cs src/SpecialRelations.cs \ src/Algos.cs src/SparqlClient.cs $(BIN)/SemWeb.dll: $(MAIN_SOURCES) Makefile mkdir -p $(BIN) $(MCS) -debug $(MAIN_SOURCES) -out:$(BIN)/SemWeb.dll -t:library \ -r:System.Data -r:System.Web # Auxiliary Assemblies $(BIN)/SemWeb.Sparql.dll: src/SparqlEngine.cs src/SparqlProtocol.cs $(MCS) -debug src/SparqlEngine.cs src/SparqlProtocol.cs -out:$(BIN)/SemWeb.Sparql.dll \ -t:library -r:$(BIN)/SemWeb.dll -r:$(BIN)/sparql-core.dll -r:$(BIN)/IKVM.GNU.Classpath.dll \ -r:System.Web $(BIN)/SemWeb.PostgreSQLStore.dll: src/PostgreSQLStore.cs ifneq "$(npgsql_available)" "0" $(MCS) -debug src/PostgreSQLStore.cs -out:$(BIN)/SemWeb.PostgreSQLStore.dll -t:library \ -r:$(BIN)/SemWeb.dll -r:System.Data -r:Npgsql else @echo "SKIPPING compilation of SemWeb.PosgreSQLStore.dll because Npgsql assembly seems to be not available in the GAC."; endif $(BIN)/SemWeb.SqliteStore.dll: src/SQLiteStore.cs ifneq "$(sqlite_available)" "0" $(MCS) -debug src/SQLiteStore.cs -out:$(BIN)/SemWeb.SqliteStore.dll -t:library \ -r:$(BIN)/SemWeb.dll -r:System.Data -r:Mono.Data.SqliteClient else @echo "SKIPPING compilation of SemWeb.SqliteStore.dll because Mono.Data.SqliteClient assembly seems to be not available in the GAC."; endif $(BIN)/SemWeb.MySQLStore.dll: src/MySQLStore.cs ifneq "$(PROFILE)" "DOTNET1" # the MySql.Data lib we are compiling against is 2.0. ifneq "$(mysql_available)" "0" $(MCS) -debug src/MySQLStore.cs -out:$(BIN)/SemWeb.MySQLStore.dll -t:library\ -r:$(BIN)/SemWeb.dll -r:System.Data -r:MySql.Data -d:CONNECTOR -lib:lib #$(MCS) -debug src/MySQLStore.cs -out:$(BIN)/SemWeb.MySQLStore-ByteFX.dll -t:library\ # -r:$(BIN)/SemWeb.dll -r:System.Data -r:ByteFX.Data -d:BYTEFX else @echo "SKIPPING compilation of SemWeb.MySQLStore.dll because MySql.Data assembly seems to be not available in the GAC."; endif endif $(BIN)/SemWeb.SQLServerStore.dll: src/SQLServerStore.cs $(MCS) -debug src/SQLServerStore.cs -out:$(BIN)/SemWeb.SQLServerStore.dll -t:library\ -r:$(BIN)/SemWeb.dll -r:System.Data # Utility programs $(BIN)/rdfstorage.exe: tools/rdfstorage.cs $(MCS) -debug tools/rdfstorage.cs -out:$(BIN)/rdfstorage.exe -r:$(BIN)/SemWeb.dll -r:Mono.GetOptions $(BIN)/rdfquery.exe: tools/rdfquery.cs $(MCS) -debug tools/rdfquery.cs -out:$(BIN)/rdfquery.exe -r:$(BIN)/SemWeb.dll -r:$(BIN)/SemWeb.Sparql.dll -r:Mono.GetOptions $(BIN)/euler.exe: tools/euler.cs $(MCS) -debug tools/euler.cs -out:$(BIN)/euler.exe -r:$(BIN)/SemWeb.dll -r:$(BIN)/SemWeb.Sparql.dll endif # that's the end of the test if we have a PROFILE given # Generating documentation files apidocxml: Makefile monodocer \ -assembly:bin_generics/SemWeb.dll -assembly:bin_generics/SemWeb.Sparql.dll \ -path:apidocxml --delete --pretty #mono /usr/lib/monodoc/monodocs2slashdoc.exe doc > SemWeb.docs.xml mkdir -p apidocs monodocs2html -source:apidocxml -dest:apidocs -template:docstemplate.xsl # Generating the release package package: all rm -rf package-workspace mkdir -p package-workspace/semweb-$(VERSION) cp -R bin bin_generics bin_silverlight src tools apidocs doc \ ChangeLog Makefile README.txt semweb.mds semweb.sln \ package-workspace/semweb-$(VERSION) mkdir package-workspace/semweb-$(VERSION)/examples cp examples/*.cs examples/Makefile examples/README.txt examples/getsomedata.sh \ package-workspace/semweb-$(VERSION)/examples tar -czf packages/semweb-$(VERSION).tgz -C package-workspace \ --exclude .svn \ semweb-$(VERSION) rm -f packages/semweb.zip cd package-workspace/semweb-$(VERSION); cp -R ../../apidocxml monodoc; zip -r -q ../../packages/semweb.zip * -x "*.svn*" rm -rf package-workspace deploy: package scp packages/semweb-$(VERSION).tgz packages/semweb.zip occams.info:www/code/semweb clean: rm bin*/SemWeb.dll* bin*/SemWeb.Sparql.dll* \ bin*/SemWeb.PostgreSQLStore.dll* bin*/SemWeb.SqliteStore.dll* bin*/SemWeb.MySQLStore.dll* \ bin*/rdfstorage.exe* bin*/rdfquery.exe* bin*/euler.exe* semweb-1.05+dfsg/tools/0000755000175000017500000000000010774502134014301 5ustar meebeymeebeysemweb-1.05+dfsg/tools/rdfxsltproc.cs0000644000175000017500000000604710774502134017211 0ustar meebeymeebeyusing System; using System.Collections; using System.Reflection; using System.Xml; using System.Xml.Xsl; using System.Xml.XPath; using SemWeb; using SemWeb.Util; [assembly: AssemblyTitle("RDFXSLTProc - XSLT Engine over RDF Data")] [assembly: AssemblyCopyright("Copyright (c) 2005 Joshua Tauberer 0 && i == args.Length-2 && args[i] == "-sparql") { sparql = true; break; } N3Reader axiomsreader = new N3Reader(args[i]); axiomsreader.BaseUri = "http://www.example.org/arbitrary/base#"; axioms.Import(axiomsreader); } Euler engine = new Euler(axioms); // Load question if (!sparql) { MemoryStore question = new MemoryStore(); question.Import(new N3Reader(args[args.Length-1])); Proof[] proofs = engine.Prove(null, question.ToArray()); foreach (Proof p in proofs) { Console.WriteLine(p.ToString()); } } else { using (StreamReader fs = new StreamReader(args[args.Length-1])) { string q = fs.ReadToEnd(); Store store = new Store(); store.AddReasoner(engine); SparqlEngine s = new SparqlEngine(q); s.Run(store, Console.Out); } } } } semweb-1.05+dfsg/tools/rdfstorage.csproj0000644000175000017500000000464510774502134017674 0ustar meebeymeebey Debug AnyCPU 8.0.50727 2.0 {ACF7139C-07D5-460F-84B5-F6F5CCA829C3} Exe Properties SemWeb.Tools rdfstorage RDFStorage true full false bin\Debug\ TRACE;DEBUG;DOTNET2 prompt 4 pdbonly true ..\bin\ TRACE;DOTNET2 prompt 4 False ..\bin\Mono.GetOptions.dll {98EA8780-0045-41A4-BAA1-575582B92BCC} SemWeb semweb-1.05+dfsg/tools/rdfbind.cs0000644000175000017500000005303710774502134016250 0ustar meebeymeebeyusing System; using System.Collections; using System.IO; using System.Reflection; using System.Reflection.Emit; using SemWeb; using SemWeb.Stores; public class Driver { public static void Main(string[] args) { if (args.Length < 3) { Console.Error.WriteLine("Usage: mono rdfbind.exe bindings.txt targetschema schmefile1 schemafile2 . . ."); return; } // Parse command-line arguments string bindingmapfile = args[0]; string targetschema = args[1]; ArrayList schemafiles = new ArrayList(); for (int i = 2; i < args.Length; i++) schemafiles.Add(args[i]); // Load the binding map Hashtable bindingmap = new Hashtable(); ArrayList schemalist = new ArrayList(); try { char[] whitespacechars = { ' ', '\t' }; using (TextReader map = new StreamReader(bindingmapfile)) { string line; while ((line = map.ReadLine()) != null) { if (line == "" || line.StartsWith("#")) continue; int whitespace = line.IndexOfAny(whitespacechars); if (whitespace == -1) throw new FormatException("Each line should be an assembly/namespace name followed by a space or tab, followed by a schema URI."); string name = line.Substring(0, whitespace).Trim(); string uri = line.Substring(whitespace+1).Trim(); bindingmap[uri] = name; schemalist.Add(uri); // Let targetscheme be either a name or URI. if (targetschema == name) targetschema = uri; } } } catch (Exception e) { Console.Error.WriteLine("Error loading the binding map: " + e.Message); return; } if (!bindingmap.ContainsKey(targetschema)) { Console.Error.WriteLine("The target schema must have an entry in the binding map."); return; } MultiStore schemas = new MultiStore(); foreach (string schemafile in schemafiles) { try { Store schema = new MemoryStore(new RdfXmlReader(schemafile)); schemas.Add(schema); } catch (Exception e) { Console.Error.WriteLine("Error loading the schema in '" + schemafile + "': " + e.Message); return; } } foreach (string sch in schemalist) { AssemblyBuilder a = new SemWeb.Bind.Bindings(sch, schemas, bindingmap).CreateBindings(); a.Save((string)bindingmap[sch] + ".dll"); } } } namespace SemWeb.Bind { public class Bindings { private const string RDF = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"; private const string RDFS = "http://www.w3.org/2000/01/rdf-schema#"; string targetschemauri; Store schemas; Hashtable bindingmap; string ns; AssemblyBuilder a; ModuleBuilder m; Hashtable definedclasses = new Hashtable(); Hashtable definedconstructors = new Hashtable(); Hashtable classtypes = new Hashtable(); static Type[] constructorargs = new Type[] { typeof(Entity), typeof(Store) }; static Type[] arraylisttoarrayargs = new Type[] { typeof(Type) }; static Type[] newentityargs = new Type[] { typeof(string) }; static Type[] selectsubjectsargs = new Type[] { typeof(Entity), typeof(Resource) }; static Type[] selectobjectsargs = new Type[] { typeof(Entity), typeof(Entity) }; ConstructorInfo anyconstructor = typeof(Any).GetConstructor(constructorargs); ConstructorInfo arraylistconstructor = typeof(ArrayList).GetConstructor(Type.EmptyTypes); MethodInfo arraylisttoarray = typeof(ArrayList).GetMethod("ToArray", arraylisttoarrayargs); MethodInfo arraylistadd = typeof(ArrayList).GetMethod("Add", new Type[] { typeof(object) }); MethodInfo gettypefromhandle = typeof(Type).GetMethod("GetTypeFromHandle", new Type[] { typeof(RuntimeTypeHandle) }); ConstructorInfo newentity = typeof(Entity).GetConstructor(newentityargs); ConstructorInfo newliteral = typeof(Literal).GetConstructor(newentityargs); MethodInfo getentity = typeof(Any).GetProperty("Entity").GetGetMethod(); MethodInfo getmodel = typeof(Any).GetProperty("Model").GetGetMethod(); MethodInfo selectsubjects = typeof(Store).GetMethod("SelectSubjects", selectsubjectsargs); MethodInfo selectobjects = typeof(Store).GetMethod("SelectObjects", selectobjectsargs); MethodInfo literalvalue = typeof(Literal).GetProperty("Value").GetGetMethod(); MethodInfo anyaddvalue = typeof(Any).GetMethod("AddValue", BindingFlags.NonPublic | BindingFlags.Instance, null, new Type[] { typeof(Entity), typeof(object), typeof(bool)}, null); MethodInfo anyremvalue = typeof(Any).GetMethod("RemoveValue", BindingFlags.NonPublic | BindingFlags.Instance, null, new Type[] { typeof(Entity), typeof(object), typeof(bool)}, null); MethodInfo anysetfuncvalue = typeof(Any).GetMethod("SetFuncProperty", BindingFlags.NonPublic | BindingFlags.Instance, null, new Type[] { typeof(Entity), typeof(object), typeof(bool)}, null); public Bindings(string targetschemauri, Store schemas, Hashtable bindingmap) { this.targetschemauri = targetschemauri; this.schemas = schemas; this.bindingmap = bindingmap; } public AssemblyBuilder CreateBindings() { ns = (string)bindingmap[targetschemauri]; AssemblyName n = new AssemblyName(); n.Name = ns; a = AppDomain.CurrentDomain.DefineDynamicAssembly(n, AssemblyBuilderAccess.RunAndSave); m = a.DefineDynamicModule("Main", ns + ".dll"); // Define each class in the schema Entity[] classes = schemas.SelectSubjects(RDF + "type", (Entity)(RDFS + "Class")); foreach (Entity c in classes) { if (c.Uri != null && c.Uri.StartsWith(targetschemauri) || schemas.Contains(new Statement(c, RDFS + "isDefinedBy", (Entity)targetschemauri))) DefineClass(c); } foreach (Entity c in definedclasses.Keys) DefineClassMethods(c, (TypeBuilder)definedclasses[c]); return a; } private string MakeName(string name) { string ret = ""; foreach (char c in name) { if (char.IsLetterOrDigit(c)) ret += ret.Length == 0 ? char.ToUpper(c) : c; } return ret; } private string GetLocalName(Entity e, string definingschema) { if (e.Uri != null && e.Uri.StartsWith(definingschema)) return MakeName(e.Uri.Substring(definingschema.Length)); foreach (Resource r in schemas.SelectObjects(e, RDFS + "label")) if (r is Literal) return MakeName(((Literal)r).Value); return null; } private string GetDefiningSchema(Entity e) { foreach (Resource r in schemas.SelectObjects(e, RDFS + "isDefinedBy")) if (r is Entity && r.Uri != null) return r.Uri; foreach (string schema in bindingmap.Keys) if (e.Uri != null && e.Uri.StartsWith(schema)) return schema; return null; } private Type GetType(Entity e) { if (definedclasses.ContainsKey(e)) return (Type)definedclasses[e]; if (classtypes.ContainsKey(e)) return (Type)classtypes[e]; if (e.Uri != null) { if (e.Uri == "http://www.w3.org/2000/01/rdf-schema#Literal" || e.Uri.StartsWith("http://www.w3.org/2001/XMLSchema#")) return typeof(string); } string schema = GetDefiningSchema(e); if (schema == null && e.Uri != null) Console.Error.WriteLine("Schema of " + e.Uri + " unknown."); if (schema == null) return null; string localname = GetLocalName(e, schema); if (schema == null && e.Uri != null) Console.Error.WriteLine("Local name of " + e.Uri + " could not be determined."); if (localname == null) return null; string ns = (string)bindingmap[schema]; if (ns == null) Console.Error.WriteLine("Schema " + schema + " is not in the binding map."); if (ns == null) return null; string name = ns + "." + localname; try { Assembly b = Assembly.LoadFrom(ns + ".dll"); if (b == null) throw new Exception("Assembly " + ns + " not found."); Type t = b.GetType(name); classtypes[e] = t; return t; } catch (Exception ex) { Console.Error.WriteLine("Could not load type " + name + ": " + ex.Message); return null; } } private void DefineClass(Entity c) { string ln = GetLocalName(c, targetschemauri); if (ln == null) return; string typename = ns + "." + ln; Console.WriteLine(c + "\t" + typename); TypeBuilder t = m.DefineType(typename, TypeAttributes.Class | TypeAttributes.Public, typeof(Any)); definedclasses[c] = t; // Constructor ILGenerator il; ConstructorBuilder constructor = t.DefineConstructor(MethodAttributes.Public, CallingConventions.Standard, constructorargs); definedconstructors[t] = constructor; il = constructor.GetILGenerator(); il.Emit(OpCodes.Ldarg_0); // this il.Emit(OpCodes.Ldarg_1); // entity il.Emit(OpCodes.Ldarg_2); // model il.Emit(OpCodes.Call, anyconstructor); il.Emit(OpCodes.Ret); } private ConstructorInfo GetConstructor(Type t) { if (definedconstructors.ContainsKey(t)) return (ConstructorInfo)definedconstructors[t]; else { return t.GetConstructor(constructorargs); } } private void DefineClassMethods(Entity c, TypeBuilder t) { ILGenerator il; // Conversion operations to super classes foreach (Resource r in schemas.SelectObjects(c, RDFS + "subClassOf")) { if (!(r is Entity)) continue; Type superclass = GetType((Entity)r); if (superclass == null || superclass == typeof(string)) continue; string methodname; if (superclass.Assembly == a) methodname = superclass.Name; else methodname = superclass.FullName.Replace(".", ""); MethodBuilder method = t.DefineMethod("As" + methodname, MethodAttributes.Public, superclass, Type.EmptyTypes); il = method.GetILGenerator(); il.Emit(OpCodes.Ldarg_0); // this il.Emit(OpCodes.Call, getentity); il.Emit(OpCodes.Ldarg_0); // this il.Emit(OpCodes.Call, getmodel); ConstructorInfo superconstructor = GetConstructor(superclass); il.Emit(OpCodes.Newobj, superconstructor); il.Emit(OpCodes.Ret); } // Properties foreach (Entity p in schemas.SelectSubjects(RDFS + "domain", c)) DefineProperty(c, p, t, true, true); foreach (Entity p in schemas.SelectSubjects(RDFS + "domain", (Entity)"http://www.w3.org/2000/01/rdf-schema#Resource")) { if (GetDefiningSchema(p) != targetschemauri) continue; DefineProperty(c, p, t, true, false); } foreach (Entity p in schemas.SelectSubjects(RDFS + "range", c)) DefineProperty(c, p, t, false, true); t.CreateType(); } private void DefineProperty(Entity c, Entity p, TypeBuilder t, bool forward, bool actualDomain) { if (p.Uri == null) return; bool functional = false; if (forward && schemas.Contains(new Statement(p, RDF + "type", (Entity)"http://www.w3.org/2002/07/owl#FunctionalProperty"))) functional = true; if (!forward && schemas.Contains(new Statement(p, RDF + "type", (Entity)"http://www.w3.org/2002/07/owl#InverseFunctionalProperty"))) functional = true; string propschema = GetDefiningSchema(p); if (propschema == null) return; string proplocalname = GetLocalName(p, propschema); if (proplocalname == null) return; string propname; if (propschema == targetschemauri) propname = proplocalname; else if (!bindingmap.ContainsKey(propschema)) return; else propname = ((string)bindingmap[propschema]).Replace(".", "") + proplocalname; if (!forward) { if (propname.EndsWith("Of")) { propname = propname.Substring(0, propname.Length-2); } else { if (propname.StartsWith("has")) propname = propname.Substring(3); propname += "Of"; } } Resource[] range = schemas.SelectObjects(p, RDFS + (forward ? "range" : "domain")); Type rettype = null; if (range.Length == 1 && range[0] is Entity) rettype = GetType((Entity)range[0]); if (rettype == null) rettype = typeof(Any); Type retelemtype = rettype; if (!functional) rettype = rettype.Assembly.GetType(rettype.FullName + "[]"); PropertyBuilder property = t.DefineProperty(propname, PropertyAttributes.None, rettype, Type.EmptyTypes); DefinePropertyGetter(c, p, t, forward, propname, rettype, retelemtype, functional, property); DefinePropertySetter(c, p, t, forward, propname, rettype, retelemtype, functional, property); DefinePropertyAddRemove(c, p, t, forward, propname, rettype, retelemtype, functional, property); if (actualDomain && retelemtype == typeof(string)) DefinePropertyStaticConstructor(c, p, t, propname); } private void DefinePropertyGetter(Entity c, Entity p, TypeBuilder t, bool forward, string propname, Type rettype, Type retelemtype, bool functional, PropertyBuilder property) { MethodBuilder method = t.DefineMethod("get_" + propname, MethodAttributes.Public | MethodAttributes.SpecialName, CallingConventions.HasThis, rettype, Type.EmptyTypes); property.SetGetMethod(method); ILGenerator il = method.GetILGenerator(); il.DeclareLocal(typeof(ArrayList)); il.DeclareLocal(typeof(int)); if (retelemtype == typeof(string)) il.DeclareLocal(typeof(string)); else il.DeclareLocal(typeof(Entity)); if (!functional) { // Create array list in local variable 0 il.Emit(OpCodes.Newobj, arraylistconstructor); il.Emit(OpCodes.Stloc_0); } // Push model (arg 0 of Select) il.Emit(OpCodes.Ldarg_0); il.Emit(OpCodes.Call, getmodel); if (forward) { // Push entity (arg 1 to Select) il.Emit(OpCodes.Ldarg_0); il.Emit(OpCodes.Call, getentity); // Push property (arg 2 to Select) il.Emit(OpCodes.Ldstr, p.Uri); il.Emit(OpCodes.Newobj, newentity); } else { // Push property (arg 1 to Select) il.Emit(OpCodes.Ldstr, p.Uri); il.Emit(OpCodes.Newobj, newentity); // Push entity (arg 2 to Select) il.Emit(OpCodes.Ldarg_0); il.Emit(OpCodes.Call, getentity); } // Call select (pushes Resource[] or Entity[]) if (forward) il.Emit(OpCodes.Call, selectobjects); else il.Emit(OpCodes.Call, selectsubjects); // Loop through the statements Label loopstart = il.DefineLabel(); Label loopend = il.DefineLabel(); Label loopcontinue = il.DefineLabel(); il.Emit(OpCodes.Ldc_I4_0); // initialize counter local var 1 il.Emit(OpCodes.Stloc_1); il.MarkLabel(loopstart); il.Emit(OpCodes.Dup); // dup the array il.Emit(OpCodes.Ldlen); // push length of array il.Emit(OpCodes.Ldloc_1); // push counter il.Emit(OpCodes.Ble, loopend); il.Emit(OpCodes.Dup); // dup the array il.Emit(OpCodes.Ldloc_1); // push counter il.Emit(OpCodes.Ldelem_Ref); // pop array, counter, push element // Ensure value is of the right type if (retelemtype == typeof(string)) { // Literal value il.Emit(OpCodes.Isinst, typeof(Literal)); il.Emit(OpCodes.Brfalse, loopcontinue); } else if (forward) { // if !forward, it must be an entity // Ensure entity value il.Emit(OpCodes.Isinst, typeof(Entity)); il.Emit(OpCodes.Brfalse, loopcontinue); } // Because of the br, we've lost the object reference -- load it again il.Emit(OpCodes.Dup); // dup the array il.Emit(OpCodes.Ldloc_1); // push counter il.Emit(OpCodes.Ldelem_Ref); // pop array, counter, push element // Get the value we want to return if (retelemtype == typeof(string)) { // Cast to literal, replace it with its value il.Emit(OpCodes.Castclass, typeof(Literal)); il.Emit(OpCodes.Call, literalvalue); } else { // Cast to entity, push model, replace with bound type il.Emit(OpCodes.Castclass, typeof(Entity)); il.Emit(OpCodes.Ldarg_0); // model il.Emit(OpCodes.Call, getmodel); ConstructorInfo ctor = GetConstructor(retelemtype); il.Emit(OpCodes.Newobj, ctor); } if (!functional) { // We need the ArrayList before this argument. il.Emit(OpCodes.Stloc_2); il.Emit(OpCodes.Ldloc_0); // push ArrayList il.Emit(OpCodes.Ldloc_2); // get back the object il.Emit(OpCodes.Call, arraylistadd); // add to ArrayList il.Emit(OpCodes.Pop); // pop the int32 return value of Add } else { // Store the result, clear the stack, get the result back, and return. il.Emit(OpCodes.Stloc_2); il.Emit(OpCodes.Pop); // the entities array il.Emit(OpCodes.Ldloc_2); il.Emit(OpCodes.Ret); } // increment counter il.MarkLabel(loopcontinue); il.Emit(OpCodes.Ldloc_1); // push counter il.Emit(OpCodes.Ldc_I4_1); // push 1 il.Emit(OpCodes.Add); il.Emit(OpCodes.Stloc_1); // go to start of loop il.Emit(OpCodes.Br, loopstart); il.MarkLabel(loopend); il.Emit(OpCodes.Pop); // pop the Resource[] array if (!functional) { // Load array list and convert to array, and return. il.Emit(OpCodes.Ldloc_0); il.Emit(OpCodes.Ldtoken, retelemtype); il.Emit(OpCodes.Call, gettypefromhandle); il.Emit(OpCodes.Call, arraylisttoarray); il.Emit(OpCodes.Castclass, rettype); } else { il.Emit(OpCodes.Ldnull); } il.Emit(OpCodes.Ret); } private void DefinePropertySetter(Entity c, Entity p, TypeBuilder t, bool forward, string propname, Type rettype, Type retelemtype, bool functional, PropertyBuilder property) { if (!functional) return; MethodBuilder method = t.DefineMethod("set_" + propname, MethodAttributes.Public | MethodAttributes.SpecialName, CallingConventions.HasThis, null, new Type[] { rettype } ); property.SetSetMethod(method); ILGenerator il = method.GetILGenerator(); il.Emit(OpCodes.Ldarg_0); il.Emit(OpCodes.Ldstr, p.Uri); il.Emit(OpCodes.Newobj, newentity); il.Emit(OpCodes.Ldarg_1); if (forward) il.Emit(OpCodes.Ldc_I4_1); else il.Emit(OpCodes.Ldc_I4_0); il.Emit(OpCodes.Call, anysetfuncvalue); il.Emit(OpCodes.Ret); } private void DefinePropertyAddRemove(Entity c, Entity p, TypeBuilder t, bool forward, string propname, Type rettype, Type retelemtype, bool functional, PropertyBuilder property) { if (functional) return; DefinePropertyAddRemove(c, p, t, forward, propname, rettype, retelemtype, functional, property, true); DefinePropertyAddRemove(c, p, t, forward, propname, rettype, retelemtype, functional, property, false); } private void DefinePropertyAddRemove(Entity c, Entity p, TypeBuilder t, bool forward, string propname, Type rettype, Type retelemtype, bool functional, PropertyBuilder property, bool add) { string mname = add ? "Add" : "Remove"; MethodInfo impl = add ? anyaddvalue : anyremvalue; MethodBuilder method = t.DefineMethod(mname + propname, MethodAttributes.Public, null, new Type[] { retelemtype } ); ILGenerator il = method.GetILGenerator(); il.Emit(OpCodes.Ldarg_0); il.Emit(OpCodes.Ldstr, p.Uri); il.Emit(OpCodes.Newobj, newentity); il.Emit(OpCodes.Ldarg_1); if (forward) il.Emit(OpCodes.Ldc_I4_1); else il.Emit(OpCodes.Ldc_I4_0); il.Emit(OpCodes.Call, impl); il.Emit(OpCodes.Ret); } private void DefinePropertyStaticConstructor(Entity c, Entity p, TypeBuilder t, string propname) { bool functional = schemas.Contains(new Statement(p, RDF + "type", (Entity)"http://www.w3.org/2002/07/owl#InverseFunctionalProperty")); Type mrettype = t; if (!functional) mrettype = t.Assembly.GetType(t.FullName + "[]"); MethodBuilder method = t.DefineMethod("From" + propname, MethodAttributes.Public | MethodAttributes.Static, mrettype, new Type[] { typeof(string), typeof(Store) } ); ILGenerator il = method.GetILGenerator(); il.DeclareLocal(typeof(ArrayList)); il.DeclareLocal(typeof(int)); il.DeclareLocal(t); if (!functional) { // Create array list in local variable 0 il.Emit(OpCodes.Newobj, arraylistconstructor); il.Emit(OpCodes.Stloc_0); } // Push model (arg 0 of Select) il.Emit(OpCodes.Ldarg_1); // Predicate il.Emit(OpCodes.Ldstr, p.Uri); il.Emit(OpCodes.Newobj, newentity); // Object il.Emit(OpCodes.Ldarg_0); il.Emit(OpCodes.Newobj, newliteral); // Call select (pushes Entity[]) il.Emit(OpCodes.Call, selectsubjects); // Loop through the entities Label loopstart = il.DefineLabel(); Label loopend = il.DefineLabel(); Label loopcontinue = il.DefineLabel(); il.Emit(OpCodes.Ldc_I4_0); // initialize counter local var 1 il.Emit(OpCodes.Stloc_1); il.MarkLabel(loopstart); il.Emit(OpCodes.Dup); // dup the array il.Emit(OpCodes.Ldlen); // push length of array il.Emit(OpCodes.Ldloc_1); // push counter il.Emit(OpCodes.Ble, loopend); il.Emit(OpCodes.Dup); // dup the array il.Emit(OpCodes.Ldloc_1); // push counter il.Emit(OpCodes.Ldelem_Ref); // pop array, counter, push element il.Emit(OpCodes.Ldarg_1); // model ConstructorInfo ctor = GetConstructor(t); il.Emit(OpCodes.Newobj, ctor); if (!functional) { // We need the ArrayList before this argument. il.Emit(OpCodes.Stloc_2); il.Emit(OpCodes.Ldloc_0); // push ArrayList il.Emit(OpCodes.Ldloc_2); // get back the object il.Emit(OpCodes.Call, arraylistadd); // add to ArrayList il.Emit(OpCodes.Pop); // pop the int32 return value of Add } else { // Store the result, clear the stack, get the result back, and return. il.Emit(OpCodes.Stloc_2); il.Emit(OpCodes.Pop); // the entities array il.Emit(OpCodes.Ldloc_2); il.Emit(OpCodes.Ret); } // increment counter il.MarkLabel(loopcontinue); il.Emit(OpCodes.Ldloc_1); // push counter il.Emit(OpCodes.Ldc_I4_1); // push 1 il.Emit(OpCodes.Add); il.Emit(OpCodes.Stloc_1); // go to start of loop il.Emit(OpCodes.Br, loopstart); il.MarkLabel(loopend); il.Emit(OpCodes.Pop); // pop the Entity[] array if (!functional) { // Load array list and convert to array, and return. il.Emit(OpCodes.Ldloc_0); il.Emit(OpCodes.Ldtoken, t); il.Emit(OpCodes.Call, gettypefromhandle); il.Emit(OpCodes.Call, arraylisttoarray); il.Emit(OpCodes.Castclass, mrettype); } else { il.Emit(OpCodes.Ldnull); } il.Emit(OpCodes.Ret); } } } semweb-1.05+dfsg/tools/rdfquery.cs0000644000175000017500000001462510774502134016501 0ustar meebeymeebeyusing System; using System.IO; using System.Reflection; using System.Text; using SemWeb; using SemWeb.Stores; using SemWeb.Query; [assembly: AssemblyTitle("RDFQuery - Query RDF Data")] [assembly: AssemblyCopyright("Copyright (c) 2006 Joshua Tauberer \nreleased under the GPL.")] [assembly: AssemblyDescription("A tool for querying RDF data.")] [assembly: Mono.UsageComplement("n3:datafile.n3 < query.rdf")] public class RDFQuery { private class Opts : Mono.GetOptions.Options { [Mono.GetOptions.Option("The type of the query: '{rsquary}' to match the N3 graph with the target data or 'sparql' to run a SPARQL SELECT query on the target data.")] public string type = "rsquary"; [Mono.GetOptions.Option("The format for variable binding output: {xml}, csv, html")] public string format = "xml"; [Mono.GetOptions.Option("Maximum number of results to report.")] public int limit = 0; } public static void Main(string[] args) { Opts opts = new Opts(); opts.ProcessArgs(args); if (opts.RemainingArguments.Length != 1) { opts.DoHelp(); return; } string baseuri = "query://query/#"; QueryResultSink qs; if (opts.format == "simple") qs = new PrintQuerySink(); else if (opts.format == "html") qs = new HTMLQuerySink(Console.Out); else if (opts.format == "xml") qs = new SparqlXmlQuerySink(Console.Out); else if (opts.format == "lubm") qs = new LUBMReferenceAnswerOutputQuerySink(); else if (opts.format == "csv") qs = new CSVQuerySink(); else { Console.Error.WriteLine("Invalid output format."); return; } Query query; MemoryStore queryModel = null; #if !DOTNET2 System.Collections.ICollection queryModelVars = null; #else System.Collections.Generic.ICollection queryModelVars = null; #endif Store model = Store.Create(opts.RemainingArguments[0]); if (opts.type == "rsquary") { RdfReader queryparser = RdfReader.Create("n3", "-"); queryparser.BaseUri = baseuri; queryModel = new MemoryStore(queryparser); queryModelVars = queryparser.Variables; query = new GraphMatch(queryModel); } else if (opts.type == "sparql" && model.DataSources.Count == 1 && model.DataSources[0] is SemWeb.Remote.SparqlSource) { string querystring = Console.In.ReadToEnd(); ((SemWeb.Remote.SparqlSource)model.DataSources[0]).RunSparqlQuery(querystring, Console.Out); return; } else if (opts.type == "sparql") { string querystring = Console.In.ReadToEnd(); query = new SparqlEngine(querystring); } else { throw new Exception("Invalid query format: " + opts.type); } if (opts.limit > 0) query.ReturnLimit = opts.limit; //Console.Error.WriteLine(query.GetExplanation()); if (query is SparqlEngine && ((SparqlEngine)query).Type != SparqlEngine.QueryType.Select) { SparqlEngine sparql = (SparqlEngine)query; sparql.Run(model, Console.Out); } else if (model is QueryableSource && queryModel != null) { SemWeb.Query.QueryOptions qopts = new SemWeb.Query.QueryOptions(); qopts.DistinguishedVariables = queryModelVars; // Replace bnodes in the query with Variables int bnodectr = 0; foreach (Entity e in queryModel.GetEntities()) { if (e is BNode && !(e is Variable)) { BNode b = (BNode)e; queryModel.Replace(e, new Variable(b.LocalName != null ? b.LocalName : "bnodevar" + (++bnodectr))); } } model.Query(queryModel.ToArray(), qopts, qs); } else { query.Run(model, qs); } if (qs is IDisposable) ((IDisposable)qs).Dispose(); } } public class PrintQuerySink : QueryResultSink { public override bool Add(VariableBindings result) { foreach (Variable var in result.Variables) if (var.LocalName != null && result[var] != null) Console.WriteLine(var.LocalName + " ==> " + result[var].ToString()); Console.WriteLine(); return true; } } public class CSVQuerySink : QueryResultSink { public override void Init(Variable[] variables) { bool first = true; foreach (Variable var in variables) { if (var.LocalName == null) continue; if (!first) Console.Write(","); first = false; Console.Write(var.LocalName); } Console.WriteLine(""); } public override bool Add(VariableBindings result) { bool first = true; foreach (Variable var in result.Variables) { if (var.LocalName == null) continue; if (!first) Console.Write(","); first = false; if (result[var] == null) continue; string t = result[var].ToString(); if (result[var] is Literal) t = ((Literal)result[var]).Value; Console.Write(t); } Console.WriteLine(); return true; } } public class HTMLQuerySink : QueryResultSink { TextWriter output; public HTMLQuerySink(TextWriter output) { this.output = output; } public override void Init(Variable[] variables) { output.WriteLine(""); output.WriteLine(""); foreach (Variable var in variables) { if (var.LocalName == null) continue; output.WriteLine(""); } output.WriteLine(""); } public override void Finished() { output.WriteLine("
" + var.LocalName + "
"); } public override bool Add(VariableBindings result) { output.WriteLine(""); foreach (Variable var in result.Variables) { if (var.LocalName == null) continue; Resource varTarget = result[var]; string t = varTarget.ToString(); if (varTarget is Literal) t = ((Literal)varTarget).Value; output.WriteLine("" + t + ""); } output.WriteLine(""); return true; } } internal class LUBMReferenceAnswerOutputQuerySink : QueryResultSink { int[] varorder; public override void Init(Variable[] variables) { varorder = new int[variables.Length]; string[] varnames = new string[variables.Length]; for (int i = 0; i < variables.Length; i++) { varorder[i] = i; varnames[i] = variables[i].LocalName.ToUpper(); } Array.Sort(varnames, varorder); for (int i = 0; i < varnames.Length; i++) Console.Write(varnames[i] + " "); Console.WriteLine(); } public override bool Add(VariableBindings result) { foreach (int idx in varorder) { if (result.Variables[idx].LocalName != null && result.Values[idx] != null) { if (result.Values[idx].Uri != null) Console.Write(result.Values[idx].Uri + " "); else if (result.Values[idx] is Literal) Console.Write(((Literal)result.Values[idx]).Value + " "); else if (result.Values[idx] is BNode) Console.Write("(bnode) "); else Console.Write(result.Values[idx] + " "); } } Console.WriteLine(); return true; } } semweb-1.05+dfsg/tools/rdfstorage.cs0000644000175000017500000002226310774502134016775 0ustar meebeymeebeyusing System; using System.Collections; using System.IO; using System.Reflection; using System.Threading; using SemWeb; //using SemWeb.Algos; [assembly: AssemblyTitle("RDFStorage - Move RDF Data Between Storage Types")] [assembly: AssemblyCopyright("Copyright (c) 2006 Joshua Tauberer \nreleased under the GPL.")] [assembly: AssemblyDescription("A tool to move RDF data between storage types.")] [assembly: Mono.UsageComplement("file1 file2...")] public class RDFStorage { private class Opts : Mono.GetOptions.Options { [Mono.GetOptions.Option("The {format} for the input files: xml, n3, or spec to use a full spec.")] public string @in = "xml"; [Mono.GetOptions.Option("The destination {storage}. Default is N3 to standard out.")] public string @out = "n3:-"; [Mono.GetOptions.Option("Clear the storage before importing data.")] public bool clear = false; [Mono.GetOptions.Option("The {URI} of a resource that expresses meta information.")] public string meta = null; [Mono.GetOptions.Option("The default base {URI} for the input streams.")] public string baseuri = null; [Mono.GetOptions.Option("The base {URI} for the output stream (if supported).")] public string outbaseuri = null; [Mono.GetOptions.Option("Emit status information to STDERR when writing to STDOUT.")] public bool stats = false; [Mono.GetOptions.Option("Read and write on separate threads buffering the given {number} of statements.")] public int buffer = 0; /*[Mono.GetOptions.Option("Make the output lean.")] public bool makelean = false; [Mono.GetOptions.Option("Make lean in comparison to another data source.")] public string leanagainst = null; [Mono.GetOptions.Option("Write out lean-removed statements.")] public bool leanprogress = false;*/ } static long totalStatementsRead = 0; public static void Main(string[] args) { try { Opts opts = new Opts(); opts.ProcessArgs(args); if (opts.RemainingArguments.Length == 0 && opts.@out == "n3:-") { opts.DoHelp(); return; } if (!(opts.@out == "xml:-" || opts.@out == "n3:-")) opts.stats = true; StatementSink storage = Store.CreateForOutput(opts.@out); if (storage is RdfWriter && opts.outbaseuri != null) ((RdfWriter)storage).BaseUri = opts.outbaseuri; Entity meta = null; if (opts.meta != null) meta = new Entity(opts.meta); if (opts.clear) { if (!(storage is ModifiableSource)) { Console.Error.WriteLine("The --clear option cannot be used with this type of output method. Ignoring --clear."); } else { try { if (meta == null) ((ModifiableSource)storage).Clear(); else ((ModifiableSource)storage).Remove(new Statement(null, null, null, meta)); } catch (Exception e) { Console.Error.WriteLine("The --clear option was not successful: " + e.Message); } } } if (opts.@in == "xml") { // Use file extension to override default parser type. foreach (string file in opts.RemainingArguments) { if (file.EndsWith(".nt") || file.EndsWith(".n3") || file.EndsWith(".ttl")) opts.@in = "n3"; break; } } DateTime start_time = DateTime.Now; MultiRdfParser multiparser = new MultiRdfParser(opts.RemainingArguments, opts.@in, meta, opts.baseuri, !opts.stats); if (opts.buffer > 0) { CircularStatementBuffer buffer = new CircularStatementBuffer(opts.buffer); buffer.BeginReading(multiparser); buffer.BeginWriting(storage); buffer.Wait(); } else if (storage is ModifiableSource) { ((ModifiableSource)storage).Import(multiparser); } else { //if (!opts.makelean) { multiparser.Select(storage); /*} else { MemoryStore st = new MemoryStore(multiparser); StatementSink removed = null; if (opts.leanprogress) removed = new N3Writer(Console.Out); if (opts.leanagainst != null) { StatementSource against = Store.CreateForInput(opts.leanagainst); if (!(against is SelectableSource)) against = new MemoryStore(against); Lean.MakeLean(st, (SelectableSource)against, removed); } else if (storage is SelectableSource) { Lean.MakeLean(st, (SelectableSource)storage, removed); } else { Lean.MakeLean(st, null, removed); } st.Select(storage); }*/ } if (storage is IDisposable) ((IDisposable)storage).Dispose(); TimeSpan alltime = DateTime.Now - start_time; if (opts.stats) Console.Error.WriteLine("Total Time: {0}m{1}s, {2} statements, {3} st/sec", (int)alltime.TotalMinutes, (int)alltime.Seconds, totalStatementsRead, alltime.TotalSeconds == 0 ? "?" : ((int)(totalStatementsRead/alltime.TotalSeconds)).ToString()); } catch (Exception exc) { Console.Error.WriteLine(exc); } } private class MultiRdfParser : RdfReader { IList files; string format; Entity meta; string baseuri; bool quiet; public MultiRdfParser(IList files, string format, Entity meta, string baseuri, bool quiet) { this.files = files; this.format = format; this.meta = meta; this.baseuri = baseuri; this.quiet = quiet; } public override void Select(StatementSink storage) { foreach (string infile in files) { if (!quiet) Console.Error.Write(infile + " "); try { DateTime start = DateTime.Now; StatementFilterSink filter = new StatementFilterSink(storage); if (format != "spec") { RdfReader parser = RdfReader.Create(format, infile); parser.BaseUri = baseuri; if (meta != null) parser.Meta = meta; if (storage is RdfWriter) ((RdfWriter)storage).Namespaces.AddFrom(parser.Namespaces); parser.Select(filter); foreach (string warning in parser.Warnings) Console.Error.WriteLine(warning); parser.Dispose(); } else { StatementSource src = Store.Create(infile); src.Select(filter); if (src is IDisposable) ((IDisposable)src).Dispose(); } totalStatementsRead += filter.StatementCount; TimeSpan time = DateTime.Now - start; if (!quiet) Console.Error.WriteLine(" {0}m{1}s, {2} statements, {3} st/sec", (int)time.TotalMinutes, (int)time.Seconds, filter.StatementCount, time.TotalSeconds == 0 ? "?" : ((int)(filter.StatementCount/time.TotalSeconds)).ToString()); } catch (ParserException e) { Console.Error.WriteLine(" " + e.Message); } catch (Exception e) { Console.Error.WriteLine("\n" + e + "\n"); } } } } } internal class StatementFilterSink : StatementSink, CanForgetBNodes { StatementSink sink; int counter = 0; public int StatementCount { get { return counter; } } public StatementFilterSink(StatementSink sink) { this.sink = sink; } public bool Add(Statement statement) { counter++; sink.Add(statement); return true; } public void ForgetBNode(BNode node) { CanForgetBNodes x = sink as CanForgetBNodes; if (x != null) x.ForgetBNode(node); } } internal class CircularStatementBuffer : StatementSource, StatementSink { const int SLEEP_DURATION = 0; Statement[] buffer; int len; volatile int nextWrite = 0; volatile int nextRead = 0; volatile bool finished = false; volatile bool canceled = false; AutoResetEvent hasData = new AutoResetEvent(false); AutoResetEvent hasSpace = new AutoResetEvent(false); StatementSource sourceData; StatementSink targetSink; Thread writer, reader; public CircularStatementBuffer(int size) { len = size; buffer = new Statement[size]; } public void BeginWriting(StatementSink sink) { targetSink = sink; reader = new Thread(ReaderRunner); reader.Start(); } public void BeginReading(StatementSource source) { sourceData = source; writer = new Thread(WriterRunner); writer.Start(); } public void Wait() { writer.Join(); reader.Join(); } void WriterRunner() { sourceData.Select(this); finished = true; hasData.Set(); // anything written but not flagged } public bool Add(Statement statement) { // Check that we can advance (i.e. not fill up the buffer // so that our pointers cross). int nw = nextWrite; int next = (nw == len-1) ? 0 : nw+1; while (next == nextRead && !canceled) { if (SLEEP_DURATION > 0) Thread.Sleep(SLEEP_DURATION); else hasSpace.WaitOne(); } if (canceled) return false; buffer[nw] = statement; nextWrite = next; if ((nw & 0xFF) == 0) hasData.Set(); return true; } void ReaderRunner() { if (targetSink is ModifiableSource) ((ModifiableSource)targetSink).Import(this); else ReadLoop(targetSink); } bool StatementSource.Distinct { get { return false; } } void StatementSource.Select(StatementSink sink) { ReadLoop(sink); } void ReadLoop(StatementSink sink) { while (!finished) { int nr = nextRead; // Check that we can advance (i.e. not cross the write pointer). while (nr == nextWrite && !finished) { if (SLEEP_DURATION > 0) Thread.Sleep(SLEEP_DURATION); else hasData.WaitOne(); } if (finished) return; int nw = nextWrite; int addctr = 0; while (nr != nw) { Statement s = buffer[nr]; nr = (nr == len-1) ? 0 : nr+1; if ((addctr++ & 0xFF) == 0) { nextRead = nr; hasSpace.Set(); } canceled = !sink.Add(s); if (canceled) break; } nextRead = nr; hasSpace.Set(); if (canceled) break; } } } semweb-1.05+dfsg/tools/runtests.cs0000644000175000017500000001617110774502134016525 0ustar meebeymeebeyusing System; using System.Collections; using System.IO; using SemWeb; public class N3Test { static string basepath; static int total = 0, error = 0, badpass = 0, badfail = 0; public static void Main(string[] args) { if (args.Length != 2) { Console.WriteLine("runtests.exe basepath manifestfile"); return; } basepath = args[0]; string manifestfile = Path.Combine(basepath, args[1]); RdfReader reader = new RdfXmlReader(manifestfile); if (!manifestfile.EndsWith(".rdf")) reader = new N3Reader(manifestfile); reader.BaseUri = "http://www.example.org/"; MemoryStore testlist = new MemoryStore(reader); // RDF/XML TESTS foreach (Entity test in testlist.GetEntitiesOfType("http://www.w3.org/2000/10/rdf-tests/rdfcore/testSchema#PositiveParserTest")) RunTest(testlist, test, true, 0); foreach (Entity test in testlist.GetEntitiesOfType("http://www.w3.org/2000/10/rdf-tests/rdfcore/testSchema#NegativeParserTest")) RunTest(testlist, test, false, 0); // N3 TESTS foreach (Entity test in testlist.GetEntitiesOfType("http://www.w3.org/2004/11/n3test#PositiveParserTest")) RunTest(testlist, test, true, 1); foreach (Entity test in testlist.GetEntitiesOfType("http://www.w3.org/2004/11/n3test#NegativeParserTest")) RunTest(testlist, test, false, 1); Console.WriteLine("Total Tests:\t{0}", total); Console.WriteLine("Total Failures:\t{0} ({1}%)", badfail+badpass, (int)(100*(float)(badpass+badfail)/total)); Console.WriteLine("Positive Fails:\t{0}", badfail); Console.WriteLine("Negative Fails:\t{0}", badpass); Console.WriteLine("Test Errors:\t{0}", error); } static void RunTest(Store testlist, Entity test, bool shouldSucceed, int mode) { string inputpath = null, outputpath = null, inputformat = null, outputformat = null, inputbase = null, outputbase = null; if (mode == 0) { inputformat = "xml"; outputformat = "n3"; string uribase = "http://www.w3.org/2000/10/rdf-tests/rdfcore/"; Resource input = testlist.SelectObjects(test, "http://www.w3.org/2000/10/rdf-tests/rdfcore/testSchema#inputDocument")[0]; inputbase = input.Uri; inputpath = input.Uri.Substring(uribase.Length); if (testlist.SelectObjects(test, "http://www.w3.org/2000/10/rdf-tests/rdfcore/testSchema#outputDocument").Length > 0) { Resource output = testlist.SelectObjects(test, "http://www.w3.org/2000/10/rdf-tests/rdfcore/testSchema#outputDocument")[0]; outputpath = output.Uri.Substring(uribase.Length); outputbase = output.Uri; } } else if (mode == 1) { inputformat = "n3"; outputformat = "n3"; inputbase = "file:/home/syosi/cvs-trunk/WWW/2000/10/swap/test/n3parser.tests"; string uribase = "http://www.example.org/"; if (testlist.SelectObjects(test, "http://www.w3.org/2004/11/n3test#inputDocument").Length == 0) return; Resource input = testlist.SelectObjects(test, "http://www.w3.org/2004/11/n3test#inputDocument")[0]; inputpath = input.Uri.Substring(uribase.Length); if (testlist.SelectObjects(test, "http://www.w3.org/2004/11/n3test#outputDocument").Length > 0) { Resource output = testlist.SelectObjects(test, "http://www.w3.org/2004/11/n3test#outputDocument")[0]; outputpath = output.Uri.Substring(uribase.Length); } } string desc = test.ToString(); try { desc += " " + ((Literal)testlist.SelectObjects(test, "http://www.w3.org/2000/10/rdf-tests/rdfcore/testSchema#description")[0]).Value; } catch (Exception e) { } try { total++; RdfReader reader = RdfReader.Create(inputformat, Path.Combine(basepath, inputpath)); reader.BaseUri = inputbase; MemoryStore inputmodel = new MemoryStore(reader); if (reader.Warnings.Count > 0) { string warnings = String.Join("; ", (string[])((ArrayList)reader.Warnings).ToArray(typeof(string))); throw new ParserException(warnings); } if (!shouldSucceed) { Console.WriteLine(desc + ": Should Not Have Passed **\n"); badpass++; return; } if (shouldSucceed && outputpath != null) { RdfReader reader2 = RdfReader.Create(outputformat, Path.Combine(basepath, outputpath)); reader2.BaseUri = outputbase; MemoryStore outputmodel = new MemoryStore(reader2); CompareModels(inputmodel, outputmodel); } } catch (System.IO.FileNotFoundException ex) { Console.WriteLine(inputpath + " Not Found"); error++; } catch (System.IO.DirectoryNotFoundException ex) { Console.WriteLine(inputpath + " Not Found"); error++; } catch (ParserException ex) { if (shouldSucceed) { Console.WriteLine(desc + ": " + ex.Message + " **"); Console.WriteLine(); badfail++; } } } static Statement Replace(Statement s, Hashtable map) { return new Statement( map.ContainsKey(s.Subject) ? (Entity)map[s.Subject] : s.Subject, map.ContainsKey(s.Predicate) ? (Entity)map[s.Predicate] : s.Predicate, map.ContainsKey(s.Object) ? (Resource)map[s.Object] : s.Object ); } static ArrayList GetBlankNodes(Store s) { ArrayList ret = new ArrayList(); foreach (Entity e in s.GetEntities()) if (e.Uri == null) ret.Add(e); return ret; } static bool Permute(int[] nodemap, int b) { if (nodemap.Length == 0) return false; nodemap[0]++; for (int i = 0; i < nodemap.Length; i++) { if (nodemap[i] != b) return true; if (i == nodemap.Length-1) break; nodemap[i] = 0; nodemap[i+1]++; } return false; } static void CompareModels(Store a, Store b) { string failures = ""; ArrayList abnodes = GetBlankNodes(a); ArrayList bbnodes = GetBlankNodes(b); // If the number of blank nodes differ, of course // the stores aren't identical, but for matching // purposes we'll add bnodes so they have the // same number. if (abnodes.Count != bbnodes.Count) failures += "\nInput/output have different number of blank nodes"; while (abnodes.Count < bbnodes.Count) abnodes.Add(new BNode()); while (bbnodes.Count < abnodes.Count) bbnodes.Add(new BNode()); // Set up the permutation array. int[] nodemap = new int[abnodes.Count]; int mindiffc = int.MaxValue; string mindiffs = null; do { // Check that two nodes don't map to the same thing. bool dup = false; for (int i = 0; i < nodemap.Length; i++) { for (int j = 0; j < i; j++) { if (nodemap[i] == nodemap[j]) { dup = true; } } } if (dup) continue; // Create maps Hashtable mapab = new Hashtable(); Hashtable mapba = new Hashtable(); for (int i = 0; i < nodemap.Length; i++) { mapab[abnodes[i]] = bbnodes[nodemap[i]]; mapba[bbnodes[nodemap[i]]] = abnodes[i]; } // Test for differences string diff = ""; int diffct = 0; foreach (Statement s in a.Select(Statement.All)) { if (!b.Contains(Replace(s, mapab))) { diff += "\nInput has: " + s; diffct++; } } foreach (Statement s in b.Select(Statement.All)) { if (!a.Contains(Replace(s, mapba))) { diff += "\nOutput has: " + s; diffct++; } } if (diffct < mindiffc) { mindiffc = diffct; mindiffs = diff; } } while (Permute(nodemap, bbnodes.Count)); if (mindiffs != null && mindiffc != 0) failures += mindiffs; if (failures != "") throw new ParserException(failures); } } semweb-1.05+dfsg/semweb.sln0000644000175000017500000000351610774502134015146 0ustar meebeymeebey Microsoft Visual Studio Solution File, Format Version 9.00 # Visual C# Express 2005 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SemWeb", "src\SemWeb.csproj", "{98EA8780-0045-41A4-BAA1-575582B92BCC}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SemWeb.Sparql", "src\SemWeb.Sparql.csproj", "{0338860C-C4DA-4D8D-9610-6BBA2244F748}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "rdfstorage", "tools\rdfstorage.csproj", "{ACF7139C-07D5-460F-84B5-F6F5CCA829C3}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {98EA8780-0045-41A4-BAA1-575582B92BCC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {98EA8780-0045-41A4-BAA1-575582B92BCC}.Debug|Any CPU.Build.0 = Debug|Any CPU {98EA8780-0045-41A4-BAA1-575582B92BCC}.Release|Any CPU.ActiveCfg = Release|Any CPU {98EA8780-0045-41A4-BAA1-575582B92BCC}.Release|Any CPU.Build.0 = Release|Any CPU {0338860C-C4DA-4D8D-9610-6BBA2244F748}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0338860C-C4DA-4D8D-9610-6BBA2244F748}.Debug|Any CPU.Build.0 = Debug|Any CPU {0338860C-C4DA-4D8D-9610-6BBA2244F748}.Release|Any CPU.ActiveCfg = Release|Any CPU {0338860C-C4DA-4D8D-9610-6BBA2244F748}.Release|Any CPU.Build.0 = Release|Any CPU {ACF7139C-07D5-460F-84B5-F6F5CCA829C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {ACF7139C-07D5-460F-84B5-F6F5CCA829C3}.Debug|Any CPU.Build.0 = Debug|Any CPU {ACF7139C-07D5-460F-84B5-F6F5CCA829C3}.Release|Any CPU.ActiveCfg = Release|Any CPU {ACF7139C-07D5-460F-84B5-F6F5CCA829C3}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal semweb-1.05+dfsg/bin/0000755000175000017500000000000011007370570013706 5ustar meebeymeebeysemweb-1.05+dfsg/ChangeLog0000644000175000017500000006144110774502134014721 0ustar meebeymeebey2008-04-01 Version 1.05 * N3Reader: Correct the class of characters allowed in variable names, and fix reading ( ) lists. * N3Reader: Parse true/false as xsd:boolean. Patch from Mark Cidade: thanks!! * Created a new interface that allows the N3Reader to signal to the N3Writer when a [] bnode goes out of scope, so the writer can remove from memory the association from the bnode object to the local name it gives it in the output. * Store: Correct a bug in Clear() and recognize the "sqlstore:" spec string for creating data sources. (Khaled Hammouda) * SQLStore: Allow both LIMIT and TOP clauses, for SqlServer, and escape apostrophes in string values too (Khaled Hammouda). * New SQLServerStore class (Khaled Hammouda). * Makefile: Build SemWeb.SQLServerStore.dll. * SQLStore: Query: Make sure to add JOINs for variables with literal value filters, and to not add WHERE expressions for filters that did not get a JOIN. If we create a VIEW in order to do projections of variables, issue a DROP VIEW IF EXISTS first. * GraphMatch: After each part of an intersective query, forget bindings for nondistinguished variables that we dont need anymore. * MySQLStore: Make sure database is open before checking server version. * SPARQL: Major restructuring of query processing in Ryan's library to push processing as deep into the queries as possible. Which variables are "locally" distinguished are now available at the level of SemWeb's Query() method. * Resource: In the .NET 2.0 profile, implements IComparable now in addition to IComparable, since ArrayList.Sort expects the former interface to be implemented. 2008-02-02 Version 1.03 * The library is now dual-licensed under Creative Commons Attribution (as before) plus GNU GPL v2 or later. * Entity: Added ValidateUri static method to validate that a string is an ok IRI-Reference. * N3Reader, RdfXmlReader: Validate incoming URIs and issue warnings on failures --- since the validation is new and untested. * GraphMatch: Once a part of a query narrows the results down to zero possible bindings, don't process it any further. * Euler: Properly ignore Meta fields of statements, especially so that when a Query comes down from SparqlEngine, which passes variables for Meta fields, it doesn't get confused here. * Implemented a Silverlight build (set the preprocessor define SILVERLIGHT) which removes the dependency on the XmlDocument class. * SPARQL DESCRIBE output now includes back-links, but limits the number of returned statements based on the total for each predicate, using hard-coded limits and exponential fall-off. * SPARQL: ORDER BY's DESC() now works. * SQLStore: CreateLikeTest revised to be able to do string ends-with tests. StringEndsWith literal filters are now passed down into the SQL query. * SQLStore: When getting IDs for resources, don't get more than 1000 at a time. * SQLStore: Create indexes over the literal value column so we can do fast string-starts-with filtering. * SparqlEngine: Turn regex(,) calls into literal filters for simple expressions with no operators except ^ and $, so that we can pass them down into the SQL query. Neither ^ and $ map to StringContains, ^... maps to StringStartsWith, ...$ maps to StringEndsWith, and ^...$ maps to StringContains. * tools/rdfquery.cs: Added a CSV output format. * tools/euler.cs: Allow queries to be issued in SPARQL language. * Updated API docs. 2007-10-25 Version 1.021 * SPARQL: Updated engine's conf/grammars/20070624.jjt so that bnodes as _:... aren't treated as regular qnames. * SparqlEngine: When a graph pattern with no named variables but some bnode variables is being evaluated with Query(), make sure to pass at least one variable as a distinguished variable to Query(). Implemented some missing methods that are indeed needed. 2007-10-21 Version 1.02 * Literal: Removed static Create(bool) method, which was a strange duplicate of FromValue(bool). * Query: Added MimeType property to control general query output. * SparqlProtocolHander: Properly treat mime-types of the different SPARQL types, and allow for Accept: content-negotiation of output format for DESCRIBE and CONSTRUCT. * RdfWriter: Added Create factory-style methods. * RdfReader: LoadFromUri now passes the URI of the resource it got to the reader as BaseUri so it can resolve relative URIs in the document. * N3Reader: Added @base directive as per latest N3/Turtle specs, and properly raise an error if the three @-directives are used where they shouldn't be. * Inference.cs: Improved distributed queries a bit by not querying sources that can't match statements better. * GraphMatch: Pass down result limits to the data sources if no intersection is involved in the query. Implemented a sort of adaptive technique to pass down limits to the data sources even in an intersective query. Correct a KeyNotFoundException bug in the generics build in calls to AddLiteralFilter. * SPARQL: Pass down LIMITs as far into the query as possible. Updated to IKVM 0.34. Updated to the latest engine upstream from Ryan Levering's SourceForge repository. * doc/: Added design document, corrected a mistake reported by Peter Williams (thanks!), and added something on SparqlHttpSource to doc/query.html. 2007-07-17 Version 1.01 * RdfXmlWriter.cs: Collapse rdf:Description nodes with only an rdf:about attribute into rdf:resource attributes on the parent predicate node. * sparql/Makefile: Added a step to get the upstream sources if they're not downloaded yet. [from M. David Peterson] * Implement GT/GE/LT/LE/NE math: relations for Euler engine; fixed some bugs when literal values ended up in subject position during inferencing, and when improper xsd literal values were parsed; made the euler.exe command-line tool output all found proofs, not just the first. Note that the math:notLessThan relation's URI differs from the math: ontology by correcting the "L" to be uppercase 2007-06-10 Version 1.00 -- "Finally" * N3Writer: Correct output if a namespace is added after the first statement has been written. * NamespaceManager: Made AddNamespace virtual. * rdfstorage: Added experimental --buffer option which runs input and output in separate threads, though this doesn't seeem to improve performance any. 2007-05-11 Version 0.87 -- Bugs and minor improvements * RdfXmlWriter: Fixed another bug where empty Description nodes inside predicates seemed to vanish (which may actually be compliant, but looked weird). * SQLStore: Always pre-fetch the database IDs of resources being Select'ed/Query'd on en mass so we don't send individual SELECTs per resource to get their IDs later. * SQLStore/MySQLStore: Moved 255 character limit on URIs to MySQLStore for MySQL < 4.1.2. * Literal: Don't Intern() values. Causes memory bloat. * SparqlEngine: Added some caches to hopefully speed things up. * QueryResultSink: Removed the distinct and ordered arguments to the Init method, which were for SPARQL, but those have been removed from the latest SPARQL XML results format draft. * QueryOptions: Added helper method AddDistinguishedVariable. * GraphMatch: Added NRE checks and passing query comments up. * rdfquery.exe: When running a query on a sparql-http (i.e. SparqlHttpSource), don't use SparqlEngine; send the SPARQL query directly to the remote end point. See the docs for an example. * MySQLStore: Allow an environ variable to control how Import() transactions are wrapped, default changed to a BEGIN/COMMIT transaction, since it's less prone to issues. See the end of the Using Databases section of the docs for more. Also, turned off the timeout in RunCommand since Clear() can take a while. 2007-04-12 Version 0.86 -- New SPARQL methods and code clean-up * Renamed: Sparql class to SparqlEngine. * Renamed: SparqlProtocol class to SparqlProtocolServerHandler. * SparqlXmlQuerySink: The spec changed a year ago and unbound variables no longer show an node, instead are just omitted from the document. * SparqlHttpSource: fixed bugs, now exposes ability to make direct SPARQL-formatted queries on the end point through new interface SparqlSource. (File Remote.cs also renamed to SparqlClient.cs.) * Added a new example in examples/sparql1.cs for using the SparqlHttpSource for making SPARQL queries in various ways. * RdfReader: Create method accepts more MIME types, new Create(string,Stream) method added. * New class: QueryResultBuffer. * VariableBindings: New this[string] method. * VisualStudio project files actually included in the deployment package now (oops). 2007-03-31 Version 0.85 -- Major Refactoring Release Bugs fixed and other minor things: * N3Reader: Reading of "(...)" lists was not working right. * Sparql.cs: In ASK, don't close the target stream via XmlWriter after writing; just flush the XmlWriter. Don't attempt to use the Query fast path if there's a statement with no variables in it (as in an ASK). * Resource.cs: BNodes without LocalName and variables without names would ToString() with their hash code, but negative hash codes look funny, so it outputs the abs(hashcode) now. Also added Literal.FromValue(Decimal). * Euler: Slight public API change. All of the cwm math: special predicates are implemented. * Store: Corrected NullRefExceptions in default Query() impl. * euler.exe: Added this new command-line program. * When building with make: .NET 1.1 binaries are put in "bin" and .NET 2.0 binaries are put in "bin_generics." Both are build by default now. Also, the SQL database adapters are now only build if the required libraries are present. * Documentation: Now tracks the generics version of the library. * SparqlHttpSource: Now supports QueryableSource interface. Major changes: * Store and MultiStore: Completely rewritten and merged. The Store is now the MultiStore. The old Store class is gone, and SQLStore no longer inherits from it. But, to get the same functionality back, just add a SQLStore object into a Store object. * MemoryStore: Inherits from the new Store class as a special case. Your use of MemoryStore shouldn't change, though. * Reasoner: New class that is the base class of RDFS (no longer SelectableSource) and Euler (no longer QueryableSource). * Query results: When getting the results of a Query via QueryableSource, the use of VariableBinding[] arrays is replaced with a new VariableBindings class. * SQLStore: Now uses SQL VIEWs where supported to speed up queries (through QueryableSource.Query) that ask for fewer variables than are mentioned in the graph. 2007-01-21 Version 0.82 -- 1st Release Candidate for version 1.0 * RdfXmlWriter: A new Options nested class and a new set of constructors allows the style of the output to be controlled. Use RdfXmlWriter.Options.XMP to enforce output consistent with the XMP spec. * N3Writer: Write out xsd:integer and xsd:double typed values without quotes in the formats that support it (integers in N3 and Turtle, doubles only in N3). * N3Reader: When an unquoted numeric literal is parsed, type it with xsd:integer or if it's non-integral xsd:double. * MultiStore's QueryableSource implementation now implements a distributed query over the sources it combines. Rather that using the default GraphMatch engine, which uses the SelectableSource interface of the underlying data sources, it now breaks the query into chunks, where possible, and sends entire chunks to the possibly optmized QueryableSource interfaces of the underlying data sources. * GraphMatch reorganized a little so MultiStore can take advantage of its algorithm for distributing a query. * Literal: Use XmlConvert class to parse XSD values in ParseValue(). * SQLStore: Minor bug fix/crash in Query. 2006-12-21 Version 0.811 * Implemented the rdfs:member property in the MemoryStore and all SQL stores. It matches against any rdf:_# predicate. Also Store.SelectObjects will automatically sort the results by the rdf:_# number when the predicate is rdfs:member. * RdfXmlWriter: Replace rdf:_# predicates with rdf:li. This only works if they are streamed to the writer *in order*. * RdfXmlWriter: Another bad bug where some data gets totally losts. * MySQLStore: Don't open the connection until it's needed. 2006-12-11 Version 0.81 Bugs: * RdfXmlWriter crashed over cyclic relations between nodes. Misc: * RDFS.cs: Cleanup. * RdfReader.cs: Generic-ified some collections in the DOTNET2 build. * MySQLStore.cs: Force an ANALYZE TABLE after an Import(). Build changes: * sparql-core.dll: Updated to latest upstream version in the SourceForge repository. * MySQLStore is now built against MySQL Connector by default, instead of the ByteFX library. Put it in the lib directory. * Added Visual Studio 2005 project files (thanks to RollsAppleTree). * Sparql.cs: Now compiles against the .NET 2.0 SemWeb.dll with the DOTNET2 precompilation flag set (in both projects). 2006-12-02 Version 0.80 Big changes and new features: * GraphMatch.cs: GraphMatch class completely reimplemented. The code is much, much shorter and cleaner now. * RDFS.cs: The RDFS class now implements QueryableSource, which means SPARQL queries over rdfs-wrapped data sources can now take advantage of the base data source's query optimizations (as in the SQLStore). The implementation in RDFS doesn't cover all of RDFS yet, though. * RdfXmlReader: Load namespace declarations from the document element early (in constructor) so that the namespaces can be read off before streaming the statements begins. * Store.cs: Implement QueryableSource and provide a default implementation of Query using the GraphMatch class. * The QueryableSource interface gets a new method MetaQuery which is used to cheaply determine how the Query method will be performed. Bugs and code cleanup: * Sparql: DESCRIBE without WHERE clause threw exception. * MultiStore: Close() should close any underlying stores. * Store.cs: Split off the main interface types out of Store.cs into Interfaces.cs. * Store.cs: When compiling with the DOTNET2 flag, only use generic collections. Code cleanup. 2006-10-23 Version 0.76 * SQLStore: Indexes are only created the first time the tables are created, so you can modify the indexes manually and not have the usual ones recreated again automatically. * MySQLStore now uses ALTER TABLE DISABLE KEYS rather than LOCK TABLES during Store.Import. * RdfXmlWriter no longer closes the underlying stream when it finishes writing, which makes it do the same as N3Writer. * Removed: MemoryStore.Statements property. Use ToArray() instead, or just foreach over the MemoryStore directly. * SPARQL: Bug in my added optimizations caused problems if a predicate in the query is a variable. 2006-10-02 Version 0.751 FIXES: * SQLStore: Adding/importing statements works again. I botched this recently. * SPARQL: Fixed several bugs I introduced recently when upgrading to the 0.8 library. * PostgreSQL Store: Working again. * MySQLStore: A flag got reverted that allows queries to avoid the DISTINCT keyword. FEATURES: * Added: SelectableSource::Contains(Resource). * N3Reader: Added a new special =:> syntax. Now ?variable =:> { ...statements... } is interpreted as ?variable being assigned to the meta field of each statement in the formula. * QueryableSource API is changed. * SQLStore now implements QuueryableSource by converting a graph into a large SQL query. * SPARQL: When querying over a QueryableSource, pass group constraints (i.e. { . . . }) directly to the QueryableSource. Major speed improvement. MISC * The SPARQL Protocol handler is moved into its own file. 2006-09-19 Version 0.75 * RdfXmlWriter: Another bug fix, this time with typed nodes. Also detects invalid parseType=Literal + datatype. Don't auto-generate a prefix named "xmlns". Don't condense literal-property-only nodes when there are a lot of literals. * RdfXmlReader: New constructors for taking a BaseURI argument. * Literal: New static method FromValue which turns doubles, ints, DateTimes, etc. into XMLSchema-typed Literal objects. * SPARQL uses the 0.8 version of Ryan Levering's library. * Sqlite 3 storage now wont insert duplicate statements into the database (requires Mono 1.1.17's SqliteClient). 2006-06-18 Version 0.741 * RdfXmlWriter: Condense output with parseType=Literal and parseType=Resource where possible. Fixed a bug with attributes and characters needing escaping, and incorrect condensing with literal attributes. * Sparql: UNIONs of UNIONs would thrown an exception. 2006-06-06 Version 0.74 * SQLStore: - Improvements to the Import() methodology, now letting the store scale much better, and a dynamic adjustment of the statement-buffer size increases performance a lot. - The literals table is now unique-indexed with a new hash column containing a SHA1 hash of the literal value, language, and datatype. This also puts an upper limit on the amount of bytes needed to be transfered to the SQL server in order to find a literal: just the hash, and not the whole value. Beware: This makes old databases unreadable. - Also, a bug fix related to literals being added to the literals table multiple times. * RdfXmlReader: Detect two cases of invalid RDF. Properly recognize xml:base on MS .NET, since that apparently isn't taken care of by XmlReader.BaseURI. * RdfXmlWriter: Better API for writing directly to a XmlDocument. Also, a minor bug fix. * RdfWriters: No need to pass your own NamespaceManager. * SelectableSource: The FindEntities method is removed in favor of the as-yet-unimplemented QueryableSource interface. 2006-05-11 Version 0.73 * RdfXmlWriter: Provide a way to access the generated XmlDocument directly, ensure it uses empty elements where possible. * Fixes and optimization for OPTIONAL groups in Sparql. * Sparql CONSTRUCT scopes bnodes properly; DESCRIBE works; CONSTRUCT still has bugs. 2006-04-18 Version 0.72 * Added SemWeb.Variable class: A subclass of BNode. The N3Reader instantiates ?variables as Variable objects rather than plain BNodes, and the N3Writer will write them out in ?variable notation. The GraphMatch class now assumes all variables are Variable objects, and nothing else. * Added SemWeb.Inferencing.Euler: Inferencing based on Jos De Roo's Euler engine (http://www.agfa.com/w3c/euler/). Experimental and not documented yet. * SQL stores: Allow insertion of bnodes outside of Import(). * SPARQL Extension Functions: New class SemWeb.Query.RdfFunction and new method Sparql.AddExtensionFunction. * SPARQL: Numeric comparison filters (i.e. <, >), are optimized by passing them into underlying SQL stores. * SPARQL: Better syntax error messages. * RdfXmlReader: Raise an error when an invalid parseType is used. * Literal: Disallow language and datatype being the empty string. * BNode: Disallow localames being the empty string. 2006-03-16 Version 0.711 * Corrected SQLStore bugs: Select(SelectFilter) would fail and cancel the select if any of the items werent in the store. The select optimization to precache metas also had two issues. * Corrected a Turtle/N3 parsing error with semicolons * Added new classes: SimpleSourceWrapper, FilterSink. * Added new spec string type: 'class' for loading a .NET class. * Added multi-line spec strings for putting together multiple stores. * Added Store.DefaultSelect(). 2006-03-11 Version 0.71 * The Select(Entity[],Entity[],Resource[]) API calls are replaced with new Select(SelectFilter) methods. * RdfXmlWriter: Improved and tightened output a lot. * Sparql: Major performance improvements. * SparqlProtocol: Make sure to dispose of data sources after queries if noreuse is set. Be sure to flush output. * RDFS: Bug fix. Implement IDisposable so it can be disposed to dispose the underlying data. * SQLStore: Limit the number of values in a multi-select to 500 to prevent the SQL query from getting too long. Performance improvement to Select(SelectFilter) by selecting on fewer columns. * Query/Sparql refactoring a bit. * Added a StatementMap which is a Statement-specialized Hashtable. * ByteFx and MySql.Connector MySQL adapters are both compiled now. * Removed Store.Write(RdfWriter). Use Store.Select(RdfWriter) or writer.Write(store) instead. 2006-01-31 Version 0.7 * New BNode class. To create a blank node, use new BNnde() in place of new Entity(null), which will now throw an exception. BNodes remember their local names in documents so reserialization can reuse the names, when possible. * New SemWeb.Inference.RDFS class which wraps any SelectableSource and provides RDFS reasoning over the store through the Select methods. * Sparql Protocol handler has been reorganized to make it easy to extend it by overriding methods. * Algos for finding MSGs and making graphs lean has been improved and is now not so slow to make it useless (if it works). * The default baseuri of the N3Reader is now "#". * StatementSources now indicate with their Distinct property whether they guarantee to return distinct statements via Select (and the Select overloads for subinterfaces). 2005-12-10 Version 0.61 * RdfReaders have a new Namespaces property to expose what namespace prefixes were found in the stream. * Added PostgreSQL and BDB (ver 4.3 only) stores. SQL store performance improvement for Select(). * There's a new SemWeb.Algos namespace containing a class to find Minimun Self-Contained Graphs and to make a store 'lean' by removing redundant subgraphs (but exponentially slow). * New method Store::RemoveAll(StatementSource). * N3Reader: If a BaseUri was set, overriding it with @prefix : did not work. Changed an error in RdfXmlReader to a warning; * RdfXmlReader now passes all W3C tests (positive & negative). * A GraphMatch bug was fixed. * Store::GetAllEntities/AllPredicates/AllMetas renamed to just GetEntities/Predicates/Metas. * Statement's Subj/Pred/Obj/Meta properties are now read/write fields. * Store::Select(Statement[]) is replaced with something else. 2005-10-19 Version 0.6 * Renamed QueryEngine to GraphMatch since it does a very limited type of query, and made the API cleaner. * Added SemWeb.Query.Sparql, a SPARQL query engine powered by http://sourceforge.net/projects/sparql by Ryan Levering, and deleted my own barely-functional SPARQL parser. * GraphMatch only allows anonymous nodes to be variables now, and the N3Reader reads variables as anonymous nodes, but remembers their names. * Removed the SelectPartialFilter class and the overloads for Store.Select that took one of those as an argument. * The overloads for Select that returned a MemoryStore rather than taking a StatementSink as an argument now return a SelectResult which lazy-loads the results into a MemoryStore if the statements are requested by IEnumerable. Otherwise it can be used as a StatementSource and passed off to other methods so it won't need to load all of the statements into memory. * SQLStore: Clear the store by dropping the tables, rather than deleting all of the rows. * Various other bug fixes, including to RdfXmlWriter. 2005-07-24 Version 0.503 * GetHashCode() for anonmyous resources used to return zero, which made hashtables of anonymous resources very slow. Now it returns Object.GetHashCode(). * Fixes in the query engine, SQL store, and N3Reader. * Statements now have a default non-null Meta field. The default is Statement.DefaultMeta. * Something has made SQLite stores much slower. * RdfXmlReader respects the RdfReader.Meta property. * MemoryStore.FindEntities wasn't working. * The SPARQL parser wasn't reading quoted literals or numbers properly. 2005-07-01 Version 0.502 * More bug fixes. * Query engine totally rewritten, which will make much more sense once its documented. * Store.Contains now accepts statement templates. 2005-06-20 Version 0.501 Just lots of bugs fixed. * New API to replace one statement with another statement in a store. * New API to test whether a statement template matches a statement. * The Resource class now has its == and != operators overloaded. * Store.CreateForInput/Output now accepts 'ntriples' 'nt' and 'turtle'. * Store.SelectSubjects signature change. * Select(Statement[]) for SQL stores works now. * SQLLite has a bug in how they handle LEFT JOIN. SQL store now works around this. * SQL stores now index on the meta field. * FindEntities works now. * N3Writer can output in NTriples, Turtle, or full N3 mode. * The query engine works now, and it's better optimized (but it wasn't working before anyway). * Xml (Sparql) query result output now has nice indentation. 2005-06-10 Version 0.5 * First release. semweb-1.05+dfsg/semweb.mds0000600000175000017500000000160310774502134015120 0ustar meebeymeebey semweb-1.05+dfsg/bin_silverlight/0000755000175000017500000000000010774502134016325 5ustar meebeymeebey