當前位置: 首頁>>代碼示例>>Java>>正文


Java Vertex.remove方法代碼示例

本文整理匯總了Java中com.tinkerpop.blueprints.Vertex.remove方法的典型用法代碼示例。如果您正苦於以下問題:Java Vertex.remove方法的具體用法?Java Vertex.remove怎麽用?Java Vertex.remove使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.tinkerpop.blueprints.Vertex的用法示例。


在下文中一共展示了Vertex.remove方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: deleteUser

import com.tinkerpop.blueprints.Vertex; //導入方法依賴的package包/類
public boolean deleteUser( String id ) {
	Graph graph = (Graph) connection.get();
	logger.debug("deleteUser: " + id );
	
	try {
		Vertex v = graph.getVertex( id );
		
		if( v== null ) throw new UserNotFoundException( id );
		
		v.remove();
		return true;
	}
	finally {
		graph.shutdown();
	}
}
 
開發者ID:maltesander,項目名稱:rest-jersey2-json-jwt-authentication,代碼行數:17,代碼來源:GremlinUserDAO.java

示例2: clear

import com.tinkerpop.blueprints.Vertex; //導入方法依賴的package包/類
@Override
public void clear() {
	if (log.isDebugEnabled()) {
		log.debug("Clearing graph");
	}

	OrientGraphNoTx tx2 = factory.getNoTx();
	tx2.declareIntent(new OIntentNoCache());
	try {
		for (Vertex vertex : tx2.getVertices()) {
			vertex.remove();
		}
	} finally {
		tx2.declareIntent(null);
		tx2.shutdown();
	}
	if (log.isDebugEnabled()) {
		log.debug("Cleared graph");
	}

}
 
開發者ID:gentics,項目名稱:mesh,代碼行數:22,代碼來源:OrientDBDatabase.java

示例3: migrateTags

import com.tinkerpop.blueprints.Vertex; //導入方法依賴的package包/類
/**
 * Tags no longer have a TagGraphFieldContainerImpl. The value is now stored directly in the tag vertex.
 * 
 * @param meshRoot
 */
private void migrateTags(Vertex meshRoot) {
	Vertex tagRoot = meshRoot.getVertices(Direction.OUT, "HAS_TAG_ROOT").iterator().next();
	for (Vertex tag : tagRoot.getVertices(Direction.OUT, "HAS_TAG")) {
		Iterator<Vertex> tagFieldIterator = tag.getVertices(Direction.OUT, "HAS_FIELD_CONTAINER").iterator();
		Vertex tagFieldContainer = tagFieldIterator.next();
		if (tagFieldIterator.hasNext()) {
			fail("The tag with uuid {" + tag.getProperty("uuid") + "} got more then one field container.");
		}
		// Load the tag value from the field container and store it directly into the tag. Remove the now no longer needed field container from the graph.
		String tagValue = tagFieldContainer.getProperty("name");
		tag.setProperty("tagValue", tagValue);
		tagFieldContainer.remove();

		// Check editor /creator
		getOrFixUserReference(tag, "HAS_EDITOR");
		getOrFixUserReference(tag, "HAS_CREATOR");
	}
}
 
開發者ID:gentics,項目名稱:mesh,代碼行數:24,代碼來源:ChangeAddVersioning.java

示例4: apply

import com.tinkerpop.blueprints.Vertex; //導入方法依賴的package包/類
@Override
public void apply() {

	// 1. Remove jobs
	Vertex meshRoot = getMeshRootVertex();
	Iterator<Vertex> it = meshRoot.getVertices(Direction.OUT, "HAS_JOB_ROOT").iterator();
	if (it.hasNext()) {
		Vertex jobRoot = meshRoot.getVertices(Direction.OUT, "HAS_JOB_ROOT").iterator().next();
		Iterable<Vertex> jobIt = jobRoot.getVertices(OUT, "HAS_JOB");
		for (Vertex v : jobIt) {
			v.remove();
		}
	}
	// 2. Remove JobImpl type since we have now specific job vertices
	getDb().removeVertexType("JobImpl");

}
 
開發者ID:gentics,項目名稱:mesh,代碼行數:18,代碼來源:PurgeOldJobs.java

示例5: purgeSearchQueue

import com.tinkerpop.blueprints.Vertex; //導入方法依賴的package包/類
private void purgeSearchQueue() {
	Vertex meshRoot = getMeshRootVertex();
	Vertex sqRoot = meshRoot.getVertices(Direction.OUT, "HAS_SEARCH_QUEUE_ROOT").iterator().next();
	for (Vertex batch : sqRoot.getVertices(Direction.OUT, "HAS_BATCH")) {
		for (Vertex entry : batch.getVertices(Direction.OUT, "HAS_ITEM")) {
			entry.remove();
		}
		batch.remove();
	}

}
 
開發者ID:gentics,項目名稱:mesh,代碼行數:12,代碼來源:ChangeTVCMigration.java

示例6: apply

import com.tinkerpop.blueprints.Vertex; //導入方法依賴的package包/類
@Override
public void apply() {
	Vertex meshRoot = getMeshRootVertex();
	Vertex searchQueueRoot = meshRoot.getVertices(OUT, "HAS_SEARCH_QUEUE_ROOT").iterator().next();

	for (Vertex batch : searchQueueRoot.getVertices(OUT, "HAS_BATCH")) {
		for (Vertex entry : batch.getVertices(OUT, "HAS_ITEM")) {
			entry.remove();
		}
		batch.remove();
	}
	searchQueueRoot.remove();
}
 
開發者ID:gentics,項目名稱:mesh,代碼行數:14,代碼來源:ChangeRemoveSearchQueueNodes.java


注:本文中的com.tinkerpop.blueprints.Vertex.remove方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。