agave-metadata/metadata-core/src/main/java/org/iplantc/service/metadata/dao/MetadataDao.java
/**
     * Stores the provided {@link MetadataItem} in the mongo collection
     *
     * @param metadataItem the {@link MetadataItem} to be inserted
     * @return the inserted {@link MetadataItem}
     * @throws MetadataStoreException when the insertion failed
     */
Stores the provided  MetadataItem in the mongo collection
@param metadataItem the  MetadataItem to be inserted
@return the inserted  MetadataItem
@throws MetadataStoreException when the insertion failed
Stores the provided MetadataItem in the mongo collection @param metadataItem the MetadataItem to be inserted @return the inserted MetadataItem @throws MetadataStoreException when the insertion failed
public MetadataItem insert(MetadataItem metadataItem) throws MetadataStoreException, MetadataException {
        if (metadataItem == null)
            throw new MetadataException("Cannot insert a null MetadataItem");
        MongoCollection<MetadataItem> metadataItemCollection;
        try {
            metadataItemCollection = getDefaultMetadataItemCollection();
            metadataItemCollection.insertOne(metadataItem);
            return metadataItem;
        } catch (MongoException e) {
            throw new MetadataStoreException("Failed to insert metadata item", e);
        }
    }
public MetadataItem insert ( MetadataItem metadataItem ) throws MetadataStoreException , MetadataException { if ( metadataItem == null ) throw new MetadataException ( "Cannot insert a null MetadataItem" ) ; MongoCollection < MetadataItem > metadataItemCollection ; try { metadataItemCollection = getDefaultMetadataItemCollection ( ) ; metadataItemCollection . insertOne ( metadataItem ) ; return metadataItem ; } catch ( MongoException e ) { throw new MetadataStoreException ( "Failed to insert metadata item" , e ) ; } }
Stores the provided {@link MetadataItem} in the mongo collection
 @param metadataItem the {@link MetadataItem} to be inserted
 @return the inserted {@link MetadataItem}
 @throws MetadataStoreException when the insertion failed
Stores the provided { @link MetadataItem } in the mongo collection @param metadataItem the { @link MetadataItem } to be inserted @return the inserted { @link MetadataItem } @throws MetadataStoreException when the insertion failed
//using POJO Codec