Modified Metacat to build against the D1_SCHEMA_0_6_1 branch of the dataone schemas by incorporating the 0.6.1-SNAPSHOT version of d1_common and d1_libclient libraries, and refactoring Metacat code references to the d1 schema changed types.
In order to sync up with DataONE 0.6.1 changes, I'm backing out ObjectFormatService changes temporarily in Metacat. Most functionality will be rolled back in using the DataONE 0.6.2 tag, but some methods in ObjectFormatService (such as getListFromDisk()) will be moved into d1_libclient_java.
Added in the 0.6.0 version of the d1_common_java library that has object format changes.
Changes in the DataONE ObjectFormat class deprecate the convert() method, and we're now using Metacat's ObjectFormatService to look up object format attributes. The following changes replace ObjectFormat.convert() with ObjectFormatService.getFormat() in several classes....
Include the DataONE 0.6.0 type schema in the SQL schema and DTD loader script.
Updating the cached object format list to the new DataONE namespace including the 'ns' domain component.
add additionalMetadata/metadata/spatialResolution/value and additionalMetadata/metadata/spatialResolution/units for indexing. Also add missing comma behind additionalMetadata/moderatorComment
use update method to update the mapping between local and guid (d1) when we get a force replication request that is an "update
remove entity encoded characters that were garbled in browser (sanparks patch)
updating CrudServiceTest with better exception handling (more specific) to match refactored CrudService.java class
generateMissingSystemMetadata was swallowing Exceptions instead of throwing. Refactored so that specific exceptions are thrown, affecting [create/update]SystemMetadata methods, too.
committing changes related to the new restservice update specification (newPid vs. obsoletedGuid)
replace whitespace in generated docid scope (sanparks patch from 1.9.4 branch)
use outputstream as an object, not a string. relax the Map typing to allow for mixed values. (sanparks patch)
use "object_format" element consistently so that it is replicated across instanceshttps://redmine.dataone.org/issues/1514
Set svn keywords on the object format list file.
The initial checkin of an object format list for Metacat, which will be used by the ObjectFormatService. The XML file will be used only if the service can't get the authoritative list from a D1 coordinating node or from within it's local Metacat database.
remove very old "metacat webservice" code - as far as i can tell it is never referenced or used. plus we have eocgrid and the new D1 rest services covering this territory now
removed newline addition to test doc now that the newline problem is fixed in utilities project. Small adjustments to comments and debug statements to aid in debugging. Reordered tests to remove possible insertion between read and getLastDocid test.
zero padded date string in DocumentUtil.generateDocumentId() for readability
Use SystemUtil.getContextURL() in ResourceHandler to construct the DataONE service URL (rather than direct calls to PropertyService). This handles http and https URLs, and strips the :80 or :443 for the well known ports.
Make this class be the subclass of the MCTestCase. The super class will initialize the property service for it.
Minor changes to MetacatHandler:- Improved logging where MetaCatServlet.class was used in getLogger() rather than MetacatHandler.class (holdover from the refactor)- Minor formatting changes, and replacement of 'MetaCatServlet' with 'MetacatHandler' in the logging output as needed.
commenting out the pisco user tests, since they only work in production.
put in more explanatory exception methods in the private helper functions that throw exceptions, and some debug statements in the onlineData201CasesTest_1 test.
improved multipart handling (improved logging messages, code, and error checking). Added exception classname to error output when the generic Exception is thrown. Added error check for cases of null value for file parts 'sysmeta' and 'object.'
added a few debugging lines in createSystemMetadata() related to contents of identifier strings
Due to changes in MetacatHandler that creates system metadata from uploaded EML documents, OnlineDataAccessTest was failing certain tests because of errors in how the test documents were originally uploaded. MetacatHandler.createSystemMetadata() was throwing exceptions because of these errors, specifically when a data document is uploaded with a docid that is difeerent than the docid statement in the EML distribution URL. Most errors involved stated docids with .2 versions, and the metadata had .1 versions....
Modified IdentifierManager.getDocumentInfo() to include the docid in the returned hash map, since it is useful to be able to obtain the docid and rev separately from a given fullDocidWithRev (e.g. test.1.1).
fixing annoying error message inaccuracy
Cleaned up imports.
Updated D1 libraries to head to eliminate problems with date parsing -- addedJoda jar to support date parsing. Removed hardcoded DN from test file. NowCrudServiceTest is passing again.
Remove hardcoded LDAP usernames from testing so that MetaCatServletNetTest will work even using alternateLDAP servers.
Changed AuthLDAP to deal with cases where getAttributes encounters non-stringattributes (which used to cause a ClassCastException). Now, if an attributevalue can not be cast to string, we catch the class cast exception and justskip this value. This only typically occurs when an LDAP server is set to send...
MOdified MetacatHandler to catch cases where ObjectFormat is not being set properly on data files whengenerating SystemMetadata. When the EML document contains a format for an entity that maps to a nulltype in ObjectFormat.convert(), then the type ends up being null and an error is generated on insertion...
allow "docid override" queries to include the results of a "normal" query - if the operator is left null, it acts as the usual override, otherwise UNION and INTERSECT modes can be used to either augment or refine the results.this is for incorporating semantic+spatial+keyword queries into one query operation/result
remove System.out statements in favor of logging
Removed hardcoded D1 node type in ResourceHandler and added in a new 'dataone.nodeType' property. Also added 'dataone.coordinatingNodeBaseURL' property which points to the CN that stores the authoritative object format list. If this instance of Metacat is a CN, it may point to itself.
ResourceHandler in Metacat was set to return the KNB site URL as the MN base URL rather than the node Id. Fixed. https://redmine.dataone.org/issues/1390
initialize the HandlerPluginManager
allow the addition of properties via code
add event notification for insert/update/delete on documents (for semtools plugin)
move semtools skin to the semtools project - build into the war when adding the semtools plugin to metacat
do not attempt to check permissions when reading documents for systemMetadata generation (unless I completely do not understand this feature - please verify!).
new EML style tag
do each table separately with it's own connection - running into memory issues on dev.nceas running this.
do not drop nonexistent table (identifier is not in 1.9.3)
This is the start of the ObjectFormatService, which manages the list of object formats registered within Metacat. This includes schema types, mime types, and other information related to a particular format. The service provides functionality for the DataONE MemberNode and CoordinatingNode components, with CoordinatingNodes providing the authoritative list of object formats. See https://redmine.dataone.org/issues/1378....
Bug 3835 - design and implement OAI-PMH compliant harvest subsystem Minor bug fix to handle irregular Metacat docids containing two or more dot ('.') characters. In the LTER Metacat, the following docids (scope and identifier, excluding the revision value) have that characteristic:...
Bug 3835 - design and implement OAI-PMH compliant harvest subsystem Return a 'badVerb' response when the 'verb' request parameter is missing from the request. Previously this generated a NullPointerException.
use the jaxb date parser for ISO 8601 formats. the numeric and date node values are now calculated after the document has been successfully inserted in the db so any sql exceptions do not prevent the raw node data from being saved.http://bugzilla.ecoinformatics.org/show_bug.cgi?id=2084
rollback the accessDAO changes - leaving well enough alone.
only include accessfileid when it is not toplevel
include accessfileid and subtreeid when inserting xml_access values
use access control dao for setting access in EML parser. send additional xml_access info in replication request
insert/update documents with null user and null group to circumvent access control restrictions then update the user_owner and user_updated values to reflect what exists on the originating server (pisco)
use 'user_updated' field when writing the replicated document - allows most recent ownership/permissions to be used (in case LDAP groups have shifted) and is more accurate for both updates and initial inserts (hopefully addresses the replication issue we are having with pisco)
use newer ecogrid tag to allow omission of the ecogrid query title (as is allowed in the query.xsd schema)
add support for temporal element query in pathqueryhttp://bugzilla.ecoinformatics.org/show_bug.cgi?id=2084
add otherEntity physical elements to indexPaths (ndp)
replace derik's settings with previous version
add paths to indexPaths, and kar namespaces to indexNamespaces for Kepler Workflow Run Manager run-kar queries
include simple union data for search results if they are present in the resultset document
include temporal coverage dates in the path index - (for opendap metadata queries)
Fixed the testNCEASLogin() password that I mistakenly changed.
Now that MetacatHandler creates GUID identifier mappings and system metadata, many of the tests in IdentifierManagerTest were failing that were manually creating id mappings and system metadata. Modified testCreateMapping() and testCreateSystemMetadataMapping() to use docids that haven't been inserted to just exercise the methods....
Added a new test method testDeleteDocumentByGUID() to ensure MetacatHandler can delete based on GUID, but fall back to docid if the GUID isn't present. Modified CrudServiceTest and made some private methods public to leverage the D1 REST calls in that library (i.e. create() a doc with a GUID).
The DataONE service API jar has been renamed to d1_common_java-0.5.0.jar, updated the build file accordingly. Added debug echo of the test classpath.
hide the data section unless there is actually data to display
DocumentImpl.delete() now throws finer grained exceptions (not a general exception). Consequently, the classes that call it have been updated to handle the thrown exceptions, including CrudService, ReplicationHandler, and ReplicationService.
refactor the names of these Data Manager implementation classes so that it's easier to use them with the default/local versions of similar. These classes utilize Metacat-specific configuration values rather than relying soley on the bundles that are used in the stand-alone DM lib.
render the <data/> CDATA section in
- it's a csv string
To support GUIDs in MetacatHandler.handleDeleteAction(), I've added in a new method:deleteFromMetacat() - deletes a document based on the docidThis factors the deletion code out of handleDeleteAction(). handleDeleteAction() now does a docid lookup based on GUID, and if it is not found, reverts to the deletion based on docid instead.
only include data value/operator when present in the form
refresh search when the data operator changes (changing the value is less clear...keyup event seems too eager)
use correct operators
include data search - new form fields and semQuery schema to allow searching for Characteristics data
turn off the databounds layer by default
new lines were showing up in the html source becuase of whitespace in this - removed the white space and the new lines are gone...
restyle the eml display and resultset after applying new eml css to the KNB L+F
new jar files from common and client
fixed width issue with default header
new files for mets style
[untested] loop through each origin[ator] to make a row for them
restyle the resultset after applying new eml cssuse more robust form-submission js for the datapackage links
check for 'null' as well as 'public' user when rendering the header Login/Logout option
restyle default eml rendering using ESA look + feel
include eml css and then adjust lter skin to accommodate the new xsls
adjust stylesheets to accommodate new default eml rendering
use latest eml style tag
use square edges for the borders around table groups and subgroups
These are fairly significant changes to MetacatHandler.handleInsertOrUpdateAction() that add in support for creation or update of GUIDs and SystemMetadata. Upon insertion or update of DataPackages from non-DataONE aware clients (such as Morpho), the identifier table is updated by creating a GUID, and the systemmetadata table is updated with fields after the EML document is parsed for distribution information and entity typing. System Metadata documents are also generated and inserted into Metacat. The list of data entities is iterated over and System Metadata is generated for each data file as well.
In MetacatHandler I've removed updateSystemMetadata() in favor of additions to insertOrUpdateSystemMetadata(). Modified createSystemMetadata() to reflect the changes as well.
Modified MetacatHandler.createSystemMetadata() to take a localId, not a guid as an argument since there are times when the guid has yet to have been created, and it is created in this method if so. Also, put the read() call to get the InputStream of the data/metadata document into it's own try/catch statement.
adjust to fit new EML look and feel
additional overrides for color
added mets to default skin