Skip to content
This repository has been archived by the owner on Oct 12, 2021. It is now read-only.

Commit

Permalink
Include JSON-LD MIME in isWriteable check (#45)
Browse files Browse the repository at this point in the history
* Include JSON-LD MIME in isWriteable check; fixes #44 
* add jsonLd support for query results as well

Signed-off-by: Andrew Berezovskyi <andriib@kth.se>
  • Loading branch information
berezovskyi committed Nov 17, 2018
1 parent 0ff8cee commit d1f2afb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Expand Up @@ -72,7 +72,8 @@ public boolean isWriteable(final Class<?> type,
OslcMediaType.APPLICATION_RDF_XML_TYPE,
OslcMediaType.APPLICATION_XML_TYPE,
OslcMediaType.TEXT_XML_TYPE,
OslcMediaType.TEXT_TURTLE_TYPE));
OslcMediaType.TEXT_TURTLE_TYPE,
OslcMediaType.APPLICATION_JSON_LD_TYPE));
}

@Override
Expand Down
Expand Up @@ -101,7 +101,8 @@ public boolean isWriteable(final Class<?> type,
OslcMediaType.APPLICATION_RDF_XML_TYPE,
OslcMediaType.APPLICATION_XML_TYPE,
OslcMediaType.TEXT_XML_TYPE,
OslcMediaType.TEXT_TURTLE_TYPE);
OslcMediaType.TEXT_TURTLE_TYPE,
OslcMediaType.APPLICATION_JSON_LD_TYPE);
}
}
}
Expand Down
Expand Up @@ -142,7 +142,8 @@ else if (actualTypeArguments[0] instanceof GenericArrayType)
OslcMediaType.APPLICATION_RDF_XML_TYPE,
OslcMediaType.APPLICATION_XML_TYPE,
OslcMediaType.TEXT_XML_TYPE,
OslcMediaType.TEXT_TURTLE_TYPE);
OslcMediaType.TEXT_TURTLE_TYPE,
OslcMediaType.APPLICATION_JSON_LD_TYPE);
}

@Override
Expand Down Expand Up @@ -285,4 +286,4 @@ public Object readFrom(final Class<Object> type,

return null;
}
}
}

0 comments on commit d1f2afb

Please sign in to comment.