Removing an item in Java™ classes
Use either remove in Item or removeItem in Document to remove an item from a document. The remove method removes only the current object -- other items with the same name remain in existence. The removeItem method removes all items with the specified name. To permanently remove an item even if soft deletions are enabled, use removePermanently.
After removing an item, you must call save for the Document object that contained the item or the update is lost when the program exits.