jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r159480 - in incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/search: QueryImpl.java sql/JCRSQLQueryBuilder.java sql/QueryFormat.java
Date Wed, 30 Mar 2005 12:57:40 GMT
Author: mreutegg
Date: Wed Mar 30 04:57:37 2005
New Revision: 159480

URL: http://svn.apache.org/viewcvs?view=rev&rev=159480
Log:
Remove dependency to NodeTypeRegistry as suggested by Angela ;)

Modified:
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/search/QueryImpl.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/search/sql/JCRSQLQueryBuilder.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/search/sql/QueryFormat.java

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/search/QueryImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/search/QueryImpl.java?view=diff&r1=159479&r2=159480
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/search/QueryImpl.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/search/QueryImpl.java Wed
Mar 30 04:57:37 2005
@@ -22,7 +22,7 @@
 import org.apache.jackrabbit.core.NoPrefixDeclaredException;
 import org.apache.jackrabbit.core.Path;
 import org.apache.jackrabbit.core.SessionImpl;
-import org.apache.jackrabbit.core.nodetype.NodeTypeRegistry;
+import org.apache.jackrabbit.core.Constants;
 
 import javax.jcr.ItemExistsException;
 import javax.jcr.ItemNotFoundException;
@@ -111,7 +111,7 @@
         this.node = node;
 
         try {
-            if (!node.isNodeType(NodeTypeRegistry.NT_QUERY.toJCRName(session.getNamespaceResolver())))
{
+            if (!node.isNodeType(Constants.NT_QUERY.toJCRName(session.getNamespaceResolver())))
{
                 throw new InvalidQueryException("node is not of type nt:query");
             }
             statement = node.getProperty(QueryConstants.JCR_STATEMENT.toJCRName(session.getNamespaceResolver())).getString();
@@ -181,7 +181,7 @@
                 throw new ItemExistsException(p.toJCRPath(resolver));
             }
             Node queryNode = session.getRootNode().addNode(relPath,
-                    NodeTypeRegistry.NT_QUERY.toJCRName(resolver));
+                    Constants.NT_QUERY.toJCRName(resolver));
             // set properties
             queryNode.setProperty(QueryConstants.JCR_LANGUAGE.toJCRName(resolver), language);
             queryNode.setProperty(QueryConstants.JCR_STATEMENT.toJCRName(resolver), statement);

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/search/sql/JCRSQLQueryBuilder.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/search/sql/JCRSQLQueryBuilder.java?view=diff&r1=159479&r2=159480
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/search/sql/JCRSQLQueryBuilder.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/search/sql/JCRSQLQueryBuilder.java
Wed Mar 30 04:57:37 2005
@@ -33,7 +33,7 @@
 import org.apache.jackrabbit.core.QName;
 import org.apache.jackrabbit.core.IllegalNameException;
 import org.apache.jackrabbit.core.UnknownPrefixException;
-import org.apache.jackrabbit.core.nodetype.NodeTypeRegistry;
+import org.apache.jackrabbit.core.Constants;
 import org.apache.log4j.Logger;
 
 import javax.jcr.query.InvalidQueryException;
@@ -213,7 +213,7 @@
 
         return node.childrenAccept(new DefaultParserVisitor() {
             public Object visit(ASTIdentifier node, Object data) {
-                if (!node.getName().equals(NodeTypeRegistry.NT_BASE)) {
+                if (!node.getName().equals(Constants.NT_BASE)) {
                     // node is either primary or mixin node type
                     NodeTypeQueryNode nodeType
                             = new NodeTypeQueryNode(constraintNode, node.getName());
@@ -500,7 +500,7 @@
                 }
             } else {
                 int idx = names[i].indexOf('[');
-                String name = null;
+                String name;
                 int index = LocationStepQueryNode.NONE;
                 if (idx > -1) {
                     // contains index

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/search/sql/QueryFormat.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/search/sql/QueryFormat.java?view=diff&r1=159479&r2=159480
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/search/sql/QueryFormat.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/search/sql/QueryFormat.java
Wed Mar 30 04:57:37 2005
@@ -34,7 +34,7 @@
 import org.apache.jackrabbit.core.NamespaceResolver;
 import org.apache.jackrabbit.core.NoPrefixDeclaredException;
 import org.apache.jackrabbit.core.QName;
-import org.apache.jackrabbit.core.nodetype.NodeTypeRegistry;
+import org.apache.jackrabbit.core.Constants;
 
 import javax.jcr.query.InvalidQueryException;
 import javax.jcr.util.ISO8601;
@@ -142,7 +142,7 @@
 
             if (ntCount == 0) {
                 sb.append(" ");
-                sb.append(NodeTypeRegistry.NT_BASE.toJCRName(resolver));
+                sb.append(Constants.NT_BASE.toJCRName(resolver));
             }
 
             // append WHERE clause



Mime
View raw message