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


Java TitanVertex.longId方法代码示例

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


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

示例1: testBasic

import com.thinkaurelius.titan.core.TitanVertex; //导入方法依赖的package包/类
/**
 * Very simple graph operation to ensure minimal functionality and cleanup
 */
@Test
public void testBasic() {

    PropertyKey uid = makeVertexIndexedUniqueKey("name", String.class);
    finishSchema();

    TitanVertex n1 = tx.addVertex();
    uid = tx.getPropertyKey("name");
    n1.property(uid.name(), "abcd");
    clopen();
    long nid = n1.longId();
    uid = tx.getPropertyKey("name");
    assertTrue(getV(tx, nid) != null);
    assertTrue(getV(tx, uid.longId()) != null);
    assertMissing(tx, nid + 64);
    uid = tx.getPropertyKey(uid.name());
    n1 = getV(tx, nid);
    assertEquals(n1, getOnlyVertex(tx.query().has(uid.name(), "abcd")));
    assertEquals(1, Iterables.size(n1.query().relations())); //TODO: how to expose relations?
    assertEquals("abcd", n1.value(uid.name()));
    assertCount(1, tx.query().vertices());
    close();
    TitanCleanup.clear(graph);
    open(config);
    assertEmpty(tx.query().vertices());
}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:30,代码来源:TitanGraphTest.java

示例2: add

import com.thinkaurelius.titan.core.TitanVertex; //导入方法依赖的package包/类
@Override
public void add(TitanVertex n) {
    if (!vertices.isEmpty()) sorted = sorted && vertices.get(vertices.size()-1)<=n.longId();
    vertices.add(n.longId());
}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:6,代码来源:VertexLongList.java

示例3: add

import com.thinkaurelius.titan.core.TitanVertex; //导入方法依赖的package包/类
@Override
public void add(TitanVertex n) {
    if (!vertices.isEmpty()) sorted = sorted && (vertices.get(vertices.size()-1).longId()<=n.longId());
    vertices.add(n);
}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:6,代码来源:VertexArrayList.java


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