private static Map<String, RcObjectMetadata> mapCollection(RcCollectionMetadata rcCollMd) { HashMap<String, RcObjectMetadata> m = new HashMap<String, RcObjectMetadata>(); for (RcObjectMetadata rcObjMd : rcCollMd.getObjectMap().values()) { m.put(rcObjMd.getId(), rcObjMd); } for (RcCollectionMetadata rcSubCollMd : rcCollMd.getCollectionMap().values()) { m.putAll(mapCollection(rcSubCollMd)); } return m; }
/** * * @param rcCollectionMetadataList * * @return * * @throws RcIndexerException */ private static List<String> getAllExtendedObjectIds(List<RcCollectionMetadata> rcCollectionMetadataList) throws RcIndexerException { List<String> allObjectsIdList = new ArrayList<String>(); String currentCollectionTitle = null; ListIterator<RcCollectionMetadata> collIt = rcCollectionMetadataList.listIterator(); RcCollectionMetadata rcCollMd; while (collIt.hasNext()) { rcCollMd = (RcCollectionMetadata) collIt.next(); currentCollectionTitle = rcCollMd.getTitle(); if (currentCollectionTitle.endsWith("/")) { throw new RcIndexerException("Invalid Collection Title Found. An illegal forward slash character found in string."); } currentCollectionTitle += "/"; Iterator<RcObjectMetadata> rcObjMdIt = rcCollMd.getObjectMap().values().iterator(); while (rcObjMdIt.hasNext()) { String rcFullObjectID = currentCollectionTitle; rcFullObjectID += rcObjMdIt.next().getId(); allObjectsIdList.add(rcFullObjectID); } } Collections.sort(allObjectsIdList); return allObjectsIdList; }
this.rcObjectMetadataMap.put(rcObjMd.getId(), rcObjMd); this.setProgress(Math.round((((float) i + 1) / ((float) this.rcObjectDirectoryList.size())) * 100F));
StringSelection selection = new StringSelection(this.selectedObject.getId()); clipboard.setContents(selection, null);
throw new ServletException(exceptionPrefix + "There is no video file metadata associated with " + rcObjMd.getId() + ".");
Field extObjIdField = new Field("objectid", rcCollectionMetadata.getTitle() + "/" + rcObjectMetadata.getId(), Field.Store.YES, Field.Index.NOT_ANALYZED, Field.TermVector.WITH_POSITIONS_OFFSETS); Field pgSeqField = new Field("pg_seq", Integer.toString(rcImageMetadata.getSequence()), Field.Store.YES, Field.Index.NOT_ANALYZED, Field.TermVector.NO); Field pgNameField = new Field("pg_name", rcImageMetadata.getPageName().trim(), Field.Store.YES, Field.Index.NOT_ANALYZED, Field.TermVector.NO);
o.put("id", rcObjMd.getId()); o.put("type", rcObjMd.getObjectType().toString()); o.put("title", rcObjMd.getTitle());
return; Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard(); StringSelection selection = new StringSelection(this.selectedObject.getId()); clipboard.setContents(selection, null);
File rcObjDir = rcFsDsMd.getDirectory(rcObjMd); RcIrPageQuery rcIrPgQuery = new RcIrPageQuery(rcCollMd.getId() + "/" + rcObjMd.getId(), new ArrayList<RcIrQueryClause>()); RcIrPageQueryResults rcIrPgQueryResults = this.rcWebApp.getRcIrSearcher().searchPages(rcIrPgQuery); canvas.put("@id", baseUrl + IIIF_PRESENTATION_API_PATH + "/" + rcCollMd.getId() + RC_ID_PATH_SEPARATOR + rcObjMd.getId().replace("/", RC_ID_PATH_SEPARATOR) + "/canvas/" + i); canvas.put("@type", "sc:Canvas"); canvas.put("label", new JSONArray().put(rcImgMd.getPageName())); thumbnail.put("@id", baseUrl + THUMBNAIL_SERVICE_PATH + "?obj_id=" + rcObjMd.getId() + "&pg_idx=" + i + "&obj_type=" + rcObjMd.getObjectType()); thumbnail.put("@type", "dctypes:image"); thumbnail.put("format", "image/jpeg"); image.put("@id", baseUrl + IIIF_PRESENTATION_API_PATH + "/" + rcCollMd.getId() + RC_ID_PATH_SEPARATOR + rcObjMd.getId().replace("/", RC_ID_PATH_SEPARATOR) + "/annotation/" + i); image.put("@type", "oa:Annotation"); image.put("motivation", "sc:painting"); image.put("on", baseUrl + IIIF_PRESENTATION_API_PATH + "/" + rcCollMd.getId() + RC_ID_PATH_SEPARATOR + rcObjMd.getId().replace("/", RC_ID_PATH_SEPARATOR) + "/canvas/" + i); resource.put("@id", baseUrl + IIIF_PRESENTATION_API_PATH + "/" + rcCollMd.getId() + RC_ID_PATH_SEPARATOR + rcObjMd.getId().replace("/", RC_ID_PATH_SEPARATOR) + "/res/" + i + ".jpg"); resource.put("@type", "dctypes:Image"); resource.put("format", "image/jpeg"); service.put("@id", baseUrl + IIIF_IMAGE_API_PATH + "/" + rcCollMd.getId() + RC_ID_PATH_SEPARATOR + rcObjMd.getId().replace("/", RC_ID_PATH_SEPARATOR) + RC_ID_PATH_SEPARATOR + i); service.put("profile", "http://iiif.io/api/image/2/level2.json");
manifest.put("@id", this.getBaseUrl(request) + IIIF_PRESENTATION_API_PATH + "/" + rcCollMd.getId() + RC_ID_PATH_SEPARATOR + rcObjMd.getId().replace("/", RC_ID_PATH_SEPARATOR) + "/manifest"); manifest.put("@type", "sc:Manifest");
text += "<span style=\"font-style:italic;color:" + fontColor + ";\">" + ((RcObjectMetadata) value).getId() + "</span>";
putStatusMessage(observer, "Processing " + rcObjMd.getId() + "...\n", showDateTime);
try { if (this.rcCollectionMetadata.getObjectMap().containsKey(rcObjectMetadataToAdd[i].getId())) { throw new RcMetadataException("The object " + rcObjectMetadataToAdd[i].getId() + " already exists in " + this.rcCollectionMetadata.getTitle() + "."); this.rcCollectionMetadata.getObjectMap().put(curRcObjectMetadataToAdd.getId(), curRcObjectMetadataToAdd); collIdSet = this.assignedObjectMap.get(curRcObjectMetadataToAdd.getId()); this.assignedObjectMap.put(curRcObjectMetadataToAdd.getId(), collIdSet);
text += rcObjectMetadata.getId();
text += ((RcObjectMetadata) value).getId();