It is quite possible that you may require access to a large number of elements, and as only one person may edit an element at a time, you do not want to be concerned with fighting for access with another member of your team. Element locking allows you to guarantee access for yourself, while denying edit priviliges to other team members.
When, for example, a class is locked, no one else may change the class's name, add an association to it, remove an attribute, or delete a state in that class's state diagram. Other users are not even allowed to select a locked element - looking at it as it appears in the diagram must suffice. Additionally, no one else may lock an element that is inside your locked namespace, and likewise you can't lock a namespace that already contains locked elements.
By default, autolocking is activated for the elements you select. This means, when you select an element, it tries to aquire a a temporary lock (which behaves like a normal one). If this is not possible (because of elements locked inside that element) no warning is issued. When you deselect the element, the lock is removed automatically. Autolocking is used to prevent conflicts as early as possible - as mentioned before, a locked element can't even be selected by other users, let alone edited. Autolocking is very useful in most settings, but it can be a hard restriction too. For example, when you select a class, then other users will not even be able to align states that reside in that classes state-diagram. You can deactivate auto-locking in the settings dialog. Note that auto-locking does NOT apply for the model - you can select the model in the tree, and you can lock it by hand, but it will not be locked automatically. Locking is only possible if nothing else inside the namespace is locked (e.g. by another auto-lock), so it is very unlikely that you'd get the model-lock without consulting your co-workers first. And even if you got the models lock, your coworkers might get a bit upset when they notice that they cannot continue working - while you selected the model just to create a few stereotypes. Any element with an autolock will appear to the owner with a green lock and clock icon.
All others will see a red lock. These locks are automatically released when you select a different element.
Namespaces may also be locked manually to reserve certain elements. These must be specifically set and unset while working on the model. To lock a namespace manually, first select the namespace and then press the 'lock' icon in the toolbar. From that point forward, the element will be marked for the lock owner by a green lock in the upper left corner of that element, while all other users will see a red lock.
Elements that are contained within a locked namespace are automatically locked too, so they also get marked. To make it possible to tell the locked and the implicitly locked elements apart, the inner elements get a transparent lock. If you don't want to see the lock-symbols, you can turn them off in the settings window.
Please remember that not all elements are namespaces. Comments are not namespaces, so it is not possible to lock them one by one at the moment.
The java-import will need access to most parts of the model. To prevent lots of conflicts with your coworkers during import (which would result in a complete rollback of the import), you have to lock the complete model for yourself before you can start importing. Tell your co-workers to unlock and deselect everything, acquire the lock on the model, perform the import, and remove the lock again.