Commit c10a0a00 authored by Emmanuel Promayon's avatar Emmanuel Promayon

NEW updated cep core schema

parent a4ac4d61
# XSD really needed
find_package(XSD REQUIRED)
# Create lib files from xsd
file (GLOB_RECURSE XSD_INPUT_FILES *.xsd)
# Create lib files from xsd
file (GLOB_RECURSE XSD_INPUT_FILES *.xsd)
# generates headers from scratch
unset(XSD_H)
unset(XSD_SRCS)
# generates headers from scratch
unset(XSD_H)
unset(XSD_SRCS)
# generates headers from scratch
foreach(xsdFile ${XSD_INPUT_FILES})
get_filename_component(xsdFileName ${xsdFile} NAME_WE)
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${xsdFileName}.hxx ${CMAKE_CURRENT_BINARY_DIR}/${xsdFileName}.cxx
COMMAND ${XSD_EXECUTABLE}
ARGS cxx-tree ${XSD_CXX_STD_FLAG} --generate-polymorphic --generate-serialization --namespace-map =cepcoreschema --polymorphic-type Method --polymorphic-type Criteria ${xsdFile}
DEPENDS ${xsdFile})
set(XSD_H ${XSD_H} ${CMAKE_CURRENT_BINARY_DIR}/${xsdFileName}.hxx)
set(XSD_SRCS ${XSD_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/${xsdFileName}.cxx)
endforeach()
# generates headers from scratch
foreach(xsdFile ${XSD_INPUT_FILES})
get_filename_component(xsdFileName ${xsdFile} NAME_WE)
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${xsdFileName}.hxx ${CMAKE_CURRENT_BINARY_DIR}/${xsdFileName}.cxx
COMMAND ${XSD_EXECUTABLE}
ARGS cxx-tree ${XSD_CXX_STD_FLAG} --generate-polymorphic --generate-serialization --namespace-map =cepcoreschema --polymorphic-type Method --polymorphic-type Criteria ${xsdFile}
DEPENDS ${xsdFile})
set(XSD_H ${XSD_H} ${CMAKE_CURRENT_BINARY_DIR}/${xsdFileName}.hxx)
set(XSD_SRCS ${XSD_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/${xsdFileName}.cxx)
endforeach()
camitk_library(STATIC
SOURCES ${XSD_H} ${XSD_SRCS}
......
......@@ -7,6 +7,7 @@
<xsd:include schemaLocation="Contact.xsd"/>
<xsd:include schemaLocation="ActionExtensions.xsd"/>
<xsd:include schemaLocation="ViewerExtensions.xsd"/>
<xsd:include schemaLocation="Applications.xsd"/>
<xsd:include schemaLocation="ComponentExtensions.xsd"/>
<xsd:include schemaLocation="Libraries.xsd"/>
......@@ -21,6 +22,7 @@
<xsd:element name="copyright" type="xsd:string" minOccurs="0"/>
<xsd:element name="actionExtensions" type="ActionExtensions" minOccurs="0"/>
<xsd:element name="viewerExtensions" type="ViewerExtensions" minOccurs="0"/>
<xsd:element name="applications" type="Applications" minOccurs="0"/>
<xsd:element name="componentExtensions" type="ComponentExtensions" minOccurs="0"/>
<xsd:element name="libraries" type="Libraries" minOccurs="0"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://camitk.imag.fr/cepcoreschema"
targetNamespace="http://camitk.imag.fr/cepcoreschema"
elementFormDefault="qualified"
>
<xsd:include schemaLocation="ClassName.xsd"/>
<xsd:include schemaLocation="ViewerType.xsd"/>
<xsd:element name="viewer" type="Viewer"/>
<xsd:complexType name="Viewer">
<xsd:sequence>
<xsd:element name="name" type="xsd:string"/>
<xsd:element name="description" type="xsd:string"/>
<xsd:element name="type" type="ViewerType"/>
<xsd:element name="component" type="ClassName" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://camitk.imag.fr/cepcoreschema"
targetNamespace="http://camitk.imag.fr/cepcoreschema"
elementFormDefault="qualified"
>
<xsd:include schemaLocation="Viewer.xsd"/>
<xsd:include schemaLocation="Dependencies.xsd"/>
<xsd:element name="viewerExtension" type="ViewerExtension"/>
<xsd:complexType name="ViewerExtension">
<xsd:sequence>
<xsd:element name="name" type="xsd:string"/>
<xsd:element name="description" type="xsd:string"/>
<xsd:element name="registerDefaultViewer" minOccurs="0">
<!-- empty element -->
<xsd:complexType/>
</xsd:element>
<xsd:element name="registerNewViewer" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="viewer" type="Viewer"/>
<xsd:element name="dependencies" type="Dependencies" minOccurs="0" />
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://camitk.imag.fr/cepcoreschema"
targetNamespace="http://camitk.imag.fr/cepcoreschema"
elementFormDefault="qualified"
>
<xsd:include schemaLocation="ViewerExtension.xsd"/>
<xsd:complexType name="ViewerExtensions">
<xsd:sequence>
<xsd:element name="viewerExtension" type="ViewerExtension" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://camitk.imag.fr/cepcoreschema"
targetNamespace="http://camitk.imag.fr/cepcoreschema"
elementFormDefault="qualified"
>
<xsd:simpleType name="ViewerType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="DOCKED"/>
<xsd:enumeration value="EMBEDDED"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>
......@@ -6,7 +6,7 @@
<contact>
<email>Celine.Fouard@univ-grenoble-alpes.fr</email>
</contact>
<description>Example of empty CEP</description>
<description>Example of a CEP with ITK Filters</description>
<actionExtensions>
<actionExtension>
<name>Example of image actions</name>
......
<?xml version="1.0" encoding="UTF-8"?>
<cep xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://camitk.imag.fr/cepcoreschema"
xsi:schemaLocation="http://camitk.imag.fr/cepcoreschema ../cep.xsd">
<name>Test Viewer CEP</name>
<contact>
<email>Emmanuel.Promayon@univ-grenoble-alpes.fr</email>
</contact>
<description>Example of a CEP with two viewer extensions</description>
<viewerExtensions>
<viewerExtension>
<name>Test Viewer 1</name>
<description>This viewer extension manages a default viewer</description>
<registerDefaultViewer/>
<viewer>
<name>Test Viewer 1</name>
<description>Example of simple embedded viewer</description>
<type>EMBEDDED</type>
<component>MeshComponent</component>
<component>ImageComponent</component>
</viewer>
</viewerExtension>
<viewerExtension>
<name>Test Viewer 2</name>
<description>This viewer extension manages three named viewer</description>
<registerNewViewer>First Test Viewer</registerNewViewer>
<registerNewViewer>Second Test Viewer</registerNewViewer>
<viewer>
<name>Test Viewer 2</name>
<description>Example of simple docked viewer</description>
<type>DOCKED</type>
<component>Component</component>
</viewer>
</viewerExtension>
</viewerExtensions>
</cep>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment