[GitHub] [jackrabbit-oak] nit0906 opened a new pull request #372: OAK-9566 | Improve index stats

2021-09-19 Thread GitBox


nit0906 opened a new pull request #372:
URL: https://github.com/apache/jackrabbit-oak/pull/372


   * Added support for Json format 
   * Fixed issue with local index dir size - currently with composite node 
store - it was just reporting size of read only mount
   * Added new stats for indexCreationTimestamp, ReindexCompletionTimestamp, 
suggestDirSize, If the index has hidden property index node and if it has a 
hidden read only libs mount.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [jackrabbit-filevault] kwin commented on a change in pull request #163: JCRVLT-549 - node cannot be deleted if it's a multi-mandatory child node

2021-09-19 Thread GitBox


kwin commented on a change in pull request #163:
URL: 
https://github.com/apache/jackrabbit-filevault/pull/163#discussion_r711728698



##
File path: 
vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/DocViewSAXImporter.java
##
@@ -1295,6 +1300,31 @@ public void endElement(String uri, String localName, 
String qName) throws SAXExc
 }
 }
 
+private int getNumChildrenWithType(Node parent, Node child) throws 
RepositoryException {
+
+int count=0;
+   
+NodeIterator iter = parent.getNodes();
+
+EffectiveNodeType ent = EffectiveNodeType.ofNode(parent); 
+Optional def = 
ent.getApplicableChildNodeDefinition(child.getName(), 
child.getPrimaryNodeType());
+
+while (iter.hasNext()) {
+Node sibling = iter.nextNode();
+Optional  childDef = 
ent.getApplicableChildNodeDefinition(sibling.getName(), 
sibling.getPrimaryNodeType());
+Boolean test = (def == childDef) || (def != null && 
def.equals(childDef));
+
+/*This is not working
+if(def.equals(childDef)) { 
+count++; 
+}*/
+
if(Arrays.equals(def.get().getRequiredPrimaryTypes(),childDef.get().getRequiredPrimaryTypes()))
 {
+count++; 
+}

Review comment:
   Right, but equals() is not implemented in 
https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/ItemDefinitionImpl.java
 either (nor does it necessarily have to according to the JCR 2.0 spec). Feel 
free to raise a PR for Oak.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [jackrabbit-filevault] tripodsan commented on a change in pull request #163: JCRVLT-549 - node cannot be deleted if it's a multi-mandatory child node

2021-09-19 Thread GitBox


tripodsan commented on a change in pull request #163:
URL: 
https://github.com/apache/jackrabbit-filevault/pull/163#discussion_r711728641



##
File path: 
vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/DocViewSAXImporter.java
##
@@ -1295,6 +1300,31 @@ public void endElement(String uri, String localName, 
String qName) throws SAXExc
 }
 }
 
+private int getNumChildrenWithType(Node parent, Node child) throws 
RepositoryException {
+
+int count=0;
+   
+NodeIterator iter = parent.getNodes();
+
+EffectiveNodeType ent = EffectiveNodeType.ofNode(parent); 
+Optional def = 
ent.getApplicableChildNodeDefinition(child.getName(), 
child.getPrimaryNodeType());
+
+while (iter.hasNext()) {
+Node sibling = iter.nextNode();
+Optional  childDef = 
ent.getApplicableChildNodeDefinition(sibling.getName(), 
sibling.getPrimaryNodeType());
+Boolean test = (def == childDef) || (def != null && 
def.equals(childDef));
+
+/*This is not working
+if(def.equals(childDef)) { 
+count++; 
+}*/
+
if(Arrays.equals(def.get().getRequiredPrimaryTypes(),childDef.get().getRequiredPrimaryTypes()))
 {
+count++; 
+}

Review comment:
   the problem is rather, that the 
[ItemDefintion](https://github.com/apache/jackrabbit-oak/blob/c6ddcc55bee3de915459af01e91edad32d538f3d/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/ItemDefinitionImpl.java#L42)
 doesn't implement equals :-(
   
   @ankitaagar I think your must implement the equals yourself or we add it as 
helper function to `EffectiveNodeType`

##
File path: 
vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/DocViewSAXImporter.java
##
@@ -1295,6 +1300,31 @@ public void endElement(String uri, String localName, 
String qName) throws SAXExc
 }
 }
 
+private int getNumChildrenWithType(Node parent, Node child) throws 
RepositoryException {
+
+int count=0;
+   
+NodeIterator iter = parent.getNodes();
+
+EffectiveNodeType ent = EffectiveNodeType.ofNode(parent); 
+Optional def = 
ent.getApplicableChildNodeDefinition(child.getName(), 
child.getPrimaryNodeType());
+
+while (iter.hasNext()) {
+Node sibling = iter.nextNode();
+Optional  childDef = 
ent.getApplicableChildNodeDefinition(sibling.getName(), 
sibling.getPrimaryNodeType());
+Boolean test = (def == childDef) || (def != null && 
def.equals(childDef));
+
+/*This is not working
+if(def.equals(childDef)) { 
+count++; 
+}*/
+
if(Arrays.equals(def.get().getRequiredPrimaryTypes(),childDef.get().getRequiredPrimaryTypes()))
 {
+count++; 
+}

Review comment:
   the problem is rather, that the 
[ItemDefintion](https://github.com/apache/jackrabbit-oak/blob/c6ddcc55bee3de915459af01e91edad32d538f3d/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/ItemDefinitionImpl.java#L42)
 doesn't implement equals :-(
   
   @ankitaagar I think you must implement the equals yourself or we add it as 
helper function to `EffectiveNodeType`




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [jackrabbit-filevault] tripodsan commented on a change in pull request #163: JCRVLT-549 - node cannot be deleted if it's a multi-mandatory child node

2021-09-19 Thread GitBox


tripodsan commented on a change in pull request #163:
URL: 
https://github.com/apache/jackrabbit-filevault/pull/163#discussion_r711728177



##
File path: 
vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/DocViewSAXImporter.java
##
@@ -1295,6 +1300,31 @@ public void endElement(String uri, String localName, 
String qName) throws SAXExc
 }
 }
 
+private int getNumChildrenWithType(Node parent, Node child) throws 
RepositoryException {
+
+int count=0;
+   
+NodeIterator iter = parent.getNodes();
+
+EffectiveNodeType ent = EffectiveNodeType.ofNode(parent); 
+Optional def = 
ent.getApplicableChildNodeDefinition(child.getName(), 
child.getPrimaryNodeType());
+
+while (iter.hasNext()) {
+Node sibling = iter.nextNode();
+Optional  childDef = 
ent.getApplicableChildNodeDefinition(sibling.getName(), 
sibling.getPrimaryNodeType());
+Boolean test = (def == childDef) || (def != null && 
def.equals(childDef));
+
+/*This is not working
+if(def.equals(childDef)) { 
+count++; 
+}*/
+
if(Arrays.equals(def.get().getRequiredPrimaryTypes(),childDef.get().getRequiredPrimaryTypes()))
 {
+count++; 
+}

Review comment:
   no. it's the name of the item definition, not the name of the child 
node. i.e. in this case it should be `*`
   
https://docs.adobe.com/content/docs/en/spec/jsr170/javadocs/jcr-2.0/javax/jcr/nodetype/ItemDefinition.html#getName()




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [jackrabbit-filevault] kwin commented on a change in pull request #163: JCRVLT-549 - node cannot be deleted if it's a multi-mandatory child node

2021-09-19 Thread GitBox


kwin commented on a change in pull request #163:
URL: 
https://github.com/apache/jackrabbit-filevault/pull/163#discussion_r711727356



##
File path: 
vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/DocViewSAXImporter.java
##
@@ -1295,6 +1300,31 @@ public void endElement(String uri, String localName, 
String qName) throws SAXExc
 }
 }
 
+private int getNumChildrenWithType(Node parent, Node child) throws 
RepositoryException {
+
+int count=0;
+   
+NodeIterator iter = parent.getNodes();
+
+EffectiveNodeType ent = EffectiveNodeType.ofNode(parent); 
+Optional def = 
ent.getApplicableChildNodeDefinition(child.getName(), 
child.getPrimaryNodeType());
+
+while (iter.hasNext()) {
+Node sibling = iter.nextNode();
+Optional  childDef = 
ent.getApplicableChildNodeDefinition(sibling.getName(), 
sibling.getPrimaryNodeType());
+Boolean test = (def == childDef) || (def != null && 
def.equals(childDef));
+
+/*This is not working
+if(def.equals(childDef)) { 
+count++; 
+}*/
+
if(Arrays.equals(def.get().getRequiredPrimaryTypes(),childDef.get().getRequiredPrimaryTypes()))
 {
+count++; 
+}

Review comment:
   NodeDefinition includes the node name 
(https://docs.adobe.com/content/docs/en/spec/jsr170/javadocs/jcr-2.0/javax/jcr/nodetype/ItemDefinition.html)
 and therefore cannot ever be equal for two different (sibling) nodes.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[jira] [Commented] (JCRVLT-560) Clarify binary properties in FileVault DocView

2021-09-19 Thread Tobias Bocanegra (Jira)


[ 
https://issues.apache.org/jira/browse/JCRVLT-560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17417316#comment-17417316
 ] 

Tobias Bocanegra commented on JCRVLT-560:
-

I don't think that binary values are serializable inline in DocView. we should 
clarify that in the documentation.

> Clarify binary properties in FileVault DocView
> --
>
> Key: JCRVLT-560
> URL: https://issues.apache.org/jira/browse/JCRVLT-560
> Project: Jackrabbit FileVault
>  Issue Type: Bug
>Reporter: Konrad Windszus
>Priority: Major
> Fix For: 3.5.4
>
>
> In contrast to JCR 2.0 DocView which states
> bq. If P is a BINARY property its value is Base64 encoded. The resulting 
> string becomes the value of the XML attribute P.
> (https://docs.adobe.com/content/docs/en/spec/jcr/2.0/7_Export.html#7.3%20Document%20View)
>  the binary support in FileVault DocView uses the default conversion from 
> String to UTF-8 byte array encoding for multi-value properties in 
> https://github.com/apache/jackrabbit-filevault/blob/b8627b9548ff1335cc0e497797b701a02a966654/vault-core/src/main/java/org/apache/jackrabbit/vault/util/DocViewProperty.java#L500
>   
> (https://docs.adobe.com/content/docs/en/spec/jcr/2.0/3_Repository_Model.html#3.6.4.1%20From%20STRING%20To)
>  or only binary references for single values: 
> https://github.com/apache/jackrabbit-filevault/blob/b8627b9548ff1335cc0e497797b701a02a966654/vault-core/src/main/java/org/apache/jackrabbit/vault/util/DocViewProperty.java#L519.
> This difference is currently not explained in 
> https://jackrabbit.apache.org/filevault/docview.html and the handling is 
> inconsistent between single- and multi-value.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[GitHub] [jackrabbit-filevault] tripodsan commented on a change in pull request #163: JCRVLT-549 - node cannot be deleted if it's a multi-mandatory child node

2021-09-19 Thread GitBox


tripodsan commented on a change in pull request #163:
URL: 
https://github.com/apache/jackrabbit-filevault/pull/163#discussion_r711723791



##
File path: 
vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/DocViewSAXImporter.java
##
@@ -1295,6 +1300,31 @@ public void endElement(String uri, String localName, 
String qName) throws SAXExc
 }
 }
 
+private int getNumChildrenWithType(Node parent, Node child) throws 
RepositoryException {
+
+int count=0;
+   
+NodeIterator iter = parent.getNodes();
+
+EffectiveNodeType ent = EffectiveNodeType.ofNode(parent); 
+Optional def = 
ent.getApplicableChildNodeDefinition(child.getName(), 
child.getPrimaryNodeType());
+
+while (iter.hasNext()) {
+Node sibling = iter.nextNode();
+Optional  childDef = 
ent.getApplicableChildNodeDefinition(sibling.getName(), 
sibling.getPrimaryNodeType());
+Boolean test = (def == childDef) || (def != null && 
def.equals(childDef));
+
+/*This is not working
+if(def.equals(childDef)) { 
+count++; 
+}*/
+
if(Arrays.equals(def.get().getRequiredPrimaryTypes(),childDef.get().getRequiredPrimaryTypes()))
 {
+count++; 
+}

Review comment:
   thanks. but @ankitaagar is comparing the `Optional`, and 
not the effective node type.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [jackrabbit-filevault] kwin commented on a change in pull request #163: JCRVLT-549 - node cannot be deleted if it's a multi-mandatory child node

2021-09-19 Thread GitBox


kwin commented on a change in pull request #163:
URL: 
https://github.com/apache/jackrabbit-filevault/pull/163#discussion_r711722122



##
File path: 
vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/DocViewSAXImporter.java
##
@@ -1295,6 +1300,31 @@ public void endElement(String uri, String localName, 
String qName) throws SAXExc
 }
 }
 
+private int getNumChildrenWithType(Node parent, Node child) throws 
RepositoryException {
+
+int count=0;
+   
+NodeIterator iter = parent.getNodes();
+
+EffectiveNodeType ent = EffectiveNodeType.ofNode(parent); 
+Optional def = 
ent.getApplicableChildNodeDefinition(child.getName(), 
child.getPrimaryNodeType());
+
+while (iter.hasNext()) {
+Node sibling = iter.nextNode();
+Optional  childDef = 
ent.getApplicableChildNodeDefinition(sibling.getName(), 
sibling.getPrimaryNodeType());
+Boolean test = (def == childDef) || (def != null && 
def.equals(childDef));
+
+/*This is not working
+if(def.equals(childDef)) { 
+count++; 
+}*/
+
if(Arrays.equals(def.get().getRequiredPrimaryTypes(),childDef.get().getRequiredPrimaryTypes()))
 {
+count++; 
+}

Review comment:
   Added those methods now in 
https://github.com/apache/jackrabbit-filevault/commit/0087391e3e2dbe0f70fab5dcb1a283c354c13c25




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [jackrabbit-filevault] kwin commented on a change in pull request #163: JCRVLT-549 - node cannot be deleted if it's a multi-mandatory child node

2021-09-19 Thread GitBox


kwin commented on a change in pull request #163:
URL: 
https://github.com/apache/jackrabbit-filevault/pull/163#discussion_r711720601



##
File path: 
vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/DocViewSAXImporter.java
##
@@ -1295,6 +1300,31 @@ public void endElement(String uri, String localName, 
String qName) throws SAXExc
 }
 }
 
+private int getNumChildrenWithType(Node parent, Node child) throws 
RepositoryException {
+
+int count=0;
+   
+NodeIterator iter = parent.getNodes();
+
+EffectiveNodeType ent = EffectiveNodeType.ofNode(parent); 
+Optional def = 
ent.getApplicableChildNodeDefinition(child.getName(), 
child.getPrimaryNodeType());
+
+while (iter.hasNext()) {
+Node sibling = iter.nextNode();
+Optional  childDef = 
ent.getApplicableChildNodeDefinition(sibling.getName(), 
sibling.getPrimaryNodeType());
+Boolean test = (def == childDef) || (def != null && 
def.equals(childDef));
+
+/*This is not working
+if(def.equals(childDef)) { 
+count++; 
+}*/
+
if(Arrays.equals(def.get().getRequiredPrimaryTypes(),childDef.get().getRequiredPrimaryTypes()))
 {
+count++; 
+}

Review comment:
   Currently 
https://github.com/apache/jackrabbit-filevault/blob/master/vault-core/src/main/java/org/apache/jackrabbit/vault/util/EffectiveNodeType.java
 does not implement equals, hashCode and toString




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [jackrabbit-filevault] kwin commented on a change in pull request #163: JCRVLT-549 - node cannot be deleted if it's a multi-mandatory child node

2021-09-19 Thread GitBox


kwin commented on a change in pull request #163:
URL: 
https://github.com/apache/jackrabbit-filevault/pull/163#discussion_r711720601



##
File path: 
vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/DocViewSAXImporter.java
##
@@ -1295,6 +1300,31 @@ public void endElement(String uri, String localName, 
String qName) throws SAXExc
 }
 }
 
+private int getNumChildrenWithType(Node parent, Node child) throws 
RepositoryException {
+
+int count=0;
+   
+NodeIterator iter = parent.getNodes();
+
+EffectiveNodeType ent = EffectiveNodeType.ofNode(parent); 
+Optional def = 
ent.getApplicableChildNodeDefinition(child.getName(), 
child.getPrimaryNodeType());
+
+while (iter.hasNext()) {
+Node sibling = iter.nextNode();
+Optional  childDef = 
ent.getApplicableChildNodeDefinition(sibling.getName(), 
sibling.getPrimaryNodeType());
+Boolean test = (def == childDef) || (def != null && 
def.equals(childDef));
+
+/*This is not working
+if(def.equals(childDef)) { 
+count++; 
+}*/
+
if(Arrays.equals(def.get().getRequiredPrimaryTypes(),childDef.get().getRequiredPrimaryTypes()))
 {
+count++; 
+}

Review comment:
   Currently 
https://github.com/apache/jackrabbit-filevault/blob/master/vault-core/src/main/java/org/apache/jackrabbit/vault/util/EffectiveNodeType.java
 does not implement equals, hash and toString




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[jira] [Commented] (JCRVLT-560) Clarify binary properties in FileVault DocView

2021-09-19 Thread Konrad Windszus (Jira)


[ 
https://issues.apache.org/jira/browse/JCRVLT-560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17417311#comment-17417311
 ] 

Konrad Windszus commented on JCRVLT-560:


[~tripod] Is FileVault DocView not supposed to support binary properties except 
via binary references? This is IMHO problematic as I always thought that even 
JCR 2.0 compliant DocViews would be supported during package import as well... 
At least http://jackrabbit.apache.org/filevault/vaultfs.html#Deserialization 
does not state explicitly that only FileVault DocView is supported...

> Clarify binary properties in FileVault DocView
> --
>
> Key: JCRVLT-560
> URL: https://issues.apache.org/jira/browse/JCRVLT-560
> Project: Jackrabbit FileVault
>  Issue Type: Bug
>Reporter: Konrad Windszus
>Priority: Major
> Fix For: 3.5.4
>
>
> In contrast to JCR 2.0 DocView which states
> bq. If P is a BINARY property its value is Base64 encoded. The resulting 
> string becomes the value of the XML attribute P.
> (https://docs.adobe.com/content/docs/en/spec/jcr/2.0/7_Export.html#7.3%20Document%20View)
>  the binary support in FileVault DocView uses the default conversion from 
> String to UTF-8 byte array encoding for multi-value properties in 
> https://github.com/apache/jackrabbit-filevault/blob/b8627b9548ff1335cc0e497797b701a02a966654/vault-core/src/main/java/org/apache/jackrabbit/vault/util/DocViewProperty.java#L500
>   
> (https://docs.adobe.com/content/docs/en/spec/jcr/2.0/3_Repository_Model.html#3.6.4.1%20From%20STRING%20To)
>  or only binary references for single values: 
> https://github.com/apache/jackrabbit-filevault/blob/b8627b9548ff1335cc0e497797b701a02a966654/vault-core/src/main/java/org/apache/jackrabbit/vault/util/DocViewProperty.java#L519.
> This difference is currently not explained in 
> https://jackrabbit.apache.org/filevault/docview.html and the handling is 
> inconsistent between single- and multi-value.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (JCRVLT-560) Clarify binary properties in FileVault DocView

2021-09-19 Thread Konrad Windszus (Jira)


 [ 
https://issues.apache.org/jira/browse/JCRVLT-560?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Konrad Windszus updated JCRVLT-560:
---
Description: 
In contrast to JCR 2.0 DocView which states
bq. If P is a BINARY property its value is Base64 encoded. The resulting string 
becomes the value of the XML attribute P.
(https://docs.adobe.com/content/docs/en/spec/jcr/2.0/7_Export.html#7.3%20Document%20View)
 the binary support in FileVault DocView uses the default conversion from 
String to UTF-8 byte array encoding for multi-value properties in 
https://github.com/apache/jackrabbit-filevault/blob/b8627b9548ff1335cc0e497797b701a02a966654/vault-core/src/main/java/org/apache/jackrabbit/vault/util/DocViewProperty.java#L500
  
(https://docs.adobe.com/content/docs/en/spec/jcr/2.0/3_Repository_Model.html#3.6.4.1%20From%20STRING%20To)
 or only binary references for single values: 
https://github.com/apache/jackrabbit-filevault/blob/b8627b9548ff1335cc0e497797b701a02a966654/vault-core/src/main/java/org/apache/jackrabbit/vault/util/DocViewProperty.java#L519.

This difference is currently not explained in 
https://jackrabbit.apache.org/filevault/docview.html and the handling is 
inconsistent between single- and multi-value.

  was:
In contrast to JCR 2.0 DocView which states
bq. If P is a BINARY property its value is Base64 encoded. The resulting string 
becomes the value of the XML attribute P.
(https://docs.adobe.com/content/docs/en/spec/jcr/2.0/7_Export.html#7.3%20Document%20View)
 the binary support in FileVault DocView uses the default conversion from 
String to UTF-8 byte array encoding 
(https://docs.adobe.com/content/docs/en/spec/jcr/2.0/3_Repository_Model.html#3.6.4.1%20From%20STRING%20To)
 which does not allow arbitrary binary strings in properties.

This difference is currently not explained in  
https://jackrabbit.apache.org/filevault/docview.html.


> Clarify binary properties in FileVault DocView
> --
>
> Key: JCRVLT-560
> URL: https://issues.apache.org/jira/browse/JCRVLT-560
> Project: Jackrabbit FileVault
>  Issue Type: Bug
>Reporter: Konrad Windszus
>Priority: Major
> Fix For: 3.5.4
>
>
> In contrast to JCR 2.0 DocView which states
> bq. If P is a BINARY property its value is Base64 encoded. The resulting 
> string becomes the value of the XML attribute P.
> (https://docs.adobe.com/content/docs/en/spec/jcr/2.0/7_Export.html#7.3%20Document%20View)
>  the binary support in FileVault DocView uses the default conversion from 
> String to UTF-8 byte array encoding for multi-value properties in 
> https://github.com/apache/jackrabbit-filevault/blob/b8627b9548ff1335cc0e497797b701a02a966654/vault-core/src/main/java/org/apache/jackrabbit/vault/util/DocViewProperty.java#L500
>   
> (https://docs.adobe.com/content/docs/en/spec/jcr/2.0/3_Repository_Model.html#3.6.4.1%20From%20STRING%20To)
>  or only binary references for single values: 
> https://github.com/apache/jackrabbit-filevault/blob/b8627b9548ff1335cc0e497797b701a02a966654/vault-core/src/main/java/org/apache/jackrabbit/vault/util/DocViewProperty.java#L519.
> This difference is currently not explained in 
> https://jackrabbit.apache.org/filevault/docview.html and the handling is 
> inconsistent between single- and multi-value.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (JCRVLT-560) Clarify binary properties in FileVault DocView

2021-09-19 Thread Konrad Windszus (Jira)
Konrad Windszus created JCRVLT-560:
--

 Summary: Clarify binary properties in FileVault DocView
 Key: JCRVLT-560
 URL: https://issues.apache.org/jira/browse/JCRVLT-560
 Project: Jackrabbit FileVault
  Issue Type: Bug
Reporter: Konrad Windszus
 Fix For: 3.5.4


In contrast to JCR 2.0 DocView which states
bq. If P is a BINARY property its value is Base64 encoded. The resulting string 
becomes the value of the XML attribute P.
(https://docs.adobe.com/content/docs/en/spec/jcr/2.0/7_Export.html#7.3%20Document%20View)
 the binary support in FileVault DocView uses the default conversion from 
String to UTF-8 byte array encoding 
(https://docs.adobe.com/content/docs/en/spec/jcr/2.0/3_Repository_Model.html#3.6.4.1%20From%20STRING%20To)
 which does not allow arbitrary binary strings in properties.

This difference is currently not explained in  
https://jackrabbit.apache.org/filevault/docview.html.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)