You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rya.apache.org by mi...@apache.org on 2015/12/07 13:04:32 UTC

[02/51] [partial] incubator-rya git commit: Cannot delete temp branch, doc'd it.

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/sail/src/main/java/mvm/rya/rdftriplestore/inference/AbstractInferVisitor.java
----------------------------------------------------------------------
diff --git a/sail/src/main/java/mvm/rya/rdftriplestore/inference/AbstractInferVisitor.java b/sail/src/main/java/mvm/rya/rdftriplestore/inference/AbstractInferVisitor.java
deleted file mode 100644
index f6d3ff0..0000000
--- a/sail/src/main/java/mvm/rya/rdftriplestore/inference/AbstractInferVisitor.java
+++ /dev/null
@@ -1,108 +0,0 @@
-package mvm.rya.rdftriplestore.inference;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-
-
-import mvm.rya.api.RdfCloudTripleStoreConfiguration;
-import mvm.rya.rdftriplestore.utils.FixedStatementPattern;
-import mvm.rya.rdftriplestore.utils.TransitivePropertySP;
-import mvm.rya.rdftriplestore.utils.FixedStatementPattern;
-import mvm.rya.rdftriplestore.utils.TransitivePropertySP;
-import org.openrdf.query.algebra.Join;
-import org.openrdf.query.algebra.StatementPattern;
-import org.openrdf.query.algebra.Union;
-import org.openrdf.query.algebra.Var;
-import org.openrdf.query.algebra.helpers.QueryModelVisitorBase;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-/**
- * Class AbstractInferVisitor
- * Date: Mar 14, 2012
- * Time: 5:33:01 PM
- */
-public class AbstractInferVisitor extends QueryModelVisitorBase {
-
-    static Var EXPANDED = new Var("infer-expanded");
-
-    boolean include = true;
-
-    RdfCloudTripleStoreConfiguration conf;
-    InferenceEngine inferenceEngine;
-
-    public AbstractInferVisitor(RdfCloudTripleStoreConfiguration conf, InferenceEngine inferenceEngine) {
-        checkNotNull(conf, "Configuration cannot be null");
-        checkNotNull(inferenceEngine, "Inference Engine cannot be null");
-        this.conf = conf;
-        this.inferenceEngine = inferenceEngine;
-    }
-
-    @Override
-    public void meet(StatementPattern sp) throws Exception {
-        if (!include) {
-            return;
-        }
-        if (sp instanceof FixedStatementPattern || sp instanceof TransitivePropertySP || sp instanceof DoNotExpandSP) {
-            return;   //already inferred somewhere else
-        }
-        final Var predVar = sp.getPredicateVar();
-        //we do not let timeRange preds be inferred, not good
-        if (predVar == null || predVar.getValue() == null
-//                || RdfCloudTripleStoreUtils.getTtlValueConverter(conf, (URI) predVar.getValue()) != null
-                ) {
-            return;
-        }
-        meetSP(sp);
-    }
-
-    protected void meetSP(StatementPattern sp) throws Exception {
-
-    }
-
-    @Override
-    public void meet(Union node) throws Exception {
-//        if (!(node instanceof InferUnion))
-        super.meet(node);
-    }
-
-    @Override
-    public void meet(Join node) throws Exception {
-        if (!(node instanceof InferJoin)) {
-            super.meet(node);
-        }
-    }
-
-    public RdfCloudTripleStoreConfiguration getConf() {
-        return conf;
-    }
-
-    public void setConf(RdfCloudTripleStoreConfiguration conf) {
-        this.conf = conf;
-    }
-
-    public InferenceEngine getInferenceEngine() {
-        return inferenceEngine;
-    }
-
-    public void setInferenceEngine(InferenceEngine inferenceEngine) {
-        this.inferenceEngine = inferenceEngine;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/sail/src/main/java/mvm/rya/rdftriplestore/inference/DoNotExpandSP.java
----------------------------------------------------------------------
diff --git a/sail/src/main/java/mvm/rya/rdftriplestore/inference/DoNotExpandSP.java b/sail/src/main/java/mvm/rya/rdftriplestore/inference/DoNotExpandSP.java
deleted file mode 100644
index aed7ed0..0000000
--- a/sail/src/main/java/mvm/rya/rdftriplestore/inference/DoNotExpandSP.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package mvm.rya.rdftriplestore.inference;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-
-
-import org.openrdf.query.algebra.StatementPattern;
-import org.openrdf.query.algebra.Var;
-
-/**
- * Class DoNotExpandSP
- * Date: Mar 15, 2012
- * Time: 9:39:45 AM
- */
-public class DoNotExpandSP extends StatementPattern{
-    public DoNotExpandSP() {
-    }
-
-    public DoNotExpandSP(Var subject, Var predicate, Var object) {
-        super(subject, predicate, object);
-    }
-
-    public DoNotExpandSP(Scope scope, Var subject, Var predicate, Var object) {
-        super(scope, subject, predicate, object);
-    }
-
-    public DoNotExpandSP(Var subject, Var predicate, Var object, Var context) {
-        super(subject, predicate, object, context);
-    }
-
-    public DoNotExpandSP(Scope scope, Var subjVar, Var predVar, Var objVar, Var conVar) {
-        super(scope, subjVar, predVar, objVar, conVar);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/sail/src/main/java/mvm/rya/rdftriplestore/inference/InferConstants.java
----------------------------------------------------------------------
diff --git a/sail/src/main/java/mvm/rya/rdftriplestore/inference/InferConstants.java b/sail/src/main/java/mvm/rya/rdftriplestore/inference/InferConstants.java
deleted file mode 100644
index aa0b99b..0000000
--- a/sail/src/main/java/mvm/rya/rdftriplestore/inference/InferConstants.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package mvm.rya.rdftriplestore.inference;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-
-
-/**
- * Interface InferConstants
- * Date: Apr 16, 2011
- * Time: 7:30:47 AM
- */
-public interface InferConstants {
-
-    public static final String INFERRED = "inferred";
-    public static final String TRUE = "true";
-    public static final String FALSE = "false";
-}

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/sail/src/main/java/mvm/rya/rdftriplestore/inference/InferJoin.java
----------------------------------------------------------------------
diff --git a/sail/src/main/java/mvm/rya/rdftriplestore/inference/InferJoin.java b/sail/src/main/java/mvm/rya/rdftriplestore/inference/InferJoin.java
deleted file mode 100644
index 87854ac..0000000
--- a/sail/src/main/java/mvm/rya/rdftriplestore/inference/InferJoin.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package mvm.rya.rdftriplestore.inference;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-
-
-import org.openrdf.query.algebra.Join;
-import org.openrdf.query.algebra.TupleExpr;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Class InferJoin
- * Date: Apr 16, 2011
- * Time: 7:29:40 AM
- */
-public class InferJoin extends Join {
-
-    private Map<String, String> properties = new HashMap<String, String>();
-
-    public InferJoin() {
-    }
-
-    public InferJoin(TupleExpr leftArg, TupleExpr rightArg) {
-        super(leftArg, rightArg);
-    }
-
-    public Map<String, String> getProperties() {
-        return properties;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/sail/src/main/java/mvm/rya/rdftriplestore/inference/InferUnion.java
----------------------------------------------------------------------
diff --git a/sail/src/main/java/mvm/rya/rdftriplestore/inference/InferUnion.java b/sail/src/main/java/mvm/rya/rdftriplestore/inference/InferUnion.java
deleted file mode 100644
index 4d229d0..0000000
--- a/sail/src/main/java/mvm/rya/rdftriplestore/inference/InferUnion.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package mvm.rya.rdftriplestore.inference;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-
-
-import org.openrdf.query.algebra.TupleExpr;
-import org.openrdf.query.algebra.Union;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Class InferUnion
- * Date: Mar 14, 2012
- * Time: 12:43:49 PM
- */
-public class InferUnion extends Union {
-    private Map<String, String> properties = new HashMap<String, String>();
-
-    public InferUnion() {
-    }
-
-    public InferUnion(TupleExpr leftArg, TupleExpr rightArg) {
-        super(leftArg, rightArg);
-    }
-
-    public Map<String, String> getProperties() {
-        return properties;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/sail/src/main/java/mvm/rya/rdftriplestore/inference/InferenceEngine.java
----------------------------------------------------------------------
diff --git a/sail/src/main/java/mvm/rya/rdftriplestore/inference/InferenceEngine.java b/sail/src/main/java/mvm/rya/rdftriplestore/inference/InferenceEngine.java
deleted file mode 100644
index f4ed420..0000000
--- a/sail/src/main/java/mvm/rya/rdftriplestore/inference/InferenceEngine.java
+++ /dev/null
@@ -1,410 +0,0 @@
-package mvm.rya.rdftriplestore.inference;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-
-
-import com.tinkerpop.blueprints.Direction;
-import com.tinkerpop.blueprints.Edge;
-import com.tinkerpop.blueprints.Graph;
-import com.tinkerpop.blueprints.Vertex;
-import com.tinkerpop.blueprints.impls.tg.TinkerGraphFactory;
-import info.aduna.iteration.CloseableIteration;
-import mvm.rya.api.RdfCloudTripleStoreConfiguration;
-import mvm.rya.api.persist.RyaDAO;
-import mvm.rya.api.persist.RyaDAOException;
-import mvm.rya.api.persist.utils.RyaDAOHelper;
-import org.openrdf.model.Resource;
-import org.openrdf.model.Statement;
-import org.openrdf.model.URI;
-import org.openrdf.model.Value;
-import org.openrdf.model.impl.StatementImpl;
-import org.openrdf.model.vocabulary.OWL;
-import org.openrdf.model.vocabulary.RDF;
-import org.openrdf.model.vocabulary.RDFS;
-import org.openrdf.query.QueryEvaluationException;
-
-import java.util.*;
-
-import static com.google.common.base.Preconditions.checkArgument;
-import static com.google.common.base.Preconditions.checkNotNull;
-
-/**
- * Will pull down inference relationships from dao every x seconds. <br>
- * Will infer extra relationships. <br>
- * Will cache relationships in Graph for later use. <br>
- */
-public class InferenceEngine {
-
-    private Graph subClassOfGraph;
-    private Graph subPropertyOfGraph;
-    private Set<URI> symmetricPropertySet;
-    private Map<URI, URI> inverseOfMap;
-    private Set<URI> transitivePropertySet;
-
-    private RyaDAO ryaDAO;
-    private RdfCloudTripleStoreConfiguration conf;
-    private boolean initialized = false;
-    private boolean schedule = true;
-
-    private long refreshGraphSchedule = 5 * 60 * 1000; //5 min
-    private Timer timer;
-    public static final String URI_PROP = "uri";
-
-    public void init() throws InferenceEngineException {
-        try {
-            if (isInitialized()) {
-                return;
-            }
-
-            checkNotNull(conf, "Configuration is null");
-            checkNotNull(ryaDAO, "RdfDao is null");
-            checkArgument(ryaDAO.isInitialized(), "RdfDao is not initialized");
-
-            if (schedule) {
-                timer = new Timer(InferenceEngine.class.getName());
-                timer.scheduleAtFixedRate(new TimerTask() {
-
-                    @Override
-                    public void run() {
-                        try {
-                            refreshGraph();
-                        } catch (InferenceEngineException e) {
-                            throw new RuntimeException(e);
-                        }
-                    }
-
-                }, refreshGraphSchedule, refreshGraphSchedule);
-            }
-            refreshGraph();
-            setInitialized(true);
-        } catch (RyaDAOException e) {
-            throw new InferenceEngineException(e);
-        }
-    }
-
-    public void destroy() throws InferenceEngineException {
-        setInitialized(false);
-        if (timer != null) {
-            timer.cancel();
-        }
-    }
-
-    public void refreshGraph() throws InferenceEngineException {
-        try {
-            //get all subclassof
-            Graph graph = TinkerGraphFactory.createTinkerGraph();
-            CloseableIteration<Statement, QueryEvaluationException> iter = RyaDAOHelper.query(ryaDAO, null,
-                    RDFS.SUBCLASSOF, null, conf);
-            try {
-                while (iter.hasNext()) {
-                    String edgeName = RDFS.SUBCLASSOF.stringValue();
-                    Statement st = iter.next();
-                    addStatementEdge(graph, edgeName, st);
-                }
-            } finally {
-                if (iter != null) {
-                    iter.close();
-                }
-            }
-
-            subClassOfGraph = graph; //TODO: Should this be synchronized?
-
-            graph = TinkerGraphFactory.createTinkerGraph();
-
-            iter = RyaDAOHelper.query(ryaDAO, null,
-                    RDFS.SUBPROPERTYOF, null, conf);
-            try {
-                while (iter.hasNext()) {
-                    String edgeName = RDFS.SUBPROPERTYOF.stringValue();
-                    Statement st = iter.next();
-                    addStatementEdge(graph, edgeName, st);
-                }
-            } finally {
-                if (iter != null) {
-                    iter.close();
-                }
-            }
-
-            //equiv property really is the same as a subPropertyOf both ways
-            iter = RyaDAOHelper.query(ryaDAO, null, OWL.EQUIVALENTPROPERTY, null, conf);
-            try {
-                while (iter.hasNext()) {
-                    String edgeName = RDFS.SUBPROPERTYOF.stringValue();
-                    Statement st = iter.next();
-                    addStatementEdge(graph, edgeName, st);
-                    //reverse is also true
-                    addStatementEdge(graph, edgeName, new StatementImpl((Resource) st.getObject(), st.getPredicate(), st.getSubject()));
-                }
-            } finally {
-                if (iter != null) {
-                    iter.close();
-                }
-            }
-
-            subPropertyOfGraph = graph; //TODO: Should this be synchronized?
-
-            iter = RyaDAOHelper.query(ryaDAO, null, RDF.TYPE, OWL.SYMMETRICPROPERTY, conf);
-            Set<URI> symProp = new HashSet();
-            try {
-                while (iter.hasNext()) {
-                    Statement st = iter.next();
-                    symProp.add((URI) st.getSubject()); //safe to assume it is a URI?
-                }
-            } finally {
-                if (iter != null) {
-                    iter.close();
-                }
-            }
-            symmetricPropertySet = symProp;
-
-            iter = RyaDAOHelper.query(ryaDAO, null, RDF.TYPE, OWL.TRANSITIVEPROPERTY, conf);
-            Set<URI> transProp = new HashSet();
-            try {
-                while (iter.hasNext()) {
-                    Statement st = iter.next();
-                    transProp.add((URI) st.getSubject());
-                }
-            } finally {
-                if (iter != null) {
-                    iter.close();
-                }
-            }
-            transitivePropertySet = transProp;
-
-            iter = RyaDAOHelper.query(ryaDAO, null, OWL.INVERSEOF, null, conf);
-            Map<URI, URI> invProp = new HashMap();
-            try {
-                while (iter.hasNext()) {
-                    Statement st = iter.next();
-                    invProp.put((URI) st.getSubject(), (URI) st.getObject());
-                    invProp.put((URI) st.getObject(), (URI) st.getSubject());
-                }
-            } finally {
-                if (iter != null) {
-                    iter.close();
-                }
-            }
-            inverseOfMap = invProp;
-        } catch (QueryEvaluationException e) {
-            throw new InferenceEngineException(e);
-        }
-    }
-
-    protected void addStatementEdge(Graph graph, String edgeName, Statement st) {
-        Resource subj = st.getSubject();
-        Vertex a = graph.getVertex(subj);
-        if (a == null) {
-            a = graph.addVertex(subj);
-            a.setProperty(URI_PROP, subj);
-        }
-        Value obj = st.getObject();
-        Vertex b = graph.getVertex(obj);
-        if (b == null) {
-            b = graph.addVertex(obj);
-            b.setProperty(URI_PROP, obj);
-        }
-        graph.addEdge(null, a, b, edgeName);
-    }
-
-    public Set<URI> findParents(Graph graph, URI vertexId) {
-        Set<URI> parents = new HashSet();
-        if (graph == null) {
-            return parents;
-        }
-        Vertex v = graph.getVertex(vertexId);
-        if (v == null) {
-            return parents;
-        }
-        addParents(v, parents);
-        return parents;
-    }
-
-    private static void addParents(Vertex v, Set<URI> parents) {
-        for (Edge edge : v.getEdges(Direction.IN)) {
-            Vertex ov = edge.getVertex(Direction.OUT);
-            Object o = ov.getProperty(URI_PROP);
-            if (o != null && o instanceof URI) {
-                boolean contains = parents.contains(o);
-                if (!contains) {
-                    parents.add((URI) o);
-                    addParents(ov, parents);
-                }
-            }
-
-        }
-    }
-
-    public boolean isSymmetricProperty(URI prop) {
-        return (symmetricPropertySet != null) && symmetricPropertySet.contains(prop);
-    }
-
-    public URI findInverseOf(URI prop) {
-        return (inverseOfMap != null) ? inverseOfMap.get(prop) : (null);
-    }
-
-    public boolean isTransitiveProperty(URI prop) {
-        return (transitivePropertySet != null) && transitivePropertySet.contains(prop);
-    }
-
-    /**
-     * TODO: This chaining can be slow at query execution. the other option is to perform this in the query itself, but that will be constrained to how many levels we decide to go
-     */
-    public Set<Statement> findTransitiveProperty(Resource subj, URI prop, Value obj, Resource... contxts) throws InferenceEngineException {
-        if (transitivePropertySet.contains(prop)) {
-            Set<Statement> sts = new HashSet();
-            boolean goUp = subj == null;
-            chainTransitiveProperty(subj, prop, obj, (goUp) ? (obj) : (subj), sts, goUp, contxts);
-            return sts;
-        } else
-            return null;
-    }
-
-    /**
-     * TODO: This chaining can be slow at query execution. the other option is to perform this in the query itself, but that will be constrained to how many levels we decide to go
-     */
-    public Set<Resource> findSameAs(Resource value, Resource... contxts) throws InferenceEngineException{
-		Set<Resource> sameAs = new HashSet<Resource>();
-		sameAs.add(value);
-		findSameAsChaining(value, sameAs, contxts);
-		return sameAs;
-    }
-
-    /**
-     * TODO: This chaining can be slow at query execution. the other option is to perform this in the query itself, but that will be constrained to how many levels we decide to go
-     */
-    public void findSameAsChaining(Resource subj, Set<Resource> currentSameAs, Resource[] contxts) throws InferenceEngineException{
-        try {
-			CloseableIteration<Statement, QueryEvaluationException> subjIter = RyaDAOHelper.query(ryaDAO, subj, OWL.SAMEAS, null, conf, contxts);
-			while (subjIter.hasNext()){
-				Statement st = subjIter.next();
-				if (!currentSameAs.contains(st.getObject())){
-					Resource castedObj = (Resource) st.getObject();
-					currentSameAs.add(castedObj);
-					findSameAsChaining(castedObj, currentSameAs, contxts);
-				}
-			}
-			subjIter.close();
-			CloseableIteration<Statement, QueryEvaluationException> objIter = RyaDAOHelper.query(ryaDAO, null, OWL.SAMEAS, subj, conf, contxts);
-			while (objIter.hasNext()){
-				Statement st = objIter.next();
-				if (!currentSameAs.contains(st.getSubject())){
-					Resource sameAsSubj = st.getSubject();
-					currentSameAs.add(sameAsSubj);
-					findSameAsChaining(sameAsSubj, currentSameAs, contxts);
-				}
-			}
-			objIter.close();
-		} catch (QueryEvaluationException e) {
-			throw new InferenceEngineException(e);
-		}
-
-    }
-
-    protected void chainTransitiveProperty(Resource subj, URI prop, Value obj, Value core, Set<Statement> sts, boolean goUp, Resource[] contxts) throws InferenceEngineException {
-        try {
-            CloseableIteration<Statement, QueryEvaluationException> iter = RyaDAOHelper.query(ryaDAO, subj, prop, obj, conf, contxts);
-            while (iter.hasNext()) {
-                Statement st = iter.next();
-                sts.add(new StatementImpl((goUp) ? (st.getSubject()) : (Resource) (core), prop, (!goUp) ? (st.getObject()) : (core)));
-                if (goUp) {
-                    chainTransitiveProperty(null, prop, st.getSubject(), core, sts, goUp, contxts);
-                } else {
-                    chainTransitiveProperty((Resource) st.getObject(), prop, null, core, sts, goUp, contxts);
-                }
-            }
-            iter.close();
-        } catch (QueryEvaluationException e) {
-            throw new InferenceEngineException(e);
-        }
-    }
-
-    public boolean isInitialized() {
-        return initialized;
-    }
-
-    public void setInitialized(boolean initialized) {
-        this.initialized = initialized;
-    }
-
-    public RyaDAO getRyaDAO() {
-        return ryaDAO;
-    }
-
-    public void setRyaDAO(RyaDAO ryaDAO) {
-        this.ryaDAO = ryaDAO;
-    }
-
-    public RdfCloudTripleStoreConfiguration getConf() {
-        return conf;
-    }
-
-    public void setConf(RdfCloudTripleStoreConfiguration conf) {
-        this.conf = conf;
-    }
-
-    public Graph getSubClassOfGraph() {
-        return subClassOfGraph;
-    }
-
-    public Graph getSubPropertyOfGraph() {
-        return subPropertyOfGraph;
-    }
-
-    public long getRefreshGraphSchedule() {
-        return refreshGraphSchedule;
-    }
-
-    public void setRefreshGraphSchedule(long refreshGraphSchedule) {
-        this.refreshGraphSchedule = refreshGraphSchedule;
-    }
-
-    public Set<URI> getSymmetricPropertySet() {
-        return symmetricPropertySet;
-    }
-
-    public void setSymmetricPropertySet(Set<URI> symmetricPropertySet) {
-        this.symmetricPropertySet = symmetricPropertySet;
-    }
-
-    public Map<URI, URI> getInverseOfMap() {
-        return inverseOfMap;
-    }
-
-    public void setInverseOfMap(Map<URI, URI> inverseOfMap) {
-        this.inverseOfMap = inverseOfMap;
-    }
-
-    public Set<URI> getTransitivePropertySet() {
-        return transitivePropertySet;
-    }
-
-    public void setTransitivePropertySet(Set<URI> transitivePropertySet) {
-        this.transitivePropertySet = transitivePropertySet;
-    }
-
-    public boolean isSchedule() {
-        return schedule;
-    }
-
-    public void setSchedule(boolean schedule) {
-        this.schedule = schedule;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/sail/src/main/java/mvm/rya/rdftriplestore/inference/InferenceEngineException.java
----------------------------------------------------------------------
diff --git a/sail/src/main/java/mvm/rya/rdftriplestore/inference/InferenceEngineException.java b/sail/src/main/java/mvm/rya/rdftriplestore/inference/InferenceEngineException.java
deleted file mode 100644
index 4fc94e3..0000000
--- a/sail/src/main/java/mvm/rya/rdftriplestore/inference/InferenceEngineException.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package mvm.rya.rdftriplestore.inference;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-
-
-/**
- * Date: 7/20/12
- * Time: 11:03 AM
- */
-public class InferenceEngineException extends Exception {
-    public InferenceEngineException() {
-    }
-
-    public InferenceEngineException(String s) {
-        super(s);
-    }
-
-    public InferenceEngineException(String s, Throwable throwable) {
-        super(s, throwable);
-    }
-
-    public InferenceEngineException(Throwable throwable) {
-        super(throwable);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/sail/src/main/java/mvm/rya/rdftriplestore/inference/InverseOfVisitor.java
----------------------------------------------------------------------
diff --git a/sail/src/main/java/mvm/rya/rdftriplestore/inference/InverseOfVisitor.java b/sail/src/main/java/mvm/rya/rdftriplestore/inference/InverseOfVisitor.java
deleted file mode 100644
index 6f8004c..0000000
--- a/sail/src/main/java/mvm/rya/rdftriplestore/inference/InverseOfVisitor.java
+++ /dev/null
@@ -1,80 +0,0 @@
-package mvm.rya.rdftriplestore.inference;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-
-
-import mvm.rya.api.RdfCloudTripleStoreConfiguration;
-import org.openrdf.model.URI;
-import org.openrdf.model.vocabulary.RDF;
-import org.openrdf.model.vocabulary.RDFS;
-import org.openrdf.model.vocabulary.SESAME;
-import org.openrdf.query.algebra.StatementPattern;
-import org.openrdf.query.algebra.Union;
-import org.openrdf.query.algebra.Var;
-
-/**
- * All predicates are changed
- * Class SubPropertyOfVisitor
- * Date: Mar 29, 2011
- * Time: 11:28:34 AM
- */
-public class InverseOfVisitor extends AbstractInferVisitor {
-
-    public InverseOfVisitor(RdfCloudTripleStoreConfiguration conf, InferenceEngine inferenceEngine) {
-        super(conf, inferenceEngine);
-        include = conf.isInferInverseOf();
-    }
-
-    @Override
-    protected void meetSP(StatementPattern node) throws Exception {
-        StatementPattern sp = node.clone();
-        final Var predVar = sp.getPredicateVar();
-
-        URI pred = (URI) predVar.getValue();
-        String predNamespace = pred.getNamespace();
-
-        final Var objVar = sp.getObjectVar();
-        final Var cntxtVar = sp.getContextVar();
-        if (objVar != null &&
-                !RDF.NAMESPACE.equals(predNamespace) &&
-                !SESAME.NAMESPACE.equals(predNamespace) &&
-                !RDFS.NAMESPACE.equals(predNamespace)
-                && !EXPANDED.equals(cntxtVar)) {
-            /**
-             *
-             * { ?a ?pred ?b .}\n" +
-             "       UNION " +
-             "      { ?b ?pred ?a }
-             */
-
-            URI predUri = (URI) predVar.getValue();
-            URI invPropUri = inferenceEngine.findInverseOf(predUri);
-            if (invPropUri != null) {
-                Var subjVar = sp.getSubjectVar();
-                Union union = new InferUnion();
-                union.setLeftArg(sp);
-                union.setRightArg(new StatementPattern(objVar, new Var(predVar.getName(), invPropUri), subjVar, cntxtVar));
-                node.replaceWith(union);
-            }
-        }
-    }
-    
-}

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/sail/src/main/java/mvm/rya/rdftriplestore/inference/SameAsVisitor.java
----------------------------------------------------------------------
diff --git a/sail/src/main/java/mvm/rya/rdftriplestore/inference/SameAsVisitor.java b/sail/src/main/java/mvm/rya/rdftriplestore/inference/SameAsVisitor.java
deleted file mode 100644
index d035026..0000000
--- a/sail/src/main/java/mvm/rya/rdftriplestore/inference/SameAsVisitor.java
+++ /dev/null
@@ -1,187 +0,0 @@
-package mvm.rya.rdftriplestore.inference;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-
-
-import mvm.rya.api.RdfCloudTripleStoreConfiguration;
-import mvm.rya.api.utils.NullableStatementImpl;
-import mvm.rya.rdftriplestore.utils.FixedStatementPattern;
-import mvm.rya.rdftriplestore.utils.TransitivePropertySP;
-import org.openrdf.model.Resource;
-import org.openrdf.model.URI;
-import org.openrdf.model.Value;
-import org.openrdf.model.vocabulary.OWL;
-import org.openrdf.model.vocabulary.RDF;
-import org.openrdf.model.vocabulary.RDFS;
-import org.openrdf.model.vocabulary.SESAME;
-import org.openrdf.query.algebra.StatementPattern;
-import org.openrdf.query.algebra.Var;
-
-import java.util.HashSet;
-import java.util.Set;
-import java.util.UUID;
-
-/**
- * All predicates are changed
- * Class SubPropertyOfVisitor
- * Date: Mar 29, 2011
- * Time: 11:28:34 AM
- */
-public class SameAsVisitor extends AbstractInferVisitor {
-
-    public SameAsVisitor(RdfCloudTripleStoreConfiguration conf, InferenceEngine inferenceEngine) {
-        super(conf, inferenceEngine);
-        include = conf.isInferSubPropertyOf(); // oops
-    }
-    
-    public void meet(StatementPattern sp) throws Exception {
-        if (!include) {
-            return;
-        }
-        if (sp instanceof FixedStatementPattern || sp instanceof TransitivePropertySP || sp instanceof DoNotExpandSP) {
-            return;   //already inferred somewhere else
-        }
-        final Var predVar = sp.getPredicateVar();
-        //do not know when things are null
-        if (predVar == null) {
-            return;
-        }
-        meetSP(sp);
-    }
-
-    @Override
-    protected void meetSP(StatementPattern node) throws Exception {
-        StatementPattern sp = node.clone();
-        final Var predVar = sp.getPredicateVar();
-
-        boolean shouldExpand = true;
-        if (predVar.hasValue()){
-            URI pred = (URI) predVar.getValue();
-            String predNamespace = pred.getNamespace();
-            shouldExpand = !pred.equals(OWL.SAMEAS) && 
-            !RDF.NAMESPACE.equals(predNamespace) &&
-            !SESAME.NAMESPACE.equals(predNamespace) &&
-            !RDFS.NAMESPACE.equals(predNamespace);
-        }
-
-        final Var objVar = sp.getObjectVar();
-        final Var subjVar = sp.getSubjectVar();
-        final Var cntxtVar = sp.getContextVar();
-        if (shouldExpand
-                && !EXPANDED.equals(cntxtVar) && !(objVar == null) && !(subjVar == null)){
-            if (objVar.getValue() == null) {
-            	Value subjVarValue = subjVar.getValue();
-            	if (subjVarValue instanceof Resource){
-            		Set<Resource> uris = inferenceEngine.findSameAs((Resource)subjVar.getValue(), getVarValue(cntxtVar));
-            		if (uris.size() > 1){
-            			InferJoin join = getReplaceJoin(uris, true, subjVar, objVar, predVar, cntxtVar);
-            			node.replaceWith(join);  
-            		}
-            	}
-            }
-            else if (subjVar.getValue() == null) {
-            	Value objVarValue = objVar.getValue();
-            	if (objVarValue instanceof Resource){
-            		Set<Resource> uris = inferenceEngine.findSameAs((Resource)objVar.getValue(), getVarValue(cntxtVar));
-                	if (uris.size() > 1){
-                        InferJoin join = getReplaceJoin(uris, false, subjVar, objVar, predVar, cntxtVar);
-                        node.replaceWith(join);  
-                	}
-            	}  	
-            }
-            else {
-            	// both subj and pred are set and should be expanded
-            	Set<Resource> subjURIs = new HashSet<Resource>();
-            	Set<Resource> objURIs = new HashSet<Resource>();
-            	// TODO I don't like these checks -- is there a better way to do this?
-            	Value objVarValue = objVar.getValue();
-           	    if (objVarValue instanceof Resource){
-           	    	objURIs = inferenceEngine.findSameAs((Resource)objVar.getValue(), getVarValue(cntxtVar));
-            	}
-            	Value subjVarValue = subjVar.getValue();
-            	if (subjVarValue instanceof Resource){
-            		subjURIs = inferenceEngine.findSameAs((Resource)subjVar.getValue(), getVarValue(cntxtVar));
-            	}
-            	InferJoin finalJoin = null;
-            	// expand subj first
-            	if (subjURIs.size() > 1){
-            		finalJoin = getReplaceJoin(subjURIs, true, subjVar, objVar, predVar, cntxtVar);
-            	}
-            	// now expand the obj
-            	if (objURIs.size() > 1){
-            		// if we already expanded the subj
-            		if (finalJoin != null){
-            			// we know what this is since we created it
-            			DoNotExpandSP origStatement = (DoNotExpandSP) finalJoin.getRightArg();
-            	        String s = UUID.randomUUID().toString();
-            	        Var dummyVar = new Var(s);
-            			StatementPattern origDummyStatement = new DoNotExpandSP(origStatement.getSubjectVar(), origStatement.getPredicateVar(), dummyVar, cntxtVar);
-            	        FixedStatementPattern fsp = new FixedStatementPattern(dummyVar, new Var("c-" + s, OWL.SAMEAS), objVar, cntxtVar);
-            	        for (Resource sameAs : objURIs){
-            	    		NullableStatementImpl newStatement = new NullableStatementImpl(sameAs, OWL.SAMEAS, (Resource)objVar.getValue(), getVarValue(cntxtVar));
-            	            fsp.statements.add(newStatement);        		
-            	    	}
-            	        InferJoin interimJoin = new InferJoin(fsp, origDummyStatement);
-            	        finalJoin = new InferJoin(finalJoin.getLeftArg(), interimJoin);
-            		}
-            		else {
-            			finalJoin = getReplaceJoin(objURIs, false, subjVar, objVar, predVar, cntxtVar);
-            		}
-            		
-            	}
-            	if (finalJoin != null){
-            	    node.replaceWith(finalJoin);
-            	}
-            }
-        }
-    }
-    
-    private InferJoin getReplaceJoin(Set<Resource> uris, boolean subSubj, Var subjVar, Var objVar, Var predVar, Var cntxtVar){
-        String s = UUID.randomUUID().toString();
-        Var dummyVar = new Var(s);
-        StatementPattern origStatement;
-        Var subVar;
-        if (subSubj){
-        	subVar = subjVar;
-        	origStatement = new DoNotExpandSP(dummyVar, predVar, objVar, cntxtVar);
-        }
-        else {
-        	subVar = objVar;
-        	origStatement = new DoNotExpandSP(subjVar, predVar, dummyVar, cntxtVar);
-       }
-        FixedStatementPattern fsp = new FixedStatementPattern(dummyVar, new Var("c-" + s, OWL.SAMEAS), subVar, cntxtVar);
-        for (Resource sameAs : uris){
-    		NullableStatementImpl newStatement = new NullableStatementImpl(sameAs, OWL.SAMEAS, (Resource)subVar.getValue(), getVarValue(cntxtVar));
-            fsp.statements.add(newStatement);        		
-    	}
-        InferJoin join = new InferJoin(fsp, origStatement);
-        join.getProperties().put(InferConstants.INFERRED, InferConstants.TRUE);
-       return join;
-    }
-    
-    protected Resource getVarValue(Var var) {
-        if (var == null)
-            return null;
-        else
-            return (Resource)var.getValue();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/sail/src/main/java/mvm/rya/rdftriplestore/inference/SubClassOfVisitor.java
----------------------------------------------------------------------
diff --git a/sail/src/main/java/mvm/rya/rdftriplestore/inference/SubClassOfVisitor.java b/sail/src/main/java/mvm/rya/rdftriplestore/inference/SubClassOfVisitor.java
deleted file mode 100644
index 664b5af..0000000
--- a/sail/src/main/java/mvm/rya/rdftriplestore/inference/SubClassOfVisitor.java
+++ /dev/null
@@ -1,108 +0,0 @@
-package mvm.rya.rdftriplestore.inference;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-
-
-import mvm.rya.api.RdfCloudTripleStoreConfiguration;
-import mvm.rya.api.utils.NullableStatementImpl;
-import mvm.rya.rdftriplestore.utils.FixedStatementPattern;
-import mvm.rya.rdftriplestore.utils.FixedStatementPattern;
-import org.openrdf.model.URI;
-import org.openrdf.model.vocabulary.RDF;
-import org.openrdf.model.vocabulary.RDFS;
-import org.openrdf.query.algebra.StatementPattern;
-import org.openrdf.query.algebra.Var;
-
-import java.util.Collection;
-import java.util.UUID;
-
-/**
- * Class SubClassOfVisitor
- * Date: Mar 29, 2011
- * Time: 11:28:34 AM
- */
-public class SubClassOfVisitor extends AbstractInferVisitor {
-
-    public SubClassOfVisitor(RdfCloudTripleStoreConfiguration conf, InferenceEngine inferenceEngine) {
-        super(conf, inferenceEngine);
-        include = conf.isInferSubClassOf();
-    }
-
-    @Override
-    protected void meetSP(StatementPattern node) throws Exception {
-        StatementPattern sp = node.clone();
-        final Var predVar = sp.getPredicateVar();
-        final Var objVar = sp.getObjectVar();
-        final Var conVar = sp.getContextVar();
-        if (predVar != null && objVar != null && objVar.getValue() != null && RDF.TYPE.equals(predVar.getValue())
-                && !EXPANDED.equals(conVar)) {
-            /**
-             * ?type sesame:directSubClassOf ub:Student . ?student rdf:type ?type +
-             */
-//            String s = UUID.randomUUID().toString();
-//            Var typeVar = new Var(s);
-//            StatementPattern subClassOf = new StatementPattern(typeVar, new Var("c-" + s, SESAME.DIRECTSUBCLASSOF), objVar, SUBCLASS_EXPANDED);
-//            StatementPattern rdfType = new StatementPattern(sp.getSubjectVar(), sp.getPredicateVar(), typeVar, SUBCLASS_EXPANDED);
-//            InferJoin join = new InferJoin(subClassOf, rdfType);
-//            join.getProperties().put(InferConstants.INFERRED, InferConstants.TRUE);
-//            node.replaceWith(join);
-
-            URI subclassof_uri = (URI) objVar.getValue();
-            Collection<URI> parents = inferenceEngine.findParents(inferenceEngine.getSubClassOfGraph(), subclassof_uri);
-            if (parents != null && parents.size() > 0) {
-                String s = UUID.randomUUID().toString();
-                Var typeVar = new Var(s);
-                FixedStatementPattern fsp = new FixedStatementPattern(typeVar, new Var("c-" + s, RDFS.SUBCLASSOF), objVar, conVar);
-                fsp.statements.add(new NullableStatementImpl(subclassof_uri, RDFS.SUBCLASSOF, subclassof_uri));
-                for (URI u : parents) {
-                    fsp.statements.add(new NullableStatementImpl(u, RDFS.SUBCLASSOF, subclassof_uri));
-                }
-
-                StatementPattern rdfType = new DoNotExpandSP(sp.getSubjectVar(), sp.getPredicateVar(), typeVar, conVar);
-                InferJoin join = new InferJoin(fsp, rdfType);
-                join.getProperties().put(InferConstants.INFERRED, InferConstants.TRUE);
-                node.replaceWith(join);
-            }
-
-//            if (parents != null && parents.size() > 0) {
-//                StatementPatterns statementPatterns = new StatementPatterns();
-//                statementPatterns.patterns.add(node);
-//                Var subjVar = node.getSubjectVar();
-//                for (URI u : parents) {
-//                    statementPatterns.patterns.add(new StatementPattern(subjVar, predVar, new Var(objVar.getName(), u)));
-//                }
-//                node.replaceWith(statementPatterns);
-//            }
-
-//            if (parents != null && parents.size() > 0) {
-//                VarCollection vc = new VarCollection();
-//                vc.setName(objVar.getName());
-//                vc.values.add(objVar);
-//                for (URI u : parents) {
-//                    vc.values.add(new Var(objVar.getName(), u));
-//                }
-//                Var subjVar = node.getSubjectVar();
-//                node.replaceWith(new StatementPattern(subjVar, predVar, vc, node.getContextVar()));
-//            }
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/sail/src/main/java/mvm/rya/rdftriplestore/inference/SubPropertyOfVisitor.java
----------------------------------------------------------------------
diff --git a/sail/src/main/java/mvm/rya/rdftriplestore/inference/SubPropertyOfVisitor.java b/sail/src/main/java/mvm/rya/rdftriplestore/inference/SubPropertyOfVisitor.java
deleted file mode 100644
index 4df45a9..0000000
--- a/sail/src/main/java/mvm/rya/rdftriplestore/inference/SubPropertyOfVisitor.java
+++ /dev/null
@@ -1,121 +0,0 @@
-package mvm.rya.rdftriplestore.inference;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-
-
-import mvm.rya.api.RdfCloudTripleStoreConfiguration;
-import mvm.rya.api.utils.NullableStatementImpl;
-import mvm.rya.rdftriplestore.utils.FixedStatementPattern;
-import mvm.rya.rdftriplestore.utils.FixedStatementPattern;
-import org.openrdf.model.URI;
-import org.openrdf.model.vocabulary.RDF;
-import org.openrdf.model.vocabulary.RDFS;
-import org.openrdf.model.vocabulary.SESAME;
-import org.openrdf.query.algebra.StatementPattern;
-import org.openrdf.query.algebra.Var;
-
-import java.util.Set;
-import java.util.UUID;
-
-/**
- * All predicates are changed
- * Class SubPropertyOfVisitor
- * Date: Mar 29, 2011
- * Time: 11:28:34 AM
- */
-public class SubPropertyOfVisitor extends AbstractInferVisitor {
-
-    public SubPropertyOfVisitor(RdfCloudTripleStoreConfiguration conf, InferenceEngine inferenceEngine) {
-        super(conf, inferenceEngine);
-        include = conf.isInferSubPropertyOf();
-    }
-
-    @Override
-    protected void meetSP(StatementPattern node) throws Exception {
-        StatementPattern sp = node.clone();
-        final Var predVar = sp.getPredicateVar();
-
-        URI pred = (URI) predVar.getValue();
-        String predNamespace = pred.getNamespace();
-
-        final Var objVar = sp.getObjectVar();
-        final Var cntxtVar = sp.getContextVar();
-        if (objVar != null &&
-                !RDF.NAMESPACE.equals(predNamespace) &&
-                !SESAME.NAMESPACE.equals(predNamespace) &&
-                !RDFS.NAMESPACE.equals(predNamespace)
-                && !EXPANDED.equals(cntxtVar)) {
-            /**
-             *
-             * { ?subProp rdfs:subPropertyOf ub:worksFor . ?y ?subProp <http://www.Department0.University0.edu> }\n" +
-             "       UNION " +
-             "      { ?y ub:worksFor <http://www.Department0.University0.edu> }
-             */
-//            String s = UUID.randomUUID().toString();
-//            Var subPropVar = new Var(s);
-//            StatementPattern subPropOf = new StatementPattern(subPropVar, new Var("c-" + s, SESAME.DIRECTSUBPROPERTYOF), predVar, EXPANDED);
-//            StatementPattern subPropOf2 = new StatementPattern(sp.getSubjectVar(), subPropVar, objVar, EXPANDED);
-//            InferJoin join = new InferJoin(subPropOf, subPropOf2);
-//            join.getProperties().put(InferConstants.INFERRED, InferConstants.TRUE);
-//            node.replaceWith(join);
-
-//            Collection<URI> parents = inferenceEngine.findParents(inferenceEngine.subPropertyOfGraph, (URI) predVar.getValue());
-//            if (parents != null && parents.size() > 0) {
-//                StatementPatterns statementPatterns = new StatementPatterns();
-//                statementPatterns.patterns.add(node);
-//                Var subjVar = node.getSubjectVar();
-//                for (URI u : parents) {
-//                    statementPatterns.patterns.add(new StatementPattern(subjVar, new Var(predVar.getName(), u), objVar));
-//                }
-//                node.replaceWith(statementPatterns);
-//            }
-//            if (parents != null && parents.size() > 0) {
-//                VarCollection vc = new VarCollection();
-//                vc.setName(predVar.getName());
-//                vc.values.add(predVar);
-//                for (URI u : parents) {
-//                    vc.values.add(new Var(predVar.getName(), u));
-//                }
-//                Var subjVar = node.getSubjectVar();
-//                node.replaceWith(new StatementPattern(subjVar, vc, objVar, node.getContextVar()));
-//            }
-
-            URI subprop_uri = (URI) predVar.getValue();
-            Set<URI> parents = inferenceEngine.findParents(inferenceEngine.getSubPropertyOfGraph(), subprop_uri);
-            if (parents != null && parents.size() > 0) {
-                String s = UUID.randomUUID().toString();
-                Var typeVar = new Var(s);
-                FixedStatementPattern fsp = new FixedStatementPattern(typeVar, new Var("c-" + s, RDFS.SUBPROPERTYOF), predVar, cntxtVar);
-//                fsp.statements.add(new NullableStatementImpl(subprop_uri, RDFS.SUBPROPERTYOF, subprop_uri));
-                //add self
-                parents.add(subprop_uri);
-                for (URI u : parents) {
-                    fsp.statements.add(new NullableStatementImpl(u, RDFS.SUBPROPERTYOF, subprop_uri));
-                }
-
-                StatementPattern rdfType = new DoNotExpandSP(sp.getSubjectVar(), typeVar, sp.getObjectVar(), cntxtVar);
-                InferJoin join = new InferJoin(fsp, rdfType);
-                join.getProperties().put(InferConstants.INFERRED, InferConstants.TRUE);
-                node.replaceWith(join);
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/sail/src/main/java/mvm/rya/rdftriplestore/inference/SymmetricPropertyVisitor.java
----------------------------------------------------------------------
diff --git a/sail/src/main/java/mvm/rya/rdftriplestore/inference/SymmetricPropertyVisitor.java b/sail/src/main/java/mvm/rya/rdftriplestore/inference/SymmetricPropertyVisitor.java
deleted file mode 100644
index 63c073b..0000000
--- a/sail/src/main/java/mvm/rya/rdftriplestore/inference/SymmetricPropertyVisitor.java
+++ /dev/null
@@ -1,78 +0,0 @@
-package mvm.rya.rdftriplestore.inference;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-
-
-import mvm.rya.api.RdfCloudTripleStoreConfiguration;
-import org.openrdf.model.URI;
-import org.openrdf.model.vocabulary.RDF;
-import org.openrdf.model.vocabulary.RDFS;
-import org.openrdf.model.vocabulary.SESAME;
-import org.openrdf.query.algebra.StatementPattern;
-import org.openrdf.query.algebra.Union;
-import org.openrdf.query.algebra.Var;
-
-/**
- * All predicates are changed
- * Class SubPropertyOfVisitor
- * Date: Mar 29, 2011
- * Time: 11:28:34 AM
- */
-public class SymmetricPropertyVisitor extends AbstractInferVisitor {
-
-    public SymmetricPropertyVisitor(RdfCloudTripleStoreConfiguration conf, InferenceEngine inferenceEngine) {
-        super(conf, inferenceEngine);
-        include = conf.isInferSymmetricProperty();
-    }
-
-    @Override
-    protected void meetSP(StatementPattern node) throws Exception {
-        StatementPattern sp = node.clone();
-
-        final Var predVar = sp.getPredicateVar();
-        URI pred = (URI) predVar.getValue();
-        String predNamespace = pred.getNamespace();
-
-        final Var objVar = sp.getObjectVar();
-        final Var cntxtVar = sp.getContextVar();
-        if (objVar != null &&
-                !RDF.NAMESPACE.equals(predNamespace) &&
-                !SESAME.NAMESPACE.equals(predNamespace) &&
-                !RDFS.NAMESPACE.equals(predNamespace)
-                && !EXPANDED.equals(cntxtVar)) {
-            /**
-             *
-             * { ?a ?pred ?b .}\n" +
-             "       UNION " +
-             "      { ?b ?pred ?a }
-             */
-
-            URI symmPropUri = (URI) predVar.getValue();
-            if(inferenceEngine.isSymmetricProperty(symmPropUri)) {
-                Var subjVar = sp.getSubjectVar();
-                Union union = new InferUnion();
-                union.setLeftArg(sp);
-                union.setRightArg(new StatementPattern(objVar, predVar, subjVar, cntxtVar));
-                node.replaceWith(union);
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/sail/src/main/java/mvm/rya/rdftriplestore/inference/TransitivePropertyVisitor.java
----------------------------------------------------------------------
diff --git a/sail/src/main/java/mvm/rya/rdftriplestore/inference/TransitivePropertyVisitor.java b/sail/src/main/java/mvm/rya/rdftriplestore/inference/TransitivePropertyVisitor.java
deleted file mode 100644
index 2f795fb..0000000
--- a/sail/src/main/java/mvm/rya/rdftriplestore/inference/TransitivePropertyVisitor.java
+++ /dev/null
@@ -1,69 +0,0 @@
-package mvm.rya.rdftriplestore.inference;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-
-
-import mvm.rya.api.RdfCloudTripleStoreConfiguration;
-import mvm.rya.rdftriplestore.utils.TransitivePropertySP;
-import mvm.rya.rdftriplestore.utils.TransitivePropertySP;
-import org.openrdf.model.URI;
-import org.openrdf.model.vocabulary.RDF;
-import org.openrdf.model.vocabulary.RDFS;
-import org.openrdf.model.vocabulary.SESAME;
-import org.openrdf.query.algebra.StatementPattern;
-import org.openrdf.query.algebra.Var;
-
-/**
- * All predicates are changed
- * Class SubPropertyOfVisitor
- * Date: Mar 29, 2011
- * Time: 11:28:34 AM
- */
-public class TransitivePropertyVisitor extends AbstractInferVisitor {
-
-    public TransitivePropertyVisitor(RdfCloudTripleStoreConfiguration conf, InferenceEngine inferenceEngine) {
-        super(conf, inferenceEngine);
-        include = conf.isInferTransitiveProperty();
-    }
-
-    @Override
-    protected void meetSP(StatementPattern node) throws Exception {
-        StatementPattern sp = node.clone();
-        final Var predVar = sp.getPredicateVar();
-
-        URI pred = (URI) predVar.getValue();
-        String predNamespace = pred.getNamespace();
-
-        final Var objVar = sp.getObjectVar();
-        final Var cntxtVar = sp.getContextVar();
-        if (objVar != null &&
-                !RDF.NAMESPACE.equals(predNamespace) &&
-                !SESAME.NAMESPACE.equals(predNamespace) &&
-                !RDFS.NAMESPACE.equals(predNamespace)
-                && !EXPANDED.equals(cntxtVar)) {
-
-            URI transPropUri = (URI) predVar.getValue();
-            if (inferenceEngine.isTransitiveProperty(transPropUri)) {
-                node.replaceWith(new TransitivePropertySP(sp.getSubjectVar(), sp.getPredicateVar(), sp.getObjectVar(), sp.getContextVar()));
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/sail/src/main/java/mvm/rya/rdftriplestore/namespace/NamespaceManager.java
----------------------------------------------------------------------
diff --git a/sail/src/main/java/mvm/rya/rdftriplestore/namespace/NamespaceManager.java b/sail/src/main/java/mvm/rya/rdftriplestore/namespace/NamespaceManager.java
deleted file mode 100644
index dd8e4fa..0000000
--- a/sail/src/main/java/mvm/rya/rdftriplestore/namespace/NamespaceManager.java
+++ /dev/null
@@ -1,167 +0,0 @@
-package mvm.rya.rdftriplestore.namespace;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-
-
-import info.aduna.iteration.CloseableIteration;
-import mvm.rya.api.RdfCloudTripleStoreConfiguration;
-import mvm.rya.api.persist.RdfDAOException;
-import mvm.rya.api.persist.RyaDAO;
-import mvm.rya.api.persist.RyaNamespaceManager;
-import net.sf.ehcache.Cache;
-import net.sf.ehcache.CacheManager;
-import net.sf.ehcache.Element;
-import net.sf.ehcache.Statistics;
-import org.openrdf.model.Namespace;
-import org.openrdf.sail.SailException;
-
-import java.io.InputStream;
-
-/**
- * Class NamespaceManager
- * Date: Oct 17, 2011
- * Time: 8:25:33 AM
- */
-public class NamespaceManager {
-    CacheManager cacheManager;
-    Cache namespaceCache;
-    public static final String NAMESPACE_CACHE_NAME = "namespace";
-    private RdfCloudTripleStoreConfiguration conf;
-    private RyaNamespaceManager namespaceManager;
-
-    public NamespaceManager(RyaDAO ryaDAO, RdfCloudTripleStoreConfiguration conf) {
-        this.conf = conf;
-        initialize(ryaDAO);
-    }
-
-    protected void initialize(RyaDAO ryaDAO) {
-        try {
-            this.namespaceManager = ryaDAO.getNamespaceManager();
-
-            InputStream cacheConfigStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("ehcache.xml");
-            if (cacheConfigStream == null) {
-                this.cacheManager = CacheManager.create();
-//                throw new RuntimeException("Cache Configuration does not exist");
-            } else {
-                this.cacheManager = CacheManager.create(cacheConfigStream);
-            }
-            this.namespaceCache = cacheManager.getCache(NAMESPACE_CACHE_NAME);
-            if (namespaceCache == null) {
-                cacheManager.addCache(NAMESPACE_CACHE_NAME);
-            }
-
-
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    public void shutdown() {
-        if (cacheManager != null) {
-            cacheManager.shutdown();
-            cacheManager = null;
-        }
-    }
-
-    public void addNamespace(String pfx, String namespace) {
-        try {
-            String savedNamespace = getNamespace(pfx);
-            //if the saved ns is the same one being saved, don't do anything
-            if (savedNamespace != null && savedNamespace.equals(namespace)) {
-                return;
-            }
-
-            namespaceCache.put(new Element(pfx, namespace));
-            namespaceManager.addNamespace(pfx, namespace);
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    public String getNamespace(String pfx) {
-        //try in the cache first
-        Element element = namespaceCache.get(pfx);
-        if (element != null) {
-            return (String) element.getValue();
-        }
-
-        try {
-            String namespace = namespaceManager.getNamespace(pfx);
-            if (namespace != null) {
-                namespaceCache.put(new Element(pfx, namespace));
-                return namespace;
-            }
-        } catch (Exception e) {
-            //TODO: print or log?
-        }
-        return null;
-
-    }
-
-    public void removeNamespace(String pfx) {
-        try {
-            namespaceCache.remove(pfx);
-            namespaceManager.removeNamespace(pfx);
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    public CloseableIteration<? extends Namespace, SailException> iterateNamespace() {
-        try {
-            //for this one we will go directly to the store
-            final CloseableIteration<? extends Namespace, RdfDAOException> iteration = namespaceManager.iterateNamespace();
-            return new CloseableIteration<Namespace, SailException>() {
-                @Override
-                public void close() throws SailException {
-                    iteration.close();
-                }
-
-                @Override
-                public boolean hasNext() throws SailException {
-                    return iteration.hasNext();
-                }
-
-                @Override
-                public Namespace next() throws SailException {
-                    return iteration.next();
-                }
-
-                @Override
-                public void remove() throws SailException {
-                    iteration.remove();
-                }
-            };
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    public void printStatistics() {
-        Statistics statistics = namespaceCache.getStatistics();
-        if (statistics != null) { //TODO: use a logger please
-            System.out.println("Namespace Cache Statisitics: ");
-            System.out.println("--Hits: \t" + statistics.getCacheHits());
-            System.out.println("--Misses: \t" + statistics.getCacheMisses());
-            System.out.println("--Total Count: \t" + statistics.getObjectCount());
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/sail/src/main/java/mvm/rya/rdftriplestore/utils/CombineContextsRdfInserter.java
----------------------------------------------------------------------
diff --git a/sail/src/main/java/mvm/rya/rdftriplestore/utils/CombineContextsRdfInserter.java b/sail/src/main/java/mvm/rya/rdftriplestore/utils/CombineContextsRdfInserter.java
deleted file mode 100644
index b7f7623..0000000
--- a/sail/src/main/java/mvm/rya/rdftriplestore/utils/CombineContextsRdfInserter.java
+++ /dev/null
@@ -1,165 +0,0 @@
-package mvm.rya.rdftriplestore.utils;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-
-
-import org.openrdf.OpenRDFUtil;
-import org.openrdf.model.*;
-import org.openrdf.repository.RepositoryConnection;
-import org.openrdf.repository.RepositoryException;
-import org.openrdf.rio.RDFHandlerException;
-import org.openrdf.rio.helpers.RDFHandlerBase;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Created by IntelliJ IDEA.
- * User: RoshanP
- * Date: 3/23/12
- * Time: 9:50 AM
- * To change this template use File | Settings | File Templates.
- */
-public class CombineContextsRdfInserter extends RDFHandlerBase {
-
-    private final RepositoryConnection con;
-    private Resource[] contexts = new Resource[0];
-    private boolean preserveBNodeIDs;
-    private final Map<String, String> namespaceMap;
-    private final Map<String, BNode> bNodesMap;
-
-    public CombineContextsRdfInserter(RepositoryConnection con) {
-        this.con = con;
-        preserveBNodeIDs = true;
-        namespaceMap = new HashMap<String, String>();
-        bNodesMap = new HashMap<String, BNode>();
-    }
-
-    public void setPreserveBNodeIDs(boolean preserveBNodeIDs) {
-        this.preserveBNodeIDs = preserveBNodeIDs;
-    }
-
-    public boolean preservesBNodeIDs() {
-        return preserveBNodeIDs;
-    }
-
-    public void enforceContext(Resource... contexts) {
-        OpenRDFUtil.verifyContextNotNull(contexts);
-        this.contexts = contexts;
-    }
-
-    public boolean enforcesContext() {
-        return contexts.length != 0;
-    }
-
-    public Resource[] getContexts() {
-        return contexts;
-    }
-
-    @Override
-    public void endRDF()
-            throws RDFHandlerException {
-        for (Map.Entry<String, String> entry : namespaceMap.entrySet()) {
-            String prefix = entry.getKey();
-            String name = entry.getValue();
-
-            try {
-                if (con.getNamespace(prefix) == null) {
-                    con.setNamespace(prefix, name);
-                }
-            } catch (RepositoryException e) {
-                throw new RDFHandlerException(e);
-            }
-        }
-
-        namespaceMap.clear();
-        bNodesMap.clear();
-    }
-
-    @Override
-    public void handleNamespace(String prefix, String name) {
-        // FIXME: set namespaces directly when they are properly handled wrt
-        // rollback
-        // don't replace earlier declarations
-        if (prefix != null && !namespaceMap.containsKey(prefix)) {
-            namespaceMap.put(prefix, name);
-        }
-    }
-
-    @Override
-    public void handleStatement(Statement st)
-            throws RDFHandlerException {
-        Resource subj = st.getSubject();
-        URI pred = st.getPredicate();
-        Value obj = st.getObject();
-        Resource ctxt = st.getContext();
-
-        if (!preserveBNodeIDs) {
-            if (subj instanceof BNode) {
-                subj = mapBNode((BNode) subj);
-            }
-
-            if (obj instanceof BNode) {
-                obj = mapBNode((BNode) obj);
-            }
-
-            if (!enforcesContext() && ctxt instanceof BNode) {
-                ctxt = mapBNode((BNode) ctxt);
-            }
-        }
-
-        try {
-            if (enforcesContext()) {
-                Resource[] ctxts = contexts;
-                if (ctxt != null) {
-                    ctxts = combineContexts(contexts, ctxt);
-                }
-                con.add(subj, pred, obj, ctxts);
-            } else {
-                con.add(subj, pred, obj, ctxt);
-            }
-        } catch (RepositoryException e) {
-            throw new RDFHandlerException(e);
-        }
-    }
-
-    private BNode mapBNode(BNode bNode) {
-        BNode result = bNodesMap.get(bNode.getID());
-
-        if (result == null) {
-            result = con.getRepository().getValueFactory().createBNode();
-            bNodesMap.put(bNode.getID(), result);
-        }
-
-        return result;
-    }
-
-    public static Resource[] combineContexts(Resource[] contexts, Resource ctxt) {
-        if (contexts == null || ctxt == null) {
-            throw new IllegalArgumentException("Contexts cannot be null");
-        }
-        int length = contexts.length;
-        Resource[] ret = new Resource[length + 1];
-        System.arraycopy(contexts, 0, ret, 0, length);
-        ret[length] = ctxt;
-        return ret;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/sail/src/main/java/mvm/rya/rdftriplestore/utils/DefaultStatistics.java
----------------------------------------------------------------------
diff --git a/sail/src/main/java/mvm/rya/rdftriplestore/utils/DefaultStatistics.java b/sail/src/main/java/mvm/rya/rdftriplestore/utils/DefaultStatistics.java
deleted file mode 100644
index d86140b..0000000
--- a/sail/src/main/java/mvm/rya/rdftriplestore/utils/DefaultStatistics.java
+++ /dev/null
@@ -1,58 +0,0 @@
-package mvm.rya.rdftriplestore.utils;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-
-
-import org.openrdf.query.algebra.StatementPattern;
-import org.openrdf.query.algebra.evaluation.impl.EvaluationStatistics;
-
-/**
- * Class DefaultStatistics
- * Date: Apr 12, 2011
- * Time: 1:31:05 PM
- */
-public class DefaultStatistics extends EvaluationStatistics {
-
-    public DefaultStatistics() {
-    }
-
-    @Override
-    protected CardinalityCalculator createCardinalityCalculator() {
-        return new DefaultCardinalityCalculator();
-    }
-
-    public class DefaultCardinalityCalculator extends CardinalityCalculator {
-
-        double count = 0.0;
-
-        @Override
-        protected double getCardinality(StatementPattern sp) {
-            //based on how many (subj, pred, obj) are set
-//            int numSet = 3;
-//            if (sp.getSubjectVar().hasValue()) numSet--;
-//            if (sp.getPredicateVar().hasValue()) numSet--;
-//            if (sp.getObjectVar().hasValue()) numSet--;
-//            return numSet;
-            return count++;
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/sail/src/main/java/mvm/rya/rdftriplestore/utils/FixedStatementPattern.java
----------------------------------------------------------------------
diff --git a/sail/src/main/java/mvm/rya/rdftriplestore/utils/FixedStatementPattern.java b/sail/src/main/java/mvm/rya/rdftriplestore/utils/FixedStatementPattern.java
deleted file mode 100644
index 891e122..0000000
--- a/sail/src/main/java/mvm/rya/rdftriplestore/utils/FixedStatementPattern.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package mvm.rya.rdftriplestore.utils;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-
-
-import org.openrdf.model.Statement;
-import org.openrdf.query.algebra.StatementPattern;
-import org.openrdf.query.algebra.Var;
-
-import java.util.ArrayList;
-import java.util.Collection;
-
-/**
- * StatementPattern gives fixed statements back
- *
- * Class FixedStatementPattern
- * Date: Mar 12, 2012
- * Time: 2:42:06 PM
- */
-public class FixedStatementPattern extends StatementPattern {
-    public Collection<Statement> statements = new ArrayList();
-
-    public FixedStatementPattern() {
-    }
-
-    public FixedStatementPattern(Var subject, Var predicate, Var object) {
-        super(subject, predicate, object);
-    }
-
-    public FixedStatementPattern(Scope scope, Var subject, Var predicate, Var object) {
-        super(scope, subject, predicate, object);
-    }
-
-    public FixedStatementPattern(Var subject, Var predicate, Var object, Var context) {
-        super(subject, predicate, object, context);
-    }
-
-    public FixedStatementPattern(Scope scope, Var subjVar, Var predVar, Var objVar, Var conVar) {
-        super(scope, subjVar, predVar, objVar, conVar);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/sail/src/main/java/mvm/rya/rdftriplestore/utils/TransitivePropertySP.java
----------------------------------------------------------------------
diff --git a/sail/src/main/java/mvm/rya/rdftriplestore/utils/TransitivePropertySP.java b/sail/src/main/java/mvm/rya/rdftriplestore/utils/TransitivePropertySP.java
deleted file mode 100644
index 4f2e378..0000000
--- a/sail/src/main/java/mvm/rya/rdftriplestore/utils/TransitivePropertySP.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package mvm.rya.rdftriplestore.utils;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-
-
-import org.openrdf.query.algebra.StatementPattern;
-import org.openrdf.query.algebra.Var;
-
-/**
- * Class TransitivePropertySP
- * Date: Mar 14, 2012
- * Time: 5:23:10 PM
- */
-public class TransitivePropertySP extends StatementPattern {
-
-    public TransitivePropertySP() {
-    }
-
-    public TransitivePropertySP(Var subject, Var predicate, Var object) {
-        super(subject, predicate, object);
-    }
-
-    public TransitivePropertySP(Scope scope, Var subject, Var predicate, Var object) {
-        super(scope, subject, predicate, object);
-    }
-
-    public TransitivePropertySP(Var subject, Var predicate, Var object, Var context) {
-        super(subject, predicate, object, context);
-    }
-
-    public TransitivePropertySP(Scope scope, Var subjVar, Var predVar, Var objVar, Var conVar) {
-        super(scope, subjVar, predVar, objVar, conVar);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/sail/src/main/resources/META-INF/org.openrdf.store.schemas
----------------------------------------------------------------------
diff --git a/sail/src/main/resources/META-INF/org.openrdf.store.schemas b/sail/src/main/resources/META-INF/org.openrdf.store.schemas
deleted file mode 100644
index ad9993f..0000000
--- a/sail/src/main/resources/META-INF/org.openrdf.store.schemas
+++ /dev/null
@@ -1 +0,0 @@
-META-INF/schemas/cloudbasestore-schema.ttl
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/sail/src/main/resources/META-INF/schemas/cloudbasestore-schema.ttl
----------------------------------------------------------------------
diff --git a/sail/src/main/resources/META-INF/schemas/cloudbasestore-schema.ttl b/sail/src/main/resources/META-INF/schemas/cloudbasestore-schema.ttl
deleted file mode 100644
index 708a964..0000000
--- a/sail/src/main/resources/META-INF/schemas/cloudbasestore-schema.ttl
+++ /dev/null
@@ -1,20 +0,0 @@
-@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
-@prefix rep: <http://www.openrdf.org/config/repository#>.
-@prefix sr: <http://www.openrdf.org/config/repository/sail#>.
-@prefix sail: <http://www.openrdf.org/config/sail#>.
-@prefix cbs: <http://www.openrdf.org/config/sail/cloudbasestore#>.
-
-[] a rep:Repository ;
-   rep:repositoryID "{%Repository ID|cloudbasestore%}" ;
-   rdfs:label "{%Repository title|Cloudbase store%}" ;
-   rep:repositoryImpl [
-      rep:repositoryType "openrdf:SailRepository" ;
-      sr:sailImpl [
-         sail:sailType "openrdf:RdfCloudTripleStore" ;
-         cbs:server "{%CBSail server|stratus13%}" ;
-         cbs:port "{%CBSail port|2181%}" ;
-         cbs:instance "{%CBSail instance|stratus%}" ;
-         cbs:user "{%CBSail user|root%}" ;
-         cbs:password "{%CBSail password|password%}" ;
-      ]
-   ].
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/sail/src/main/resources/META-INF/services/org.openrdf.sail.config.SailFactory
----------------------------------------------------------------------
diff --git a/sail/src/main/resources/META-INF/services/org.openrdf.sail.config.SailFactory b/sail/src/main/resources/META-INF/services/org.openrdf.sail.config.SailFactory
deleted file mode 100644
index 09a0661..0000000
--- a/sail/src/main/resources/META-INF/services/org.openrdf.sail.config.SailFactory
+++ /dev/null
@@ -1 +0,0 @@
-mvm.rya.rdftriplestore.RdfCloudTripleStoreFactory
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/sail/src/main/resources/ehcache.xml
----------------------------------------------------------------------
diff --git a/sail/src/main/resources/ehcache.xml b/sail/src/main/resources/ehcache.xml
deleted file mode 100644
index 7049c00..0000000
--- a/sail/src/main/resources/ehcache.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version='1.0'?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../config/ehcache.xsd"
-         updateCheck="false">
-    <diskStore path="java.io.tmpdir"/>
-    <cache name="namespace"
-            maxElementsInMemory="1000"
-            eternal="false"
-            timeToIdleSeconds="3600"
-            timeToLiveSeconds="3600"
-            overflowToDisk="false"
-            diskPersistent="false"
-            memoryStoreEvictionPolicy="FIFO"
-            >
-    </cache>
-    <defaultCache
-            maxElementsInMemory="50000"
-            eternal="false"
-            timeToIdleSeconds="0"
-            timeToLiveSeconds="0"
-            overflowToDisk="true"
-            maxElementsOnDisk="1000000"
-            diskPersistent="true"
-            diskExpiryThreadIntervalSeconds="120"
-            memoryStoreEvictionPolicy="FIFO"
-            >
-    </defaultCache>
-</ehcache>