//http://ww2.bgbm.org/herbarium/images/B/-W/08/53/B_-W_08537%20-00%201__3.jpg
JSONArray multimediaArray = record.getJSONArray(MULTIMEDIA);
JSONObject mediaRecord;
- Media media;
- URI uri = null;
- CdmImageInfo imageInf = null;
- MediaRepresentation representation = null;
SpecimenOrObservationType type = null;
for(Object object:multimediaArray){
//parse every record
- media = Media.NewInstance();
- uri = null;
- imageInf = null;
+ Media media = Media.NewInstance();
+ URI uri = null;
+ CdmImageInfo imageInf = null;
if(object instanceof JSONObject){
mediaRecord = (JSONObject) object;
}
}
ImageFile imageFile = ImageFile.NewInstance(uri, null, imageInf);
- representation = MediaRepresentation.NewInstance();
+ MediaRepresentation representation = MediaRepresentation.NewInstance();
representation.addRepresentationPart(imageFile);
media.addRepresentation(representation);
}
}
- /**
- * @param uriString
- * @param readMediaData
- * @return
- * @throws URISyntaxException
- */
private MediaRepresentation makeMediaRepresentation(String uriString, boolean readMediaData) throws URISyntaxException {
uriString = uriString.replace(" ", "%20"); //replace whitespace
CdmImageInfo cdmImageInfo = null;
\r
if (elMediaObjects != null) {\r
// <MediaObject id="m1">\r
- List<Element> listMediaObjects = elMediaObjects.getChildren("MediaObject", sddNamespace);\r
+ @SuppressWarnings("unchecked")\r
+ List<Element> listMediaObjects = elMediaObjects.getChildren("MediaObject", sddNamespace);\r
int j = 0;\r
for (Element elMO : listMediaObjects){\r
\r
List<MetadataEntry> metadata = new ArrayList<>();
List<Language> languages = LocaleContext.getLanguages();
-
if(media.getTitle() != null){
// TODO get localized titleCache
metadata.add(new MetadataEntry("Title", media.getTitleCache()));
Integer height = null;
boolean isMaxExtend = false;
- /**
- *
- */
- public MediaUriTransformation() {
-
- }
+ public MediaUriTransformation() {}
public SearchReplace getScheme() {
return scheme;
return searchPattern;
}
+ @Override
+ public String toString() {
+ return "SearchReplace [replace=" + replace + ", search=" + search + ", searchPattern=" + searchPattern + "]";
+ }
+
+
+
}
\ No newline at end of file