foafrdf-xml

Represent relation between services in SOAF


I have some problem about SOAF; service of a friend (extension of FOAF).

I want to create a SOAF file like this:

<foaf:knows>
  <soaf:Connection>
    <soaf:established>December 1 s t 2008</soaf:established>
    <soaf:discontinued>December 21 s t 2008</soaf:discontinued>
    <soaf:active>false</soaf:active>
    <soaf:connectiontype>Cont inuous</soaf:connectiontype>
    <soaf:uses>
      <soaf:Service>
        <foaf:name>SOAFReporter</foaf:name>
        . . .
      </soaf:Service>
    </soaf:uses>
  </soaf:Connection>
</foaf:knows>

In this file, soaf:uses represents the relation between person and services. In SOAF model, we can represent also the relation between services "services uses services".

I want in my new SOAF file to represent this relation, but I don't know how and I don't find any example.


Solution

  • You can represent the relation Service A uses Service B like this:

    <soaf:Service>
        <foaf:name>Service A</foaf:name>
        <foaf:knows>
            <soaf:Connection>
                <soaf:established>December 1 st 2008</soaf:established>
                <soaf:discontinued>December 21 st 2008</soaf:discontinued>
                <soaf:active>false</soaf:active>
                <soaf:connectiontype>Continuous</soaf:connectiontype>
                <soaf:uses>
                    <soaf:Service>
                        <foaf:name>Service B</foaf:name>
                        . . .
                    </soaf:Service>
                </soaf:uses>
            </soaf:Connection>
        </foaf:knows>
    </soaf:Service>
    

    Of course, you can also add several connection objects (these encapsulate the actual relation) in the knows relation.