public code v1

This commit is contained in:
Francisco Jesús Martínez Mimbrera
2026-05-23 00:32:57 +02:00
commit 759a8968a2
4357 changed files with 163763 additions and 0 deletions
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>flintstones.group</groupId>
<artifactId>flintstones.bundles</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>flintstones.entity.method</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<name>[bundle] Method</name>
</project>
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>flintstones.entity.method</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
<filteredResources>
<filter>
<id>1779484362566</id>
<name></name>
<type>30</type>
<matcher>
<id>org.eclipse.core.resources.regexFilterMatcher</id>
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8
@@ -0,0 +1,7 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8
@@ -0,0 +1,4 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
@@ -0,0 +1,15 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: flintstones.entity.method;singleton:=true
Bundle-Version: 1.0.0.qualifier
Automatic-Module-Name: flintstones.entity.method
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: flintstones.entity.extensionenum,
flintstones.helper.chainvalidator;visibility:=reexport,
flintstones.entity.method.phase,
flintstones.entity.method.phase.ui,
javax.inject;visibility:=reexport,
org.eclipse.e4.core.services;visibility:=reexport,
org.eclipse.e4.core.di;visibility:=reexport
Export-Package: flintstones.entity.method
@@ -0,0 +1,11 @@
#Properties file for flintstones.entity.method
extension-point.name = Method
extension-point.name.0 = Method category extension point
Bundle-Name = Method
flintstones.entity.method.twotuple.category = 2-tuple linguistic framework
flintstones.entity.method.hesitant.category = Hesitant fuzzy linguistic framework
flintstones.entity.method.multigranular.category = Multi-granular framework
flintstones.entity.method.multicriteria.category = Multi-criteria decision analysis framework
flintstones.entity.method.heterogeneous.category = Heterogeneous framework
flintstones.entity.method.unbalanced.category = Unbalanced linguistic framework
flintstones.entity.method.sorting.category = Multi-criteria sorting framework
@@ -0,0 +1,11 @@
#Properties file for flintstones.entity.method
extension-point.name = Method
extension-point.name.0 = Method category extension point
Bundle-Name = Method
flintstones.entity.method.twotuple.category = Marco lingüístico 2-tuplas
flintstones.entity.method.hesitant.category = Marco lingüístico difuso dudoso
flintstones.entity.method.multigranular.category = Marco lingüístico multigranular
flintstones.entity.method.multicriteria.category = Marco multicriterio de análisis de decisión
flintstones.entity.method.heterogeneous.category = Marco heterogéneo
flintstones.entity.method.unbalanced.category = Marco lingüístico no balanceado
flintstones.entity.method.sorting.category = Marco multicriterio de clasificación
@@ -0,0 +1,8 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
schema/,\
plugin.xml,\
OSGI-INF/l10n/bundle.properties,\
OSGI-INF/
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xml>
<?eclipse version="3.4"?>
<plugin>
<extension-point id="flintstones.method.extension" name="%extension-point.name" schema="schema/flintstones.method.exsd"/>
<extension-point id="flintstones.method.category.extension" name="%extension-point.name.0" schema="schema/flintstones.method.category.exsd"/>
<extension
point="flintstones.method.category.extension">
<method_category
category="%flintstones.entity.method.twotuple.category"
uid="flintstones.entity.method.twotuple">
</method_category>
<method_category
category="%flintstones.entity.method.hesitant.category"
uid="flintstones.entity.method.hesitant">
</method_category>
<method_category
category="%flintstones.entity.method.multigranular.category"
uid="flintstones.entity.method.multigranular">
</method_category>
<method_category
category="%flintstones.entity.method.multicriteria.category"
uid="flintstones.entity.method.multicriteria">
</method_category>
<method_category
category="%flintstones.entity.method.heterogeneous.category"
uid="flintstones.entity.method.heterogeneous">
</method_category>
<method_category
category="%flintstones.entity.method.unbalanced.category"
uid="flintstones.entity.method.unbalanced">
</method_category>
<method_category
category="%flintstones.entity.method.sorting.category"
uid="flintstones.entity.method.sorting">
</method_category>
</extension>
</plugin>
@@ -0,0 +1,109 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
<schema targetNamespace="flintstones.entity.method" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appinfo>
<meta.schema plugin="flintstones.entity.method" id="flintstones.method.category.extension" name="Method category extension point"/>
</appinfo>
<documentation>
[Enter description of this extension point.]
</documentation>
</annotation>
<element name="extension">
<annotation>
<appinfo>
<meta.element />
</appinfo>
</annotation>
<complexType>
<choice>
<element ref="method_category" minOccurs="1" maxOccurs="unbounded"/>
</choice>
<attribute name="point" type="string" use="required">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
<attribute name="xid" type="string">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
<attribute name="name" type="string">
<annotation>
<documentation>
</documentation>
<appinfo>
<meta.attribute translatable="true"/>
</appinfo>
</annotation>
</attribute>
</complexType>
</element>
<element name="method_category">
<complexType>
<attribute name="uid" type="string" use="required">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
<attribute name="category" type="string" use="required">
<annotation>
<documentation>
</documentation>
<appinfo>
<meta.attribute translatable="true"/>
</appinfo>
</annotation>
</attribute>
</complexType>
</element>
<annotation>
<appinfo>
<meta.section type="since"/>
</appinfo>
<documentation>
[Enter the first release in which this extension point appears.]
</documentation>
</annotation>
<annotation>
<appinfo>
<meta.section type="examples"/>
</appinfo>
<documentation>
[Enter extension point usage example here.]
</documentation>
</annotation>
<annotation>
<appinfo>
<meta.section type="apiinfo"/>
</appinfo>
<documentation>
[Enter API information here.]
</documentation>
</annotation>
<annotation>
<appinfo>
<meta.section type="implementation"/>
</appinfo>
<documentation>
[Enter information about supplied implementation of this extension point.]
</documentation>
</annotation>
</schema>
@@ -0,0 +1,138 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
<schema targetNamespace="flintstones.method" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appinfo>
<meta.schema plugin="flintstones.method" id="flintstones.method" name="Method"/>
</appinfo>
<documentation>
Este punto de extensión nos permitirá definir nuevos métodos, indicando los dominios soportados por el método, las fases del método y las pre-condiciones que se indicarán para que el método pueda ejecutarse o no con la información del proyecto, indicadas en la implementación que se da.
==============================================================================================================================================
This extension point will allow us to define new methods, indicating the domains supported by the method, the phases of the method and the preconditions that will be indicated so that the method can be executed or not with the project information, indicated in the implementation that is given.
</documentation>
</annotation>
<element name="extension">
<annotation>
<appinfo>
<meta.element />
</appinfo>
</annotation>
<complexType>
<choice>
<element ref="method"/>
</choice>
<attribute name="point" type="string" use="required">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
<attribute name="xid" type="string">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
<attribute name="name" type="string">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
</complexType>
</element>
<element name="method">
<complexType>
<choice minOccurs="1" maxOccurs="unbounded">
<element ref="phase"/>
</choice>
<attribute name="uid" type="string" use="required">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
<attribute name="category" type="string" use="required">
<annotation>
<documentation>
</documentation>
<appinfo>
<meta.attribute kind="identifier" basedOn="flintstones.method.category.extension/method_category/@uid"/>
</appinfo>
</annotation>
</attribute>
<attribute name="implementation" type="string" use="required">
<annotation>
<documentation>
</documentation>
<appinfo>
<meta.attribute kind="java" basedOn="flintstones.entity.method.Method:"/>
</appinfo>
</annotation>
</attribute>
</complexType>
</element>
<element name="phase">
<complexType>
<attribute name="uid" type="string" use="required">
<annotation>
<documentation>
</documentation>
<appinfo>
<meta.attribute kind="identifier" basedOn="flintstones.phasemethod.extensionpoint/phase/@uid"/>
</appinfo>
</annotation>
</attribute>
</complexType>
</element>
<annotation>
<appinfo>
<meta.section type="since"/>
</appinfo>
<documentation>
[Enter the first release in which this extension point appears.]
</documentation>
</annotation>
<annotation>
<appinfo>
<meta.section type="examples"/>
</appinfo>
<documentation>
[Enter extension point usage example here.]
</documentation>
</annotation>
<annotation>
<appinfo>
<meta.section type="apiinfo"/>
</appinfo>
<documentation>
[Enter API information here.]
</documentation>
</annotation>
<annotation>
<appinfo>
<meta.section type="implementation"/>
</appinfo>
<documentation>
[Enter information about supplied implementation of this extension point.]
</documentation>
</annotation>
</schema>
@@ -0,0 +1,186 @@
package flintstones.entity.method;
import java.util.ArrayList;
import java.util.HashMap;
import flintstones.entity.extensionenum.ExtensionEnum;
import flintstones.entity.method.phase.PhaseMethod;
import flintstones.entity.method.phase.ui.PhaseMethodUI;
import flintstones.helper.chainvalidator.Statement;
/**
* The Class Method.
*/
public abstract class Method {
/** The id. */
private String id;
/** The name. */
private String name;
/** The category. */
private String category;
/** The phaseModels. */
private ArrayList<PhaseMethod> phaseModels = new ArrayList<>();
private PhaseMethodUI[] phases;
public final static String TYPE_OF_VALUATION = "finalValuationId";
/** The Constant EXTENSION_POINT. */
public final static String EXTENSION_POINT = "flintstones.method.extension"; //$NON-NLS-1$
/** The Constant CATEGORY EXTENSION_POINT. */
public final static String EXTENSION_POINT_CATEGORY = "flintstones.method.category.extension"; //$NON-NLS-1$
/**
* The Fields.
*/
public enum Fields implements ExtensionEnum {
/** The id. */
uid,
/** The name. */
name,
/** The phase. */
phase,
/** The phasemethod. */
phasemethod,
/** The implementation. */
implementation,
/** The category. */
category,
/** The description. */
description,
/** The aggregation supported. */
aggregation_supported,
/** The type. */
type
}
/**
* Gets the id.
*
* @return the id
*/
public String getId() {
return this.id;
}
/**
* Sets the id.
*
* @param id the new id
*/
public void setId(String id) {
this.id = id;
}
/**
* Gets the name.
*
* @return the name
*/
public String getName() {
return this.name;
}
/**
* Sets the name
*
* @param the name
*/
public void setName(String name) {
this.name = name;
}
/**
* Gets the category.
*
* @return the category
*/
public String getCategory() {
return this.category;
}
/**
* Sets the category.
*
* @return the category
*/
public void setCategory(String category) {
this.category = category;
}
/**
* Gets the phaseModels.
*
* @return the phaseModels
*/
public ArrayList<PhaseMethod> getPhaseModels() {
return this.phaseModels;
}
/**
* Sets the phaseModels.
*
* @param phaseModels the new phaseModels
*/
public void setPhaseModels(ArrayList<PhaseMethod> phases) {
this.phaseModels = phases;
}
/**
* Can be executed.
*
* @return true, if successful
*/
public abstract boolean canBeExecuted();
/**
* Gets the passed execute conditions.
*
* @return the passed execute conditions
*/
public abstract String[] getPassedExecuteConditions();
/**
* Gets the failed execute conditions.
*
* @return the failed execute conditions
*/
public abstract String[] getFailedExecuteConditions();
/**
* Gets the execution statement.
*
* @return the execution statement
*/
public abstract Statement getExecutionStatement();
/**
* Inits the method.
*/
public abstract void init();
public void setPhases(PhaseMethodUI[] phases) {
this.phases = phases;
}
public PhaseMethodUI[] getPhases() {
return phases;
}
public HashMap<String,Object> getExportedData(){
HashMap<String,Object> data = exportData();
data.put("methodId", this.getId());
return data;
}
protected abstract HashMap<String,Object> exportData();
}