group user_owner clause as "AND (... OR .... OR ....)" to handle multiple pathquery <owner> elements. http://bugzilla.ecoinformatics.org/show_bug.cgi?id=5880
Implement MNQuery for "pathquery" engine. Optionally include guid in the pathquery results (https://redmine.dataone.org/issues/3083)
simplify the xml_access query, and instead use guid to check for permission. Now the docid/rev join (to get most recent version for search results) happens "higher up" in the query.http://bugzilla.ecoinformatics.org/show_bug.cgi?id=5696
remove the max(rev) clause in favor of a more straight-forward join to xml_documents (that will have the max rev). http://bugzilla.ecoinformatics.org/show_bug.cgi?id=5696
when performing query, make sure we are using the access rules of the latest revision of a given docid, otherwise we may include documents that used to be public but have been made private in subsequent revisions.http://bugzilla.ecoinformatics.org/show_bug.cgi?id=5696
refactor Metacat access handling to be on a per-revision basis so that it more closely aligns with the DataONE approachhttp://bugzilla.ecoinformatics.org/show_bug.cgi?id=5560
handle queries with predicates correctly.when docids are used in the return field look up, we need to make sure they are included in the values in the correct order for their corresponding parameter place holders (?)
uses prepared statement parameter binding for querieshttp://bugzilla.ecoinformatics.org/show_bug.cgi?id=5527
escape quotes when processing returnfield with predicates. example:<returnfield>dataset/dataTable/physical/distribution/online/url[@function='download']</returnfield>
Merge 1.9.2 changes back into the trunk
make sure querygroup is not null before trying to print it.
Create database and shared directories for database management code and shared code respectively.
Beef up exception handling from file utilities. Move UtilException to MetacatUtilException to eliminate conflict with similar exception in utility package.
Format indexPaths in metacat.properties. Remove from build.properties and build.xml. Move indexPath list getter from MetacatUtil to SystemUtil.
Renamed MetaCatUtil to MetacatUtil
Move the DBAdaptor accessor into a DatabaseService class
Merge 1.9 changes into Head
Fixed bug that lsid couldn't be shown up in result page of kepler skin. The bug is that in extended query, lsid attribute was treated as a element, but it is attribute.I also optimized the query by deleting xml_documents table from query. The table is not needed.
Fixed bug that kepler skin wouldn't return actor name in query. The reason is there was no separate vector to store returnfield with "]". So those fields with or without "]" are handledtogether (which shouldn't). When seperate those return fields, the bug was fixed.
Add a new string buffer to store normalized query xml itself.
fix mistake where there is an attempt to select nodetype column from table xml_path_index table (it's not there!)
add retrieval of field type for each node (TEXT, ATTRIBUTE, etc).this is to support a fix for bug#2999
Change String.contains which only java 1.5 have to String.indexOf
Change a handleReturnField to public which will be used in ecogrid.
Fixed bug that searching for parameters.
Revised the access query part.
Remove the subtree constrain in access query
Remove an method
Merge the getting return fields for both elements and attributes.
Remove the access query for return field since we remove the partial tree access control in eml.
got a better version of paging working. still needs to be cleaned up and debugged more.
Limited use of predicates in XPath return fields
Get rid of user_owner=public part in access query.
Removed the release ant token from all files in 'src'.
release
fix for the access control check - earlier only permission 4 and 7 were checked for read. Now the query checks for permissions 5 and 6 also
Fixed a bug in QueryGroup which prevented QueryGroup from appending itself to the sql query when no queryTerm is present.
Replacing MetaCatUtil.debugMessage or MetaCatUtil.logMetacat call with logMetacat (private Logger object) call
Removing support for 'site' from pathquery
Check if all the paths in returnfield are indexed. If yes, then you xml_path_index for getting values of returnfields instead of using xml_nodes + xml_index
1. removed the call to QuerySpecification.printAttributeSQL() from QuerySpecification.printExtendedSQL()2. in QuerySpecification.printExtendedSQL() if ( returnFieldList.size() == 0 ) then it returns null3. DBQuery.addReturnfield() doesnt execute the element query if printExtendedSQL returns null
I've added in a test in QuerySpecification.printExtendedSQL that checksto see if attributes, and sometimes only attributes, are in the originalreturnfield request. If so, the printAttributeQuery is called.
Changed the handleReturnField() method so that it handles path expressions withonly attributes in the path.
Added a check if printAttributeQuery() for returnPath to see that it is not null so that that this doesnt happen
xml_index.path like 'null' AND xml_nodes.nodename like 'id'
Fixed a bug in previous commit
Modified code for computing the returnfield string - earlier only elements were used to construct the string. e.g. /dataset/titleNow attributes are also added to the returnfield. e.g. title/@id
When searching for attributes in the XPATH expression, an 'index out of bounds'exception was thrown when only an attribute was included in the path string.
This fix changes the pathexpr.indexOf comparison to 0 rather than 1, sincethe index starts at 0....
Modified code such that nodedata column in xml_index is not created and used. So now we are using the same logic for using xml_index which was used for metacat release 1.4
Added a function which gives back a string which is generated by sorting the returnfields requested for given query specifications
Fixed a bug in the format of query result.
Modifying code so that nodedata is stored in xml_index table next to the paths.This helps in making the search faster.
Some more modifications so that % search doesnt run a select on xml_nodes.
Modified code so that when a % search is done, a xml_nodes search is not done. This search is not required and hence saves time in doing a % search
Fixed a bug the text filed in path xml query maybe splited.
Fixed a bug in the new recursive SQL statements that prevented them from operating on oracle. Now they should work on both oracle and postgres.
Changed printAttributeQuery() to no longer depend on the xml_index table. Now, if useXMLIndex is false, the method will use a recursive query on xml_nodes to match paths instead of using xml_index.
Some refactoring of the printExtendedSQL() methods to eliminate redundancy in the code andto provide more readable documentation.
Moved decision about whether to use xml_index forquery to the metacat.properties as "usexmlindex". Defaultis now false. Still have some refactoring to do to remove afew more uses of the xml_index table.
Created new printExtendedSQL function that can get the extendedreturn fields using only xml_nodes and not xml_index. Onestep closer to eliminating the dependence ofn xml_index.
Created test class QuerySpecificationTest and started process of removing the xml_index from the QuerySpecification code. Reformatted some classes for readability.
Removed the "getdataguide" action as it was always experimental and is no longer used in metacat or morpho.
removed the 3 versions of printPackageSQL which are no longer used by metacat. This eliminates some dependency on xml_index.
Fixed the bug for sessionid storing, revision couldn't be zero and Ldap DN is case sensitive.
Modified a debug Message.
Revise code so it can be called directly.
Revied the class.
Revise the query for access control return field.
Revise the sql for access control for return fields.
Add code to handle access control for return fields.
Fixed a bug that the column in sql is ambiguous.
Add nodes access control for print extended query.
In search query, add subtreeid is null this condition to make sure is for top level documents.
Add a access control query for return fields.
Change package query.
In extened query, parentnodeid was added.
Support returnfields has attributes.
add some methods and attributes to determine percentage search.
Add new feature to support attribute in query.
Add a piece of query to get rid of invalid number in nodedata.
Made a shortcut for % search. It will look like: LIKE '%' rather than: LIKE '%%%'.
In accessQuery, permission=READ or permission=ALL was added for both allow rule and deny rule.
Add three private method: createOwnerQuery, createAllowRuleQuery and createDenyRuleQuery. And three public methods: setUserName, setGroup and getAccessQuery.
made a ton of changes related to keeping oracle SQL code out of the main classes. fixed a bug where the timing of the index thread was off so when it went to index a document, the document was not already in xml_documents thus breaking the FK relation between xml_documents and xml_index. I think that bug might be the reason for the blank resultset screens in morpho. made the postgres implementation much more robust.
support for the new terms included in pathquery.dtd
Fixed bug in metacat where return doctypes were not being properlyback traced. Changed DBQuery.findDocuments() so that it no longertakes a returndoc array, but instead retrieves the returndoc arrayfromthe QUERYSpecification. The QuerySpecification was augmented...
Modifications that change the package handling behavior of metacat. Packagemembership is now determined by an identifier being used as either the subjector object in a triple. One can not request arbitrary returndocs -- onlythose types that have package information embedded can be "returndoctype"...
Modifications to allow printing of SQL with and without INDEX option.
added print info and timing info
print the nested statements sql query
included flag in DBQuery to run pathqueries with or without the index,but for the command line only.
there were more mentions of DOCTITLE attr - cleared them
added precise location information (class.method) to each catch statement so that errors are more easily traced.
Added license terms to source code files, and cleaned up some javadocdocumentation in a few places.
fixed sql error
Modified pathquery.dtd and QuerySpecification to allow some new constraintson queries submitted to Metacat. Now, queries can contain an optionalset of <owner> tags that identify the users for which documents should bereturned, and a list of <site> tags constraining the site identifiers...
added functionality to return the doctype of a relation in a relationdoctype tag. This information is now returned automatically in the resultset under the path resultset/relation/relationdoctype.
Added backtrack functionality. Backtracking works by passing a returndoc parameter. There can be more than one. If a document that is hit by a query is not of type returndoc then it searches the database for a related file of type returndoc. If one is found it is displayed, if no relation is found, the original is displayed....
Added functionality for package specifications. metacatservlet now contains a new action called getrelateddocument that handles retrieving related documents using the metacatURL specification (metacatURL.java). DBQuery contains new code in runQuery that embeds relation tags in the returned hashtable describing the documents related to each docid. querySpecification contains a new method which prints the sql that does the relation query.
changed xslf for new returnfield scheme. the returnfields are now returned as <param name="<returnfield>"> tags.hThe sql for the returnfield query was redone to fix a previous problem with slow queries
changed the field names to be case-sensitive in the returnfields
added support for the returnfield parameter-QuerySpecification now sets a flag (containsExtendedSQL) when there are returnfield items in the pathquery document.the accessor method containsExtendedSQL() can be called by other classes to check for extended return parameters...