[Mulgara-svn] r1715 - trunk/src/jar/krule/java/org/mulgara/krule
alexhall at mulgara.org
alexhall at mulgara.org
Thu Jun 4 17:27:46 UTC 2009
Author: alexhall
Date: 2009-06-04 10:27:45 -0700 (Thu, 04 Jun 2009)
New Revision: 1715
Modified:
trunk/src/jar/krule/java/org/mulgara/krule/KruleLoader.java
trunk/src/jar/krule/java/org/mulgara/krule/QueryStruct.java
Log:
Remove unused namespace alias map.
Modified: trunk/src/jar/krule/java/org/mulgara/krule/KruleLoader.java
===================================================================
--- trunk/src/jar/krule/java/org/mulgara/krule/KruleLoader.java 2009-06-03 01:46:00 UTC (rev 1714)
+++ trunk/src/jar/krule/java/org/mulgara/krule/KruleLoader.java 2009-06-04 17:27:45 UTC (rev 1715)
@@ -70,9 +70,6 @@
/** The URI of the graph to receive the entailed data. */
private URI destGraphUri;
- /** A map of namespace names to the URIs. */
- private Map<String,URI> aliases;
-
/** Map of krule:URIReference nodes to their associated URIs. */
private Map<URIReference,URIReference> uriReferences;
@@ -110,9 +107,6 @@
// set the query objects to null
operationContext = null;
- // initialize the aliases
- newAliases();
-
// initialize the constriant map
constraintMap = new HashMap<Node,ConstraintExpression>();
}
@@ -326,7 +320,7 @@
Answer answer = query(query);
// get the length of the sequence prefix
- int prefixLength = ((URI)aliases.get("rdf")).toString().length() + 1;
+ int prefixLength = RDF.BASE_URI.toString().length() + 1;
// get the variables and values as elements with the appropriate type
List<URIReference> elements = new ArrayList<URIReference>();
List<URIReference> types = new ArrayList<URIReference>();
@@ -359,7 +353,7 @@
}
}
// convert these elements into ConstraintElements for the query
- QueryStruct queryStruct = new QueryStruct(elements, types, aliases, uriReferences, varReferences, literalReferences);
+ QueryStruct queryStruct = new QueryStruct(elements, types, uriReferences, varReferences, literalReferences);
// read in the WHERE reference
@@ -472,24 +466,6 @@
/**
- * Set up query aliases.
- *
- * @return A map of aliases to their fully qualified names
- */
- private Map<String,URI> newAliases() {
- aliases = new HashMap<String,URI>();
- aliases.put("rdf", URI.create("http://www.w3.org/1999/02/22-rdf-syntax-ns#"));
- aliases.put("rdfs", URI.create("http://www.w3.org/2000/01/rdf-schema#"));
- aliases.put("owl", URI.create("http://www.w3.org/2002/07/owl#"));
- aliases.put("mulgara", URI.create("http://mulgara.org/mulgara#"));
- aliases.put("krule", URI.create("http://mulgara.org/owl/krule/#"));
- aliases.put("foaf", URI.create("http://xmlns.com/foaf/0.1/"));
- aliases.put("skos", URI.create("http://www.w3.org/2004/02/skos/core#"));
- return aliases;
- }
-
-
- /**
* Queries for all URI references and loads their string representations.
*
* @throws TuplesException There was an error acessing the data.
Modified: trunk/src/jar/krule/java/org/mulgara/krule/QueryStruct.java
===================================================================
--- trunk/src/jar/krule/java/org/mulgara/krule/QueryStruct.java 2009-06-03 01:46:00 UTC (rev 1714)
+++ trunk/src/jar/krule/java/org/mulgara/krule/QueryStruct.java 2009-06-04 17:27:45 UTC (rev 1715)
@@ -83,14 +83,13 @@
*
* @param valueSelection The element nodes.
* @param selTypes The types of the elements, defined in the krule namespace.
- * @param alias The aliases used in the query process.
* @param uriReferences A map of all krule:ref_* objects to the appropriate {@link org.jrdf.graph.URIReference}s.
* @param varReferences A map of all krule:var_* objects to the appropriate name.
* @throws IllegalArgumentException If the types are incorrect, the elements are not named as expected,
* or the references are not found in the references map.
*/
public QueryStruct(
- List<URIReference> valueSelection, List<URIReference> selTypes, Map<String,URI> alias,
+ List<URIReference> valueSelection, List<URIReference> selTypes,
Map<URIReference,URIReference> uriReferences, Map<URIReference,Variable> varReferences,
Map<Node,Literal> litReferences
) {
More information about the Mulgara-svn
mailing list