agave-metadata/metadata-core/src/main/java/org/iplantc/service/metadata/dao/MetadataSchemaDao.java
/**
     * Find the Metadata Schema based on the provided query in the mongo collection
     * @param query the {@link Bson} query to search the collection with
     * @return Document matching the {@link MetadataSchemaItem} found
     * @throws MetadataStoreException if unable to find the {@link MetadataSchemaItem}
     */
Find the Metadata Schema based on the provided query in the mongo collection
@param query the  Bson query to search the collection with
@return Document matching the  MetadataSchemaItem found
@throws MetadataStoreException if unable to find the  MetadataSchemaItem
Find the Metadata Schema based on the provided query in the mongo collection @param query the Bson query to search the collection with @return Document matching the MetadataSchemaItem found @throws MetadataStoreException if unable to find the MetadataSchemaItem
public Document findOne(Bson query) throws MetadataStoreException {
        MongoCollection collection;
        try {
            collection = getDefaultCollection();
            return (Document) collection.find(query).first();
        } catch (UnknownHostException | NullPointerException e ) {
            throw new MetadataStoreException("Failed to find metadata schema item", e);
        }
    }
public Document findOne ( Bson query ) throws MetadataStoreException { MongoCollection collection ; try { collection = getDefaultCollection ( ) ; return ( Document ) collection . find ( query ) . first ( ) ; } catch ( UnknownHostException | NullPointerException e ) { throw new MetadataStoreException ( "Failed to find metadata schema item" , e ) ; } }
Find the Metadata Schema based on the provided query in the mongo collection
 @param query the {@link Bson} query to search the collection with
 @return Document matching the {@link MetadataSchemaItem} found
 @throws MetadataStoreException if unable to find the {@link MetadataSchemaItem}
Find the Metadata Schema based on the provided query in the mongo collection @param query the { @link Bson } query to search the collection with @return Document matching the { @link MetadataSchemaItem } found @throws MetadataStoreException if unable to find the { @link MetadataSchemaItem }