当前位置: 首页>>代码示例>>Java>>正文


Java VertexProperty.value方法代码示例

本文整理汇总了Java中org.apache.tinkerpop.gremlin.structure.VertexProperty.value方法的典型用法代码示例。如果您正苦于以下问题:Java VertexProperty.value方法的具体用法?Java VertexProperty.value怎么用?Java VertexProperty.value使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.tinkerpop.gremlin.structure.VertexProperty的用法示例。


在下文中一共展示了VertexProperty.value方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: DetachedVertexProperty

import org.apache.tinkerpop.gremlin.structure.VertexProperty; //导入方法依赖的package包/类
protected DetachedVertexProperty(final VertexProperty<V> vertexProperty, final boolean withProperties) {
    super(vertexProperty);
    this.value = vertexProperty.value();
    this.vertex = DetachedFactory.detach(vertexProperty.element(), false);

    // only serialize properties if requested, the graph supports it and there are meta properties present.
    // this prevents unnecessary object creation of a new HashMap which will just be empty.  it will use
    // Collections.emptyMap() by default
    if (withProperties && vertexProperty.graph().features().vertex().supportsMetaProperties()) {
        final Iterator<Property<Object>> propertyIterator = vertexProperty.properties();
        if (propertyIterator.hasNext()) {
            this.properties = new HashMap<>();
            propertyIterator.forEachRemaining(property -> this.properties.put(property.key(), Collections.singletonList(DetachedFactory.detach(property))));
        }
    }
}
 
开发者ID:PKUSilvester,项目名称:LiteGraph,代码行数:17,代码来源:DetachedVertexProperty.java

示例2: getPropertyOrEmptyString

import org.apache.tinkerpop.gremlin.structure.VertexProperty; //导入方法依赖的package包/类
public static String getPropertyOrEmptyString(final Vertex vertex, final String propertyKey) {
    VertexProperty<String> property = vertex.property(propertyKey);
    if (property.isPresent()) {
        return property.value();
    }
    return "";
}
 
开发者ID:eclipse,项目名称:keti,代码行数:8,代码来源:GraphGenericRepository.java

示例3: getPropertyOrFail

import org.apache.tinkerpop.gremlin.structure.VertexProperty; //导入方法依赖的package包/类
public static String getPropertyOrFail(final Vertex vertex, final String propertyKey) {
    VertexProperty<String> property = vertex.property(propertyKey);
    if (property.isPresent()) {
        return property.value();
    }
    throw new IllegalStateException(
            String.format("The vertex with id '%s' does not conatin the expected property '%s'.", vertex.id(),
                    propertyKey));
}
 
开发者ID:eclipse,项目名称:keti,代码行数:10,代码来源:GraphGenericRepository.java

示例4: getPropertyOrNull

import org.apache.tinkerpop.gremlin.structure.VertexProperty; //导入方法依赖的package包/类
public static String getPropertyOrNull(final Vertex vertex, final String propertyKey) {
    VertexProperty<String> property = vertex.property(propertyKey);
    if (property.isPresent()) {
        return property.value();
    }
    return null;
}
 
开发者ID:eclipse,项目名称:keti,代码行数:8,代码来源:GraphGenericRepository.java

示例5: ReferenceVertexProperty

import org.apache.tinkerpop.gremlin.structure.VertexProperty; //导入方法依赖的package包/类
public ReferenceVertexProperty(final VertexProperty<V> vertexProperty) {
    super(vertexProperty);
    this.vertex = ReferenceFactory.detach(vertexProperty.element());
    this.key = vertexProperty.key();
    this.value = vertexProperty.value();
}
 
开发者ID:PKUSilvester,项目名称:LiteGraph,代码行数:7,代码来源:ReferenceVertexProperty.java


注:本文中的org.apache.tinkerpop.gremlin.structure.VertexProperty.value方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。