<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns="http://schema.infor.com/InforOAGIS/2"
    targetNamespace="http://schema.infor.com/InforOAGIS/2" elementFormDefault="qualified"
    attributeFormDefault="unqualified">
    
    <xsd:include schemaLocation="./Components.xsd"/>
    
    <xsd:complexType name="AP_ApplicationType">
        <xsd:sequence>
            <xsd:element name="AP_Configuration" type="AP_ConfigurationType" minOccurs="0" maxOccurs="1" />
            <xsd:element name="AP_Logs" type="AP_LogsType" minOccurs="0" maxOccurs="1" />
            <xsd:element name="AP_ODBCDataSources" type="AP_ODBCDataSourcesType" minOccurs="0" maxOccurs="1" />
            <xsd:element name="AP_Processes" type="AP_ProcessesType" minOccurs="0" maxOccurs="1" />
        </xsd:sequence>	
    </xsd:complexType>
    
    <xsd:complexType name="AP_PropertyType">
        <xsd:sequence>
            <xsd:element name="AP_Name" type="NameType" />
            <xsd:element name="AP_Value" type="StringType" minOccurs="0" />
            <xsd:element name="AP_Status" type="StringType" minOccurs="0" />		
        </xsd:sequence>
    </xsd:complexType>
    
    <xsd:complexType name="AP_FileType">
        <xsd:sequence>
            <xsd:element name="AP_File_Name" type="NameType" />
            <xsd:element name="AP_File_Version" type="StringType" minOccurs="0"/>
            <xsd:element name="AP_File_Location" type="StringType" />
            <xsd:element name="AP_File_Date_Modified" type="StringType" minOccurs="0"/>
            <xsd:element name="AP_File_Content" type="StringType" minOccurs="0"/>
            <xsd:element name="AP_File_Meta_Data" type="StringType" minOccurs="0"/>
            <xsd:element name="AP_File_Status" type="StringType" minOccurs="0"/>		
        </xsd:sequence>	
    </xsd:complexType>
    
    <xsd:complexType name="AP_ConfigurationType">
        <xsd:sequence>
            <xsd:element name="AP_Registry" type="AP_PropertiesType" minOccurs="0" maxOccurs="1" />
            <!-- e.g. AP property files --> 
            <xsd:element name="AP_File" type="AP_FileType" minOccurs="0" maxOccurs="unbounded" />
            <xsd:element name="AP_Other" type="AP_PropertiesType" minOccurs="0" maxOccurs="1" />	
        </xsd:sequence>	
    </xsd:complexType>
    
    <xsd:complexType name="AP_PropertiesType">
        <xsd:sequence>
            <xsd:element ref="AP_Property" minOccurs="0" maxOccurs="unbounded" />
        </xsd:sequence>	
    </xsd:complexType>
    
    <xsd:complexType name="AP_LogsType">
        <xsd:sequence>
            <xsd:element name="AP_Log" type="AP_LogDirectoryType" minOccurs="0" maxOccurs="unbounded" />
        </xsd:sequence>	
    </xsd:complexType>
    
    <xsd:complexType name="AP_LogDirectoryType">
        <xsd:sequence>
            <xsd:element name="AP_DirectoryPath" type="NameType" />
            <!-- selected log files --> 
            <xsd:element name="AP_File" type="AP_FileType" minOccurs="0" maxOccurs="unbounded" /> 
            <!-- log directory property, e.g. access permissions -->
            <xsd:element ref="AP_Property" minOccurs="0" maxOccurs="unbounded" /> 		
        </xsd:sequence> 
    </xsd:complexType>
    
    <xsd:complexType name="AP_ODBCDataSourcesType">
        <xsd:sequence>
            <xsd:element name="AP_ODBCDataSource" type="AP_ODBCDataSourceType" minOccurs="0" maxOccurs="unbounded" />
        </xsd:sequence>
    </xsd:complexType>
    
    <xsd:complexType name="AP_ODBCDataSourceType">
        <xsd:sequence>
            <xsd:element name="AP_DataSourceName" type="NameType" />
            <xsd:element ref="AP_Property" minOccurs="0" maxOccurs="unbounded" />
        </xsd:sequence>	
    </xsd:complexType>
    
    <xsd:complexType name="AP_ProcessesType">
        <xsd:sequence>
            <xsd:element name="AP_Process" type="AP_ProcessType" minOccurs="0" maxOccurs="unbounded" />    
        </xsd:sequence>
    </xsd:complexType>
    
    <xsd:complexType name="AP_ProcessType">
        <xsd:sequence>
            <xsd:element name="AP_ProcessName" type="NameType" /> 
            <!-- properties of a process. this might be e.g. PID, working set memory or other additional information about the process --> 
            <xsd:element ref="AP_Property" minOccurs="0" maxOccurs="unbounded" /> 
        </xsd:sequence>	
    </xsd:complexType>
    <xsd:element name="AP_Property" type="AP_PropertyType" /> 
        
</xsd:schema>
