Skip to content

Commit

Permalink
Correction for fcrepo-transform
Browse files Browse the repository at this point in the history
  • Loading branch information
ajs6f committed Nov 21, 2013
1 parent 0fdfc80 commit 7e045a2
Showing 1 changed file with 6 additions and 2 deletions.
Expand Up @@ -61,6 +61,7 @@
import com.hp.hpl.jena.sparql.syntax.ElementVisitor;
import org.apache.commons.lang.NotImplementedException;
import org.fcrepo.kernel.rdf.JcrRdfTools;
import org.fcrepo.kernel.utils.NodePropertiesTools;
import org.modeshape.common.collection.Collections;
import org.modeshape.jcr.api.query.qom.Limit;
import org.modeshape.jcr.api.query.qom.SelectQuery;
Expand Down Expand Up @@ -92,7 +93,6 @@
import static javax.jcr.PropertyType.WEAKREFERENCE;
import static javax.jcr.query.qom.QueryObjectModelConstants.JCR_OPERATOR_EQUAL_TO;
import static org.fcrepo.jcr.FedoraJcrTypes.FEDORA_RESOURCE;
import static org.fcrepo.kernel.utils.NodePropertiesTools.getReferencePropertyName;
import static org.slf4j.LoggerFactory.getLogger;

/**
Expand Down Expand Up @@ -122,6 +122,8 @@ public class JQLQueryVisitor implements QueryVisitor, ElementVisitor, ExprVisito
private Map<String, Source> joins;
private Map<String, JoinCondition> joinConditions;

private NodePropertiesTools propertiesTools = new NodePropertiesTools();

/**
* Create a new query
* @param session
Expand Down Expand Up @@ -464,7 +466,9 @@ public void visit(final ElementPathBlock el) {
final String joinPropertyName;

if (propertyType == URI) {
joinPropertyName = getReferencePropertyName(propertyName);
joinPropertyName =
propertiesTools
.getReferencePropertyName(propertyName);
} else {
joinPropertyName = propertyName;
}
Expand Down

0 comments on commit 7e045a2

Please sign in to comment.