public code v1
This commit is contained in:
+47
@@ -0,0 +1,47 @@
|
||||
package flintstones.method.decision.topsis.numeric;
|
||||
|
||||
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.ValuationTypeOperation;
|
||||
import flintstones.helper.faq.interfaces.IMarkdownFAQ;
|
||||
import flintstones.method.decision.topsis.numeric.messages.Messages;
|
||||
import flintstones.valuation.numeric.NumericValuation;
|
||||
|
||||
public class NumericTopsisMethod extends ValidatedMethod implements IMarkdownFAQ {
|
||||
|
||||
@Inject
|
||||
@Translation
|
||||
private Messages messages;
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return messages.Method_name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFAQFile() {
|
||||
return "faq/faq";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void reloadValidator() {
|
||||
|
||||
validator = ContextInjectionFactory.make(ChainValidator.class, context);
|
||||
|
||||
Valuation[] valuations = valuationService.getAll();
|
||||
String valuationsEntity = valuationMessages.Valuation_entity;
|
||||
ValuationTypeOperation valuationTypeOperator =
|
||||
new ValuationTypeOperation(valuationsEntity, NumericValuation.class.getSimpleName(), valuations);
|
||||
|
||||
validator.setReturn(this.getName())
|
||||
.custom(valuationTypeOperator)
|
||||
.named("valuations");//$NON-NLS-1$
|
||||
}
|
||||
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package flintstones.method.decision.topsis.numeric.messages;
|
||||
|
||||
import org.eclipse.e4.core.services.nls.Message;
|
||||
|
||||
@Message
|
||||
@SuppressWarnings("javadoc")
|
||||
public class Messages {
|
||||
|
||||
public String Method_name;
|
||||
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
Method_name=Technique for Order of Preference by Similarity to Ideal Solution (TOPSIS)
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
Method_name=Técnica para el orden de preferencia mediante cercania a la solución ideal (información numérica)
|
||||
method.name
|
||||
Reference in New Issue
Block a user