private Document cmisObject( String id ) {
        CmisObject cmisObject;
        try {
             cmisObject   = session.getObject(id);
        } catch (CmisObjectNotFoundException e) {
            return null;
        }

        // object does not exist? return null
        if (cmisObject == null) {
            return null;
        }

        // converting CMIS object to JCR node
        switch (cmisObject.getBaseTypeId()) {
            case CMIS_FOLDER:
                return cmisFolder(cmisObject);
            case CMIS_DOCUMENT:
                return cmisDocument(cmisObject);
            case CMIS_POLICY:
            case CMIS_RELATIONSHIP:
            case CMIS_SECONDARY:
            case CMIS_ITEM:
        }

        // unexpected object type
        return null;
    }
private Document cmisObject ( String id ) { CmisObject cmisObject ; try { cmisObject = session . getObject ( id ) ; } catch ( CmisObjectNotFoundException e ) { return null ; } if ( cmisObject == null ) { return null ; } switch ( cmisObject . getBaseTypeId ( ) ) { case CMIS_FOLDER : return cmisFolder ( cmisObject ) ; case CMIS_DOCUMENT : return cmisDocument ( cmisObject ) ; case CMIS_POLICY : case CMIS_RELATIONSHIP : case CMIS_SECONDARY : case CMIS_ITEM : } return null ; }
Converts CMIS object to JCR node.

@param id the identifier of the CMIS object
@return JCR node document.