预订演示
前页 后页

Examples of RDF/XML Representations

This topic provides a number of examples of the RDF/XML representation of Resource Creation Factory XML.

Create an element

Create an Actor called 'Actor1' in a Package with the Enterprise Architect GUID {259A54C2-6A89-46d7-AB7E-F192668010CA}.

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:oslc_am="http://open-services.net/ns/am#"
                xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
                xmlns:dcterms="http://purl.org/dc/terms/"
                xmlns:foaf="http://xmlns.com/foaf/0.1/"
                xmlns:ss="http://www.sparxsystems.com.au/oslc_am#">
     <oslc_am:Resource>
          <!--Required Properties-->
          <dcterms:title>Actor1</dcterms:title>
          <dcterms:type>Actor</dcterms:type>
          <ss:resourcetype>Element</ss:resourcetype>
          <ss:parentresourceidentifier>pk_{259A54C2-6A89-46d7-AB7E-F192668010CA}</ss:parentresourceidentifier>
          <ss:useridentifier>{B6106F48-9659-4bff-B52A-C68F638BB1CE}</ss:useridentifier>
     </oslc_am:Resource>
</rdf:RDF>

Create an element in a Security Enabled model

Create a Class called 'Class1' in a security-enabled model, under a Package with the Enterprise Architect GUID {965A54C2-6A89-46d7-AB7E-F192668010CA}, and set its Notes, Complexity and Version.

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:oslc_am="http://open-services.net/ns/am#"
                xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
                xmlns:dcterms="http://purl.org/dc/terms/"
                xmlns:foaf="http://xmlns.com/foaf/0.1/"
                xmlns:ss="http://www.sparxsystems.com.au/oslc_am#">
     <oslc_am:Resource>
          <!--Required Properties-->
          <dcterms:title>Class1</dcterms:title>
          <dcterms:type>Class</dcterms:type>
          <ss:resourcetype>Element</ss:resourcetype>
          <ss:parentresourceidentifier>pk_{259A54C2-6A89-46d7-AB7E-F192668010CA}</ss:parentresourceidentifier>
          <ss:useridentifier>{B6106F48-9659-4bff-B52A-C68F638BB1CE}</ss:useridentifier>
          <!--Optional Properties-->
          <dcterms:description>Created via OSLC</dcterms:description>
          <ss:complexity>Easy</ss:complexity>
          <ss:version>1.0</ss:version>
          <ss:useridentifier>{B6106F48-9659-4bff-B52A-C68F638BB1CE}</ss:useridentifier>
     </oslc_am:Resource>
</rdf:RDF>

Create a BPMN2.0 Activity

Create a BPMN 2.0 Activity called 'Retrieve Parts List' in a Package with the Enterprise Architect GUID {259A54C2-6A89-46d7-AB7E-F192668010CA}.

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:oslc_am="http://open-services.net/ns/am#"
                xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
                xmlns:dcterms="http://purl.org/dc/terms/"
                xmlns:foaf="http://xmlns.com/foaf/0.1/"
                xmlns:ss="http://www.sparxsystems.com.au/oslc_am#">
     <oslc_am:Resource>
          <!--Required Properties-->
          <dcterms:title>Retrieve Parts List</dcterms:title>
          <dcterms:type>BPMN2.0::Activity(UML::Activity)</dcterms:type>
          <ss:resourcetype>Element</ss:resourcetype>
          <ss:parentresourceidentifier>pk_{259A54C2-6A89-46d7-AB7E-F192668010CA}</ss:parentresourceidentifier>
          <ss:useridentifier>{B6106F48-9659-4bff-B52A-C68F638BB1CE}</ss:useridentifier>
     </oslc_am:Resource>
</rdf:RDF>

Create a Use Case with Stereotype

Create a UseCase called 'Validate Login' with the stereotype 'validator', in a Package with the Enterprise Architect GUID {259A54C2-6A89-46d7-AB7E-F192668010CA}.

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:oslc_am="http://open-services.net/ns/am#"
                xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
                xmlns:dcterms="http://purl.org/dc/terms/"
                xmlns:foaf="http://xmlns.com/foaf/0.1/"
                xmlns:ss="http://www.sparxsystems.com.au/oslc_am#">
     <oslc_am:Resource>
          <!--Required Properties-->
          <dcterms:title>Validate Login</dcterms:title>
          <dcterms:type>UseCase</dcterms:type>
          <ss:resourcetype>Element</ss:resourcetype>
          <ss:parentresourceidentifier>pk_{259A54C2-6A89-46d7-AB7E-F192668010CA}</ss:parentresourceidentifier>
          <ss:useridentifier>{B6106F48-9659-4bff-B52A-C68F638BB1CE}</ss:useridentifier>
          <!--Optional Properties-->
          <ss:stereotype>
               <ss:stereotypename>
                    <ss:name>validator</ss:name>
               </ss:stereotypename>
          </ss:stereotype>
     </oslc_am:Resource>
</rdf:RDF>

Create an Attribute

Create a UML attribute called 'attribute1' in a Class with the Enterprise Architect GUID {BE901CA9-FB3D-4af6-AEE2-B5CE6585F9D1}, and set its Type, Default Value and Scope.

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:oslc_am="http://open-services.net/ns/am#"
                xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
                xmlns:dcterms="http://purl.org/dc/terms/"
                xmlns:ss="http://www.sparxsystems.com.au/oslc_am#">
     <ss:attribute>
          <!--Required Properties-->
          <ss:resourceidentifier>el_{BE901CA9-FB3D-4af6-AEE2-B5CE6585F9D1}</ss:resourceidentifier>
          <dcterms:title>attribute1</dcterms:title>
          <ss:useridentifier>{B6106F48-9659-4bff-B52A-C68F638BB1CE}</ss:useridentifier>
          <!--Optional Properties-->
          <ss:classifiername>int</ss:classifiername>
          <ss:defaultvalue>10</ss:defaultvalue>
     <ss:scope>Private</ss:scope>
</ss:attribute>

Create an enumeration Tagged Value

Create an enumeration-type Tagged Value (with the values 'Val1', 'Val2' and 'Val3') on a Class with the Enterprise Architect GUID {BE901CA9-FB3D-4af6-AEE2-B5CE6585F9D1}.

<rdf:RDF xmlns:oslc_am="http://open-services.net/ns/am#"
                xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
                xmlns:dcterms="http://purl.org/dc/terms/"
                xmlns:ss="http://www.sparxsystems.com.au/oslc_am#">
     <ss:taggedvalue>
          <!--Required Properties-->
          <dcterms:title>enumTag</dcterms:title>
          <ss:resourceidentifier>el_{BE901CA9-FB3D-4af6-AEE2-B5CE6585F9D1}</ss:resourceidentifier>
          <ss:useridentifier>{B6106F48-9659-4bff-B52A-C68F638BB1CE}</ss:useridentifier>
          <!--Optional Properties-->
          <ss:value>Val2</ss:value>
          <ss:type> Type=Enum;Values=Val1,Val2,Val3</ss:type>
          <ss:allowduplicates>false</ss:allowduplicates>
     </ss:taggedvalue>
</rdf:RDF>

Create a Dependency Connector

Create a Dependency connector called 'Actor_DepCon' from the Actor 'Actor1' (with the Enterprise Architect GUID {FACC69CC-F55E-4a81-9645-239DD50A94BB}) to the Actor 'Actor2' (with the Enterprise Architect GUID {81E80D25-F8BB-4fca-A819-317962FC0672}).
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:oslc_am="http://open-services.net/ns/am#"
                xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
                xmlns:dcterms="http://purl.org/dc/terms/" 
                xmlns:ss="http://www.sparxsystems.com.au/oslc_am#">
     <oslc_am:Resource>
          <!--Required Properties-->
          <dcterms:identifier>el_{FACC69CC-F55E-4a81-9645-239DD50A94BB}</dcterms:identifier>
          <ss:Dependency rdf:ID="ID" rdf:resource="http://localhost:480/firebird_model/oslc/am/resource/el_{81E80D25-F8BB-4fca-A819-317962FC0672}/"/>
     </oslc_am:Resource>
     <rdf:Description rdf:about="#ID">
          <ss:useridentifier>{B6106F48-9659-4bff-B52A-C68F638BB1CE}</ss:useridentifier>
          <!--Optional Properties-->
          <dcterms:title>Actor_DepCon</dcterms:title>
          <dcterms:type>Dependency</dcterms:type>
          <dcterms:description>Created via OSLC</dcterms:description>
          <ss:direction>Source → Destination</ss:direction>
     </rdf:Description>
</rdf:RDF>

Create a BPMN 2.0 Sequence Flow connector

Create a BPMN 2.0 Sequence Flow connector from the BPMN 2.0 Activity 'Retrieve Parts List' (with the Enterprise Architect GUID {85F77073-A93A-496b-A3C6-9C20EE33A065}) to the BPMN 2.0 Activity 'Store Order' (with the Enterprise Architect GUID {A992EC7C-92C0-488e-B7B4-5FCBE87896AE}).

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:oslc_am="http://open-services.net/ns/am#"
                xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
                xmlns:dcterms="http://purl.org/dc/terms/" 
                xmlns:ss="http://www.sparxsystems.com.au/oslc_am#">
     <oslc_am:Resource>
          <!--Required Properties-->
          <dcterms:identifier>el_{85F77073-A93A-496b-A3C6-9C20EE33A065}</dcterms:identifier>
          <ss:ControlFlow rdf:ID="ID" rdf:resource="http://localhost:480/firebird_model/oslc/am/resource/el_{A9 GUID 92EC7C-92C0-488e-B7B4-5FCBE87896AE}/"/>
     </oslc_am:Resource>
     <rdf:Description rdf:about="#ID">     
          <dcterms:type>BPMN2.0::SequenceFlow(UML::ControlFlow)</dcterms:type>
          <ss:useridentifier>{B6106F48-9659-4bff-B52A-C68F638BB1CE}</ss:useridentifier>
          <!--Optional Properties-->
          <ss:direction>Source → Destination</ss:direction>
     </rdf:Description>
</rdf:RDF>