本文整理匯總了Java中com.tinkerpop.blueprints.util.wrappers.wrapped.WrappedVertex類的典型用法代碼示例。如果您正苦於以下問題:Java WrappedVertex類的具體用法?Java WrappedVertex怎麽用?Java WrappedVertex使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
WrappedVertex類屬於com.tinkerpop.blueprints.util.wrappers.wrapped包,在下文中一共展示了WrappedVertex類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: setVertexType
import com.tinkerpop.blueprints.util.wrappers.wrapped.WrappedVertex; //導入依賴的package包/類
@Override
public void setVertexType(Element element, Class<?> classOfVertex) {
if (element instanceof WrappedVertex) {
element = ((WrappedVertex) element).getBaseElement();
}
((OrientVertex) element).moveToClass(classOfVertex.getSimpleName());
}
示例2: initPermissions
import com.tinkerpop.blueprints.util.wrappers.wrapped.WrappedVertex; //導入依賴的package包/類
@Override
public void initPermissions() {
try (Tx tx = db.tx()) {
Role adminRole = meshRoot().getRoleRoot().findByName("admin");
for (Vertex vertex : tx.getGraph().getVertices()) {
WrappedVertex wrappedVertex = (WrappedVertex) vertex;
MeshVertex meshVertex = tx.getGraph().frameElement(wrappedVertex.getBaseElement(), MeshVertexImpl.class);
adminRole.grantPermissions(meshVertex, READ_PERM, CREATE_PERM, DELETE_PERM, UPDATE_PERM, PUBLISH_PERM, READ_PUBLISHED_PERM);
if (log.isTraceEnabled()) {
log.trace("Granting admin CRUD permissions on vertex {" + meshVertex.getUuid() + "} for role {" + adminRole.getUuid() + "}");
}
}
tx.success();
}
}
示例3: asAmberVertex
import com.tinkerpop.blueprints.util.wrappers.wrapped.WrappedVertex; //導入依賴的package包/類
private AmberVertex asAmberVertex() {
if (this.asVertex() instanceof WrappedVertex) {
return (AmberVertex) ((WrappedVertex) this.asVertex()).getBaseVertex();
} else {
return (AmberVertex) this.asVertex();
}
}
示例4: removeVertex
import com.tinkerpop.blueprints.util.wrappers.wrapped.WrappedVertex; //導入依賴的package包/類
public void removeVertex(final Vertex vertex)
{
this.baseGraph.removeVertex(((WrappedVertex) vertex).getBaseVertex());
}