diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 53c66677..c9957d9f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,18 +16,28 @@ jobs: strategy: fail-fast: false matrix: - java: [ '8', '11', '16', '17', '19' ] - runs-on: [ubuntu-latest, macos-latest, windows-latest] + java: [ '8', '11', '16', '17', '19', '21' ] + runs-on: [ubuntu-latest, macos-12, windows-latest] + exclude: + - runs-on: macos-latest + java: "8" + - runs-on: macos-latest + java: "16" name: Test on Java ${{ matrix.Java }} on ${{ matrix.runs-on }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up JDK ${{ matrix.Java }} - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: ${{ matrix.Java }} distribution: 'temurin' + - name: Install HDF5 on macos-latest (v14) + if: ${{ matrix.runs-on == 'macos-latest' }} + run: | + brew install hdf5 + - name: Install and test (non Win) env: main_repo_branch: ${GITHUB_REF_NAME} diff --git a/.github/workflows/javadocs.yml b/.github/workflows/javadocs.yml index df4fda2e..366be122 100644 --- a/.github/workflows/javadocs.yml +++ b/.github/workflows/javadocs.yml @@ -9,16 +9,17 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up JDK 17 - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: java-version: 17 java-package: jdk + distribution: 'temurin' - name: Set up Python 3.9 - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: 3.9 @@ -28,17 +29,17 @@ jobs: pip install ghp-import - name: Checkout NeuroML2 - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: repository: NeuroML/NeuroML2 - ref: development + ref: ${{ github.ref }} path: NeuroML2 - name: Checkout org.neuroml.model.injectingplugin - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: repository: NeuroML/org.neuroml.model.injectingplugin - ref: development + ref: ${{ github.ref }} path: org.neuroml.model.injectingplugin - name: Install NeuroML deps diff --git a/pom.xml b/pom.xml index 8636ebc7..d783f870 100644 --- a/pom.xml +++ b/pom.xml @@ -3,10 +3,10 @@ 4.0.0 org.neuroml.model org.neuroml.model - 1.9.1 + 1.10.1 bundle - 2.3 + 2.3.1 UTF-8 @@ -19,12 +19,12 @@ org.neuroml.model.injectingplugin org.neuroml.model.injectingplugin - 1.9.1 + 1.10.1 org.neuroml.core neuroml2-base-definitions - 1.9.1 + 1.10.1 @@ -64,7 +64,7 @@ <br /> <br /> - Copyright NeuroML Contributors 2022 + Copyright NeuroML Contributors 2024 @@ -105,7 +105,7 @@ - org.neuroml.core:neuroml2-base-definitions:1.9.1 + org.neuroml.core:neuroml2-base-definitions:1.10.1 @@ -158,8 +158,8 @@ maven-compiler-plugin 3.0 - 1.7 - 1.7 + 1.8 + 1.8 @@ -198,7 +198,7 @@ org.neuroml.model.injectingplugin org.neuroml.model.injectingplugin - 1.9.1 + 1.10.1 diff --git a/src/main/java/org/neuroml/model/util/CellUtils.java b/src/main/java/org/neuroml/model/util/CellUtils.java index 5d6527a9..06d54627 100644 --- a/src/main/java/org/neuroml/model/util/CellUtils.java +++ b/src/main/java/org/neuroml/model/util/CellUtils.java @@ -13,6 +13,8 @@ import org.neuroml.model.Point3DWithDiam; import org.neuroml.model.Segment; import org.neuroml.model.SegmentGroup; +import org.neuroml.model.Morphology; +import org.neuroml.model.BiophysicalProperties; /** * @@ -32,9 +34,16 @@ public static boolean isUnbranchedNonOverlapping(SegmentGroup sg) { sg.getNeuroLexId().equals(NEUROML2_NEUROLEX_UNBRANCHED_NONOVERLAPPING_SEG_GROUP); } - public static boolean hasUnbranchedNonOverlappingInfo(Cell cell) + @Deprecated + public static boolean hasUnbranchedNonOverlappingInfo(Cell cell) throws NeuroMLException { - for (SegmentGroup sg : cell.getMorphology().getSegmentGroup()) + return hasUnbranchedNonOverlappingInfo(cell, null); + } + + public static boolean hasUnbranchedNonOverlappingInfo(Cell cell, NeuroMLDocument nml2doc) throws NeuroMLException { + + Morphology morphology = getCellMorphology(cell, nml2doc); + for (SegmentGroup sg : morphology.getSegmentGroup()) { if (isUnbranchedNonOverlapping(sg)) { @@ -44,6 +53,49 @@ public static boolean hasUnbranchedNonOverlappingInfo(Cell cell) return false; } + public static Morphology getCellMorphology(Cell cell, NeuroMLDocument nml2doc) throws NeuroMLException { + + if (cell.getMorphology()!=null) { + return cell.getMorphology(); + } + else if (cell.getMorphologyAttr() !=null) + { + for (Morphology m: nml2doc.getMorphology()) + { + if (m.getId().equals(cell.getMorphologyAttr())) + return m; + } + throw new NeuroMLException("Cannot find morphology: "+cell.getMorphologyAttr()+" specified as an attribute in cell: "+cell.getId()); + } + else if (nml2doc==null) + { + return null; + // Cannot get any morphology attribute + } + return null; // may be expected... + } + + public static BiophysicalProperties getCellBiophysicalProperties(Cell cell, NeuroMLDocument nml2doc) { + + if (cell.getBiophysicalProperties()!=null) { + + return cell.getBiophysicalProperties(); + } + + else if (cell.getBiophysicalPropertiesAttr() !=null) + { + for (BiophysicalProperties bp: nml2doc.getBiophysicalProperties()) { + if (bp.getId().equals(cell.getBiophysicalPropertiesAttr())) + return bp; + } + } + return null; + } + + /** + * @deprecated use getIdsVsSegments(Cell cell, NeuroMLDocument nml2doc) instead. + */ + @Deprecated public static LinkedHashMap getIdsVsSegments(Cell cell) { LinkedHashMap idsVsSegments = new LinkedHashMap(); @@ -53,6 +105,16 @@ public static LinkedHashMap getIdsVsSegments(Cell cell) { return idsVsSegments; } + public static LinkedHashMap getIdsVsSegments(Cell cell, NeuroMLDocument nml2doc) throws NeuroMLException { + + LinkedHashMap idsVsSegments = new LinkedHashMap(); + Morphology morphology = getCellMorphology(cell, nml2doc); + for (Segment seg : morphology.getSegment()) { + idsVsSegments.put(seg.getId(), seg); + } + return idsVsSegments; + } + public static SegmentGroup getSegmentGroup(Cell cell, String id) throws NeuroMLException { for (SegmentGroup sg: cell.getMorphology().getSegmentGroup()) { if (sg.getId().equals(id)) @@ -61,8 +123,13 @@ public static SegmentGroup getSegmentGroup(Cell cell, String id) throws NeuroMLE throw new NeuroMLException("No SegmentGroup with id: "+id+" in cell with id: "+cell.getId()); } + @Deprecated public static Segment getSegmentWithId(Cell cell, int segmentId) throws NeuroMLException { - List segments = cell.getMorphology().getSegment(); + return getSegmentWithId(cell, null, segmentId); + } + + public static Segment getSegmentWithId(Cell cell, NeuroMLDocument nml2doc, int segmentId) throws NeuroMLException { + List segments = getCellMorphology(cell, nml2doc).getSegment(); if (segments.size()>segmentId) { Segment guess = segments.get(segmentId); if (guess.getId()==segmentId) @@ -75,16 +142,21 @@ public static Segment getSegmentWithId(Cell cell, int segmentId) throws NeuroMLE throw new NeuroMLException("No Segment with id: "+segmentId+" in cell with id: "+cell.getId()); } - public static LinkedHashMap getNamesVsSegmentGroups(Cell cell) { + public static LinkedHashMap getNamesVsSegmentGroups(Cell cell, NeuroMLDocument nml2doc) throws NeuroMLException { LinkedHashMap namesVsSegmentGroups = new LinkedHashMap(); - for (SegmentGroup sg : cell.getMorphology().getSegmentGroup()) { + for (SegmentGroup sg : getCellMorphology(cell, nml2doc).getSegmentGroup()) { namesVsSegmentGroups.put(sg.getId(), sg); } return namesVsSegmentGroups; } - public static ArrayList getSegmentIdsInGroup(Cell cell, String segmentGroup) { + public static LinkedHashMap getNamesVsSegmentGroups(Cell cell) throws NeuroMLException { + + return getNamesVsSegmentGroups(cell, null); + } + + public static ArrayList getSegmentIdsInGroup(Cell cell, String segmentGroup) throws NeuroMLException { for (SegmentGroup sg : cell.getMorphology().getSegmentGroup()) { if (sg.getId().equals(segmentGroup)) { @@ -121,34 +193,45 @@ public static boolean hasSegmentGroup(Cell cell, String segmentGroup) { return false; } + @Deprecated public static ArrayList getSegmentsInGroup(Cell cell, String segmentGroup) throws NeuroMLException { + return getSegmentsInGroup(cell, null, segmentGroup); + } - for (SegmentGroup sg : cell.getMorphology().getSegmentGroup()) { + public static ArrayList getSegmentsInGroup(Cell cell, NeuroMLDocument nml2doc, String segmentGroup) throws NeuroMLException { + + for (SegmentGroup sg : CellUtils.getCellMorphology(cell, nml2doc).getSegmentGroup()) { if (sg.getId().equals(segmentGroup)) { - LinkedHashMap namesVsSegmentGroups = getNamesVsSegmentGroups(cell); - return getSegmentsInGroup(cell, namesVsSegmentGroups, sg); + LinkedHashMap namesVsSegmentGroups = getNamesVsSegmentGroups(cell, nml2doc); + return getSegmentsInGroup(cell, nml2doc, namesVsSegmentGroups, sg); } } throw new NeuroMLException("No SegmentGroup: "+segmentGroup+" in cell with id: "+cell.getId()); } + public static ArrayList getSegmentsInGroup(Cell cell, LinkedHashMap namesVsSegmentGroups, SegmentGroup segmentGroup) throws NeuroMLException { + return getSegmentsInGroup(cell, null, namesVsSegmentGroups, segmentGroup); + } + + public static ArrayList getSegmentsInGroup(Cell cell, NeuroMLDocument nml2doc, LinkedHashMap namesVsSegmentGroups, SegmentGroup segmentGroup) throws NeuroMLException { + ArrayList segsHere = new ArrayList(); for (Member memb : segmentGroup.getMember()) { - segsHere.add(getSegmentWithId(cell, memb.getSegment())); + segsHere.add(getSegmentWithId(cell, nml2doc, memb.getSegment())); } for (Include inc : segmentGroup.getInclude()) { String sg = inc.getSegmentGroup(); - ArrayList segs = getSegmentsInGroup(cell, namesVsSegmentGroups, namesVsSegmentGroups.get(sg)); + ArrayList segs = getSegmentsInGroup(cell, nml2doc, namesVsSegmentGroups, namesVsSegmentGroups.get(sg)); segsHere.addAll(segs); } return segsHere; } - public static LinkedHashMap> getSegmentGroupsVsSegIds(Cell cell) { + public static LinkedHashMap> getSegmentGroupsVsSegIds(Cell cell) throws NeuroMLException { LinkedHashMap> sgVsSegId = new LinkedHashMap>(); @@ -162,13 +245,33 @@ public static LinkedHashMap> getSegmentGroupsVs return sgVsSegId; } + public static LinkedHashMap> getSegmentGroupsVsSegIds(Cell cell, NeuroMLDocument nml2doc) throws NeuroMLException { + + LinkedHashMap> sgVsSegId = new LinkedHashMap>(); + + Morphology morphology = getCellMorphology(cell, nml2doc); + + LinkedHashMap namesVsSegmentGroups = getNamesVsSegmentGroups(cell, nml2doc); + + for (SegmentGroup sg : morphology.getSegmentGroup()) { + ArrayList segsHere = getSegmentIdsInGroup(namesVsSegmentGroups, sg); + sgVsSegId.put(sg, segsHere); + } + + return sgVsSegId; + } + public static double distance(Point3DWithDiam p, Point3DWithDiam d) { return Math.sqrt( Math.pow(p.getX()-d.getX(),2) + Math.pow(p.getY()-d.getY(),2) + Math.pow(p.getZ()-d.getZ(),2) ); } public static double getFractionAlongSegGroupLength(Cell cell, String segmentGroup, int segmentId, float fractAlongSegment) throws NeuroMLException { + return getFractionAlongSegGroupLength(cell, null, segmentGroup, segmentId, fractAlongSegment); + } + + public static double getFractionAlongSegGroupLength(Cell cell, NeuroMLDocument nml2doc, String segmentGroup, int segmentId, float fractAlongSegment) throws NeuroMLException { - ArrayList segs = getSegmentsInGroup(cell, segmentGroup); + ArrayList segs = getSegmentsInGroup(cell, nml2doc, segmentGroup); if (segs.size()==1) { if(segs.get(0).getId()!=segmentId) @@ -235,30 +338,45 @@ public static double getFractionAlongSegGroupLength(Cell cell, String segmentGro public static void main(String[] args) throws Exception { NeuroMLConverter conv = new NeuroMLConverter(); - //String test = "/home/padraig/neuroConstruct/osb/cerebral_cortex/networks/ACnet2/neuroConstruct/generatedNeuroML2/bask.cell.nml"; + + + ArrayList cellFiles = new ArrayList(); + cellFiles.add("../neuroConstruct/osb/cerebral_cortex/networks/ACnet2/neuroConstruct/generatedNeuroML2/bask.cell.nml"); //String test = "/home/padraig/neuroConstruct/osb/hippocampus/networks/nc_superdeep/neuroConstruct/generatedNeuroML2/pvbasketcell.cell.nml"; - String test = "/Users/padraig/neuroConstruct/osb/cerebral_cortex/networks/ACnet2/neuroConstruct/generatedNeuroML2/pyr_4_sym.cell.nml"; - test = "/Users/padraig/git/GoC_Varied_Inputs/Cells/Golgi/GoC.cell.nml"; + cellFiles.add("../neuroConstruct/osb/cerebral_cortex/networks/ACnet2/neuroConstruct/generatedNeuroML2/pyr_4_sym.cell.nml"); + //test = "/Users/padraig/git/GoC_Varied_Inputs/Cells/Golgi/GoC.cell.nml"; //test = "/home/padraig/neuroConstruct/osb/cerebral_cortex/networks/ACnet2/neuroConstruct/generatedNeuroML2/bask_soma.cell.nml"; - NeuroMLDocument nml2 = conv.loadNeuroML(new File(test)); - Cell cell = nml2.getCell().get(0); - System.out.println("cell: " + cell.getId()); + cellFiles.add("../git/morphology_include/pyr_soma_m_out_b_in.cell.nml"); - LinkedHashMap ids = getIdsVsSegments(cell); + for(String cellFile : cellFiles) + { + NeuroMLDocument nml2doc = conv.loadNeuroML(new File(cellFile), true, true); - System.out.println("getIdsVsSegments: "); - for (Integer id: ids.keySet()) { - System.out.println("ID "+id+": "+ids.get(id)); - } + Cell cell = nml2doc.getCell().get(0); + System.out.println("-------- Cell loaded: " + cell.getId()+" from "+cellFile); - LinkedHashMap> sgVsSegId = getSegmentGroupsVsSegIds(cell); - for (SegmentGroup sg: sgVsSegId.keySet()) { - System.out.println("SG "+sg.getId()+": "+sgVsSegId.get(sg)); + LinkedHashMap ids = getIdsVsSegments(cell, nml2doc); + + System.out.println("getIdsVsSegments: "); + for (Integer id: ids.keySet()) { + System.out.println("ID "+id+": "+ids.get(id)); + } + + System.out.println("hasUnbranchedNonOverlappingInfo: "+hasUnbranchedNonOverlappingInfo(cell, nml2doc)); + System.out.println("getSegmentWithId: "+getSegmentWithId(cell, nml2doc, 0)); + + System.out.println("getSegmentsInGroup: "+getSegmentsInGroup(cell, nml2doc, "soma_group")); + + System.out.println("getFractionAlongSegGroupLength: "+getFractionAlongSegGroupLength(cell, nml2doc, "soma_group", 0, 0.1f)); + + LinkedHashMap> sgVsSegId = getSegmentGroupsVsSegIds(cell, nml2doc); + for (SegmentGroup sg: sgVsSegId.keySet()) { + System.out.println("SG "+sg.getId()+": "+sgVsSegId.get(sg)); + } + //getFractionAlongSegGroupLength(cell, "basal2", 8, 0.1f); + //getFractionAlongSegGroupLength(cell, "some_apicals", 2, 0.5f); } - getFractionAlongSegGroupLength(cell, "soma_group", 0, 0.1f); - //getFractionAlongSegGroupLength(cell, "basal2", 8, 0.1f); - //getFractionAlongSegGroupLength(cell, "some_apicals", 2, 0.5f); } diff --git a/src/main/java/org/neuroml/model/util/NeuroML2Validator.java b/src/main/java/org/neuroml/model/util/NeuroML2Validator.java index 625da19e..63978f70 100644 --- a/src/main/java/org/neuroml/model/util/NeuroML2Validator.java +++ b/src/main/java/org/neuroml/model/util/NeuroML2Validator.java @@ -40,6 +40,8 @@ import org.neuroml.model.SegmentGroup; import org.neuroml.model.Species; import org.neuroml.model.Standalone; +import org.neuroml.model.Morphology; +import org.neuroml.model.BiophysicalProperties; import org.w3c.dom.Element; import org.xml.sax.SAXException; @@ -139,22 +141,22 @@ public void validateWithTests(File xmlFile) throws SAXException, IOException, Ne return; } NeuroMLConverter conv = new NeuroMLConverter(); - NeuroMLDocument nml2 = conv.loadNeuroML(xmlFile, true, false); - validateWithTests(nml2); + NeuroMLDocument nml2doc = conv.loadNeuroML(xmlFile, true, false); + validateWithTests(nml2doc); } /* * TODO: Needs to be moved to a separate package for validation! */ - public void validateWithTests(NeuroMLDocument nml2) throws NeuroMLException + public void validateWithTests(NeuroMLDocument nml2doc) throws NeuroMLException { // Checks the areas the Schema just can't reach... ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// - for (IncludeType include: nml2.getInclude()) { + for (IncludeType include: nml2doc.getInclude()) { File inclFile = new File(baseDirectory, include.getHref()); test(TEST_INCLUDED_FILES_EXIST, "Included file: "+include.getHref() @@ -164,7 +166,7 @@ public void validateWithTests(NeuroMLDocument nml2) throws NeuroMLException LinkedHashMap standalones = null; try { - standalones = NeuroMLConverter.getAllStandaloneElements(nml2); + standalones = NeuroMLConverter.getAllStandaloneElements(nml2doc); } catch (NeuroMLException ne) { @@ -186,7 +188,7 @@ public void validateWithTests(NeuroMLDocument nml2) throws NeuroMLException ////////////////////////////////////////////////////////////////// HashMap> cellidsVsSegs = new HashMap>(); - for (Cell cell: nml2.getCell()){ + for (Cell cell: nml2doc.getCell()){ // Morphologies ArrayList segIds = new ArrayList(); @@ -194,8 +196,10 @@ public void validateWithTests(NeuroMLDocument nml2) throws NeuroMLException boolean rootFound = false; int numParentless = 0; - if (cell.getMorphology() != null) { - for(Segment segment: cell.getMorphology().getSegment()) { + Morphology morphology = CellUtils.getCellMorphology(cell, nml2doc); + + if (morphology != null) { + for(Segment segment: morphology.getSegment()) { int segId = segment.getId(); test(TEST_REPEATED_IDS, "Current segment ID: "+segId, !segIds.contains(segId)); @@ -212,7 +216,7 @@ public void validateWithTests(NeuroMLDocument nml2) throws NeuroMLException test(WARN_ROOT_ID_0, "", rootFound); test(TEST_ONE_SEG_MISSING_PARENT, "", (numParentless==1)); - for(SegmentGroup segmentGroup: cell.getMorphology().getSegmentGroup()) { + for(SegmentGroup segmentGroup: morphology.getSegmentGroup()) { test(TEST_REPEATED_GROUPS, "SegmentGroup: "+segmentGroup.getId(), !segGroups.contains(segmentGroup.getId())); @@ -245,7 +249,7 @@ public void validateWithTests(NeuroMLDocument nml2) throws NeuroMLException } } - for(SegmentGroup segmentGroup: cell.getMorphology().getSegmentGroup()) { + for(SegmentGroup segmentGroup: morphology.getSegmentGroup()) { segGroups.add(segmentGroup.getId()); for (Include inc: segmentGroup.getInclude()) { // This second time time, all segment groups are known, so fail if included group missing @@ -257,8 +261,10 @@ public void validateWithTests(NeuroMLDocument nml2) throws NeuroMLException //TODO: test for morphology attribute! } - if (cell.getBiophysicalProperties()!=null) { - MembraneProperties mp = cell.getBiophysicalProperties().getMembraneProperties(); + BiophysicalProperties bp = CellUtils.getCellBiophysicalProperties(cell, nml2doc); + + if (bp!=null) { + MembraneProperties mp = bp.getMembraneProperties(); //TODO: consolidate! for (ChannelDensity cd: mp.getChannelDensity()) { @@ -292,7 +298,7 @@ public void validateWithTests(NeuroMLDocument nml2) throws NeuroMLException test(TEST_ION_CHANNEL_EXISTS, "Ion channel: "+cd.getIonChannel()+" in "+cd.getId()+" not found!", standaloneIds.contains(cd.getIonChannel())); } - IntracellularProperties ip = cell.getBiophysicalProperties().getIntracellularProperties(); + IntracellularProperties ip = bp.getIntracellularProperties(); for (Species sp: ip.getSpecies()) { /* See PospischilEtAl2008/NeuroML2/cells/LTS/LTS.cell.nml for example. @@ -306,7 +312,7 @@ public void validateWithTests(NeuroMLDocument nml2) throws NeuroMLException } - for (Network network: nml2.getNetwork()) { + for (Network network: nml2doc.getNetwork()) { ArrayList allNetElementIds = new ArrayList(); ////////////////////////////////////////////////////////////////// @@ -463,6 +469,18 @@ public void validateWithTests(NeuroMLDocument nml2) throws NeuroMLException if (warnings.length()==0) warnings.append(NO_WARNINGS); + + String testFail = "failed!"; + if (validity.indexOf(testFail)>=0) + { + + int num = (validity.length() - validity.toString().replaceAll(testFail,"").length())/testFail.length(); + if (num==1) + validity.append("\n1 failure in validation!"); + else + validity.append("\n"+num+" failures in validation!"); + } + } @@ -539,7 +557,11 @@ public static void testValidity(File xmlFile, StreamSource schemaFileSource) thr public static void main(String[] args) throws Exception { - File f = new File("../neuroConstruct/osb/showcase/BlueBrainProjectShowcase/NMC/NeuroML2/CaDynamics_E2_NML2.nml"); + //File f = new File("../git/morphology_include/pyr_soma_m_in_b_in.cell.nml"); + //File f = new File("../git/morphology_include/pyr_soma_m_out_b_in.cell.nml"); + //File f = new File("../git/morphology_include/pyr_soma_m_in_b_out.cell.nml"); + //File f = new File("../git/morphology_include/pyr_soma_m_out_b_out.cell.nml"); + File f = new File("../NeuroML2/examples/NML2_FullNeuroML.nml"); //File f = new File("../neuroConstruct/osb/cerebral_cortex/networks/ACnet2/neuroConstruct/generatedNeuroML2/pyr_4_sym.cell.nml"); //File f = new File("../neuroConstruct/osb/cerebral_cortex/networks/ACnet2/neuroConstruct/generatedNeuroML2/MediumNet.net.nml"); //File f = new File("../OpenCortex/examples/Deterministic.net.nml"); diff --git a/src/main/java/org/neuroml/model/util/NeuroMLElements.java b/src/main/java/org/neuroml/model/util/NeuroMLElements.java index e9118b35..ad0a3111 100644 --- a/src/main/java/org/neuroml/model/util/NeuroMLElements.java +++ b/src/main/java/org/neuroml/model/util/NeuroMLElements.java @@ -2,7 +2,7 @@ public class NeuroMLElements { - public static final String ORG_NEUROML_MODEL_VERSION = "1.9.1"; + public static final String ORG_NEUROML_MODEL_VERSION = "1.10.1"; public static final String NAMESPACE_URI_VERSION_2 = "http://www.neuroml.org/schema/neuroml2"; @@ -17,11 +17,12 @@ public class NeuroMLElements { public static final String DEFAULT_SCHEMA_LOCATION_VERSION_2_1 = "https://raw.githubusercontent.com/NeuroML/NeuroML2/development/Schemas/NeuroML2/NeuroML_v2.1.xsd"; public static final String DEFAULT_SCHEMA_LOCATION_VERSION_2_2 = "https://raw.githubusercontent.com/NeuroML/NeuroML2/development/Schemas/NeuroML2/NeuroML_v2.2.xsd"; public static final String DEFAULT_SCHEMA_LOCATION_VERSION_2_3 = "https://raw.githubusercontent.com/NeuroML/NeuroML2/development/Schemas/NeuroML2/NeuroML_v2.3.xsd"; + public static final String DEFAULT_SCHEMA_LOCATION_VERSION_2_3_1 = "https://raw.githubusercontent.com/NeuroML/NeuroML2/development/Schemas/NeuroML2/NeuroML_v2.3.1.xsd"; - public static final String LATEST_SCHEMA_VERSION = "2.3"; + public static final String LATEST_SCHEMA_VERSION = "2.3.1"; public static final String LATEST_SCHEMA = "/Schemas/NeuroML2/NeuroML_v"+LATEST_SCHEMA_VERSION+".xsd"; - public static final String LATEST_SCHEMA_LOCATION = DEFAULT_SCHEMA_LOCATION_VERSION_2_3; + public static final String LATEST_SCHEMA_LOCATION = DEFAULT_SCHEMA_LOCATION_VERSION_2_3_1; // Top level... public static final String NEUROML_ROOT = "neuroml"; @@ -46,6 +47,7 @@ public class NeuroMLElements { public static final String BASE_RATE_UNIT = "baseRateUnit"; public static final String CELL_COMP_TYPE = "cell"; + public static final String CELL_2CA_POOLS_COMP_TYPE = "cell2CaPools"; public static final String BASE_COND_SCALING_CA = "baseConductanceScalingCaDependent"; diff --git a/src/main/resources/bindings/NeuroML_v2.3.1.xjb b/src/main/resources/bindings/NeuroML_v2.3.1.xjb new file mode 100644 index 00000000..8ddb502b --- /dev/null +++ b/src/main/resources/bindings/NeuroML_v2.3.1.xjb @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + +