<?xml version="1.0" encoding="UTF-8"?>
<RuleML xmlns="http://www.ruleml.org/0.9/xsd" 
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.ruleml.org/0.9/xsd http://www.ruleml.org/0.9/xsd/datalog.xsd">
    <Assert mapClosure="universal">
        <!-- SA01 Regulatory Requirements, Obligation, Curation Layer, Enterprise Level, 
        Set / Update Flag, Flag for which compliance reg. is needed, Does the organization 
        have obligations to comply with HIPAA, FIRPA, Sarbanes-Oxley, or other federal regulations
        that apply to archived material? -->
        <Atom>
            <Rel>complies</Rel>
            <Ind uri="hdl:1721.1/"/>
            <Ind
                uri="http://www.legalarchiver.org/soa.htm"
                />
        </Atom>
        <!-- SA02 Accounting Standards, A4.3, Obligation, Curation Layer, Enterprise Level,
        Set / Update Descriptive Metadata, List of relevant accounting standards.  Flag for 
        date of last audit, Repository business planning and practices are transparent, compliant
        with relevant accounting standards and practives, and auditable -->
        <Atom>
            <Rel>last audited</Rel>
            <Ind uri="hdl:1721.1/"/>
            <Data xsi:type="xs:dateTime">2006-07-11T12:13:12Z</Data>
        </Atom>
        <!-- CC01 Validate Source, B1.4, SA42, AR01, Obligation, Curation Layer, Collection Level,
        Set / update flag;  Consistency rule - validate source flag against submission agreement, 
        Flag for source of records and metadata: Consistency check that flag agrees with submission 
        agreement, Repository has a process to ensure that the information is acquired form the 
        expected source -->
        <Implies>
            <head>
                <Atom>
                    <Rel>is valid</Rel>
                    <Var>data source</Var>
                </Atom>
            </head>
            <body>
                <Atom>
                    <Rel>agrees with</Rel>
                    <Var>data source</Var>
                    <Ind>submission agreement</Ind>
                </Atom>
            </body>
        </Implies>
        
        <!-- CC02 Format, A5.1, SA48, PR16, Obligation, Curation Layer, Item Level,
        Consistency rule - check that deposit agreement exists, Deposit agreement for
        storage of data specifying access, replicas, consistency checks, If repository
        manages, preserves, and/or provides access to digital materials on behalf of 
        another organization, it has and maintains appropriate contracts or deposit agreements. -->
        <Forall>
            <declare>
                <Var type="depositor">depositor</Var>
            </declare>
            <formula>
                <Atom>
                    <Rel>must have</Rel>
                    <Var type="depositor">depositor</Var>
                    <Ind>deposit agreement</Ind>
                </Atom>
            </formula>
        </Forall>
        
        <Implies>
            <head>
                <Atom>
                    <Rel>is valid</Rel>
                    <Var type="depositor">depositor</Var>
                </Atom>
            </head>
            <body>
                <Atom>
                    <Rel>has</Rel>
                    <Var type="depositor">depositor</Var>
                    <Ind>deposit agreement</Ind>
                </Atom>
            </body>
        </Implies>
        
        <!-- PR01 Business Process Rengineering, Obligation, Curation Layer, Archive Level, 
        Periodic rule - check frequency flag; send notification to do review, Flag for frequency 
        of architecture review; list of members of review committee; certification status, 
        How often should the system requirements and architecture be reviewed and with what procedure? -->        
        <Implies>
            <head>
                <Atom>
                    <Rel>review</Rel>
                    <Ind>system requirements</Ind>
                    <Ind>system architecture</Ind>
                    <Var>review committee</Var>
                </Atom>
            </head>
            <body>
                <Atom>
                    <Rel>equals</Rel>
                    <Var type="xsi:dateTime">today's date</Var>
                    <Data xsi:type="xs:dateTime">2006-11-11T12:13:12Z</Data>    
                </Atom>
            </body>       
        </Implies>
        
        <!-- PR02 User Privacy, AR03, Obligation, Curation Layer, Archive Level,
        Periodic rule - check deletion status, Flags for allowed usage, Is end-user
        usage data publicly available? Used internally for data mining? Locked down?
        With what technical mechanism? Examples:  sanitize or destroy usage data after 
        some defined period of time,  procedure for employees responding to HSA requests 
        for usage data-->
        <Implies>
            <And>
                <Atom>
                    <Rel>is less than</Rel>
                    <Var>user data age</Var>
                    <Data xsi:type="xs:dateTime">P0003-00-00T00:00:00</Data>
                </Atom>
                <Atom>
                    <Rel>is not private</Rel>
                    <Var>user data</Var>
                </Atom>
            </And>
            <Atom>
                <Rel>is available</Rel>
                <Var>user data</Var>
            </Atom>
        </Implies>
        
        <!-- AR01 Deposit, SA43, CC01, Obligation, Curation Layer, Collection Level, 
        Atomic rule - check collection update role, List of registered persons who may
        exercise collection role, Who can deposit items into the collection -->
        <Implies>
            <Atom>
                <Rel>has part</Rel>
                <Ind>registered Epersons</Ind>
                <Var type="Eperson">submitter</Var>
            </Atom>
            <Atom>
                <Rel>may submit</Rel>
                <Var type="Eperson">submitter</Var>
            </Atom>
        </Implies>
        
        <!-- AR02 Risk management, Obligation, Storage Layer, Item Level,
        Atomic rule - check whether access can be to master or must be to
        a replica, Flag for master copy., Level of concern (e.g. is this 
        file the archival master or a delivery copy?)  -->
        <Implies>
            <Atom>
                <Rel>equals</Rel>
                <Ind type="rule">Accessible copies</Ind>
                <Var>copy</Var>
            </Atom>
            <Atom>
                <Rel>can deliver</Rel>
                <Ind uri="hdl:1721.1"/>
                <Var>copy</Var>
            </Atom>
        </Implies>
        
    </Assert>
</RuleML>
