[ 
https://issues.apache.org/jira/browse/JCR-2028?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12706929#action_12706929
 ] 

angela commented on JCR-2028:
-----------------------------

I committed the changes including the those addressing thomas' feedback at rev. 
r772659.

Modifications:
-----------------------------------------------------------------------------------------------------------------------------------------------------------
- Implementation for the identifier-based JCR Path (see above)
- Adjusting the value handling in jackrabbit-core in order to allow for 
expanded names in Name and Path values as
  well as for Identifier-based path values (see above for a short discussion of 
the problem)
- some trivial javadoc fixes (not related to the changes made)

regarding thomas' remarks:

a) catching RepositoryException in the BundleBinding: rethrown as IOException 
as some of the other prop type
    already did instead of ignoring
b) handling attempt to create InternalValue from null: check moved to the 
various constructors as discussed
    and adjusted the QValue tests accordingly... not yet changed to 
NullPointerException.
c) usage of Long.valueOf done in InternalValue and where ever I happen to see 
it while looking at the diffs and the
    other QValues. similarly treated the doubles.
d) equals/hashCode: fixed

Testing
-----------------------------------------------------------------------------------------------------------------------------------------------------------
jackrabbit-jcr-test
- added 2 test classes NameTest and PathTest that cover the basics of the 
various variants of jcr names and jcr paths
- TODO: add more (sophisticated) tests

jackrabbit-core
- jackrabbit-core tests including api test pass with datastore enabled and 
disabled
- i added some initial tests for InternalValue and the corresponding factory

jackrabbit-spi2jcr
- the api test for path handling still fail for Node.getIdentifier() is not yet 
implemented.

jackrabbit-spi
- added QValueTest

jackrabbit-spi-commons
- added test for ValueFormat. currently only a single test regarding the 
changes made. this was: path values
  are never meant to be normalized before being stored in the content.
- added various tests for the changes made to Path, PathFactory, PathParser and 
PathResolver for the handling
  of identifier based path

TODO:
-----------------------------------------------------------------------------------------------------------------------------------------------------------

- PathParser stills needs some trivial adjustments as the list of illegal 
characters in JCR names changed (marked with
  TODO in the code)
- added a couple of TODOs where I saw room for improvement or wasn't sure.

Up to now InternalValue's behaviour was not covered by test cases. Therefore 
the changes made may introduce bugs that were not detected by the existing 
tests... (though i obviously tried to avoid that ;-).

For this reason and due the remaining TODOs, I will keep this issue open...

> JSR 283: JCR Path
> -----------------
>
>                 Key: JCR-2028
>                 URL: https://issues.apache.org/jira/browse/JCR-2028
>             Project: Jackrabbit Content Repository
>          Issue Type: Sub-task
>          Components: JCR 2.0
>            Reporter: angela
>             Fix For: 2.0.0
>
>         Attachments: JCR-2028_commons.patch, JCR-2028_core.patch, 
> JCR-2028_jcr2spi_spiimpls.patch, JCR-2028_spi.diff, JCR-2028_spicommons.diff, 
> JCR-2028_tests.diff
>
>
> with jsr 283 the jcr path is defined to consist of a combination of the 
> following segments
> •     a name segment, (J, I), where J is a JCR name and I is an integer index 
> (I ≥ 1).
> •     an identifier segment, U, where U is a JCR identifier.
> •     the root segment.
> •     the self segment.
> •     the parent segment.
> -> the name segment can be in extended or qualified form -> see issue JCR-1712
> -> the identifier segment is new for jsr283 and always identifies a node (-> 
> see new method Node.getIdentifier())
> Non-standard parts always need to be standardized. Any of the following makes 
> a path non-standard:
> - expanded name segments
> - trailing /
> - index [1]
> Identifier-segments
> - get resolved upon being passed to any API calls that take path to an 
> existing Node
> - don't get resolved when being used to create a PATH value object.
> Except for PATH values, all jcr paths returned by the API are normalized and 
> standard, thus never identifier-based.
> PATH values in contrast:
> - must be converted to standard form
> - must NOT be normalized. i.e. redundant segments and identifiers must be 
> preserved.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to