Java Code Examples for com.thinkaurelius.titan.graphdb.internal.InternalRelationType#isPropertyKey()

The following examples show how to use com.thinkaurelius.titan.graphdb.internal.InternalRelationType#isPropertyKey() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MizoTitanRelationType.java    From mizo with Apache License 2.0 6 votes vote down vote up
public MizoTitanRelationType(InternalRelationType relationType) {
    status = relationType.getStatus();
    sortKey = relationType.getSortKey();
    name = relationType.name();
    id = relationType.longId();
    isInvisibleType = relationType.isInvisibleType();
    signature = relationType.getSignature();
    sortOrder = relationType.getSortOrder();
    multiplicity = relationType.multiplicity();
    consistencyModifier = relationType.getConsistencyModifier();
    ttl = relationType.getTTL();
    isPropertyKey = relationType.isPropertyKey();
    isEdgeLabel = relationType.isEdgeLabel();

    if (relationType instanceof PropertyKey) {
        dataType = ((PropertyKey)relationType).dataType();
        cardinality = ((PropertyKey)relationType).cardinality();
    } else {
        dataType = null;
        cardinality = null;
    }
}
 
Example 2
Source File: RelationQueryCache.java    From titan1withtp3.1 with Apache License 2.0 5 votes vote down vote up
public CacheEntry(EdgeSerializer edgeSerializer, InternalRelationType t) {
    if (t.isPropertyKey()) {
        out = edgeSerializer.getQuery(t, Direction.OUT,new EdgeSerializer.TypedInterval[t.getSortKey().length]);
        in = out;
        both = out;
    } else {
        out = edgeSerializer.getQuery(t,Direction.OUT,
                    new EdgeSerializer.TypedInterval[t.getSortKey().length]);
        in = edgeSerializer.getQuery(t,Direction.IN,
                new EdgeSerializer.TypedInterval[t.getSortKey().length]);
        both = edgeSerializer.getQuery(t,Direction.BOTH,
                new EdgeSerializer.TypedInterval[t.getSortKey().length]);
    }
}