static Map<String, String> getMetadata(FolderItem item) {
		if (!(item instanceof DatabaseItem databaseItem)) {
			return new HashMap<>();
		}
		ManagedBufferFile bf = null;
		DBHandle dbh = null;
		GenericDomainObjectDB genericDomainObj = null;
		try {
			bf = databaseItem.open();
			dbh = new DBHandle(bf);
			genericDomainObj = new GenericDomainObjectDB(dbh);
			return genericDomainObj.getMetadata();
		}
		catch (FileNotFoundException e) {
			// file has been deleted, just return an empty map.
		}
		catch (Field.UnsupportedFieldException e) {
			// file created with newer version of Ghidra
		}
		catch (IOException e) {
			Msg.error(GhidraFileData.class, "Read meta-data error", e);
		}
		finally {
			if (genericDomainObj != null) {
				genericDomainObj.release();
			}
			if (dbh != null) {
				dbh.close();
			}
			if (bf != null) {
				bf.dispose();
			}
		}
		return new HashMap<>();
	}
Returns an ordered map containing the metadata stored within a specific {@link FolderItem}
database. The map contains key,value pairs and are ordered by their insertion order. 
@param item folder item whose metadata should be read
@return a map containing the metadata that has been associated with the corresponding domain 
object.  Map will be empty for a non-database item.
Ghidra/Framework/Project/src/main/java/ghidra/framework/data/GhidraFileData.java