前页 | 后页 |
RDF / XML表示的示例
本主题提供了Resource Creation Factory XML的RDF / XML表示的许多示例。
创建一个元素
使用Enterprise Architect GUID {259A54C2-6A89-46d7-AB7E-F192668010CA}在一个包中创建一个名为“ Actor1”的Actor。
<?xml版本=“ 1.0”编码=“ 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:资源>
<!-必需属性->
<dcterms:title>演员1 </ dcterms:title>
<dcterms:type>演员</ dcterms:type>
<ss:resourcetype>元素</ ss:resourcetype>
<ss:parentresourceidentifier> pk_ {259A54C2-6A89-46d7-AB7E-F192668010CA} </ ss:parentresourceidentifier>
</ oslc_am:资源>
</ rdf:RDF>
在启用安全性的模型中创建元素
在具有Enterprise Architect GUID {965A54C2-6A89-46d7-AB7E-F192668010CA}的程序包下,在启用安全性的模型中创建一个名为“ Class1”的类,并设置其注释,复杂性和版本。
<?xml版本=“ 1.0”编码=“ 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:资源>
<!-必需属性->
<dcterms:title> Class1 </ dcterms:title>
<dcterms:type>类</ dcterms:type>
<ss:resourcetype>元素</ ss:resourcetype>
<ss:parentresourceidentifier> pk_ {259A54C2-6A89-46d7-AB7E-F192668010CA} </ ss:parentresourceidentifier>
<!-启用安全性的模型中必需的->
<ss:useridentifier> {B6106F48-9659-4bff-B52A-C68F638BB1CE} </ ss:useridentifier>
<!-可选属性->
<dcterms:description>通过OSLC创建</ dcterms:description>
<ss:complexity>简单</ ss:complexity>
<ss:version> 1.0 </ ss:version>
<ss:useridentifier> {B6106F48-9659-4bff-B52A-C68F638BB1CE} </ ss:useridentifier>
</ oslc_am:资源>
</ rdf:RDF>
创建一个BPMN2.0活动
使用Enterprise Architect GUID {259A54C2-6A89-46d7-AB7E-F192668010CA}在一个包中创建一个名为“检索零件列表”的BPMN 2.0活动。
<?xml版本=“ 1.0”编码=“ 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:资源>
<!-必需属性->
<dcterms:title>检索零件列表</ dcterms:title>
<dcterms:type> BPMN2.0 :: Activity( UML :: Activity)</ dcterms:type>
<ss:resourcetype>元素</ ss:resourcetype>
<ss:parentresourceidentifier> pk_ {259A54C2-6A89-46d7-AB7E-F192668010CA} </ ss:parentresourceidentifier>
</ oslc_am:资源>
</ rdf:RDF>
创建具有原型的用例
在带有Enterprise Architect GUID {259A54C2-6A89-46d7-AB7E-F192668010CA}的程序包中,使用Enterprise Architect型“ validator”创建一个名为“ Validate Login”的用例。
<?xml版本=“ 1.0”编码=“ 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:资源>
<!-必需属性->
<dcterms:title>验证登录</ dcterms:title>
<dcterms:type> UseCase </ dcterms:type>
<ss:resourcetype>元素</ ss:resourcetype>
<ss:parentresourceidentifier> pk_ {259A54C2-6A89-46d7-AB7E-F192668010CA} </ ss:parentresourceidentifier>
<!-可选属性->
<ss:定型>
<ss:stereotypename>
<ss:name>验证器</ ss:name>
</ ss:stereotypename>
</ ss:stereotype>
</ oslc_am:资源>
</ rdf:RDF>
创建一个属性
使用Enterprise Architect GUID {BE901CA9-FB3D-4af6-AEE2-B5CE6585F9D1}在类中创建一个名为“ attribute1”的UML属性,并设置其类型,默认值和范围。
<?xml版本=“ 1.0”编码=“ 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:属性>
<!-必需属性->
<ss:resourceidentifier> el_ {BE901CA9-FB3D-4af6-AEE2-B5CE6585F9D1} </ ss:resourceidentifier>
<dcterms:title>属性1 </ dcterms:title>
<!-可选属性->
<ss:classifiername>整数</ ss:classifiername>
<ss:defaultvalue> 10 </ ss:defaultvalue>
<ss:scope>私有</ ss:scope>
</ ss:attribute>
创建枚举标记值
使用Enterprise Architect GUID {BE901CA9-FB3D-4af6-AEE2-B5CE6585F9D1}在类上创建枚举类型的标记值(值'Val1','Val2'和'Val3')。
<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>
<!-必需属性->
<dcterms:title> enumTag </ dcterms:title>
<ss:resourceidentifier> el_ {BE901CA9-FB3D-4af6-AEE2-B5CE6585F9D1} </ ss:resourceidentifier>
<!-可选属性->
<ss:value> Val2 </ ss:value>
<ss:type>类型=枚举;值= Val1,Val2,Val3 </ ss:type>
<ss:allowduplicates> false </ ss:allowduplicates>
</ ss:taggedvalue>
</ rdf:RDF>
创建一个依赖连接器
创建依赖连接器称为从演员'Actor1' 'Actor_DepCon'(与Enterprise Architect GUID {FACC69CC-F55E-4a81-9645-239DD50A94BB})给演员'Actor2'(与Enterprise Architect GUID {81E80D25-F8BB-4fca -A819-317962FC0672}。
<?xml版本=“ 1.0”编码=“ 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:资源>
<!-必需属性->
<dcterms:identifier> el_ {FACC69CC-F55E-4a81-9645-239DD50A94BB} </ dcterms:identifier>
<ss:依赖项rdf:ID =“ ID” rdf:resource =“ http:// localhost:480 / firebird_model / oslc / am / resource / el_ {81E80D25-F8BB-4fca-A819-317962FC0672} /” />
</ oslc_am:资源>
<!-可选属性->
<rdf:说明rdf:about =“#ID”>
<dcterms:title> Actor_DepCon </ dcterms:title>
<dcterms:type>依赖项</ dcterms:type>
<dcterms:description>通过OSLC创建</ dcterms:description>
<ss:direction>源→目标</ ss:direction>
</ rdf:Description>
</ rdf:RDF>
创建BPMN 2.0序列流连接器
从BPMN 2.0活动“检索零件清单”(使用Enterprise Architect GUID {85F77073-A93A-496b-A3C6-9C20EE33A065})到BPMN 2.0活动“存储订单”(使用Enterprise Architect GUID)创建BPMN 2.0序列流连接器。 {A992EC7C-92C0-488e-B7B4-5FCBE87896AE})。
<?xml版本=“ 1.0”编码=“ 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:资源>
<!-必需属性->
<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:资源>
<rdf:说明rdf:about =“#ID”>
<dcterms:type> BPMN2.0 :: SequenceFlow( UML :: ControlFlow)</ dcterms:type>
<!-可选属性->
<ss:direction>源→目标</ ss:direction>
</ rdf:Description>
</ rdf:RDF>