A2A

A2A zapisany za pomocą R2ML.

opis

<r2ml:RuleBase xmlns:r2ml="http://www.rewerse.net/I1/2006/R2ML"
          xmlns:r2mlv="http://www.rewerse.net/I1/2006/R2ML/R2MLV"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xmlns:xs="http://www.w3.org/2001/XMLSchema" 
          xmlns:userv="http://www.businessrulesforum.com/2005/userv#" 
          xmlns:swrlb="http://www.w3.org/2003/11/swrlb"
          xsi:schemaLocation="http://oxygen.informatik.tu-cottbus.de/R2ML/0.5/R2ML.xsd">
 
 <r2mlv:Vocabulary> 
   <r2mlv:Class r2mlv:ID="Actions"> 
    <r2mlv:Attribute r2mlv:ID="remittance">
      <r2mlv:range>
       <r2mlv:Datatype r2mlv:ID="xs:positiveInteger"></r2mlv:Datatype>
      </r2mlv:range>
    </r2mlv:Attribute>
    <r2mlv:Attribute r2mlv:ID="pricelist">
      <r2mlv:range>
       <r2mlv:Datatype r2mlv:ID="xs:string"></r2mlv:Datatype>
      </r2mlv:range>
    </r2mlv:Attribute>
    <r2mlv:Attribute r2mlv:ID="chosenProduct">
      <r2mlv:range>
       <r2mlv:Datatype r2mlv:ID="xs:string"></r2mlv:Datatype>
      </r2mlv:range>
    </r2mlv:Attribute>
   </r2mlv:Class>
 
   <r2mlv:Class r2mlv:ID="Time"> 
    <r2mlv:Attribute r2mlv:ID="startTime">
      <r2mlv:range>
       <r2mlv:Datatype r2mlv:ID="xs:positiveInteger"></r2mlv:Datatype>
      </r2mlv:range>
    </r2mlv:Attribute>
    <r2mlv:Attribute r2mlv:ID="currentTime">
      <r2mlv:range>
       <r2mlv:Datatype r2mlv:ID="xs:positiveInteger"></r2mlv:Datatype>
      </r2mlv:range>
    </r2mlv:Attribute>
    <r2mlv:Attribute r2mlv:ID="outTime">
      <r2mlv:range>
       <r2mlv:Datatype r2mlv:ID="xs:positiveInteger"></r2mlv:Datatype>
      </r2mlv:range>
    </r2mlv:Attribute>
   </r2mlv:Class>
 
   <r2mlv:Class r2mlv:ID="Machine"> 
    <r2mlv:Attribute r2mlv:ID="fundsInMachine">
      <r2mlv:range>
       <r2mlv:Datatype r2mlv:ID="xs:positiveInteger"></r2mlv:Datatype>
      </r2mlv:range>
    </r2mlv:Attribute>
    <r2mlv:Attribute r2mlv:ID="change">
      <r2mlv:range>
       <r2mlv:Datatype r2mlv:ID="xs:positiveInteger"></r2mlv:Datatype>
      </r2mlv:range>
    </r2mlv:Attribute>
    <r2mlv:Attribute r2mlv:ID="enoughCashToChange">
      <r2mlv:range>
       <r2mlv:Datatype r2mlv:ID="xs:boolean"></r2mlv:Datatype>
      </r2mlv:range>
    </r2mlv:Attribute>
    <r2mlv:Attribute r2mlv:ID="activity">
      <r2mlv:range>
       <r2mlv:Datatype r2mlv:ID="xs:boolean"></r2mlv:Datatype>
      </r2mlv:range>
    </r2mlv:Attribute>
   </r2mlv:Class>
 </r2mlv:Vocabulary>
 
 
  <r2ml:ProductionRule r2ml:ruleID="cash">
   <r2ml:Documentation>
       <r2ml:RuleText r2ml:textFormat="plain">
            Cash
       </r2ml:RuleText>
   </r2ml:Documentation>
    <r2ml:conditions>
 
        <r2ml:DatatypePredicateAtom r2ml:datatypePredicateID="swrlb:equal">
          <r2ml:dataArguments>
            <r2ml:AttributeFunctionTerm r2ml:attributeID="chosenProduct">
              <r2ml:contextArgument>
                <r2ml:ObjectVariable r2ml:name="action" r2ml:classID="Action"/>
              </r2ml:contextArgument>
            </r2ml:AttributeFunctionTerm>
              <r2ml:TypedLiteral r2ml:lexicalValue="pricelist" r2ml:datatypeID="xs:string"/>
                <r2ml:contextArgument>
                  <r2ml:ObjectVariable r2ml:name="action" r2ml:classID="Action"/>
                </r2ml:contextArgument>
          </r2ml:dataArguments>
        </r2ml:DatatypePredicateAtom>
 
        <r2ml:DatatypePredicateAtom r2ml:datatypePredicateID="swrlb:greaterThan">
          <r2ml:dataArguments>
            <r2ml:AttributeFunctionTerm r2ml:attributeID="remittance">
              <r2ml:contextArgument>
                <r2ml:ObjectVariable r2ml:name="action" r2ml:classID="Action"/>
              </r2ml:contextArgument>
            </r2ml:AttributeFunctionTerm>
              <r2ml:TypedLiteral r2ml:lexicalValue="0" r2ml:datatypeID="xs:positiveInteger"/>
          </r2ml:dataArguments>
        </r2ml:DatatypePredicateAtom>
 
    </r2ml:conditions>
 
    <r2ml:producedAction>
 
      <r2ml:AssignActionExpression r2ml:propertyID="change">
       <r2ml:contextArgument>
        <r2ml:ObjectVariable r2ml:classID="Machine" r2ml:name="machine" />
       </r2ml:contextArgument>         
       <r2ml:value>
        <r2ml:TypedLiteral r2ml:lexicalValue="remittance-pricelist" r2ml:datatypeID="xs:positiveInteger">
          <r2ml:contextArgument>
            <r2ml:ObjectVariable r2ml:classID="Action" r2ml:name="action" />
          </r2ml:contextArgument> 
        </r2ml:TypedLiteral>
       </r2ml:value>
      </r2ml:AssignActionExpression>
 
      <r2ml:InvokeActionExpression r2ml:propertyID="enoughFoundsInMachine" />
      <r2ml:InvokeActionExpression r2ml:propertyID="activityAll" />
 
    </r2ml:producedAction>
  </r2ml:ProductionRule>
 
 
 
  <r2ml:ProductionRule r2ml:ruleID="countTime">
   <r2ml:Documentation>
       <r2ml:RuleText r2ml:textFormat="plain">
            countTime
       </r2ml:RuleText>
   </r2ml:Documentation>
    <r2ml:conditions>
 
        <r2ml:DatatypePredicateAtom r2ml:datatypePredicateID="swrlb:lessThan">
          <r2ml:dataArguments>
            <r2ml:AttributeFunctionTerm r2ml:attributeID="startTime">
              <r2ml:contextArgument>
                <r2ml:ObjectVariable r2ml:name="time" r2ml:classID="Time"/>
              </r2ml:contextArgument>
            </r2ml:AttributeFunctionTerm>
              <r2ml:TypedLiteral r2ml:lexicalValue="currentTime" r2ml:datatypeID="xs:positiveInteger"/>
                <r2ml:contextArgument>
                  <r2ml:ObjectVariable r2ml:name="time" r2ml:classID="Time"/>
                </r2ml:contextArgument>
          </r2ml:dataArguments>
        </r2ml:DatatypePredicateAtom>
 
    </r2ml:conditions>
 
    <r2ml:producedAction>
 
      <r2ml:AssignActionExpression r2ml:propertyID="outTime">
       <r2ml:contextArgument>
        <r2ml:ObjectVariable r2ml:classID="Time" r2ml:name="time" />
       </r2ml:contextArgument>         
       <r2ml:value>
        <r2ml:TypedLiteral r2ml:lexicalValue="currnetTime-startTime" r2ml:datatypeID="xs:positiveInteger">
          <r2ml:contextArgument>
            <r2ml:ObjectVariable r2ml:classID="Time" r2ml:name="time" />
          </r2ml:contextArgument> 
        </r2ml:TypedLiteral>
       </r2ml:value>
      </r2ml:AssignActionExpression>
 
      <r2ml:InvokeActionExpression r2ml:propertyID="activityAll" />
 
    </r2ml:producedAction>
  </r2ml:ProductionRule>
 
 
 
  <r2ml:ProductionRule r2ml:ruleID="enoughFoundsInMachine">
   <r2ml:Documentation>
       <r2ml:RuleText r2ml:textFormat="plain">
            enoughFoundsInMachine
       </r2ml:RuleText>
   </r2ml:Documentation>
    <r2ml:conditions>
 
        <r2ml:DatatypePredicateAtom r2ml:datatypePredicateID="swrlb:lessThan">
          <r2ml:dataArguments>
            <r2ml:AttributeFunctionTerm r2ml:attributeID="change">
              <r2ml:contextArgument>
                <r2ml:ObjectVariable r2ml:name="machine" r2ml:classID="Machine"/>
              </r2ml:contextArgument>
            </r2ml:AttributeFunctionTerm>
              <r2ml:TypedLiteral r2ml:lexicalValue="fundsInMachine" r2ml:datatypeID="xs:positiveInteger"/>
                <r2ml:contextArgument>
                  <r2ml:ObjectVariable r2ml:name="machine" r2ml:classID="Machine"/>
                </r2ml:contextArgument>
          </r2ml:dataArguments>
        </r2ml:DatatypePredicateAtom>
 
    </r2ml:conditions>
 
    <r2ml:producedAction>
 
      <r2ml:AssignActionExpression r2ml:propertyID="enoughCashToChange">
       <r2ml:contextArgument>
        <r2ml:ObjectVariable r2ml:classID="Machine" r2ml:name="machine" />
       </r2ml:contextArgument>         
       <r2ml:value>
        <r2ml:TypedLiteral r2ml:lexicalValue="true" r2ml:datatypeID="xs:boolean" />
       </r2ml:value>
      </r2ml:AssignActionExpression>
 
      <r2ml:InvokeActionExpression r2ml:propertyID="activityAll" />
 
    </r2ml:producedAction>
  </r2ml:ProductionRule>
 
 
 
  <r2ml:ProductionRule r2ml:ruleID="activityAll">
   <r2ml:Documentation>
       <r2ml:RuleText r2ml:textFormat="plain">
            activityAll
       </r2ml:RuleText>
   </r2ml:Documentation>
    <r2ml:conditions>
 
        <r2ml:DatatypePredicateAtom r2ml:datatypePredicateID="swrlb:greaterThan">
          <r2ml:dataArguments>
            <r2ml:AttributeFunctionTerm r2ml:attributeID="timeOut">
              <r2ml:contextArgument>
                <r2ml:ObjectVariable r2ml:name="time" r2ml:classID="Time"/>
              </r2ml:contextArgument>
            </r2ml:AttributeFunctionTerm>
              <r2ml:TypedLiteral r2ml:lexicalValue="0" r2ml:datatypeID="xs:positiveInteger"/>
          </r2ml:dataArguments>
        </r2ml:DatatypePredicateAtom>
 
        <r2ml:DatatypePredicateAtom r2ml:datatypePredicateID="swrlb:equal">
          <r2ml:dataArguments>
            <r2ml:AttributeFunctionTerm r2ml:attributeID="enoughCachToChange">
              <r2ml:contextArgument>
                <r2ml:ObjectVariable r2ml:name="machine" r2ml:classID="Machine"/>
              </r2ml:contextArgument>
            </r2ml:AttributeFunctionTerm>
              <r2ml:TypedLiteral r2ml:lexicalValue="true" r2ml:datatypeID="xs:boolean"/>
          </r2ml:dataArguments>
        </r2ml:DatatypePredicateAtom>
 
        <r2ml:DatatypePredicateAtom r2ml:datatypePredicateID="swrlb:greaterThanOrEqual">
          <r2ml:dataArguments>
            <r2ml:AttributeFunctionTerm r2ml:attributeID="change">
              <r2ml:contextArgument>
                <r2ml:ObjectVariable r2ml:name="machine" r2ml:classID="Machine"/>
              </r2ml:contextArgument>
            </r2ml:AttributeFunctionTerm>
              <r2ml:TypedLiteral r2ml:lexicalValue="0" r2ml:datatypeID="xs:positiveInteger"/>
          </r2ml:dataArguments>
        </r2ml:DatatypePredicateAtom>
 
        <r2ml:DatatypePredicateAtom r2ml:datatypePredicateID="swrlb:greaterThanOrEqual">
          <r2ml:dataArguments>
            <r2ml:AttributeFunctionTerm r2ml:attributeID="foundInMachine">
              <r2ml:contextArgument>
                <r2ml:ObjectVariable r2ml:name="machine" r2ml:classID="Machine"/>
              </r2ml:contextArgument>
            </r2ml:AttributeFunctionTerm>
              <r2ml:TypedLiteral r2ml:lexicalValue="0" r2ml:datatypeID="xs:positiveInteger"/>
          </r2ml:dataArguments>
        </r2ml:DatatypePredicateAtom>
    </r2ml:conditions>
 
    <r2ml:producedAction>
 
      <r2ml:AssignActionExpression r2ml:propertyID="activity">
       <r2ml:contextArgument>
        <r2ml:ObjectVariable r2ml:classID="Machine" r2ml:name="machine" />
       </r2ml:contextArgument>         
       <r2ml:value>
        <r2ml:TypedLiteral r2ml:lexicalValue="true" r2ml:datatypeID="xs:positiveInteger" />
       </r2ml:value>
      </r2ml:AssignActionExpression>
 
    </r2ml:producedAction>
  </r2ml:ProductionRule>
</r2ml:RuleBase>
pl/miw/miw08_xtt_r2ml/a2a.txt · ostatnio zmienione: 2017/07/17 08:08 (edycja zewnętrzna)
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0