-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
I'm reading the code of, say TitanGoGraph.java, and I see:
private VertexLabel goTermTypeLabel;
private PropertyKey goTermTypekey;
private PropertyKey goTermIdKey;
private PropertyKey goTermNameKey;
private PropertyKey goTermDefinitionKey;
private PropertyKey goTermObsoleteKey;
private PropertyKey goTermCommentKey;
private PropertyKey goTermSynonymKey;And these private fields are not used ever. They are assigned in the initTypes method:
...
goTermSynonymKey = raw().createOrGet(mgmt, raw().titanPropertyMakerForVertexProperty( mgmt, GoTerm().synonym ).cardinality(Cardinality.SINGLE));
goTermTypeLabel = raw().createOrGet(mgmt, goTermType.raw());But then never used. Except the goTermTypeLabel which is used to create an index:
goTermIdIndex = new TitanTypedVertexIndex.DefaultUnique<>(mgmt, this, GoTerm().id);
goTermIdIndex.makeOrGet(goTermTypeLabel);There it's not really needed, because you create index once and can just call the same raw().createOrGet(mgmt, goTermType.raw()).
So I think those unused property keys and vertex/edge labels can be removed. Then with bio4j/angulillos#51 there is no much business left in this code and I think it can be made generic.
eparejatobeslaughedelic
Metadata
Metadata
Assignees
Labels
No labels