Delete a named model of a Dataset

@param graphUri
516127
@Override
    public void deleteGraph(URI graphUri) {

        if (graphUri == null || !this.canBeModified())
            return;

        // Use HTTP protocol if possible
        if (this.sparqlServiceEndpoint != null) {
            this.datasetAccessor.deleteModel(graphUri.toASCIIString());
        } else {
            deleteGraphSparqlUpdate(graphUri);
        }

        log.debug("Graph deleted: {}", graphUri.toASCIIString());
    }
1234714
def deleteMapTable(self, name, session):
        

        duplicate_map_tables = session.query(MapTable).filter(MapTable.mapTableFile == self).filter(MapTable.name == name).all()
        for duplicate_map_table in duplicate_map_tables:
            if duplicate_map_table.indexMap:
                session.delete(duplicate_map_table.indexMap)
            session.delete(duplicate_map_table)
            session.commit()
141048
public void removeFilterModel(final FilterModel model) {
		if (model.getUrlPatterns() != null) {
			try {
				deassociateBundle(model.getContextModel().getVirtualHosts(), model.getContextModel().getBundle());
				filterLock.writeLock().lock();
				for (String virtualHost:resolveVirtualHosts(model)) {
					for (String urlPattern : model.getUrlPatterns()) {
							String fullPath = getFullPath(model.getContextModel(), urlPattern);
							Set<UrlPattern> urlSet = filterUrlPatterns.get(virtualHost).get(fullPath);
							UrlPattern toDelete = null;
							for (UrlPattern pattern : urlSet) {
									FilterModel filterModel = (FilterModel) pattern.getModel();
									Class<?> filter = filterModel.getFilterClass();
									Class<?> matchFilter = model.getFilterClass();
									if (filter != null && filter.equals(matchFilter)) {
											toDelete = pattern;
											break;
									}
							}
							urlSet.remove(toDelete);
					}
				}
			} finally {
				filterLock.writeLock().unlock();
			}
		}
	}
87577
public void deleteEntities(Collection<AtlasVertex> instanceVertices) throws AtlasBaseException {
        RequestContextV1 requestContext = RequestContextV1.get();

        Set<AtlasVertex> deletionCandidateVertices = new HashSet<>();

        for (AtlasVertex instanceVertex : instanceVertices) {
            String              guid = AtlasGraphUtilsV1.getIdFromVertex(instanceVertex);
            AtlasEntity.Status state = AtlasGraphUtilsV1.getState(instanceVertex);

            if (state == AtlasEntity.Status.DELETED) {
                LOG.debug("Skipping deletion of {} as it is already deleted", guid);
                continue;
            }

            String typeName = AtlasGraphUtilsV1.getTypeName(instanceVertex);
            AtlasObjectId objId = new AtlasObjectId(guid, typeName);

            if (requestContext.getDeletedEntityIds().contains(objId)) {
                LOG.debug("Skipping deletion of {} as it is already deleted", guid);
                continue;
            }

            // Get GUIDs and vertices for all deletion candidates.
            Set<GraphHelper.VertexInfo> compositeVertices = getOwnedVertices(instanceVertex);

            // Record all deletion candidate GUIDs in RequestContext
            // and gather deletion candidate vertices.
            for (GraphHelper.VertexInfo vertexInfo : compositeVertices) {
                requestContext.recordEntityDelete(new AtlasObjectId(vertexInfo.getGuid(), vertexInfo.getTypeName()));
                deletionCandidateVertices.add(vertexInfo.getVertex());
            }
        }

        // Delete traits and vertices.
        for (AtlasVertex deletionCandidateVertex : deletionCandidateVertices) {
            deleteAllTraits(deletionCandidateVertex);
            deleteTypeVertex(deletionCandidateVertex, false);
        }
    }
189724
void delete() {
        StringBuilder sql = new StringBuilder();
        sql.append("DROP SCHEMA ");
        sql.append(this.sqlgGraph.getSqlDialect().maybeWrapInQoutes(this.name));
        if (this.sqlgGraph.getSqlDialect().supportsCascade()) {
            sql.append(" CASCADE");
        }
        if (this.sqlgGraph.getSqlDialect().needsSemicolon()) {
            sql.append(";");
        }
        if (logger.isDebugEnabled()) {
            logger.debug(sql.toString());
        }
        Connection conn = this.sqlgGraph.tx().getConnection();
        try (Statement stmt = conn.createStatement()) {
            stmt.execute(sql.toString());
        } catch (SQLException e) {
            logger.error("schema deletion failed " + this.sqlgGraph.toString(), e);
            throw new RuntimeException(e);
        }
    }
1253936
def delete(self, model_name):
    
    full_name = model_name
    if not model_name.startswith('projects/'):
      full_name = ('projects/%s/models/%s' % (self._project_id, model_name))
    response = self._api.projects().models().delete(name=full_name).execute()
    if 'name' not in response:
      raise Exception('Invalid response from service. "name" is not found.')
    _util.wait_for_long_running_operation(response['name'])
545079
public <S extends Model> int deleteByModel(S model) {
        this.beforeCheck();
        String       sql             = this.buildDeleteSQL(model);
        List<Object> columnValueList = AnimaUtils.toColumnValues(model, false);
        return this.execute(sql, columnValueList);
    }
729041
function(model, options) {
      delete this._byId[model.cid];
      var id = this.modelId(model.attributes);
      if (id != null) delete this._byId[id];
      if (this === model.collection) delete model.collection;
      model.off('all', this._onModelEvent, this);
    }
277381
def delete_model(client, model_id):
    """"""

    # [START bigquery_delete_model]
    from google.cloud import bigquery

    # TODO(developer): Construct a BigQuery client object.
    # client = bigquery.Client()

    # TODO(developer): Set model_id to the ID of the model to fetch.
    # model_id = 'your-project.your_dataset.your_model'

    client.delete_model(model_id)
    print("Deleted model '{}'.".format(model_id))
1257981
protected boolean deleteModel(MODEL_ID id, boolean permanent) throws Exception {
        if (permanent) {
            server.deletePermanent(modelType, id);
        } else {
            server.delete(modelType, id);
        }
        return permanent;
    }
1273428
def delete(self, table_name):
        
        dataset = Dataset(self, table_name)
        deleted = dataset.delete()
        if deleted:
            return deleted

        raise CartoException('''The table `{}` doesn't exist'''.format(table_name))
771751
public boolean deleteDatasetFromId(String projectId, String datasetName) {
    // [START bigquery_delete_dataset]
    DatasetId datasetId = DatasetId.of(projectId, datasetName);
    boolean deleted = bigquery.delete(datasetId, DatasetDeleteOption.deleteContents());
    if (deleted) {
      // the dataset was deleted
    } else {
      // the dataset was not found
    }
    // [END bigquery_delete_dataset]
    return deleted;
  }
502358
def removeFeatureSet(self):
        
        self._openRepo()
        dataset = self._repo.getDatasetByName(self._args.datasetName)
        featureSet = dataset.getFeatureSetByName(self._args.featureSetName)

        def func():
            self._updateRepo(self._repo.removeFeatureSet, featureSet)
        self._confirmDelete("FeatureSet", featureSet.getLocalId(), func)
832342
private void deleteAllTraits(AtlasVertex instanceVertex) throws AtlasBaseException {
        List<String> traitNames = GraphHelper.getTraitNames(instanceVertex);
        LOG.debug("Deleting traits {} for {}", traitNames, string(instanceVertex));
        String typeName = GraphHelper.getTypeName(instanceVertex);

        for (String traitNameToBeDeleted : traitNames) {
            String relationshipLabel = GraphHelper.getTraitLabel(typeName, traitNameToBeDeleted);
            deleteEdgeReference(instanceVertex, relationshipLabel, TypeCategory.CLASSIFICATION, false);
        }
    }
311667
public void deleteTrait(String guid, String traitName) throws AtlasServiceException {
        callAPIWithBodyAndParams(API.DELETE_TRAITS, null, guid, TRAITS, traitName);
    }
20012
def delete(self, using=None, soft=True, *args, **kwargs):
        
        if soft:
            self.is_removed = True
            self.save(using=using)
        else:
            return super(SoftDeletableModel, self).delete(using=using, *args, **kwargs)
345651
def delete(self, dataset_identifier, row_id=None, content_type="json"):
        '''
        
        '''
        if row_id:
            resource = _format_new_api_request(dataid=dataset_identifier, row_id=row_id,
                                               content_type=content_type)
        else:
            resource = _format_old_api_request(dataid=dataset_identifier,
                                               content_type=content_type)

        return self._perform_request("delete", resource)