package org.apache.tinkerpop.gremlin.orientdb;

import com.orientechnologies.orient.core.db.record.OIdentifiable;
import com.orientechnologies.orient.core.metadata.schema.OImmutableClass;
import org.apache.tinkerpop.gremlin.structure.*;
import sun.reflect.generics.reflectiveObjects.NotImplementedException;

import java.util.Iterator;

public class OrientEdge extends OrientElement implements Edge {
    public OrientEdge(OrientGraph graph, OIdentifiable rawElement) {
        super(graph, rawElement);
    }

    public OrientEdge(OrientGraph graph, String className) {
        super(graph, className);
    }

    @Override
    public Iterator<Vertex> vertices(Direction direction) {
        throw new NotImplementedException();
    }

    public <V> Iterator<Property<V>> properties(final String... propertyKeys) {
        throw new NotImplementedException();
//        Iterator<? extends Property<V>> properties = super.properties(propertyKeys);
//        return StreamUtils.asStream(properties).map(p ->
//                        (Property<V>) new OrientProperty<>( p.key(), p.value(), (Element) p.element())
//        ).iterator();
    }

    @Override
    public String toString() {
        String labelPart = "";

        if(!label().equals(OImmutableClass.EDGE_CLASS_NAME))
            labelPart = "(" + label() + ")";
        return "e" + labelPart + "[" + id() + "]";
    }
}

@@ -815,55 +815,8 @@
 ) %7B%0A
-        throw new NotImplementedException();%0A//
     
@@ -896,18 +896,16 @@
 yKeys);%0A
-//
         
@@ -953,24 +953,16 @@
 ap(p -%3E%0A
-//      
         
@@ -965,22 +965,16 @@
         
-      
 (Propert
@@ -1000,17 +1000,16 @@
 perty%3C%3E(
- 
 p.key(),
@@ -1023,18 +1023,8 @@
 e(),
- (Element)
  p.e
@@ -1037,10 +1037,8 @@
 ())%0A
-//
     

support edge properties