Package uk.ac.bbsrc.tgac.miso.core.service.naming

Examples of uk.ac.bbsrc.tgac.miso.core.service.naming.MisoNameGeneratorResolverService


    //set up naming schemes
    MisoEntityNamingSchemeResolverService entityNamingSchemeResolverService = (MisoEntityNamingSchemeResolverService)context.getBean("entityNamingSchemeResolverService");
    Collection<MisoNamingScheme<?>> mnss = entityNamingSchemeResolverService.getNamingSchemes();

    MisoNameGeneratorResolverService nameGeneratorResolverService = (MisoNameGeneratorResolverService)context.getBean("nameGeneratorResolverService");
    Collection<NameGenerator<?>> ngs = nameGeneratorResolverService.getNameGenerators();

    for (MisoNamingScheme<?> mns : mnss) {
      log.info("Got naming scheme: " + mns.getSchemeName());
      String classname = mns.namingSchemeFor().getSimpleName().toLowerCase();

      if (misoProperties.containsKey("miso.naming.scheme."+classname) && misoProperties.get("miso.naming.scheme."+classname).equals(mns.getSchemeName())) {
        for (String key : misoProperties.keySet()) {
          if (key.startsWith("miso.naming.generator."+classname)) {
            String genprop = key.substring(key.lastIndexOf(".")+1);
            NameGenerator ng = nameGeneratorResolverService.getNameGenerator(misoProperties.get("miso.naming.generator."+classname+"."+genprop));
            if (ng != null) {
              mns.registerCustomNameGenerator(genprop, ng);
            }
          }
        }
View Full Code Here

TOP

Related Classes of uk.ac.bbsrc.tgac.miso.core.service.naming.MisoNameGeneratorResolverService

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.