本文整理了Java中com.tinkerpop.blueprints.Vertex.remove()
方法的一些代码示例,展示了Vertex.remove()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Vertex.remove()
方法的具体详情如下:
包路径:com.tinkerpop.blueprints.Vertex
类名称:Vertex
方法名:remove
暂无
代码示例来源:origin: edu.jhuapl.tinkerpop/blueprints-accumulo-graph
@Override
public void removeVertex(Vertex vertex) {
vertex.remove();
}
代码示例来源:origin: org.hawkular.titan/titan-core
@Override
public void removeVertex(Vertex vertex) {
vertex.remove();
}
代码示例来源:origin: com.tinkerpop.blueprints/blueprints-orient-graph
public void removeVertex(final Vertex vertex) {
vertex.remove();
}
代码示例来源:origin: com.puresoltechnologies.extended-objects/titan
@Override
public void deleteEntity(Vertex vertex) {
vertex.remove();
}
代码示例来源:origin: JHUAPL/AccumuloGraph
@Override
public void removeVertex(Vertex vertex) {
vertex.remove();
}
代码示例来源:origin: com.orientechnologies/orientdb-graphdb
/**
* Removes a vertex from the Graph. All the edges connected to the Vertex are automatically removed.
*
* @param vertex Vertex to remove
*/
public void removeVertex(final Vertex vertex) {
makeActive();
vertex.remove();
}
代码示例来源:origin: gentics/mesh
@Override
public void applyInTx() {
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();
}
代码示例来源:origin: fr.inria.atlanmod.neoemf/neoemf-data-blueprints-core
/**
* {@inheritDoc}
* <p>
* If the {@link Edge} references a {@link Vertex} with no more incoming {@link Edge}, the referenced
* {@link Vertex} is removed as well.
*/
@Override
public void remove() {
Vertex referencedVertex = getVertex(Direction.IN);
super.remove();
if (Iterables.isEmpty(referencedVertex.getEdges(Direction.IN))) {
// If the Vertex has no more incoming edges remove it from the DB
referencedVertex.remove();
}
}
}
代码示例来源:origin: gentics/mesh
@Override
public void applyInTx() {
Vertex root = getMeshRootVertex();
Vertex tagFamilyRoot = root.getVertices(OUT, "HAS_TAGFAMILY_ROOT").iterator().next();
// Iterate over all tag families
Iterator<Vertex> iterator = tagFamilyRoot.getVertices(OUT, "HAS_TAG_FAMILY").iterator();
while (iterator.hasNext()) {
Vertex tagFamily = iterator.next();
Vertex tagRoot = tagFamily.getVertices(OUT, "HAS_TAG_ROOT").iterator().next();
// Now iterate over all tags and assign them directly to the tag family
Iterator<Vertex> tagIterator = tagRoot.getVertices(OUT, "HAS_TAG").iterator();
while (tagIterator.hasNext()) {
Vertex tag = tagIterator.next();
tagFamily.addEdge("HAS_TAG", tag);
}
// Remove the tag family root vertex
tagRoot.remove();
}
// Locate all tag roots for all projects and remove them
Vertex projectRoot = root.getVertices(OUT, "HAS_PROJECT_ROOT").iterator().next();
Iterator<Vertex> projectIterator = projectRoot.getVertices(OUT, "HAS_PROJECT").iterator();
while (projectIterator.hasNext()) {
Vertex project = projectIterator.next();
Vertex tagRoot = project.getVertices(OUT, "HAS_TAG_ROOT").iterator().next();
tagRoot.remove();
}
}
代码示例来源:origin: gentics/mesh
@Override
public void applyInTx() {
// 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");
}
代码示例来源:origin: eu.agrosense.server/storage-tinkerpop
protected void deleteCascaded(Vertex v, Set<String> deletedIds) {
for (Vertex child : v.getVertices(Direction.IN, EDGE_LABEL_HAS_PARENT)) {
deleteCascaded(child, deletedIds);
}
// The edges connected to removed vertices are dropped automatically,
// some of them might have models attached to them (only ORE for now).
// `Vertex.getEdges()` requires we specify the edge_labels to get,
// we want to check all of them for PROP_URI presence.
for (Edge e : v.getEdges(Direction.BOTH, ItemIdType.ORE.name())) { //(Direction.BOTH, new String[]{})
String edgeURI = e.getProperty(eu.agrosense.shared.model.AgroEntity.PROP_URI);
if (edgeURI != null) {
deletedIds.add(edgeURI);
}
}
v.remove();
deletedIds.add(v.<String>getProperty(eu.agrosense.shared.model.AgroEntity.PROP_URI));
}
代码示例来源:origin: gentics/mesh
/**
* 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");
}
}
代码示例来源:origin: gentics/mesh
System.out.println("key: " + key + " : " + oldBinaryField.getProperty(key));
oldBinaryField.remove();
return;
edge.remove();
oldBinaryField.remove();
代码示例来源:origin: gentics/mesh
@Override
public void clear() {
if (log.isDebugEnabled()) {
log.debug("Clearing graph");
}
OrientGraphNoTx tx2 = rawNoTx();
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");
}
}
代码示例来源:origin: org.hawkular.titan/titan-test
assertEquals(1,Iterables.size(v1.getEdges(Direction.BOTH)));
assertEquals(1,Iterables.size(v2.getEdges(Direction.BOTH)));
v2.remove();
assertEquals(0,Iterables.size(v1.getEdges(Direction.BOTH)));
try {
代码示例来源:origin: org.hawkular.titan/titan-test
String n = u.<String>getProperty("name");
if (n.endsWith("Don")) {
u.remove();
} else if (n.endsWith("Lewis")) {
u.setProperty("name","Big Brother Bob");
代码示例来源:origin: gentics/mesh
fromV.remove();
count++;
if (count % 1000 == 0) {
代码示例来源:origin: org.hawkular.titan/titan-test
tx.getVertex(v13).remove();
assertEquals(1,Iterables.size(v.query().types(link).direction(BOTH).edges()));
内容来源于网络,如有侵权,请联系作者删除!