<?xml version="1.0" encoding="UTF-8"?>

<!--
    $Id: envelope.xml,v 1.12 2013/02/13 11:55:59 robbod Exp $
    Author: Rob Bodington, Eurostep Limited
    Owner:  Developed by Eurostep 
    Purpose: envelope test data
-->

<cmn:Uos
    xmlns:plcs="http://docs.oasis-open.org/plcs/ns/plcslib/v1.0/data/plcs/plcs-psm/xml-schema/plcs-psm"
    xmlns:cmn="http://standards.iso.org/iso/ts/10303/-3000/-ed-1/tech/xml-schema/common"
    xsi:schemaLocation="http://docs.oasis-open.org/plcs/ns/plcslib/v1.0/data/plcs/plcs-psm/xml-schema/plcs-psm ../../../../../PLCS/psm_model/plcs_psm.xsd"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

    <!-- header information present in every file -->
    <Header>
        <Author>
            <Name>Rob Bodington</Name>
        </Author>
        <Organization>
            <Name>Eurostep Limited</Name>
        </Organization>
        <OriginatingSystem>Hand created</OriginatingSystem>
        <Documentation>A hand coded example showing how an envelope is represented</Documentation>
    </Header>

    <DataContainer xsi:type="plcs:PlcsDataContainer">
        <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
        <!--    Main Body  -->
        <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
        <!-- 
        every file should identify the ExchangeContextClassLibrary to indicate the 
        main OWL ontology that imports all the reference data used.
    -->
        <ExchangeContextClassLibrary uid="id-eccl">
            <!-- The URI of the Ontology NOT the OWL file -->
            <LibraryId>http://www.plcs.org/Exemplar/Exemplar-rdl</LibraryId>
        </ExchangeContextClassLibrary>
        <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
        <!--    Classes  -->
        <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
        <!-- Class of Exemplar identifiers. 
            Note the ExternalOwlClass for PLCSPSM_v001_message should only appear once -->
        <ExternalOwlClass uid="cls-PLCSPSM_v1_0">
            <Class>http://docs.oasis-open.org/plcs/ns/plcslib/v1.0/data/contexts/OASIS/refdata/plcs-rdl#PLCSPSM_v001_message</Class>
        </ExternalOwlClass>
        
        <!-- Class of CAGE identifiers. 
        Note the ExternalOwlClass for CAGE_code should only appear once -->
        <ExternalOwlClass uid="cls-CAGE_code">
            <Class>http://docs.oasis-open.org/plcs/ns/plcslib/v1.0/data/contexts/OASIS/refdata/plcs-rdl#CAGE_code</Class>
        </ExternalOwlClass>
        
        <!-- Class of Date_message_sent  . 
        Note the ExternalOwlClass for Date_message_sent should only appear once -->
        <ExternalOwlClass uid="cls-Date_message_sent">
            <Class>http://docs.oasis-open.org/plcs/ns/plcslib/v1.0/data/contexts/OASIS/refdata/plcs-rdl#Date_actual_sent</Class>
        </ExternalOwlClass>
        
        <!-- Class of Envelope  identifiers. 
        Note the ExternalOwlClass for Envelope_identification_code should only appear once -->
        <ExternalOwlClass uid="cls-Envelope_identification_code">
            <Class>http://docs.oasis-open.org/plcs/ns/plcslib/v1.0/data/contexts/OASIS/refdata/plcs-rdl#Envelope_identification_code</Class>
        </ExternalOwlClass>
        
        <!-- Class of Message identifiers. 
        Note the ExternalOwlClass for Message_identification_code should only appear once -->
        <ExternalOwlClass uid="cls-Message_identification_code">
            <Class>http://docs.oasis-open.org/plcs/ns/plcslib/v1.0/data/contexts/OASIS/refdata/plcs-rdl#Message_identification_code</Class>
        </ExternalOwlClass>
        
        <!-- Class of Receiver_of. 
        Note the ExternalOwlClass for Receiver_of should only appear once -->
        <ExternalOwlClass uid="cls-Receiver_of">
            <Class>http://docs.oasis-open.org/plcs/ns/plcslib/v1.0/data/contexts/OASIS/refdata/plcs-rdl#PersOrgAsg_actual_receiver</Class>
        </ExternalOwlClass>
        <!-- Class of Sender_of. 
        Note the ExternalOwlClass for Sender_of should only appear once -->
        <ExternalOwlClass uid="cls-Sender_of">
            <Class>http://docs.oasis-open.org/plcs/ns/plcslib/v1.0/data/contexts/OASIS/refdata/plcs-rdl#PersOrgAsg_actual_sender</Class>
        </ExternalOwlClass>
        <!-- Class of WorkOrder number identifiers. 
        Note the ExternalOwlClass for Work_order_identification_code should only appear once -->
        <ExternalOwlClass uid="cls-Work_order_identification_code">
            <Class>http://docs.oasis-open.org/plcs/ns/plcslib/v1.0/data/contexts/OASIS/refdata/plcs-rdl#Work_order_identification_code</Class>
        </ExternalOwlClass>
        <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
        <!--    Envelope  -->
        <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
        <Envelope uid="id-env">
            <Id>
                <!-- idContextRef is the Organization that owns the envelope number -->
                <Identifier id="msg-1" idContextRef="org6"
                    idRoleRef="cls-Envelope_identification_code"/>
            </Id>
            <Wrapping uidRef="id-msg"/>
            <DateTimeAssignment>
                <ClassifiedAs>
                    <Classification classRef="cls-Date_message_sent"/>
                </ClassifiedAs>
                <AssignedDate>2011-07-12T16:25:00</AssignedDate>
            </DateTimeAssignment>
        </Envelope>
        <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
        <!--    Organization sending Envelope -->
        <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
        <!-- Organization identified by its CAGE code:  OrganizationX -->
        <Organization uid="org6">
            <Id>
                <Identifier id="OrganizationX" idRoleRef="cls-CAGE_code"/>
            </Id>
        </Organization>
        <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
        <!--    Organization receiving Envelope -->
        <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
        <!-- Organization identified by its CAGE code:  OrganizationRCV -->
        <Organization uid="org-reciever">
            <Id>
                <Identifier id="OrganizationRCX" idRoleRef="cls-CAGE_code"/>
            </Id>
        </Organization>
        <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
        <!--    Message  -->
        <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
        <Message uid="id-msg">
            <Id>
                <Identifier id="msg-1" idContextRef="org6"
                    idRoleRef="cls-Message_identification_code"/>
            </Id>
            <ClassifiedAs>
                <Classification classRef="cls-PLCSPSM_v1_0"/>
            </ClassifiedAs>
            <Contains>
                <WorkOrder uidRef="id-wo"/>
            </Contains>
            <DefinedBy>
                <Organization uidRef="org6"/>
            </DefinedBy>
            <ExchangeContextClassLibrary uidRef="id-eccl"/>
        </Message>
        <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
        <!--    Content of message - a work order  -->
        <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
        <WorkOrder uid="id-wo">
            <Id>
                <Identifier id="wo-1" idContextRef="org6"
                    idRoleRef="cls-Work_order_identification_code"/>
            </Id>
            <OrganizationOrPersonInOrganizationAssignment uid="id-orgasg-sender">
                <ClassifiedAs>
                    <Classification classRef="cls-Sender_of"/>
                </ClassifiedAs>
                <AssignedEntity uidRef="org6"/>
            </OrganizationOrPersonInOrganizationAssignment>
            <OrganizationOrPersonInOrganizationAssignment uid="id-orgasg-rcv">
                <ClassifiedAs>
                    <Classification classRef="cls-Receiver_of"/>
                </ClassifiedAs>
                <AssignedEntity uidRef="org-reciever"/>
            </OrganizationOrPersonInOrganizationAssignment>
        </WorkOrder>
    </DataContainer>
</cmn:Uos>
