1 23 24 package org.objectweb.jorm.verifier.lib; 25 26 import org.objectweb.jorm.metainfo.api.Manager; 27 import org.objectweb.jorm.verifier.api.MappingVerifier; 28 import org.objectweb.jorm.verifier.api.Verifier; 29 import org.objectweb.util.monolog.api.BasicLevel; 30 import org.objectweb.util.monolog.api.Logger; 31 import org.objectweb.util.monolog.api.LoggerFactory; 32 import org.objectweb.jorm.util.api.Loggable; 33 34 import java.util.HashMap ; 35 import java.util.Collection ; 36 37 public class JormVerifier implements Verifier, Loggable { 38 42 private Manager metaInfoManager; 43 44 47 private String projectName; 48 49 52 private Logger logger; 53 54 57 private LoggerFactory loggerFactory; 58 59 63 private HashMap mappingVerifiers = new HashMap (); 64 65 68 public JormVerifier() { 69 } 70 71 73 79 public void setMetaInfoManager(Manager mim) { 80 metaInfoManager = mim; 81 } 82 83 87 public void setProjectName(String name) { 88 projectName = name; 89 } 90 91 97 public void addMappingVerifier(String mappername, MappingVerifier mappingVerifier) { 98 mappingVerifiers.put(mappername, mappingVerifier); 99 } 100 101 104 public void verify(Collection mos) { 105 if (logger.isLoggable(BasicLevel.DEBUG)) 106 logger.log(BasicLevel.DEBUG, 107 "Start the verification of the meta-information"); 108 109 111 if (logger.isLoggable(BasicLevel.DEBUG)) 112 logger.log(BasicLevel.DEBUG, 113 "The verification of the meta-information is finished"); 114 } 115 116 118 public void setLogger(Logger logger) { 119 this.logger = logger; 120 } 121 122 public void setLoggerFactory(LoggerFactory loggerfactory) { 123 this.loggerFactory = loggerfactory; 124 } 125 126 public Logger getLogger() { 127 return logger; 128 } 129 130 public LoggerFactory getLoggerFactory() { 131 return loggerFactory; 132 } 133 } 134 | Popular Tags |