From: Lars H. <lh...@us...> - 2005-03-08 12:34:27
|
Update of /cvsroot/tmapi-utils/tmapi-utils/src/org/tmapiutils/query/tolog/memory In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17903/src/org/tmapiutils/query/tolog/memory Modified Files: PreparedQueryImpl.java QueryEvaluatorImpl.java Log Message: Shift to Apache License 2.0 More TMAPI compatible, some classes already compile. ;) Deleted CVS log from files Index: PreparedQueryImpl.java =================================================================== RCS file: /cvsroot/tmapi-utils/tmapi-utils/src/org/tmapiutils/query/tolog/memory/PreparedQueryImpl.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PreparedQueryImpl.java 6 Mar 2005 17:28:46 -0000 1.1 --- PreparedQueryImpl.java 8 Mar 2005 12:33:40 -0000 1.2 *************** *** 1,11 **** /* ! Copyright (c) 2000-2004 The TM4J Project. All rights reserved. ! ! The license for this source code can be found in the file ! LICENSE.TXT with this distribution or at http://tm4j.org/LICENSE.txt ! */ ! /* ! *$Header$ */ package org.tmapiutils.query.tolog.memory; --- 1,19 ---- /* ! * Copyright 2005 TMAPI Utils / Kal Ahmed, Lars Heuer ! * Copyright (c) 2000-2004 The TM4J Project. All rights reserved. ! * ! * Licensed 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. */ + package org.tmapiutils.query.tolog.memory; *************** *** 16,32 **** /** ! * @author Kal ! * ! * Describe PreparedQueryImpl here. */ public class PreparedQueryImpl implements PreparedQuery { private TologQuery m_query; ! public PreparedQueryImpl(TologQuery q) { m_query = q; rewrite(); } ! /** * Rewrite the query for optimisation purposes --- 24,40 ---- /** ! * ! * @author Kal Ahmed (kal[at]techquila.com) ! * @author Lars Heuer (heuer[at]semagia.com) */ public class PreparedQueryImpl implements PreparedQuery { private TologQuery m_query; ! public PreparedQueryImpl(TologQuery q) { m_query = q; rewrite(); } ! /** * Rewrite the query for optimisation purposes *************** *** 58,74 **** } - /* - * $Log$ - * Revision 1.1 2005/03/06 17:28:46 lheuer - * Initial tolog import - * - * Revision 1.4 2004/06/20 14:12:30 kal_ahmed - * Copied TologRsultsSet interface and TologFragmentBuilder implementation from org.tm4j.tolog to this package. - * - * Revision 1.3 2004/06/16 21:21:43 kal_ahmed - * Tolog queries may now contain replaceable references specified in an Object array parameter to the QueryEvaluator at evaluation time. - * - * Revision 1.2 2004/06/09 21:12:18 kal_ahmed - * Added standard source file header and footer. - * - */ \ No newline at end of file --- 66,67 ---- Index: QueryEvaluatorImpl.java =================================================================== RCS file: /cvsroot/tmapi-utils/tmapi-utils/src/org/tmapiutils/query/tolog/memory/QueryEvaluatorImpl.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** QueryEvaluatorImpl.java 6 Mar 2005 17:28:46 -0000 1.1 --- QueryEvaluatorImpl.java 8 Mar 2005 12:33:40 -0000 1.2 *************** *** 1,11 **** /* ! Copyright (c) 2000-2004 The TM4J Project. All rights reserved. ! ! The license for this source code can be found in the file ! LICENSE.TXT with this distribution or at http://tm4j.org/LICENSE.txt ! */ ! /* ! *$Header$ */ package org.tmapiutils.query.tolog.memory; --- 1,19 ---- /* ! * Copyright 2005 TMAPI Utils / Kal Ahmed, Lars Heuer ! * Copyright (c) 2000-2004 The TM4J Project. All rights reserved. ! * ! * Licensed 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. */ + package org.tmapiutils.query.tolog.memory; *************** *** 51,57 **** /** ! * @author Kal ! * ! * Describe QueryEvaluatorImpl here. */ public class QueryEvaluatorImpl implements QueryEvaluator { --- 59,65 ---- /** ! * ! * @author Kal Ahmed (kal[at]techquila.com) ! * @author Lars Heuer (heuer[at]semagia.com) */ public class QueryEvaluatorImpl implements QueryEvaluator { *************** *** 62,66 **** private Map m_rulesByPrefix = null; private Map m_predicatesByName = null; ! public QueryEvaluatorImpl(TopicMap tm) { m_rulesByName = new HashMap(); --- 70,74 ---- private Map m_rulesByPrefix = null; private Map m_predicatesByName = null; ! public QueryEvaluatorImpl(TopicMap tm) { m_rulesByName = new HashMap(); *************** *** 70,74 **** setTopicMap(tm); } ! /** * Loads the default built-in predicates --- 78,82 ---- setTopicMap(tm); } ! /** * Loads the default built-in predicates *************** *** 100,109 **** m_tm = tm; } ! /* (non-Javadoc) * @see org.tmapiutils.query.tolog.QueryEvaluator#addRulesModule(java.io.InputStream, java.lang.String) */ public void addRulesModule(InputStream src, String prefix) ! throws IOException, TologParserException { try { --- 108,117 ---- m_tm = tm; } ! /* (non-Javadoc) * @see org.tmapiutils.query.tolog.QueryEvaluator#addRulesModule(java.io.InputStream, java.lang.String) */ public void addRulesModule(InputStream src, String prefix) ! throws IOException, TologParserException { try { *************** *** 142,146 **** */ public PreparedQuery prepareQuery(String queryString) ! throws TologParserException, TologProcessingException { try { --- 150,154 ---- */ public PreparedQuery prepareQuery(String queryString) ! throws TologParserException, TologProcessingException { try { *************** *** 162,166 **** */ public TologResultsSet execute(String queryString) ! throws TologParserException, TologProcessingException { PreparedQuery pq = prepareQuery(queryString); --- 170,174 ---- */ public TologResultsSet execute(String queryString) ! throws TologParserException, TologProcessingException { PreparedQuery pq = prepareQuery(queryString); *************** *** 183,192 **** String predicateName, Class predicateClass) ! throws IllegalArgumentException { if (!Predicate.class.isAssignableFrom(predicateClass)) { throw new IllegalArgumentException("Class does not implement the " + Predicate.class.getName() + " interface."); } ! m_predicatesByName.put(predicateName, predicateClass); } --- 191,200 ---- String predicateName, Class predicateClass) ! throws IllegalArgumentException { if (!Predicate.class.isAssignableFrom(predicateClass)) { throw new IllegalArgumentException("Class does not implement the " + Predicate.class.getName() + " interface."); } ! m_predicatesByName.put(predicateName, predicateClass); } *************** *** 200,240 **** } - /* - * $Log$ - * Revision 1.1 2005/03/06 17:28:46 lheuer - * Initial tolog import - * - * Revision 1.12 2004/11/02 16:03:38 kal_ahmed - * Fixed reported bug with processing external tolog modules. - * - * Revision 1.11 2004/08/17 14:55:28 kal_ahmed - * Fixed naming of subject-locator and subject-identifier predicate implementations (Bug#1010670). - * - * Revision 1.10 2004/06/20 14:12:30 kal_ahmed - * Copied TologRsultsSet interface and TologFragmentBuilder implementation from org.tm4j.tolog to this package. - * - * Revision 1.9 2004/06/16 21:21:43 kal_ahmed - * Tolog queries may now contain replaceable references specified in an Object array parameter to the QueryEvaluator at evaluation time. - * - * Revision 1.8 2004/06/14 21:31:16 kal_ahmed - * Added TopicNamePredicate to builtins. - * - * Revision 1.7 2004/06/13 19:44:30 kal_ahmed - * Added a fix and test for handling recursive rules definitions. - * - * Revision 1.6 2004/06/13 17:17:59 kal_ahmed - * Added registration of builtin predicates. Fixed rule expansion code to handle player/role pairs correctly. - * - * Revision 1.5 2004/06/10 17:09:34 kal_ahmed - * Added reifies and instance-of predicates. - * - * Revision 1.4 2004/06/10 08:18:35 kal_ahmed - * Added OccurrencePredicate to default extensions. - * - * Revision 1.3 2004/06/09 22:15:08 kal_ahmed - * Fixed parser to disallow player:role pairs in predicates other than dynamic association predicates. Fixed initialisation of extension predicates. Added DirectInstanceOfPredicate extension to in-memory query evaluator. - * - * Revision 1.2 2004/06/09 21:12:18 kal_ahmed - * Added standard source file header and footer. - * - */ \ No newline at end of file --- 208,209 ---- |