本文整理匯總了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();
}
}
示例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");
}
}
示例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");
}
}
示例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");
}
示例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();
}
}
示例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();
}