code: protected boolean isLocked( EditableDocument doc ) {
          return hasProperty(doc, JcrLexicon.LOCK_OWNER) || hasProperty(doc, JcrLexicon.LOCK_IS_DEEP);
      }
docs: Checks if the given document is already locked
  
  @param doc the document
  @return true if the change was made successfully, or false otherwise