@Override
	public synchronized DataTypeManager openArchive(DomainFile domainFile, TaskMonitor monitor)
			throws VersionException, CancelledException, IOException, DuplicateIdException {

		if (!DataTypeArchive.class.isAssignableFrom(domainFile.getDomainObjectClass())) {
			throw new IOException("Unable to open domain file: '%s', not a data type archive"
					.formatted(domainFile.getName()));
		}

		DataTypeManagerInfo dtmInfo = getOpenDTMInfo(domainFile);
		if (dtmInfo == null) {
			DataTypeArchive dta = openDomainFile(domainFile, monitor);
			DataTypeManager dtm = dta.getDataTypeManager();
			dtmInfo = addDTM(new DataTypeManagerInfo(null, dta, domainFile.getPathname(), dtm));
		}

		return dtmInfo.dtm;
	}
Simple, non-ui implementation of the {@link DataTypeArchiveService} interface.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/archive/DefaultDataTypeArchiveService.java