You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by "David Sanders (JIRA)" <ji...@apache.org> on 2011/06/09 23:21:58 UTC

[jira] [Created] (CMIS-386) OpenCMIS TCK should consider empty cmis:parentId element as a "not set" attribute for base type definition

OpenCMIS TCK should consider empty cmis:parentId element as a "not set" attribute for base type definition
----------------------------------------------------------------------------------------------------------

                 Key: CMIS-386
                 URL: https://issues.apache.org/jira/browse/CMIS-386
             Project: Chemistry
          Issue Type: Bug
          Components: opencmis-tck
    Affects Versions: OpenCMIS 0.4.0
            Reporter: David Sanders
            Priority: Minor


The OpenTCK expects a base type's cmis:parentId attribute to be null.  An empty element should also be accepted assuming that meets the spec's definition of "not set".  That is, both TypeDefinition.getParentTypeId() == null
and TypeDefiniton.getParentTypeId().length() == 0 should be accepted.

OpenCMIS TCK fails with
  FAILURE: Document type spec compliance. (AbstractCmisTest.java:114)
    FAILURE: Base type has parent type! (AbstractSessionTest.java:1357)

The IBM FileNet CMIS provider returns the following for cmis:document and cmis:folder:
      <cmis:parentId></cmis:parentId>

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CMIS-386) OpenCMIS TCK should consider empty cmis:parentId element as a "not set" attribute for base type definition

Posted by "Florian Müller (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CMIS-386?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Florian Müller updated CMIS-386:
--------------------------------

    Affects Version/s:     (was: OpenCMIS 0.4.0)
                       OpenCMIS 0.3.0
        Fix Version/s: OpenCMIS 0.4.0
             Assignee: Florian Müller

> OpenCMIS TCK should consider empty cmis:parentId element as a "not set" attribute for base type definition
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: CMIS-386
>                 URL: https://issues.apache.org/jira/browse/CMIS-386
>             Project: Chemistry
>          Issue Type: Bug
>          Components: opencmis-tck
>    Affects Versions: OpenCMIS 0.3.0
>            Reporter: David Sanders
>            Assignee: Florian Müller
>            Priority: Minor
>             Fix For: OpenCMIS 0.4.0
>
>
> The OpenTCK expects a base type's cmis:parentId attribute to be null.  An empty element should also be accepted assuming that meets the spec's definition of "not set".  That is, both TypeDefinition.getParentTypeId() == null
> and TypeDefiniton.getParentTypeId().length() == 0 should be accepted.
> OpenCMIS TCK fails with
>   FAILURE: Document type spec compliance. (AbstractCmisTest.java:114)
>     FAILURE: Base type has parent type! (AbstractSessionTest.java:1357)
> The IBM FileNet CMIS provider returns the following for cmis:document and cmis:folder:
>       <cmis:parentId></cmis:parentId>

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (CMIS-386) OpenCMIS TCK should consider empty cmis:parentId element as a "not set" attribute for base type definition

Posted by "Florian Müller (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CMIS-386?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Florian Müller resolved CMIS-386.
---------------------------------

    Resolution: Fixed

It's ambiguous in spec. I have changed the TCK to accept an empty string.

> OpenCMIS TCK should consider empty cmis:parentId element as a "not set" attribute for base type definition
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: CMIS-386
>                 URL: https://issues.apache.org/jira/browse/CMIS-386
>             Project: Chemistry
>          Issue Type: Bug
>          Components: opencmis-tck
>    Affects Versions: OpenCMIS 0.3.0
>            Reporter: David Sanders
>            Assignee: Florian Müller
>            Priority: Minor
>             Fix For: OpenCMIS 0.4.0
>
>
> The OpenTCK expects a base type's cmis:parentId attribute to be null.  An empty element should also be accepted assuming that meets the spec's definition of "not set".  That is, both TypeDefinition.getParentTypeId() == null
> and TypeDefiniton.getParentTypeId().length() == 0 should be accepted.
> OpenCMIS TCK fails with
>   FAILURE: Document type spec compliance. (AbstractCmisTest.java:114)
>     FAILURE: Base type has parent type! (AbstractSessionTest.java:1357)
> The IBM FileNet CMIS provider returns the following for cmis:document and cmis:folder:
>       <cmis:parentId></cmis:parentId>

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (CMIS-386) OpenCMIS TCK should consider empty cmis:parentId element as a "not set" attribute for base type definition

Posted by "jay brown (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CMIS-386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13047302#comment-13047302 ] 

jay brown commented on CMIS-386:
--------------------------------

I completely agree that based on the schema it is valid for the property to be completely absent.   The point is that having the element present-but-empty is an equally valid (and accepted) method for expressing 'not set'.  So what we are suggesting is that the TCK  not fail for either of the valid responses.  As opposed to what it does today which is fail if the element is present but not-set (which is also correct).  

> OpenCMIS TCK should consider empty cmis:parentId element as a "not set" attribute for base type definition
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: CMIS-386
>                 URL: https://issues.apache.org/jira/browse/CMIS-386
>             Project: Chemistry
>          Issue Type: Bug
>          Components: opencmis-tck
>    Affects Versions: OpenCMIS 0.4.0
>            Reporter: David Sanders
>            Priority: Minor
>
> The OpenTCK expects a base type's cmis:parentId attribute to be null.  An empty element should also be accepted assuming that meets the spec's definition of "not set".  That is, both TypeDefinition.getParentTypeId() == null
> and TypeDefiniton.getParentTypeId().length() == 0 should be accepted.
> OpenCMIS TCK fails with
>   FAILURE: Document type spec compliance. (AbstractCmisTest.java:114)
>     FAILURE: Base type has parent type! (AbstractSessionTest.java:1357)
> The IBM FileNet CMIS provider returns the following for cmis:document and cmis:folder:
>       <cmis:parentId></cmis:parentId>

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CMIS-386) OpenCMIS TCK should consider empty cmis:parentId element as a "not set" attribute for base type definition

Posted by "Florian Müller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CMIS-386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13053762#comment-13053762 ] 

Florian Müller commented on CMIS-386:
-------------------------------------

Another look at the CMIS schema revealed this:

{code:xml} 
<xs:element name="parentId" type="xs:string" minOccurs="0" maxOccurs="1">
  <xs:annotation>
    <xs:documentation>
      This is the id for the parent type definition. If this is a base type, this is not present.
    </xs:documentation>
  </xs:annotation>
</xs:element>
{code}

I'm not going to revert the code changes to keep it interoperable, but the intention of the spec is that this tag should be absent for base types rather than empty.

> OpenCMIS TCK should consider empty cmis:parentId element as a "not set" attribute for base type definition
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: CMIS-386
>                 URL: https://issues.apache.org/jira/browse/CMIS-386
>             Project: Chemistry
>          Issue Type: Bug
>          Components: opencmis-tck
>    Affects Versions: OpenCMIS 0.3.0
>            Reporter: David Sanders
>            Assignee: Florian Müller
>            Priority: Minor
>             Fix For: OpenCMIS 0.4.0
>
>
> The OpenTCK expects a base type's cmis:parentId attribute to be null.  An empty element should also be accepted assuming that meets the spec's definition of "not set".  That is, both TypeDefinition.getParentTypeId() == null
> and TypeDefiniton.getParentTypeId().length() == 0 should be accepted.
> OpenCMIS TCK fails with
>   FAILURE: Document type spec compliance. (AbstractCmisTest.java:114)
>     FAILURE: Base type has parent type! (AbstractSessionTest.java:1357)
> The IBM FileNet CMIS provider returns the following for cmis:document and cmis:folder:
>       <cmis:parentId></cmis:parentId>

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (CMIS-386) OpenCMIS TCK should consider empty cmis:parentId element as a "not set" attribute for base type definition

Posted by "jay brown (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CMIS-386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13053954#comment-13053954 ] 

jay brown commented on CMIS-386:
--------------------------------

Good catch.  Though the spec could still be more specific here.   For example if the sentence said either 

  If this is a base type, this value is not present.
  or 
  If this is a base type, this element is not present.

But since it does not, then 'this' would be interpreted to mean this xs:element.  
We will look into changing our implementation eventually then, but we need to make sure this does not break any of our internal clients.  :)  
I agree that the client should continue to permit both interpretations for maximum compatibility. 

> OpenCMIS TCK should consider empty cmis:parentId element as a "not set" attribute for base type definition
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: CMIS-386
>                 URL: https://issues.apache.org/jira/browse/CMIS-386
>             Project: Chemistry
>          Issue Type: Bug
>          Components: opencmis-tck
>    Affects Versions: OpenCMIS 0.3.0
>            Reporter: David Sanders
>            Assignee: Florian Müller
>            Priority: Minor
>             Fix For: OpenCMIS 0.4.0
>
>
> The OpenTCK expects a base type's cmis:parentId attribute to be null.  An empty element should also be accepted assuming that meets the spec's definition of "not set".  That is, both TypeDefinition.getParentTypeId() == null
> and TypeDefiniton.getParentTypeId().length() == 0 should be accepted.
> OpenCMIS TCK fails with
>   FAILURE: Document type spec compliance. (AbstractCmisTest.java:114)
>     FAILURE: Base type has parent type! (AbstractSessionTest.java:1357)
> The IBM FileNet CMIS provider returns the following for cmis:document and cmis:folder:
>       <cmis:parentId></cmis:parentId>

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (CMIS-386) OpenCMIS TCK should consider empty cmis:parentId element as a "not set" attribute for base type definition

Posted by "Florent Guillaume (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CMIS-386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13053791#comment-13053791 ] 

Florent Guillaume commented on CMIS-386:
----------------------------------------

Agreed, this issue should be considered a workaround for buggy servers.

> OpenCMIS TCK should consider empty cmis:parentId element as a "not set" attribute for base type definition
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: CMIS-386
>                 URL: https://issues.apache.org/jira/browse/CMIS-386
>             Project: Chemistry
>          Issue Type: Bug
>          Components: opencmis-tck
>    Affects Versions: OpenCMIS 0.3.0
>            Reporter: David Sanders
>            Assignee: Florian Müller
>            Priority: Minor
>             Fix For: OpenCMIS 0.4.0
>
>
> The OpenTCK expects a base type's cmis:parentId attribute to be null.  An empty element should also be accepted assuming that meets the spec's definition of "not set".  That is, both TypeDefinition.getParentTypeId() == null
> and TypeDefiniton.getParentTypeId().length() == 0 should be accepted.
> OpenCMIS TCK fails with
>   FAILURE: Document type spec compliance. (AbstractCmisTest.java:114)
>     FAILURE: Base type has parent type! (AbstractSessionTest.java:1357)
> The IBM FileNet CMIS provider returns the following for cmis:document and cmis:folder:
>       <cmis:parentId></cmis:parentId>

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (CMIS-386) OpenCMIS TCK should consider empty cmis:parentId element as a "not set" attribute for base type definition

Posted by "Florent Guillaume (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CMIS-386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13048574#comment-13048574 ] 

Florent Guillaume commented on CMIS-386:
----------------------------------------

Shouldn't we also change some of the OpenCMIS code to translate empty strings into null at the library level, so that all clients don't have to use the same workarounds, and just check for null?

> OpenCMIS TCK should consider empty cmis:parentId element as a "not set" attribute for base type definition
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: CMIS-386
>                 URL: https://issues.apache.org/jira/browse/CMIS-386
>             Project: Chemistry
>          Issue Type: Bug
>          Components: opencmis-tck
>    Affects Versions: OpenCMIS 0.3.0
>            Reporter: David Sanders
>            Assignee: Florian Müller
>            Priority: Minor
>             Fix For: OpenCMIS 0.4.0
>
>
> The OpenTCK expects a base type's cmis:parentId attribute to be null.  An empty element should also be accepted assuming that meets the spec's definition of "not set".  That is, both TypeDefinition.getParentTypeId() == null
> and TypeDefiniton.getParentTypeId().length() == 0 should be accepted.
> OpenCMIS TCK fails with
>   FAILURE: Document type spec compliance. (AbstractCmisTest.java:114)
>     FAILURE: Base type has parent type! (AbstractSessionTest.java:1357)
> The IBM FileNet CMIS provider returns the following for cmis:document and cmis:folder:
>       <cmis:parentId></cmis:parentId>

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (CMIS-386) OpenCMIS TCK should consider empty cmis:parentId element as a "not set" attribute for base type definition

Posted by "Florian Müller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CMIS-386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13048730#comment-13048730 ] 

Florian Müller commented on CMIS-386:
-------------------------------------

Good point. Fixed.

> OpenCMIS TCK should consider empty cmis:parentId element as a "not set" attribute for base type definition
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: CMIS-386
>                 URL: https://issues.apache.org/jira/browse/CMIS-386
>             Project: Chemistry
>          Issue Type: Bug
>          Components: opencmis-tck
>    Affects Versions: OpenCMIS 0.3.0
>            Reporter: David Sanders
>            Assignee: Florian Müller
>            Priority: Minor
>             Fix For: OpenCMIS 0.4.0
>
>
> The OpenTCK expects a base type's cmis:parentId attribute to be null.  An empty element should also be accepted assuming that meets the spec's definition of "not set".  That is, both TypeDefinition.getParentTypeId() == null
> and TypeDefiniton.getParentTypeId().length() == 0 should be accepted.
> OpenCMIS TCK fails with
>   FAILURE: Document type spec compliance. (AbstractCmisTest.java:114)
>     FAILURE: Base type has parent type! (AbstractSessionTest.java:1357)
> The IBM FileNet CMIS provider returns the following for cmis:document and cmis:folder:
>       <cmis:parentId></cmis:parentId>

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (CMIS-386) OpenCMIS TCK should consider empty cmis:parentId element as a "not set" attribute for base type definition

Posted by "Florian Müller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CMIS-386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13047257#comment-13047257 ] 

Florian Müller commented on CMIS-386:
-------------------------------------

I think I had that this discussion with Jay before. There are different interpretations of "not-set". 
The parent id MUST NOT be set for base types and MUST be set for all other types.

The XSD says this:
<xs:element name="parentId" type="xs:string" minOccurs="0" maxOccurs="1">
 
It explicitly defines 'minOccurs="0"' which can only be valid for base types. My conclusion is that "not-set" means "not existing" and an empty string is actually a value.

Therefore I'm a bit reluctant to change the TCK. Thoughts?


> OpenCMIS TCK should consider empty cmis:parentId element as a "not set" attribute for base type definition
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: CMIS-386
>                 URL: https://issues.apache.org/jira/browse/CMIS-386
>             Project: Chemistry
>          Issue Type: Bug
>          Components: opencmis-tck
>    Affects Versions: OpenCMIS 0.4.0
>            Reporter: David Sanders
>            Priority: Minor
>
> The OpenTCK expects a base type's cmis:parentId attribute to be null.  An empty element should also be accepted assuming that meets the spec's definition of "not set".  That is, both TypeDefinition.getParentTypeId() == null
> and TypeDefiniton.getParentTypeId().length() == 0 should be accepted.
> OpenCMIS TCK fails with
>   FAILURE: Document type spec compliance. (AbstractCmisTest.java:114)
>     FAILURE: Base type has parent type! (AbstractSessionTest.java:1357)
> The IBM FileNet CMIS provider returns the following for cmis:document and cmis:folder:
>       <cmis:parentId></cmis:parentId>

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira