com.lambdazen.bitsy.BitsyVertexProperty Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bitsy Show documentation
Show all versions of bitsy Show documentation
Bitsy v3 is a small, fast, embeddable, durable in-memory graph database that is compatible with Tinkerpop3
package com.lambdazen.bitsy;
import java.util.Collections;
import java.util.Iterator;
import java.util.Set;
import org.apache.tinkerpop.gremlin.structure.Property;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.apache.tinkerpop.gremlin.structure.VertexProperty;
import org.apache.tinkerpop.gremlin.structure.util.StringFactory;
public class BitsyVertexProperty extends BitsyProperty implements VertexProperty {
public BitsyVertexProperty(final BitsyVertex vertex, final String key, final V value) {
super(vertex, key, value);
}
@Override
public Set keys() {
return Collections.emptySet();
}
@Override
public Property property(final String key) {
throw new BitsyException(BitsyErrorCodes.NO_META_PROPERTY_SUPPORT);
}
@Override
public Property property(final String key, final U value) {
throw new BitsyException(BitsyErrorCodes.NO_META_PROPERTY_SUPPORT);
}
@Override
public Vertex element() {
return (BitsyVertex)super.element();
}
@Override
public Iterator> properties(final String... propertyKeys) {
throw new BitsyException(BitsyErrorCodes.NO_META_PROPERTY_SUPPORT);
}
@Override
public Object id() {
return element().id().toString() + ":" + key();
}
public String toString() {
return StringFactory.propertyString(this);
}
}