Removed overkill version attribute from standardComponentIDMapping
authorDaniel Kirschten <daniel.kirschten@gmx.de>
Mon, 16 Sep 2019 15:46:01 +0000 (17:46 +0200)
committerDaniel Kirschten <daniel.kirschten@gmx.de>
Mon, 16 Sep 2019 15:46:01 +0000 (17:46 +0200)
plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/standardComponentIDMapping.json
plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/serializing/IndirectModelComponentCreator.java
plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/serializing/StandardComponentIdMappingContainer.java [deleted file]
plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/serializing/standardComponentIDMapping.json
plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/snippets/highlevelstatehandlers/standard/standardSnippetIDMapping.json
plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/snippets/standardSnippetIDMapping.json
plugins/net.mograsim.machine/src/net/mograsim/machine/standardComponentIDMapping.json

index b753895..d67ee2a 100644 (file)
@@ -1,68 +1,65 @@
 {
-  "version": "0.1.0",
-  "map": {
-       "Am2900MainMemory": "resloader:Am2900Loader:class:net.mograsim.logic.model.am2900.components.ModelAm2900MainMemory",
-       "Am2900MicroInstructionMemory": "resloader:Am2900Loader:class:net.mograsim.logic.model.am2900.components.ModelAm2900MicroInstructionMemory",
-    "Am2904RegCTInstrDecode": "resloader:Am2900Loader:class:net.mograsim.logic.model.am2900.components.am2904.ModelAm2904RegCTInstrDecode",
-    "Am2904ShiftInstrDecode": "resloader:Am2900Loader:class:net.mograsim.logic.model.am2900.components.am2904.ModelAm2904ShiftInstrDecode",
-    "Am2910InstrPLA": "resloader:Am2900Loader:class:net.mograsim.logic.model.am2900.components.am2910.ModelAm2910InstrPLA",
-    "Am2910RegCntr": "resloader:Am2900Loader:class:net.mograsim.logic.model.am2900.components.am2910.ModelAm2910RegCntr",
-    "Am2910SP": "resloader:Am2900Loader:class:net.mograsim.logic.model.am2900.components.am2910.ModelAm2910SP",
-    "dff12": "resloader:Am2900Loader:class:net.mograsim.logic.model.am2900.components.Modeldff12",
-    "dff4_finewe": "resloader:Am2900Loader:class:net.mograsim.logic.model.am2900.components.Modeldff4_finewe",
-    "inc": "resloader:Am2900Loader:class:net.mograsim.logic.model.am2900.components.Modelinc",
-    "nor12": "resloader:Am2900Loader:class:net.mograsim.logic.model.am2900.components.Modelnor12",
-    "ram5_12": "resloader:Am2900Loader:class:net.mograsim.logic.model.am2900.components.Modelram5_12",
-    "sel4_12": "resloader:Am2900Loader:class:net.mograsim.logic.model.am2900.components.Modelsel4_12",
-    "Am2900": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/Am2900.json",
-    "Am2901": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/am2901/Am2901.json",
-    "Am2901ALUFuncDecode": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/am2901/Am2901ALUFuncDecode.json",
-    "Am2901ALUInclDecode": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/am2901/Am2901ALUInclDecode.json",
-    "Am2901ALUInclSourceDecodeInclFunctionDecode": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/am2901/Am2901ALUInclSourceDecodeInclFunctionDecode.json",
-    "Am2901ALUOneBit": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/am2901/Am2901ALUOneBit.json",
-    "Am2904": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/am2904/Am2904.json",
-    "Am2910": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/am2910/Am2910.json",
-    "Am2904MSR": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/am2904/Am2904MSR.json",
-    "Am2904muSR": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/am2904/Am2904muSR.json",
-    "Am2904TestLogic": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/am2904/Am2904TestLogic.json",
-    "Am2901DestDecode": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/am2901/Am2901DestDecode.json",
-    "Am2901SourceDecode": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/am2901/Am2901SourceDecode.json",
-    "_rsLatch": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/_rsLatch.json",
-    "and": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/and.json",
-    "and41": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/and41.json",
-    "andor414": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/andor414.json",
-    "demux2": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/demux2.json",
-    "dff": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/dff.json",
-    "dff4": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/dff4.json",
-    "dff4_invwe": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/dff4_invwe.json",
-    "dff8": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/dff8.json",
-    "dff12_we": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/dff12_we.json",
-    "dff16": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/dff16.json",
-    "dff16_we": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/dff16_we.json",
-    "dff16_invwe": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/dff16_invwe.json",
-    "dff80": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/dff80.json",
-    "dlatch": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/dlatch.json",
-    "dlatch4": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/dlatch4.json",
-    "dlatch8": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/dlatch8.json",
-    "dlatch80": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/dlatch80.json",
-    "fulladder": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/fulladder.json",
-    "halfadder": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/halfadder.json",
-    "mux1": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/mux1.json",
-    "mux1_4": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/mux1_4.json",
-    "mux1_8": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/mux1_8.json",
-    "mux1_12": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/mux1_12.json",
-    "mux1_16": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/mux1_16.json",
-    "mux2": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/mux2.json",
-    "mux3": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/mux3.json",
-    "nand3": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/nand3.json",
-    "not4": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/not4.json",
-    "or4": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/or4.json",
-    "or_4": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/or_4.json",
-    "ram2": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/ram2.json",
-    "ram4": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/ram4.json",
-    "sel1": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/sel1.json",
-    "sel2_4": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/sel2_4.json",
-    "sel3_4": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/sel3_4.json",
-    "xor": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/xor.json"
-  }
+  "Am2900MainMemory": "resloader:Am2900Loader:class:net.mograsim.logic.model.am2900.components.ModelAm2900MainMemory",
+  "Am2900MicroInstructionMemory": "resloader:Am2900Loader:class:net.mograsim.logic.model.am2900.components.ModelAm2900MicroInstructionMemory",
+  "Am2904RegCTInstrDecode": "resloader:Am2900Loader:class:net.mograsim.logic.model.am2900.components.am2904.ModelAm2904RegCTInstrDecode",
+  "Am2904ShiftInstrDecode": "resloader:Am2900Loader:class:net.mograsim.logic.model.am2900.components.am2904.ModelAm2904ShiftInstrDecode",
+  "Am2910InstrPLA": "resloader:Am2900Loader:class:net.mograsim.logic.model.am2900.components.am2910.ModelAm2910InstrPLA",
+  "Am2910RegCntr": "resloader:Am2900Loader:class:net.mograsim.logic.model.am2900.components.am2910.ModelAm2910RegCntr",
+  "Am2910SP": "resloader:Am2900Loader:class:net.mograsim.logic.model.am2900.components.am2910.ModelAm2910SP",
+  "dff12": "resloader:Am2900Loader:class:net.mograsim.logic.model.am2900.components.Modeldff12",
+  "dff4_finewe": "resloader:Am2900Loader:class:net.mograsim.logic.model.am2900.components.Modeldff4_finewe",
+  "inc": "resloader:Am2900Loader:class:net.mograsim.logic.model.am2900.components.Modelinc",
+  "nor12": "resloader:Am2900Loader:class:net.mograsim.logic.model.am2900.components.Modelnor12",
+  "ram5_12": "resloader:Am2900Loader:class:net.mograsim.logic.model.am2900.components.Modelram5_12",
+  "sel4_12": "resloader:Am2900Loader:class:net.mograsim.logic.model.am2900.components.Modelsel4_12",
+  "Am2900": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/Am2900.json",
+  "Am2901": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/am2901/Am2901.json",
+  "Am2901ALUFuncDecode": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/am2901/Am2901ALUFuncDecode.json",
+  "Am2901ALUInclDecode": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/am2901/Am2901ALUInclDecode.json",
+  "Am2901ALUInclSourceDecodeInclFunctionDecode": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/am2901/Am2901ALUInclSourceDecodeInclFunctionDecode.json",
+  "Am2901ALUOneBit": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/am2901/Am2901ALUOneBit.json",
+  "Am2904": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/am2904/Am2904.json",
+  "Am2910": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/am2910/Am2910.json",
+  "Am2904MSR": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/am2904/Am2904MSR.json",
+  "Am2904muSR": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/am2904/Am2904muSR.json",
+  "Am2904TestLogic": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/am2904/Am2904TestLogic.json",
+  "Am2901DestDecode": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/am2901/Am2901DestDecode.json",
+  "Am2901SourceDecode": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/am2901/Am2901SourceDecode.json",
+  "_rsLatch": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/_rsLatch.json",
+  "and": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/and.json",
+  "and41": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/and41.json",
+  "andor414": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/andor414.json",
+  "demux2": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/demux2.json",
+  "dff": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/dff.json",
+  "dff4": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/dff4.json",
+  "dff4_invwe": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/dff4_invwe.json",
+  "dff8": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/dff8.json",
+  "dff12_we": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/dff12_we.json",
+  "dff16": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/dff16.json",
+  "dff16_we": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/dff16_we.json",
+  "dff16_invwe": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/dff16_invwe.json",
+  "dff80": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/dff80.json",
+  "dlatch": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/dlatch.json",
+  "dlatch4": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/dlatch4.json",
+  "dlatch8": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/dlatch8.json",
+  "dlatch80": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/dlatch80.json",
+  "fulladder": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/fulladder.json",
+  "halfadder": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/halfadder.json",
+  "mux1": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/mux1.json",
+  "mux1_4": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/mux1_4.json",
+  "mux1_8": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/mux1_8.json",
+  "mux1_12": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/mux1_12.json",
+  "mux1_16": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/mux1_16.json",
+  "mux2": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/mux2.json",
+  "mux3": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/mux3.json",
+  "nand3": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/nand3.json",
+  "not4": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/not4.json",
+  "or4": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/or4.json",
+  "or_4": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/or_4.json",
+  "ram2": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/ram2.json",
+  "ram4": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/ram4.json",
+  "sel1": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/sel1.json",
+  "sel2_4": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/sel2_4.json",
+  "sel3_4": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/sel3_4.json",
+  "xor": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/xor.json"
 }
\ No newline at end of file
index c149848..4bc9a36 100644 (file)
@@ -16,12 +16,9 @@ import net.mograsim.logic.model.model.LogicModelModifiable;
 import net.mograsim.logic.model.model.components.ModelComponent;
 import net.mograsim.logic.model.model.components.submodels.SubmodelComponent;
 import net.mograsim.logic.model.util.JsonHandler;
-import net.mograsim.logic.model.util.Version;
 
 public class IndirectModelComponentCreator
 {
-       public static final Version CURRENT_STD_ID_MAPPING_VERSION = Version.parseSemver("0.1.0");
-
        private static final Map<String, String> standardComponentIDs = new HashMap<>();
        private static final Map<String, String> standardComponentIDsUnmodifiable = Collections.unmodifiableMap(standardComponentIDs);
 
@@ -42,7 +39,7 @@ public class IndirectModelComponentCreator
                {
                        if (s == null)
                                throw new IOException("Resource not found");
-                       Map<String, String> tmp = JsonHandler.readJson(s, StandardComponentIdMappingContainer.class).getMap();
+                       Map<String, String> tmp = JsonHandler.readJson(s, Map.class);
                        // don't use putAll to apply sanity checks
                        tmp.forEach((st, id) ->
                        {
diff --git a/plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/serializing/StandardComponentIdMappingContainer.java b/plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/serializing/StandardComponentIdMappingContainer.java
deleted file mode 100644 (file)
index 9467200..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-package net.mograsim.logic.model.serializing;
-
-import java.util.Map;
-
-import net.mograsim.logic.model.util.Version;
-
-public class StandardComponentIdMappingContainer extends SerializablePojo
-{
-       public Map<String, String> map;
-
-       public StandardComponentIdMappingContainer(Version version)
-       {
-               super(version);
-       }
-
-       public Map<String, String> getMap()
-       {
-               return map;
-       }
-}
index b0b8bed..00cbca1 100644 (file)
@@ -1,17 +1,14 @@
 {
-  "version": "0.1.0",
-  "map": {
-    "AndGate": "class:net.mograsim.logic.model.model.components.atomic.ModelAndGate",
-    "BitDisplay": "class:net.mograsim.logic.model.model.components.atomic.ModelBitDisplay",
-    "Clock": "class:net.mograsim.logic.model.model.components.atomic.ModelClock",
-    "FixedOutput": "class:net.mograsim.logic.model.model.components.atomic.ModelFixedOutput",
-    "ManualSwitch": "class:net.mograsim.logic.model.model.components.atomic.ModelManualSwitch",
-    "Merger": "class:net.mograsim.logic.model.model.components.atomic.ModelMerger",
-    "NandGate": "class:net.mograsim.logic.model.model.components.atomic.ModelNandGate",
-    "OrGate": "class:net.mograsim.logic.model.model.components.atomic.ModelOrGate",
-    "Splitter": "class:net.mograsim.logic.model.model.components.atomic.ModelSplitter",
-    "TriStateBuffer": "class:net.mograsim.logic.model.model.components.atomic.ModelTriStateBuffer",
-    "TextComponent": "class:net.mograsim.logic.model.model.components.atomic.ModelTextComponent",
-    "WireCrossPoint": "class:net.mograsim.logic.model.model.wires.ModelWireCrossPoint"
-  }
+  "AndGate": "class:net.mograsim.logic.model.model.components.atomic.ModelAndGate",
+  "BitDisplay": "class:net.mograsim.logic.model.model.components.atomic.ModelBitDisplay",
+  "Clock": "class:net.mograsim.logic.model.model.components.atomic.ModelClock",
+  "FixedOutput": "class:net.mograsim.logic.model.model.components.atomic.ModelFixedOutput",
+  "ManualSwitch": "class:net.mograsim.logic.model.model.components.atomic.ModelManualSwitch",
+  "Merger": "class:net.mograsim.logic.model.model.components.atomic.ModelMerger",
+  "NandGate": "class:net.mograsim.logic.model.model.components.atomic.ModelNandGate",
+  "OrGate": "class:net.mograsim.logic.model.model.components.atomic.ModelOrGate",
+  "Splitter": "class:net.mograsim.logic.model.model.components.atomic.ModelSplitter",
+  "TriStateBuffer": "class:net.mograsim.logic.model.model.components.atomic.ModelTriStateBuffer",
+  "TextComponent": "class:net.mograsim.logic.model.model.components.atomic.ModelTextComponent",
+  "WireCrossPoint": "class:net.mograsim.logic.model.model.wires.ModelWireCrossPoint"
 }
\ No newline at end of file