} else if (content.getContentType() == Content.Type.MEDIA) {
resource.setMediaType(content.getMimeType().toString());
}
}
IRI srcIri = content.getSrc();
if (srcIri != null) {
try {
final URL url = new URL(Utils.encodeRegistryPath(
URLDecoder.decode(srcIri.toString(), "utf-8")) +
((resource.getPermanentPath() != null) ?
RegistryConstants.URL_SEPARATOR + "version:" + snapshotID : ""));
resource.setContentURL(url);
if (authorizationString != null) {
resource.setAuthorizationString(authorizationString);
}
return resource;
} catch (IOException e) {
throw new RegistryException("unable to receive source. " + srcIri.toString());
}
}
String content1 = entry.getContent();
resource.setContent(content1);