Flat XML

Jul 28, 2013 at 8:40 PM
When testing my service provider, I noticed that the returned RDF XML is flat: the publisher, service, etc are referenced using rdf:nodeIDs, not contained within the parent nodes. Looking at the output from the StockQuoteSample I realize it's the same thing there.

By contrast, the OSLC4J RIO providers return a logical tree where the service provider contains its publisher, prefix definitions, and so on.
Is this a bug or is it by design?

Cheers,

/Uffe
<rdf:RDF>
    <oslc:ServiceProvider rdf:about="http://localhost:7077/api/stockquote">
        <oslc:prefixDefinition rdf:nodeID="autos11"/>
        <oslc:prefixDefinition rdf:nodeID="autos12"/>
        <oslc:prefixDefinition rdf:nodeID="autos13"/>
        <oslc:prefixDefinition rdf:nodeID="autos14"/>
        <oslc:prefixDefinition rdf:nodeID="autos15"/>
        <oslc:service rdf:nodeID="autos17"/>
        <dcterms:description rdf:parseType="Literal">Sample OSLC Service Provider for a Stock Quote service</dcterms:description>
        <dcterms:publisher rdf:nodeID="autos16"/>
        <dcterms:title rdf:parseType="Literal">StockQuote Service Provider</dcterms:title>
    </oslc:ServiceProvider>
    <oslc:PrefixDefinition rdf:nodeID="autos11">
        <oslc:prefix>dcterms</oslc:prefix>
        <oslc:prefixBase rdf:resource="http://purl.org/dc/terms/"/>
    </oslc:PrefixDefinition>
    <oslc:PrefixDefinition rdf:nodeID="autos12">
        <oslc:prefix>oslc</oslc:prefix>
        <oslc:prefixBase rdf:resource="http://open-services.net/ns/core#"/>
    </oslc:PrefixDefinition>
    <oslc:PrefixDefinition rdf:nodeID="autos13">
        <oslc:prefix>rdf</oslc:prefix>
        <oslc:prefixBase rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#"/>
    </oslc:PrefixDefinition>
    <oslc:PrefixDefinition rdf:nodeID="autos14">
        <oslc:prefix>rdfs</oslc:prefix>
        <oslc:prefixBase rdf:resource="http://www.w3.org/2000/01/rdf-schema#"/>
    </oslc:PrefixDefinition>
    <oslc:PrefixDefinition rdf:nodeID="autos15">
        <oslc:prefix>stockquote</oslc:prefix>
        <oslc:prefixBase rdf:resource="http://yourcompany.com/ns/stockquote#"/>
    </oslc:PrefixDefinition>
    <oslc:Publisher rdf:nodeID="autos16">
        <dcterms:identifier>urn:codeplex:oslc4net</dcterms:identifier>
        <dcterms:title rdf:parseType="Literal">Codeplex OSLC4Net</dcterms:title>
    </oslc:Publisher>
    <oslc:Service rdf:nodeID="autos17">
        <oslc:creationFactory rdf:nodeID="autos18"/>
        <oslc:domain rdf:resource="http://yourcompany.com/ns/stockquote#"/>
        <oslc:queryCapability rdf:nodeID="autos19"/>
        <oslc:selectionDialog rdf:nodeID="autos20"/>
    </oslc:Service>
    <oslc:CreationFactory rdf:nodeID="autos18">
        <oslc:creation rdf:resource="http://localhost:7077/api/stockquote"/>
        <oslc:label>Stock Quote Creation</oslc:label>
        <oslc:resourceShape rdf:resource="http://localhost:7077/api/stockquote?getShape=true"/>
        <oslc:resourceType rdf:resource="http://yourcompany.com/ns/stockquote#StockQuote"/>
        <oslc:usage rdf:resource="http://open-services.net/ns/core#default"/>
        <dcterms:title rdf:parseType="Literal">Stock Quote Creation Factory</dcterms:title>
    </oslc:CreationFactory>
    <oslc:QueryCapability rdf:nodeID="autos19">
        <oslc:label>Stock Quote Catalog Query</oslc:label>
        <oslc:queryBase rdf:resource="http://localhost:7077/api/stockquote"/>
        <oslc:resourceShape rdf:resource="http://localhost:7077/apistockquote?getShape=true"/>
        <oslc:resourceType rdf:resource="http://yourcompany.com/ns/stockquote#StockQuote"/>
        <oslc:usage rdf:resource="http://open-services.net/ns/core#default"/>
        <dcterms:title rdf:parseType="Literal">Stock Quote Query Capability</dcterms:title>
    </oslc:QueryCapability>
    <oslc:Dialog rdf:nodeID="autos20">
        <oslc:dialog rdf:resource="http://localhost:7077/api/selection"/>
        <oslc:hintHeight>600px</oslc:hintHeight>
        <oslc:hintWidth>1000px</oslc:hintWidth>
        <oslc:label>Stock Quote Selection Dialog</oslc:label>
        <oslc:resourceType rdf:resource="http://yourcompany.com/ns/stockquote#StockQuote"/>
        <oslc:usage rdf:resource="http://open-services.net/ns/core#default"/>
        <dcterms:title rdf:parseType="Literal">Stock Quote Selection Dialog</dcterms:title>
    </oslc:Dialog>
</rdf:RDF>
Jul 31, 2013 at 8:13 AM
It would appear this is a bug.
According to the core spec, ServiceProvider.Publisher, .Service, .PrefixDefinition and .OauthConfiguration are all supposed to be inline.
In ServiceProvider.cs, GetPublisher(), GetServices(), GetPrefixDefinitions() and GetOauthConfiguration() all have the Representation.Inline attribute, but this seems to be ignored