agave-metadata/metadata-core/src/main/java/org/iplantc/service/metadata/dao/MetadataSchemaDao.java
/**
     * Stores the provided {@link MetadataSchemaItem} in the mongo collection
     * @param metadataSchema the {@link MetadataSchemaItem} to be inserted
     * @return the inserted {@link MetadataSchemaItem}
     * @throws MetadataStoreException when the insertion failed
     */
Stores the provided  MetadataSchemaItem in the mongo collection
@param metadataSchema the  MetadataSchemaItem to be inserted
@return the inserted  MetadataSchemaItem
@throws MetadataStoreException when the insertion failed
Stores the provided MetadataSchemaItem in the mongo collection @param metadataSchema the MetadataSchemaItem to be inserted @return the inserted MetadataSchemaItem @throws MetadataStoreException when the insertion failed
public MetadataSchemaItem insert(MetadataSchemaItem metadataSchema) throws MetadataStoreException {
        MongoCollection collection;
        try {
            collection = getDefaultCollection();
            collection.insertOne(Document.parse(mapper.writeValueAsString(metadataSchema)));
            return metadataSchema;
        } catch (UnknownHostException| JsonProcessingException e) {
            throw new MetadataStoreException("Failed to insert metadata item", e);
        }
    }
public MetadataSchemaItem insert ( MetadataSchemaItem metadataSchema ) throws MetadataStoreException { MongoCollection collection ; try { collection = getDefaultCollection ( ) ; collection . insertOne ( Document . parse ( mapper . writeValueAsString ( metadataSchema ) ) ) ; return metadataSchema ; } catch ( UnknownHostException | JsonProcessingException e ) { throw new MetadataStoreException ( "Failed to insert metadata item" , e ) ; } }
Stores the provided {@link MetadataSchemaItem} in the mongo collection
 @param metadataSchema the {@link MetadataSchemaItem} to be inserted
 @return the inserted {@link MetadataSchemaItem}
 @throws MetadataStoreException when the insertion failed
Stores the provided { @link MetadataSchemaItem } in the mongo collection @param metadataSchema the { @link MetadataSchemaItem } to be inserted @return the inserted { @link MetadataSchemaItem } @throws MetadataStoreException when the insertion failed