refactor Constants and ServiceTypeUtil
use new "v1" types from DataONE
remove CrudService -- replaced by MNodeService and CNodeService
reset object input stream (testGet)check for reserveIdentifier NotImplemented (expected)
Return the new pid (not the obsoleted pid) on update(), and set the correct system metadata.
include Mock version of looking up the base url for our own node - for testReplicate().still expecting a failure during MN.replicate() since we are trying to add the replica to the same MN from which it came.
allow alternative CNode implementations (subclasses) to be returned when D1Client.getCN() is called. The alternative is given in the Settings configuration via the D1Client.cnClassName property.MockCNode in Metacat is an example of such an alternative and is used when Metacat requires methods of a CN be present for unit testing.
Test that the obsoletes and derivedFrom system metadata fields were set correctly.
use objectFormatIdentifier for listObjects()remove provisional system metadata indicator - Metacat will not implement reserveIdentifier()
add test for synchronization failed -- TODO: verify that the log record made it in the logs
provisional replicate() implementation -- does not check if the session's subject is "allowed" to do this.the test also requires 2 servers -- right now it attempts to replicate with itself which will fail because of duplicate IDs
provisional version of getOperationStatistics() -- not clear if we are meant to aggregate by hour or by day
include test for replicate() method -- still fails as not implemented
allow null objects (use default checksum)
wire-up the getCapabilities() and getOperationStatistics() methods for when they are actually implemented (tests fail now)
test listObjects()
include MNAuthorization tests
refactor to use common superclass D1NodeServiceTest for shared methods
test for getLogRecords -- with some semi-reasonable expectations on the return that is expected
tests for isAuthorized and setAccessPolicy
include getLogRecords() test, though it is commented out at the moment
test for CN.getSystemMetadata()
test CN.get()
Uncommented MNStorage tests.
Send the correct Date format in testGetLogRecords(). I've commented out certain tests in the suite until isAuthorized() functionality is working. It is returning a NotFound exception even though the object is clearly in Metacat.
Add MNodeServiceTest tests for MNCore, MNRead, MNStorage, MNAuthorization implementations. MNReplication remains to be tested, as does MNCore.getCapabilities() and getOperationStatistics().
add the d1_common formats if they do not exist on the server
remove resolve() test -- not implemented in Metacat
add methods for testing CNodeService impl. Still some failing tests, but whittling them down
refactor to test the entire CN service impl
CNCoreImpl is replaced by CNodeService
Updated tests to use ObjectFormatCache.getInstance(), and added tests for CNCoreImpl.listFormats and getFormat().
When calling SystemMetadata.getObjectFormat(), return the string value of the ObjectFormatIdentifier rather than ObjectFormat.toString() (which no longer returns the fmtid string).
organize imports so that it is clearer what dependencies exist on the D1 jars
Merged in the D1_0_6_2_BRANCH changes that include the transition from ObjectFormat calls to ObjectFormatCache calls.
include GUID column for xml_access and related methods for storing/retrieving access rules
do not use XML files for storing SystemMetadata - use DB tables only.
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.
updating CrudServiceTest with better exception handling (more specific) to match refactored CrudService.java class
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.
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).
removed comments from crudservicetest
fixed bugs in listObjects
Fix the MetadataTypeRegisterTest because it had the wrong URI for METS.
added code to do database query for listObjects
fixed compile errors
uncommented tests
fixes for creating SM for legacy docs
uncommenting tests
use detected document encoding or Metacat's default encoding (UTF-8)
changed test to use actual semi-colons instead of colons
added semi-colon id test
organized code for inputstream handling
removed dependency on InputStreamToOutputStream so that exceptions will be passed correctly.
changes for new d1 schemas
implemented crud.delete
implemented crud.describe
fixed a couple bugs with dates and fixed a major bug where metacat was reading the entire document from the database everytime a DocumentImpl instance was created even though it didn't need to
fixed a bunch of small errors, did some reformatting, and fixed a bug that I thought was fixed last week
minor changes to crudservicetest
adding a test that I forgot to check in a while back
fixed error where insert/update errors were not getting caught as exceptions
fixed bug with logger where localid didn't get appended when inserting a data file
fixed update bug I introduced yesterday while fixing replication
updated for date format that supports time zones correctly.
changed date comparison to compare to gmt only
fixed bug in access control where the sessionid was not correctly passed along so changes of privileges were not being made
add back all tests
fixing date formatting and timezone issues
fixed some bugs in time handling for listObjects and getLogRecords
fixed bug in getLogRecords where the wrong id was getting set as the identifier
fixed listObject bugs, added params to the listObjects rest interface, consolidated the date format passed in params
fixed query for listObjects so that paging works as advertised.
fixed error with listObjects and get.
got the crud test to pass on knb-mn, now need to figure out why the rest service still isn't working
added a failure test to the testPublicAccess test. This test should allow public gets and listObjects but not public creates
changed getSessionData so that it will respond property to public tokens
test to check for public access to get and listObjects
adding getlogrecords to the rest interface.
changed getLogRecords to use new classes for log events
fixed bug in metacat that allowed attribute data to be appended to element data in returnfields
implementing getLogRecords
made the test functional so that it checks that missing system metadata will be created.
working on getting systemmetadata creation working for legacy knb objects
working on a function to create dataone system metadata docs for legacy metacat objects that do not have SM.
moved authentication checking out of ResourceHandler and into CrudService
added a test for access control changes
refactored the sessionService to use a correct singleton initialization scheme. Added true authentication to ResourceHandler.
new class to handle system metadata tasks in metacat
listObjects is now working for rest calls as well as crud calls
finished the crud part of listObjects. need to implement it in the rest interface now.
listObjects is almost working. need to get the result set parsed when returned to CrudService.
setting up the framework for the listObjects api call
removed system.outs
update works. it was the test that was faulty. all working now
amost have update working. still need to get unit test squared away.
removed old method that didn't do anything