MenthorTools / menthor-editor

Menthor Editor
30 stars 7 forks source link

Duplicated Classes: RelationshipType and RelationshipStereotype #74

Open tgoprince opened 8 years ago

tgoprince commented 8 years ago

The classes are in the following packages: net.menthor.editor.v2.types.RelationshipType and net.menthor.common.ontoumlfixer.RelationshipStereotype

They are exactly the same! Just enumerations for the OntoUML stereotypes with a friendly toString().

I guess The implementation of RelationshipType is more concise. The location of RelationshipStereotype is better suited.

What you think @johnguerson ??

tgoprince commented 8 years ago

Maybe it should be in net.menthor.ontouml, right?

tgoprince commented 8 years ago

They are not exactly the same, net.menthor.common.ontoumlfixer.RelationshipStereotypehas a mapping to the .class of the RefOntoUML elements:

static {
        FORMAL.metaClass = FormalAssociation.class;
        MATERIAL.metaClass = MaterialAssociation.class;
        CHARACTERIZATION.metaClass = Characterization.class;
        MEDIATION.metaClass = Mediation.class;
        DERIVATION.metaClass = Derivation.class;
        ASSOCIATION.metaClass = Association.class;
        COMPONENTOF.metaClass = componentOf.class;
        SUBQUANTITYOF.metaClass = subQuantityOf.class;
        SUBCOLLECTIONOF.metaClass = subCollectionOf.class;
        MEMBEROF.metaClass = memberOf.class;
        GENERALIZATION.metaClass = null; //FIX
        STRUCTURATION.metaClass = Structuration.class;
    }
BernardoFBBraga commented 8 years ago

This is probably because of the refactoring John is doing. [meta discussion] The "duplicate" label is for duplicated issues: when two issues talk about the same thing. Not for an issue about duplicate code.

johnguerson commented 7 years ago

@tgoprince I think I solved this. There is only one java class responsible for the relationship stereotypes and it is at the /ontouml project as you suggested. I did the same for ClassStereotype as well and DataTypeStereotype. After checking please close this issue :)