HistoryViewLinks to this page 2013 April 25 | 10:41 am

A sample Diagram resource. This is a minimalistic example of a diagram resource. A more realistic resource would have many more properties to it, this example just highlights those properties defined in the OSLC AM Diagram resource .

This diagram contains three elements, two nodes and one connector that is made up of two line segments (or three points).


@prefix oslc_am:  <http://open-services.net/ns/am#> .
@prefix rdf:      <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix dcterms:  <http://purl.org/dc/terms/> .
@prefix sample:   <https://example.com/SampleOntology#> .

<https://example.com/am/res/84>
      a sample:Diagram ,       # a diagram type in the sample domain
        oslc_am:Diagram ;      # an OSLC AM Diagram type
      
      dcterms:title "Diagram 1" ;   # all OSLC resources can have a title property
      
      sample:renders    # a properties in sample domain
              <https://example.com/am/res/83> , 
              <https://example.com/am/res/82> , 
              <https://example.com/am/res/81> ;

      oslc_am:area
              [ a  oslc_am:DiagramRectangle ;                # the type of area is rectangle
                dcterms:title "Element 1" ;
                oslc_am:represents 
                    <https://example.com/am/res/82>          # the region represents this resource 
                oslc_am:x 425 ;                              # the upper left hand corner of the rectangular 
                oslc_am:y 267 ;   
                oslc_am:width 242 ;                          # the width and height of the rectangular region
                oslc_am:height 85 ;
                oslc_am:order 1 
              ] ;
              
      oslc_am:area
              [ a  oslc_am:DiagramRectangle ;
                dcterms:title "Element 2" ;
                oslc_am:represents <https://example.com/am/res/81>
                oslc_am:x 73 ;
                oslc_am:y 108 ;
                oslc_am:width 217 ;
                oslc_am:height 85 ;
                oslc_am:order 2 
              ] ;

      oslc_am:area
              [ a  oslc_am:DiagramPolygon ;   # a polygonal region
                dcterms:title "Element 3" ;
                oslc_am:represents <https://example.com/am/res/83>
                oslc_am:coords                                           # coordinates of 
                    "196,196,248,295,422,296,422,312,242,309,185,196" ;  # vertices of polygon
                oslc_am:order 3
              ] .