<?xml version="1.0" encoding="utf-8"?>
<!--
        
        ** OAGIS® Revision: 9.1  **
        ** Date: 11 May 2007 **
        ** Copyright 1997-2007, All Rights Reserved **
        
        This is an OAGIS® BOD XML Schema (XSD) Definition.
        
       License information for this file is provided in the file **OAGi License Agreement.txt** that is provided with this download package.
        
        For support, more information, or to report implementation bugs, please contact the Open Applications Group at xml@openapplications.org.
        
        XML Schema 
        
-->
 
<!--
© Copyright 2007 Infor Global Solutions Technology GmbH and/or its affiliates and subsidiaries. All rights reserved. The 
word and design marks set forth herein are trademarks and/or registered trademarks of Infor Global Solutions 
Technology GmbH and/or its affiliates and subsidiaries. All rights reserved. All other trademarks listed herein 
are the property of their respective owners.
 
-->
 
<!--    *****     Update Log     *****
 
Date          By                Note
May 01 2014   Ravi.Ravuri       Created LicenseMaintenaceOrder.xsd
May 24 2014   Ravi.Ravuri       Recreated based on discussion with Tom
May 28 2014   Ravi.Ravuri       Renamed this file name with 'LicenseUsage'

*****     Update End     *****
 
-->
<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/Common/Components.xsd"/>
        
        <xsd:element name="LicenseUsage" type="LicenseUsageType">
                
                <xsd:annotation>
                        
                        <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">LMO</xsd:documentation>
                        
                </xsd:annotation>
                
        </xsd:element>
        
        <xsd:complexType name="LicenseUsageType">
                
                <xsd:sequence>
                        <xsd:element ref="DocumentID" minOccurs="0"/>
                        <xsd:element ref="Description" minOccurs="0"/>
                        <xsd:element ref="Status" minOccurs="0"/>
                        <xsd:element ref="DocumentDateTime" minOccurs="0"/>
                        <xsd:element ref="ProductName"  minOccurs="0"/>
                        <xsd:element ref="InstalledLocation"  minOccurs="0"/>
                        <xsd:element ref="Version"  minOccurs="0"/>
                        <xsd:element ref="Platform"  minOccurs="0"/>
                        <xsd:element ref="NamedUsers" minOccurs="0" maxOccurs="unbounded"/>
                        <xsd:element ref="ApplicationKey"  minOccurs="0"/>
                        <xsd:element ref="Consolidations" minOccurs="0" maxOccurs="unbounded"/>
                        <xsd:element ref="ItemCounts" minOccurs="0" maxOccurs="unbounded"/>
                </xsd:sequence>
                
        </xsd:complexType>

        <!-- Platform Resource -->
        <xsd:complexType name="PlatformType">
                <xsd:sequence>
                        <xsd:element ref="Identity" minOccurs="0"/>
                        <xsd:element ref="OSName" minOccurs="0"/>
                        <xsd:element ref="OSVersion" minOccurs="0"/>
                        <xsd:element ref="TotalCPU" minOccurs="0"/>
                        <xsd:element ref="ActiveCPU" minOccurs="0"/>
                        <xsd:element ref="CPUCores" minOccurs="0"/>
                        <xsd:element ref="CPUPercentageAllocated" minOccurs="0"/>
                        <xsd:element ref="PlatformModel" minOccurs="0"/>
                        <xsd:element ref="PlatformVendor" minOccurs="0"/>
                </xsd:sequence>
        </xsd:complexType>
        <xsd:element name="Platform" type="PlatformType">
                <xsd:annotation>
                        <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">
                                This type provides the details of the platform the application is hosted on. It details the processor / core and model details to cater for licenses where the applications are tier or processor based. 
                                
                                It is repeated for each platform.
                        </xsd:documentation>
                </xsd:annotation>
        </xsd:element>
        <xsd:element name="OSName" type="StringType">
                <xsd:annotation>
                        <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">
                                Operating system the applications operate on
                        </xsd:documentation>
                </xsd:annotation>
        </xsd:element>
        <xsd:element name="OSVersion" type="StringType">
                <xsd:annotation>
                        <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">
                                The version number of the operating environment.
                        </xsd:documentation>
                </xsd:annotation>
        </xsd:element>
        <xsd:element name="TotalCPU" type="QuantityType">
                <xsd:annotation>
                        <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">
                                Total number of central processing units installed or available to the system in total
                        </xsd:documentation>
                </xsd:annotation>
        </xsd:element>
        <xsd:element name="ActiveCPU" type="QuantityType">
                <xsd:annotation>
                        <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">
                                The number of central processing units of the total available that are active
                        </xsd:documentation>
                </xsd:annotation>
        </xsd:element>
        <xsd:element name="CPUCores" type="QuantityType">
                <xsd:annotation>
                        <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">
                                Total number of processor cores available
                        </xsd:documentation>
                </xsd:annotation>
        </xsd:element>
        <xsd:element name="CPUPercentageAllocated" type="NumericType">
                <xsd:annotation>
                        <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">
                                The percentage of the processing capability of the platform allocated to the instance
                        </xsd:documentation>
                </xsd:annotation>
        </xsd:element>
        <xsd:element name="PlatformModel" type="StringType">
                <xsd:annotation>
                        <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">
                                Central processing unit feature code or type. For example “x86”, “i5”, “Cloud resource” or what have you.
                        </xsd:documentation>
                </xsd:annotation>
        </xsd:element>
        <xsd:element name="PlatformVendor" type="StringType">
                <xsd:annotation>
                        <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">
                                The manufacturer of the central processing unit e.g.. Intel, IBM, Motorola, AMD or what have you
                        </xsd:documentation>
                </xsd:annotation>
        </xsd:element>
        
        <!-- ItemCount -->
        <xsd:complexType name="ItemCountsType">
                <xsd:sequence>
                        <xsd:element ref="Identity" minOccurs="0"/>
                        <xsd:element ref="Description" minOccurs="0"/>
                        <xsd:element ref="Unit" minOccurs="0"/>
                        <xsd:element ref="CreationDateTime" minOccurs="0"/>
                        <xsd:element ref="Total" minOccurs="0"/>
                </xsd:sequence>
        </xsd:complexType>
        <xsd:element name="ItemCounts" type="ItemCountsType">
                <xsd:annotation>
                        <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">
                                This holds details that relate to counts of things. For example the number of employees, the number of product lines, or the number of reports produced.
                        </xsd:documentation>
                </xsd:annotation>
        </xsd:element>
        <xsd:element name="Identity" type="IdentifierType">
                <xsd:annotation>
                        <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">
                                The identity allocated to this count type which is defined per application
                        </xsd:documentation>
                </xsd:annotation>
        </xsd:element>
        <xsd:element name="Total" type="QuantityType">
                <xsd:annotation>
                        <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">
                                The count value (integer)
                        </xsd:documentation>
                </xsd:annotation>
        </xsd:element>

        <!-- Product Key -->
        <xsd:complexType name="ApplicationKeyType">
                <xsd:sequence>
                        <xsd:element ref="Name" minOccurs="0"/>
                        <xsd:element ref="Description" minOccurs="0"/>
                        <xsd:element ref="SerialNumber" minOccurs="0"/>
                        <xsd:element ref="PlatFormModel" minOccurs="0"/>
                        <xsd:element ref="NoOfProcessors" minOccurs="0"/>
                        <xsd:element ref="MaxUniqueUsers" minOccurs="0"/>
                        <xsd:element ref="MaxConcurrentUsers" minOccurs="0"/>
                </xsd:sequence>
        </xsd:complexType>
        <xsd:element name="ApplicationKey" type="ApplicationKeyType"/>
        <xsd:element name="Serialnumber" type="IdentifierType"/>
        <xsd:element name="PlatFormModel" type="StringType"/>
        <xsd:element name="NoOfProcessors" type="QuantityType"/>
        <xsd:element name="MaxUniqueUsers" type="QuantityType"/>
        <xsd:element name="MaxConcurrentUsers" type="QuantityType"/>
 
        
        <!-- Consolidated usage count -->
        <xsd:complexType name="ConsolidationsType">
                <xsd:sequence>
                        <xsd:element ref="Period" minOccurs="0"/>
                        <xsd:element ref="DurationofCollection" minOccurs="0"/>
                        <xsd:element ref="TotalUsers" minOccurs="0"/>
                        <xsd:element ref="ApplicationID" minOccurs="0"/>
                        <xsd:element ref="ConsolidatedUsers" minOccurs="0" maxOccurs="unbounded"/>
                </xsd:sequence>
        </xsd:complexType>
        <xsd:element name="Consolidations" type="ConsolidationsType">
                <xsd:annotation>
                        <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">
                                This component relates to an hourly consolidation of system usage.
                                The consolidation will take place on a scheduled basis the frequency of which can be adjusted to reflect the granularity of the data required. 
                                It provides a picture of all application users that have been active in the previous time slice. 
                                The snapshot time period will be adjustable however it be must multiples of, or an even sub division of 60 minutes to allow for synchronisation of regional data collections on the hour.
                                The data consists of details relating to the date and time the snapshot was captured, users and details of the modules / programs touched.        
                        </xsd:documentation>
                </xsd:annotation>
        </xsd:element>
        <xsd:element name="Period" type="DateTimeType">
                <xsd:annotation>
                        <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">
                                The date and time the consolidate count relates to.
                        </xsd:documentation>
                </xsd:annotation>
        </xsd:element>
        <xsd:element name="DurationofCollection" type="TimeType">
                <xsd:annotation>
                        <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">
                                This is the calculated period of time between snapshots in seconds. So if the snapshot was timed to occur ever hour the value would be 60.
                        </xsd:documentation>
                </xsd:annotation>
        </xsd:element>
        <xsd:element name="TotalUsers" type="QuantityType">
                <xsd:annotation>
                        <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">
                                Total number of unique users included in this consolidation
                        </xsd:documentation>
                </xsd:annotation>
        </xsd:element>
        <xsd:element name="ApplicationID" type="IdentifierType">
                <xsd:annotation>
                        <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">
                                The a code identifying the application in use
                        </xsd:documentation>
                </xsd:annotation>
        </xsd:element>

        <!-- ConsolidatedUsers -->
        <xsd:complexType name="ConsolidatedUsersType">
                <xsd:sequence>
                        <xsd:element ref="ApplicationUserCode" minOccurs="0"/>
                        <xsd:element ref="UserAccessType" minOccurs="0"/>
                        <xsd:element ref="UniqueSessionIdentity" minOccurs="0"/>
                        <xsd:element ref="SessionType" minOccurs="0"/>
                </xsd:sequence>
        </xsd:complexType>
        <xsd:element name="ConsolidatedUsers" type="ConsolidatedUsersType">
                <xsd:annotation>
                        <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">
                                This contains session details and each program touched during that session. 
                                
                                It is repeated for each session recorded.
                        </xsd:documentation>
                </xsd:annotation>
        </xsd:element>
        <xsd:element name="UniqueSessionIdentity" type="IdentifierType">
                <xsd:annotation>
                        <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">
                                This is the unique identifier for the session. This could be the token, the job number workstation IP combination or something similar. 
                        </xsd:documentation>
                </xsd:annotation>
        </xsd:element>
        <xsd:element name="SessionType" type="StringType">
                <xsd:annotation>
                        <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">
                                This identifies the session type, Interactive, Batch, Queued etc. 
                        </xsd:documentation>
                </xsd:annotation>
        </xsd:element>

        <!-- Named Users -->
        <xsd:complexType name="NamedUsersType">
                <xsd:sequence>
                        <xsd:element ref="ApplicationUserCode" minOccurs="0"/>
                        <xsd:element ref="Description" minOccurs="0"/>
                        <xsd:element ref="ApplicationEnabledStatus" minOccurs="0"/>
                        <xsd:element ref="UserType" minOccurs="0"/>
                        <xsd:element ref="UserAccessType" minOccurs="0"/>
                        <xsd:element ref="LastModificationDateTime" minOccurs="0"/>
                        <xsd:element ref="LanguageAccessible" minOccurs="0" maxOccurs="unbounded"/>
                        <xsd:element ref="ProgramCodeDetails" minOccurs="0" maxOccurs="unbounded"/>
                        <xsd:element ref="ModuleCodeDetails" minOccurs="0" maxOccurs="unbounded"/>
                        <xsd:element ref="ModuleGroupCodeDetails" minOccurs="0" maxOccurs="unbounded"/>
                </xsd:sequence>
        </xsd:complexType>
        <xsd:element name="NamedUsers" type="NamedUsersType">
                <xsd:annotation>
                        <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">
                                This type provides the details relating to "named user" including access permissions set within the application for the application details this type is part of.
                                
                                It is repeated for each user recorded.
                        </xsd:documentation>
                </xsd:annotation>
        </xsd:element>
        <xsd:element name="ApplicationEnabledStatus" type="StatusType">
                <xsd:annotation>
                        <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">
                                Is this user identity active for this application.
                        </xsd:documentation>
                </xsd:annotation>
        </xsd:element>
        <xsd:element name="UserType" type="StringType">
                <xsd:annotation>
                        <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">
                                User type relates to the user class/roll E.G. Admin, Accounts, Stores
                        </xsd:documentation>
                </xsd:annotation>
        </xsd:element>
        <xsd:complexType name="LanguageAccessibleType">
                <xsd:sequence>
                        <xsd:element ref="LanguageUserAccess" minOccurs="0"/>
                </xsd:sequence>
        </xsd:complexType>
        <xsd:element name="LanguageAccessible" type="LanguageAccessibleType">
                <xsd:annotation>
                        <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">
                                Languages that can be used by this User identity.
                        </xsd:documentation>
                </xsd:annotation>
        </xsd:element>
        <xsd:element name="LanguageUserAccess" type="CodeType">
                <xsd:annotation>
                        <xsd:documentation>Indicates the language for the associated object. This can be any valid language code.</xsd:documentation>
                </xsd:annotation>
        </xsd:element>

        <!-- Program Code Details -->
        <xsd:complexType name="ProgramCodeDetailsType">
                <xsd:sequence>
                        <xsd:element ref="Code" minOccurs="0"/>
                        <xsd:element ref="Description" minOccurs="0"/>
                        <xsd:element ref="LastModificationDateTime" minOccurs="0"/>
                        <xsd:element ref="Accessible" minOccurs="0"/>
                </xsd:sequence>
        </xsd:complexType>
        <xsd:element name="ProgramCodeDetails" type="ProgramCodeDetailsType">
                <xsd:annotation>
                        <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">
                                Program code details (repeated for every program)
                                
                                This type provides the details within the user application permissions type to detail the program access permissions the user has been granted in the application. 
                                It is repeated for program permission is granted for or denied for
                        </xsd:documentation>
                </xsd:annotation>
        </xsd:element>
     
        <!-- Module Code Details -->
        <xsd:complexType name="ModuleCodeDetailsType">
                <xsd:sequence>
                        <xsd:element ref="Code" minOccurs="0"/>
                        <xsd:element ref="Description" minOccurs="0"/>
                        <xsd:element ref="LastModificationDateTime" minOccurs="0"/>
                        <xsd:element ref="Accessible" minOccurs="0"/>
                </xsd:sequence>
        </xsd:complexType>
        <xsd:element name="ModuleCodeDetails" type="ModuleCodeDetailsType">
                <xsd:annotation>
                        <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">
                                This type provides the details within the name user type to detail the module access permissions the user has been granted in the application.
                                It is repeated for module permission is granted for or denied for.
                        </xsd:documentation>
                </xsd:annotation>
        </xsd:element>

        <!-- Module Group Code Details -->
        <xsd:complexType name="ModuleGroupCodeDetailsType">
                <xsd:sequence>
                        <xsd:element ref="Code" minOccurs="0"/>
                        <xsd:element ref="Description" minOccurs="0"/>
                        <xsd:element ref="LastModificationDateTime" minOccurs="0"/>
                        <xsd:element ref="Accessible" minOccurs="0"/>
                </xsd:sequence>
        </xsd:complexType>
        <xsd:element name="ModuleGroupCodeDetails" type="ModuleGroupCodeDetailsType">
                <xsd:annotation>
                        <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">
                                This type provides the details within the user application permissions type to detail the module group access permissions the user has been granted in the application. 
                                It is repeated for module permission is granted for or denied for.
                        </xsd:documentation>
                </xsd:annotation>
        </xsd:element>

        <!-- Comman elements -->
        <xsd:element name="ProductName" type="StringType">
                <xsd:annotation>
                        <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">
                                This standard application name BPCS, LX, LN, M3 etc. (Standard list to be added).
                        </xsd:documentation>
                </xsd:annotation>
        </xsd:element>
        <xsd:element name="InstalledLocation" type="StringType">
                <xsd:annotation>
                        <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">
                                Installed Location indicates in which location the product is installed
                        </xsd:documentation>
                </xsd:annotation>
        </xsd:element>
        <xsd:element name="ApplicationUserCode" type="IdentifierType">
                <xsd:annotation>
                        <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">
                                This is the user identity that is specific to the application and is required for authentication and permissions within the application itself.
                        </xsd:documentation>
                </xsd:annotation>
        </xsd:element>
        <xsd:element name="Accessible" type="StringType">
                <xsd:annotation>
                        <xsd:documentation>Does the user have access to this (true or false?)</xsd:documentation>
                </xsd:annotation>
        </xsd:element>
        <xsd:element name="UserAccessType" type="StringType">
                <xsd:annotation>
                        <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">
                                User access type relates to the level of access to the application and differentiates between "Full users",  "Light user" , or  “Enquiry only.”
                        </xsd:documentation>
                </xsd:annotation>
        </xsd:element>
        
</xsd:schema>