diff --git a/cmake/XsdFu.cmake b/cmake/XsdFu.cmake index b3eeaec8c..06ccb3d0c 100644 --- a/cmake/XsdFu.cmake +++ b/cmake/XsdFu.cmake @@ -52,7 +52,7 @@ set(XSD_FU python ${XSD_FU_SCRIPT}) set(MODEL_VERSION 2016-06) # Path to the model within the source tree -set(MODEL_PATH ${PROJECT_SOURCE_DIR}/specification/src/main/resources/released-schema/${MODEL_VERSION}) +set(MODEL_PATH ${PROJECT_SOURCE_DIR}/specification/src/main/resources/schemas/${MODEL_VERSION}) # Files to use within the model directory set(MODEL_FILES diff --git a/ome-xml/CMakeLists.txt b/ome-xml/CMakeLists.txt index 303c7c983..3324ae8f2 100644 --- a/ome-xml/CMakeLists.txt +++ b/ome-xml/CMakeLists.txt @@ -39,7 +39,7 @@ function(ome_xml_add_test) add_test(${ARGV}) set_tests_properties(${ARGV0} - PROPERTIES ENVIRONMENT "OME_XML_SCHEMADIR=${PROJECT_SOURCE_DIR}/specification/src/main/resources/released-schema;OME_XML_TRANSFORMDIR=${PROJECT_SOURCE_DIR}/specification/src/main/resources/transforms;OME_XML_SAMPLEDIR=${PROJECT_SOURCE_DIR}/specification/src/main/resources/samples") + PROPERTIES ENVIRONMENT "OME_XML_SCHEMADIR=${PROJECT_SOURCE_DIR}/specification/src/main/resources/schemas;OME_XML_TRANSFORMDIR=${PROJECT_SOURCE_DIR}/specification/src/main/resources/transforms;OME_XML_SAMPLEDIR=${PROJECT_SOURCE_DIR}/specification/src/main/resources/samples") endfunction() add_subdirectory(src/main/cpp) diff --git a/ome-xml/src/main/cpp/ome/xml/CMakeLists.txt b/ome-xml/src/main/cpp/ome/xml/CMakeLists.txt index 5db0dd1a0..ac2060b95 100644 --- a/ome-xml/src/main/cpp/ome/xml/CMakeLists.txt +++ b/ome-xml/src/main/cpp/ome/xml/CMakeLists.txt @@ -239,15 +239,15 @@ add_custom_target(gensrc DEPENDS ${OME_XML_GENERATED_MODEL_ENUMS_HEADERS}) # Find and install all schemas -file(GLOB OME_SCHEMAS RELATIVE "${PROJECT_SOURCE_DIR}/specification/src/main/resources/released-schema/" - "${PROJECT_SOURCE_DIR}/specification/src/main/resources/released-schema/catalog.xml" - "${PROJECT_SOURCE_DIR}/specification/src/main/resources/released-schema/2*/*.xsd" - "${PROJECT_SOURCE_DIR}/specification/src/main/resources/released-schema/2*/catalog.xml" - "${PROJECT_SOURCE_DIR}/specification/src/main/resources/released-schema/external/*.xsd" - "${PROJECT_SOURCE_DIR}/specification/src/main/resources/released-schema/external/catalog.xml") +file(GLOB OME_SCHEMAS RELATIVE "${PROJECT_SOURCE_DIR}/specification/src/main/resources/schemas/" + "${PROJECT_SOURCE_DIR}/specification/src/main/resources/schemas/catalog.xml" + "${PROJECT_SOURCE_DIR}/specification/src/main/resources/schemas/2*/*.xsd" + "${PROJECT_SOURCE_DIR}/specification/src/main/resources/schemas/2*/catalog.xml" + "${PROJECT_SOURCE_DIR}/specification/src/main/resources/schemas/external/*.xsd" + "${PROJECT_SOURCE_DIR}/specification/src/main/resources/schemas/external/catalog.xml") foreach(schema ${OME_SCHEMAS}) get_filename_component(SCHEMA_RELEASE ${schema} PATH) - install(FILES "${PROJECT_SOURCE_DIR}/specification/src/main/resources/released-schema/${schema}" + install(FILES "${PROJECT_SOURCE_DIR}/specification/src/main/resources/schemas/${schema}" DESTINATION "${OME_XML_INSTALL_SCHEMADIR}/${SCHEMA_RELEASE}" COMPONENT "runtime") endforeach(schema) @@ -263,10 +263,10 @@ foreach(transform ${OME_TRANSFORMS}) endforeach(transform) # Find and install all samples -file(GLOB_RECURSE OME_SAMPLES RELATIVE "${PROJECT_SOURCE_DIR}/specification/samples/" "${PROJECT_SOURCE_DIR}/specification/samples/*") +file(GLOB_RECURSE OME_SAMPLES RELATIVE "${PROJECT_SOURCE_DIR}/specification/src/main/resources/samples/" "${PROJECT_SOURCE_DIR}/specification/src/main/resources/samples/*") foreach(sample ${OME_SAMPLES}) get_filename_component(SAMPLE_FILE ${sample} PATH) - install(FILES "${PROJECT_SOURCE_DIR}/specification/samples/${sample}" + install(FILES "${PROJECT_SOURCE_DIR}/specification/src/main/resources/samples/${sample}" DESTINATION "${OME_XML_INSTALL_SAMPLEDIR}/${SAMPLE_FILE}" COMPONENT "runtime") endforeach(sample) diff --git a/ome-xml/src/test/cpp/model.cpp b/ome-xml/src/test/cpp/model.cpp index 75a2cf497..7662e1075 100644 --- a/ome-xml/src/test/cpp/model.cpp +++ b/ome-xml/src/test/cpp/model.cpp @@ -83,7 +83,7 @@ namespace /// @todo Use the correct model version when available. /// @todo Use all model versions when transforms available. - path dir(PROJECT_SOURCE_DIR "/specification/samples/" "2015-01"); + path dir(PROJECT_SOURCE_DIR "/specification/src/main/resources/samples/" "2015-01"); if (exists(dir) && is_directory(dir)) { for(directory_iterator i(dir); i != directory_iterator(); ++i) diff --git a/ome-xml/src/test/cpp/transform.cpp b/ome-xml/src/test/cpp/transform.cpp index 42d82a173..7c7660f3f 100644 --- a/ome-xml/src/test/cpp/transform.cpp +++ b/ome-xml/src/test/cpp/transform.cpp @@ -80,7 +80,7 @@ namespace ome::xml::OMETransformResolver tr; std::set versions = tr.schema_versions(); - path samplesdir(PROJECT_SOURCE_DIR "/specification/samples"); + path samplesdir(PROJECT_SOURCE_DIR "/specification/src/main/resources/samples"); if (exists(samplesdir) && is_directory(samplesdir)) { for (directory_iterator si(samplesdir); si != directory_iterator(); ++si) diff --git a/pom.xml b/pom.xml index 74d20004e..a99f2c570 100644 --- a/pom.xml +++ b/pom.xml @@ -120,7 +120,7 @@ ${ome_common.version} 2016-06 - specification/src/main/resources/released-schema/${ome.model.schemaver} + specification/src/main/resources/schemas/${ome.model.schemaver} ${ome.model.schemapath}/ome.xsd diff --git a/specification/publish b/specification/publish index 6e5701b39..2622cc5f3 100755 --- a/specification/publish +++ b/specification/publish @@ -40,7 +40,7 @@ curdate() { # Get the most recent version of a schema # $1=schema name mostrecentversion() { - echo "$(basename $(dirname $(find src/main/resources/released-schema -name "$1" | grep -v $devmarker | sort | tail -n1)))" + echo "$(basename $(dirname $(find src/main/resources/schemas -name "$1" | grep -v $devmarker | sort | tail -n1)))" } # Check if the a schema is the most recent version (return true) or legacy (return false) @@ -88,7 +88,7 @@ schemastatus() { # $1=schema name # $2=release to check if current schemaversion() { - version=$(grep "version=" "src/main/resources/released-schema/$2/$1" | grep -v 'xml' | head -n1 | sed -e 's;^.*version="\([0-9][0-9]*\)".*$;\1;') + version=$(grep "version=" "src/main/resources/schemas/$2/$1" | grep -v 'xml' | head -n1 | sed -e 's;^.*version="\([0-9][0-9]*\)".*$;\1;') if [ -z "$version" ]; then version="1" fi @@ -155,7 +155,7 @@ root=target/published rm -rf "$root" mkdir -p "$root" -for dir in src/main/resources/released-schema/20* +for dir in src/main/resources/schemas/20* do if contains $dir $devmarker; then @@ -407,11 +407,11 @@ the