-
Notifications
You must be signed in to change notification settings - Fork 19
Persist jcr/xml in hierarchy structure. #49
base: master
Are you sure you want to change the base?
Conversation
@@ -217,7 +218,8 @@ public void onMessage(final Message message) { | |||
LOGGER.debug("Discovered baseURL: {} in message.", baseURL); | |||
LOGGER.debug("Discovered properties: {} in message.", message.getStringProperty(PROPERTIES_HEADER_NAME)); | |||
|
|||
index( baseURL + id, eventType ); | |||
// jcr/xml persist need the base url to storage file in hierarchy structure | |||
index( baseURL, baseURL + id, eventType ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These parameters are too complicated and redundant: baseURL and baseURL + id
This implementation creates the following directories: The directory should start at "collection" |
Okay, I've rebase and squash it into one commit lsitu@4274f9f. The compiling error/conflicts should be fixed now. |
@@ -286,7 +289,7 @@ private void index( final String uri, final String eventType ) { | |||
if (rdf.contains(createResource(uri), type, DATASTREAM_TYPE) && uri.indexOf("/fedora:system/") == -1 ) { | |||
final String parent = uri.substring(0, uri.lastIndexOf("/")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"parent" should actually be "parentID", no?
When the index() call concatenates "baseURL" and "parent" it should have a valid URI.
Should this instead be:
final String parentID = uri.substring(uri.lastIndexOf("/"));
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@awoods It sounds good to me. The term "parent" was used that way in the source codes. Would you like me to make the change now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lsitu, it is not just the name of the variable, but the logic in creating the substring that likely needs to change.
I believe the current logic is incorrect.
I've updated it to use the parentID and made the change to use reindexURI( child, "", true ) instead of splitting the child url into two parts like baseURL+id. |
https://www.pivotaltracker.com/s/projects/684825/stories/75644184