public code v1
This commit is contained in:
+48
@@ -0,0 +1,48 @@
|
||||
package flintstones.method.waspasFuzzy;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import org.eclipse.e4.core.contexts.ContextInjectionFactory;
|
||||
import org.eclipse.e4.core.services.nls.Translation;
|
||||
|
||||
import flintstones.entity.validatedmethod.ValidatedMethod;
|
||||
import flintstones.entity.valuation.Valuation;
|
||||
import flintstones.helper.chainvalidator.ChainValidator;
|
||||
import flintstones.helper.chainvalidator.operation.method.RLibTestOperation;
|
||||
import flintstones.helper.chainvalidator.operation.method.ValuationTypeOperation;
|
||||
import flintstones.method.waspasFuzzy.messages.Messages;
|
||||
import flintstones.valuation.linguistic.LinguisticValuation;
|
||||
|
||||
|
||||
public class FuzzyWASPASMethod extends ValidatedMethod{
|
||||
|
||||
@Inject
|
||||
@Translation
|
||||
private Messages msg;
|
||||
|
||||
/**
|
||||
* @return Method name
|
||||
*/
|
||||
@Override
|
||||
public String getName() {
|
||||
return "Fuzzy Weighted Aggregated Sum Product ASsessment (Fuzzy WASPAS)";
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests if method is applicable
|
||||
*/
|
||||
@Override
|
||||
protected void reloadValidator() {
|
||||
validator = ContextInjectionFactory.make(ChainValidator.class, context);
|
||||
|
||||
Valuation[] valuations = valuationService.getAll();
|
||||
String vEntity = valuationMessages.Valuation_entity;
|
||||
|
||||
String[] validTypes = new String[1];
|
||||
validTypes[0] = LinguisticValuation.class.getSimpleName();
|
||||
ValuationTypeOperation vto = new ValuationTypeOperation(vEntity, validTypes, valuations);
|
||||
|
||||
validator.setReturn(this.getName()).custom(vto).named("valuations").custom(new RLibTestOperation("RLibTest", "FuzzyMCDM")).named("FuzzyMCDM");
|
||||
}
|
||||
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package flintstones.method.waspasFuzzy.messages;
|
||||
|
||||
import org.eclipse.e4.core.services.nls.Message;
|
||||
|
||||
@Message
|
||||
public class Messages {
|
||||
|
||||
public String method_name;
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
method_name=Fuzzy Weighted Aggregated Sum Product ASsessment (Fuzzy WASPAS)
|
||||
+1
@@ -0,0 +1 @@
|
||||
method_name=Evaluación difusa del producto de la suma agregada ponderada (Fuzzy WASPAS)
|
||||
Reference in New Issue
Block a user