Issue Details (XML | Word | Printable)

Key: CMIS-87
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Ethan Gur-esh
Reporter: David Caruana
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OASIS Content Management Interoperability Services (CMIS) TC

Type Id vs Query Name confusion

Created: 03/Mar/09 11:24 AM   Updated: 04/Jan/10 11:30 PM
Component/s: Domain Model, REST/AtomPub Binding
Affects Version/s: Draft 0.50
Fix Version/s: Draft 0.62

Proposal:
Part I...

1) 2.7.2.1 Attributes common to all Object-Type Definitions
a) keep type name
b) remove baseType
c) add baseTypeName; whose value is one of Document, Folder, Relationship, Policy
d) remove baseTypeQueryName
e) rename parentId to parentTypeId
e) remove id from type


 Description  « Hide
The definition of type ids and query names is disjoint between part I and part II of the spec.


As I understand there are six concepts:


- ObjectTypeId (value is repo specific)
- ParentTypeId
- BaseObjectTypeId


- ObjectTypeQueryName (spec defines values for root types e.g. Document, Folder, ...)
- ParentTypeQueryName
- BaseTypeQueryName


However, part I of the spec does not define properties for all above even though part II defines a serialization mapping for them e.g. base type id.


I would like to see the spec (Part I) also define well known ObjectTypeId values for root types. This would then allow Object Type Definition to support following attributes:


- ObjectTypeId
- ParentTypeId
- BaseTypeId
- TypeQueryName


And Base Object Type to support the following properties


- ObjectTypeId
- BaseTypeId


Part 2 is then a direct serialization of above. This means Query Name must be retrieved via Type Definition (I think that's ok, as it's generally used to drive query builders). However cmis:object provides its actual type id and a known base type id that can be switched on by a client (e.g. split between item and container) without requiring retrieval of Type Definition (a common use case).

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
David Caruana added a comment - 31/Mar/09 06:19 PM
Correction to above: v0.6 has introduced constants for the Object Type Definition attribute named 'baseType'.

I'd like to propose the following changes...

Part I...

1) 2.7.2.1 Attributes common to all Object-Type Definitions
a) typeId value no longer repository specific. Instead is one of Document, Folder, Relationship, Policy
b) remove baseType
c) add baseTypeId; type ID whose value is one of Document, Folder, Relationship, Policy
d) remove baseTypeQueryName
e) rename parentId to parentTypeId

This gives us:
- three IDs for all Object Type Definitions; typeId, parentTypeId & baseTypeId
- one Query Name for all Object Type Definitions; queryName

2) 2.7.4.1.2, 2.7.4.2.2, 2.7.4.3.2, 2.7.4.4.2 Object-Type Property Definitions
a) add BaseTypeId; type ID whose value is the type id of base type i.e. one of Document, Folder, Relationship, Policy

This gives us:
- two type ID properties for all object instances; ObjectTypeId, BaseTypeId

Part II: AtomPub and SOAP bindings

a) No special treatment is given to base type. The ObjectTypeId and BaseTypeId properties are represented as any other property i.e. mapped to cmis:property/cmis:value.

Florent Guillaume added a comment - 08/Apr/09 11:15 AM
I like David's proposal, it's clean and orthogonal.


Al Brown added a comment - 14/Apr/09 01:00 PM
I'd also remove type.name since we have type.display name. That way we have typeId and DisplayName. We should also see how this works with namespace.

Also, this proposal can be done with name instead of id.

Al Brown added a comment - 15/Apr/09 12:24 PM
(copy from email to list) - suggestion:

a) remove typeId, baseType, baseTypeQueryName from type
b) remove baseType
c) add baseTypeName; whose value is one of the defined cmis base types (cmis:Document)
d) rename parentId to parentTypeName
e) add globalUniqueName to property and type definition:
This attribute contains a a globally unique name either in namespace format or Clark format which uniquely identifies this type or property.
f) remove id, package from property definition
g) clarify name may contain prefixes utilizing ':'
h) clarify all cmis defined types and properties utilizes cmis prefix
g) extend query grammar to support multiple prefixes:
<prefixedidentifier> ::= [ ( <prefixedidentifier> | <identifier> ) ":" ] <identifier>

<identifier> ::= !! As defined by SQL-92 grammar.


This leaves on type definition:
- name, globalUniqueName, baseTypeName

property definition:
- name, globalUniqueName

Al Brown added a comment - 08/Jun/09 12:30 PM
Changed to swap id & name:

was: Part I...

1) 2.7.2.1 Attributes common to all Object-Type Definitions
a) typeId value no longer repository specific. Instead is one of Document, Folder, Relationship, Policy
b) remove baseType
c) add baseTypeId; type ID whose value is one of Document, Folder, Relationship, Policy
d) remove baseTypeQueryName
e) rename parentId to parentTypeId
e) remove name from type

Al Brown added a comment - 08/Jun/09 12:34 PM
Accepted by TC

Al Brown added a comment - 08/Jun/09 01:31 PM
accepted

Al Brown added a comment - 16/Jun/09 12:27 PM
During editing, changed name of attribute baseTypeId to baseTypeName since typeids are gone now.

Al Brown added a comment - 07/Jul/09 01:39 PM
refined by #317

Al Brown added a comment - 04/Jan/10 11:30 PM
JIRA Cleanup