title: Accessing data in java from JSON-Ld
body: <p>my server is receiving different JSON-LD messages as a string. I now need to acces these messages. Here is an example:</p>
  
  <pre><code>    {
    "@graph": [
      {
        "@graph": [
          {
            "@id": "InterIoTMsg:meta/b453273f-36d6-49a2-82ec-d909d8e6f10a",
            "@type": [
              "InterIoTMsg:meta",
              "InterIoTMsg:Observation"
            ],
            "InterIoTMsg:ReceiverPlatformId": {
              "@id": "http://om2m.org/myPlatform"
            },
            "InterIoTMsg:conversationID": "conv614d3621-7399-45b1-bf2f-505b24045ea6",
            "InterIoTMsg:dateTimeStamp": "2018-01-15T21:49:00.655+01:00",
            "InterIoTMsg:messageID": "msg7713aa0f-61df-471d-beec-80e8fb71528a"
          }
        ],
        "@id": "InterIoTMsg:metadata"
      },
      {
        "@graph": [
          {
            "@id": "_:b1",
            "@type": "sosa:Observation",
            "iiot:hasName": "tempOutside",
            "sosa:resultTime": {
              "@type": "http://www.w3.org/2001/XMLSchema#dateTime",
              "@value": "2018-04-06T12:36:12Z"
            },
            "sosa:hasResult": {
              "@id": "_:b2"
            },
            "sosa:madeBySensor": {
              "@id": "_:b0"
            }
          },
          {
            "@id": "_:b2",
            "@type": "sosa:Result",
            "iiot:hasResultValue": {
              "@type": "http://www.w3.org/2001/XMLSchema#long",
              "@value": "32"
            },
            "iiot:hasUnit": {
              "@id": "sweet_units:celsius"
            }
          },
          {
            "@id": "http://localhost:8080/weather/station1",
            "@type": "http://inter-iot.eu/GOIoTP#IoTDevice",
            "InterIoT:GOIoTP#hasName": "Weather Station 1"
          },
          {
            "@id": "_:b0",
            "@type": "sosa:Sensor",
            "sosa:isHostedBy": {
              "@id": "http://localhost:8080/in-name/humidity"
            }
          }
        ],
        "@id": "InterIoTMsg:payload"
      }
    ],
    "@context": {
      "InterIoTMsg": "http://inter-iot.eu/message/",
      "InterIoT": "http://inter-iot.eu/",
      "sosa": "http://www.w3.org/ns/sosa/",
      "iiot": "http://inter-iot.eu/GOIoTP#"
    }
  }
  </code></pre>
  
  <p>I don't know exactly how to access specific values in the data. For example <strong>value</strong> in <strong>iiot:hasResultValue</strong>. What I have right now is a RDF-Parser which parses the <code>String</code> to a <code>dataset</code> with the help of the Jena Api:</p>
  
  <pre><code>try (InputStream in = new ByteArrayInputStream(message.getBytes(StandardCharsets.UTF_8))) {
          RDFParser.create()
                  .source(in)
                  .lang(Lang.JSONLD)
                  .parse(dataset.asDatasetGraph());
      }
  </code></pre>
  
  <p>First of all I don't know how to continue at this point, and second I don't even know if this is the right rudiment. So if anybody could help I am very grateful.</p>