public static String getCollectionTitleForFacetPath(RcIrFacetPath facetPath) { RcCollectionMetadata rcCollMd = RcWebApp.getInstance().getCollectionMetadata(facetPath); if (rcCollMd == null) { return null; } return rcCollMd.getTitle(); }
private static RcIrFacetPath getFacetPath(RcCollectionMetadata rcCollMd) { if (rcCollMd != null) { List<String> facetPathList = new ArrayList<String>(); facetPathList.add(rcCollMd.getTitle()); while (rcCollMd.getParentMetadata() != null && rcCollMd.getParentMetadata() instanceof RcCollectionMetadata) { rcCollMd = (RcCollectionMetadata) rcCollMd.getParentMetadata(); facetPathList.add(rcCollMd.getTitle()); } facetPathList.add(RcIrStaticField.COLLECTION.getFieldName()); Collections.reverse(facetPathList); return new RcIrFacetPath(facetPathList.toArray(new String[0])); } else { return null; } } /*
/** * * @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; }
/** * Refresh collectionMetadataJPanel components. */ private void refreshCollectionMetadata() { this.collectionTitleJTextField.setText(this.rcCollectionMetadata.getTitle()); this.rcRefreshAbstractsJList(); this.rcRefreshIpFiltersJList(); this.rcRefreshPermissionsJList(); }
System.out.print("for objects in " + this.rcCollectionMetadata.getTitle().trim() + ": ");
subCollection.put("label", rcSubCollMd.getTitle()); subCollection.put("description", this.getDescriptions(rcSubCollMd.getAbstracts()));
@Override public Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus) { super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus); if (value.equals(RcCollectionsManagerJPanel.this.collectionsRootNode)) { this.setIcon(this.collectionIcon); this.setDisabledIcon(this.collectionIcon); } if (((DefaultMutableTreeNode) value).getUserObject() instanceof RcCollectionMetadata) { this.setIcon(this.collectionIcon); this.setDisabledIcon(this.collectionIcon); this.setText(((RcCollectionMetadata) ((DefaultMutableTreeNode) value).getUserObject()).getTitle()); } else if (((DefaultMutableTreeNode) value).getUserObject() instanceof String) { this.setIcon(null); this.setDisabledIcon(null); } return this; } }
Field collIdField = new Field("collection", rcCollectionMetadata.getTitle(), Field.Store.YES, Field.Index.NOT_ANALYZED, Field.TermVector.WITH_POSITIONS_OFFSETS); 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);
modifiedCollMd.setTitle(selectedCollMd.getTitle()); rcCollMd.getTitle().trim().equals(modifiedCollMd.getTitle().trim())) { this.showErrorMessageDialog("A collection titled " + modifiedCollMd.getTitle() + " already exists.", "Unable to Modify Collection Metadata"); return; selectedCollMd.setTitle(modifiedCollMd.getTitle());
c.put("title", rcCollMd.getTitle());
response = RcJOptionPane.showConfirmDialog(this.getWindow(), "Are you sure you want to remove " + this.selectedObject.getTitle() + " from " + this.rcCollectionMetadata.getTitle() + "?", "Confirm Object Removal", RcJOptionPane.YES_NO_OPTION); response = RcJOptionPane.showConfirmDialog(this.getWindow(), "Are you sure you want to remove the " + selectedObjectIdices.length + " selected objects from " + this.rcCollectionMetadata.getTitle() + "?", "Confirm Object Removal", RcJOptionPane.YES_NO_OPTION);
int response = RcJOptionPane.showConfirmDialog(this.getWindow(), "Are you sure you want to remove " + this.selectedCollection.getTitle() + "?", "Confirm Collection Removal", RcJOptionPane.YES_NO_OPTION);
throw new RcMetadataException("The object " + rcObjectMetadataToAdd[i].getId() + " already exists in " + this.rcCollectionMetadata.getTitle() + ".");