7.3.3 Respecting Property Semantics

During either system or document view import, elements (in system view) or attributes (in document view) may be encountered that correspond to properties with repository-level semantics. This includes, in particular, the properties that are defined in nt:base, mix:lockable, mix:referenceable or mix:versionable (that is properties such as jcr:primaryType, jcr:mixinTypes, jcr:uuid, jcr:lockIsDeep, and so forth).

When an element or attribute representing such a property is encountered, an implementation may either skip it or respect it.

To respect it means to import it and alter the internal state of the repository in accordance with the semantics of the property in the given implementation. For example, to respect jcr:primaryType means to attempt to create a node of the indicated primary node type. If the node type in question is not supported by the implementation, an exception is thrown (see 7.3.6 Workspace Import Methods for details).

To skip the element or attribute means not to import it all. It does not mean to import it but then ignore its semantic implications.

The implementation-specific policy regarding what to skip and what to respect must be internally consistent. For example, it makes no sense to skip jcr:mixinTypes (thus missing the presence of mix:lockable, for example) and yet respect jcr:lockOwner and jcr:lockIsDeep.

If an implementation chooses to skip jcr:primaryType, the node type of the imported node is determined by the implementation (see 7.3.4 Determining Node Types, immediately below).