jgralab/jgralab — Issue #2: Bug in VertexClass.getDirectedEdgeClassForFarEndRole(String role)
Author: tsdh
Created: 2012-02-27 18:35:53+00:00
State: open

`VertexClass.getDirectedEdgeClassForFarEndRole(String role)` is broken.

Here's a test class:

```

import de.uni_koblenz.jgralab.GraphIO;
import de.uni_koblenz.jgralab.GraphIOException;
import de.uni_koblenz.jgralab.schema.Schema;
import de.uni_koblenz.jgralab.schema.VertexClass;

public class FooBar {
public static void main(String[] args) throws GraphIOException {
Schema s = GraphIO.loadSchemaFromFile("genealogy-schema.tg");
VertexClass maleVC = s.getGraphClass().getVertexClass("Male");
// Should be and is {HasChild, OUT}
System.out.println(maleVC.getDirectedEdgeClassForFarEndRole("children"));
// Should be {HasChild, IN} but is {HasChild, OUT}
System.out.println(maleVC.getDirectedEdgeClassForFarEndRole("parents"));
}
}
```

I'll attach the schema.