Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot resolve symbol "NameStripper" #1

Open
vinbush opened this issue Jan 16, 2020 · 3 comments
Open

Cannot resolve symbol "NameStripper" #1

vinbush opened this issue Jan 16, 2020 · 3 comments

Comments

@vinbush
Copy link
Contributor

vinbush commented Jan 16, 2020

@i-laird I'm trying the build prophet-utils which has a dependency on bounded-context, but when I try to build bounded-context, I get a compilation error around the NameStripper class. It doesn't seem to have an implementation and I can't find where it is supposed to be declared; do you have any insight on this?

I'm getting the error in SimilarityUtilsImpl (on line 188) and BoundedContextUtilsImpl (on line 40).

@i-laird
Copy link
Contributor

i-laird commented Jan 16, 2020

Sorry about that! I guess I forgot to commit that file. My source code currently does not compile, so I will just include here in the response the code that should be in NameStripper.java.

package edu.baylor.ecs.prophet.bounded.context.utils.impl;

import edu.baylor.ecs.cloudhubs.prophetdto.systemcontext.Entity;
import edu.baylor.ecs.cloudhubs.prophetdto.systemcontext.Field;
import edu.baylor.ecs.cloudhubs.prophetdto.systemcontext.Module;
import edu.baylor.ecs.cloudhubs.prophetdto.systemcontext.SystemContext;

public class NameStripper {

public static String getBasicName(String name){
    String [] parts = name.split("[^a-zA-Z0-9]+");
    return parts[parts.length - 1];
}

public static void sanitizeSystemContext(SystemContext toSanitize){
    for(Module m : toSanitize.getModules()){
        m.setName(getBasicName(m.getName()));
        for(Entity e : m.getEntities()){
            // make the full name just the simple name
            e.getEntityName().setFullName(e.getEntityName().getName());
            for(Field f : e.getFields()){
                f.setName(getBasicName(f.getName()));
            }
        }
    }
}

}

@svacina
Copy link
Contributor

svacina commented Jan 17, 2020

One must always have master branch in the way that we can compile it. What do you mean by that code snippet? That Vincent should add this code snippet instead of you? Not acceptable. Fix it yourself. It is your repository. We will talk tomorrow.

@i-laird
Copy link
Contributor

i-laird commented Jan 17, 2020

Thank you for the clarification

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

No branches or pull requests

3 participants