[JBoss JIRA] Created: (DNA-293) JcrSession creates Property instances that use the PropertyType.UNDEFINED, which is not allowed
by Randall Hauch (JIRA)
JcrSession creates Property instances that use the PropertyType.UNDEFINED, which is not allowed
-----------------------------------------------------------------------------------------------
Key: DNA-293
URL: https://jira.jboss.org/jira/browse/DNA-293
Project: DNA
Issue Type: Bug
Components: JCR
Affects Versions: 0.3
Reporter: Randall Hauch
Assignee: Randall Hauch
Fix For: 0.4
The "undefined" property type is only allowed in property definitions. According to the JSR-170 specification (Section, 6.2.5):
"This constant can be used within a property definition (see 6.7.6 Property Definitions) to specify that the property in
question may be of any type. However, it cannot be the actual type of any property instance. For example it will
never be returned by Property.getType and (in level 2 implementations) it cannot be assigned as the type when
creating a new property."
When the property definition has a type of "undefined", then we'll need to choose what actual type to use. There doesn't appear to be any guidance on this in the spec (anybody?), so barring that the most logical approach is probably to look at the first property value.
Note that this is one reason why the DNA graph API was designed with the value factories to allow (or encourage) the client to convert the property values to the type desired by the client. Because of this, it doesn't matter so much what type the value actually is, but rather that it can be converted to the type needed by the user. So this should make the above assumption (about choosing the property type based upon value) a pretty decent one.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 7 months
[JBoss JIRA] Created: (DNA-294) Define a custom node type for the root node in a repository
by Randall Hauch (JIRA)
Define a custom node type for the root node in a repository
-----------------------------------------------------------
Key: DNA-294
URL: https://jira.jboss.org/jira/browse/DNA-294
Project: DNA
Issue Type: Task
Components: JCR
Affects Versions: 0.3
Reporter: Randall Hauch
Fix For: 0.4
The JCR Specification says (at least in Section 6.7.10):
"Which NodeType is returned when this method is called on the root node of a workspace is up to the implementation,
though the returned type must, of course, be consistent with the child nodes and properties of the root node."
Although some of the examples (e.g, Section 6.6.1) show the primary type for the root node being "nt:unstructured". While this is probably a good simple example, defining a DNA-specific node type would allow us to say the following:
1) the root node is autocreated
2) the root node is not autoprotected
3) the root node can have any properties
4) the root node is mix:referenceable (which says the "jcr:uuid" property is mandatory, autocreated and protected)
5) the root node allows any children, including allowing same-name-siblings
6) the root node always has a "jcr:system" child node that does not allow same-name-siblings, and that has its own type (again the spec says the type is implementation specific) that also is auto-created and protected
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 7 months
[JBoss JIRA] Created: (DNA-287) AbstractJcrNode.getAncestor Does Not Match JCR 1.0 Specification
by Brian Carothers (JIRA)
AbstractJcrNode.getAncestor Does Not Match JCR 1.0 Specification
----------------------------------------------------------------
Key: DNA-287
URL: https://jira.jboss.org/jira/browse/DNA-287
Project: DNA
Issue Type: Bug
Components: JCR
Affects Versions: 0.4
Reporter: Brian Carothers
Attachments: DNA-287.patch
AbstractJcrNode.getDepth(int depth) treats depth parameter as a relative depth. That is, getDepth(0) returns the current node. According to spec, getDepth(0) should return the root node and getDepth(n) should return the current node if the current node's depth is n.
Also, the spec indicates that the method should throw an ItemNotFoundException if the depth parameter is negative. The current code throws an IllegalArgumentException.
Fixing this behavior allows a few more TCK tests to pass.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 7 months