本文整理汇总了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());
}