@Override
	public Category copyCategory(Category category, DataTypeConflictHandler handler,
			TaskMonitor monitor) {
		// TODO: source archive handling is not documented
		boolean isInSameArchive = (mgr == category.getDataTypeManager());
		mgr.lock.acquire();
		try {
			checkDeleted();
			Category cat = createCategory(category.getName());
			Category[] cats = category.getCategories();
			for (Category cat2 : cats) {
				if (monitor.isCancelled()) {
					return cat;
				}
				cat.copyCategory(cat2, handler, monitor);
			}
			DataType[] dts = category.getDataTypes();
			for (DataType dt : dts) {
				if (monitor.isCancelled()) {
					break;
				}
				DataType newDataType = isInSameArchive ? dt.copy(mgr) : dt.clone(mgr);
				cat.addDataType(newDataType, handler);
			}
			return cat;
		}
		catch (InvalidNameException e) {
			// can't happen--already had a valid name
		}
		finally {
			mgr.lock.release();
		}
		return null;
	}
@see ghidra.program.model.data.Category#copyCategory(ghidra.program.model.data.Category, ghidra.program.model.data.DataTypeConflictHandler, ghidra.util.task.TaskMonitor)
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/data/CategoryDB.java