Skip to content
This repository has been archived by the owner on Mar 11, 2021. It is now read-only.

Duplicated Classes: RelationshipType and RelationshipStereotype #74

Open
tgoprince opened this issue Jan 28, 2016 · 4 comments
Open

Duplicated Classes: RelationshipType and RelationshipStereotype #74

tgoprince opened this issue Jan 28, 2016 · 4 comments
Assignees

Comments

@tgoprince
Copy link
Member

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
Copy link
Member Author

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

@tgoprince
Copy link
Member Author

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
Copy link
Contributor

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
Copy link
Contributor

@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 :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants