├── .gitignore ├── README.md ├── eclipse-repository ├── about.png ├── bundleJREs │ ├── Workbench │ ├── linux.gtk.x86_64-assembly.xml │ ├── macosx.cocoa.x86_64-app-assembly.xml │ ├── win32.win32.x86-assembly.xml │ └── win32.win32.x86_64-assembly.xml ├── category.xml ├── intro.png ├── plugin_customization.ini ├── pom.xml ├── test └── workbench.product ├── etc ├── about.xcf ├── header.txt ├── ica-logo.png └── liddell12.tif ├── pom.xml ├── staging ├── META-INF │ └── MANIFEST.MF ├── build.properties ├── contexts.xml ├── icons │ ├── folder.png │ ├── refresh.gif │ ├── stagingareas.gif │ └── synch_synch.gif ├── initialStagingAreasConfig.json ├── plugin.xml ├── pom.xml └── src │ └── main │ └── java │ └── staging │ └── plugin │ ├── EFSResolver.java │ ├── IRODSURLStreamHandler.java │ ├── IRODSURLStreamHandlerFactory.java │ ├── StagingAreaPreferenceInitializer.java │ ├── StagingPlugin.java │ ├── StagingUtils.java │ ├── WorkbenchPreferencePage.java │ └── views │ ├── StagingAreasView.java │ └── StagingFolderDialog.java ├── target-definition ├── helios.target ├── indigo.target ├── indigo_3_8.target ├── juno.target ├── kepler.target └── pom.xml ├── workbench_feature ├── build.properties ├── feature.xml ├── pom.xml └── rootfiles │ ├── configurations │ ├── factories │ │ └── stub.txt │ └── services │ │ └── org.ops4j.pax.logging.properties │ └── icons │ ├── alt_launcher.icns │ ├── alt_launcher.ico │ ├── alt_launcher.xpm │ └── alt_window_32.gif ├── workbench_help ├── META-INF │ └── MANIFEST.MF ├── build.properties ├── html │ ├── concepts │ │ ├── arrangement.html │ │ ├── capture.html │ │ ├── crosswalks.html │ │ ├── dictionaries.html │ │ ├── forms.html │ │ ├── originals.html │ │ ├── prestaging.html │ │ ├── project_export.html │ │ ├── projects.html │ │ └── staging.html │ ├── gettingstarted │ │ ├── add_originals.html │ │ ├── capturing_files.html │ │ ├── create_project.html │ │ ├── crosswalk_mods.html │ │ ├── edit_description.html │ │ ├── finish_export.html │ │ ├── sshot1.jpg │ │ ├── sshot2.jpg │ │ ├── sshot3.jpg │ │ ├── sshot4.jpg │ │ ├── sshot5.jpg │ │ └── sshot6.jpg │ ├── tasks │ │ ├── dictionaries_preference.html │ │ ├── export-import.html │ │ └── staging_preference.html │ └── toc.html ├── plugin.xml ├── pom.xml ├── toc.xml ├── tocconcepts.xml ├── tocgettingstarted.xml └── toctasks.xml └── workbench_plugin ├── META-INF ├── MANIFEST.MF └── p2.inf ├── about.png ├── build.properties ├── helpData.xml ├── icons ├── 24px-Crystal_Clear_action_filenew.png ├── 24px-Crystal_Clear_app_ark.png ├── 24px-Crystal_Clear_app_file-manager.png ├── 24px-Crystal_Clear_app_harddrive.png ├── 24px-Crystal_Clear_app_kexi.png ├── 24px-Crystal_Clear_app_kthememgr.png ├── 24px-Crystal_Clear_filesystem_folder_grey.png ├── 24px-Crystal_Clear_filesystem_folder_txt.png ├── 48px-Crystal_Clear_action_editcopy.png ├── 48px-Crystal_Clear_action_filenew.png ├── 48px-Crystal_Clear_app_ark.png ├── 48px-Crystal_Clear_app_ark2.png ├── 48px-Crystal_Clear_app_error.png ├── 48px-Crystal_Clear_app_file-manager.png ├── 48px-Crystal_Clear_app_harddrive.png ├── 48px-Crystal_Clear_app_kexi.png ├── 48px-Crystal_Clear_app_kfm.png ├── 48px-Crystal_Clear_app_kthememgr.png ├── 48px-Crystal_Clear_app_lists.png ├── 48px-Crystal_Clear_app_my_documents.png ├── 48px-Crystal_Clear_app_package_graphics.png ├── 48px-Crystal_Clear_app_phppg.png ├── 48px-Crystal_Clear_app_sharemanager.png ├── 48px-Crystal_Clear_app_warehause.png ├── 48px-Crystal_Clear_device_blockdevice.png ├── 48px-Crystal_Clear_device_cdrom_unmount.png ├── 48px-Crystal_Clear_device_dvd_unmount.png ├── 48px-Crystal_Clear_device_floppy_unmount.png ├── 48px-Crystal_Clear_device_nfs_unmount.png ├── 48px-Crystal_Clear_device_usbpendrive_unmount.png ├── 48px-Crystal_Clear_device_zip_unmount.png ├── 48px-Crystal_Clear_filesystem_folder.png ├── 48px-Crystal_Clear_filesystem_folder_grey.png ├── 48px-Crystal_Clear_filesystem_folder_tar.png ├── 48px-Crystal_Clear_filesystem_folder_txt.png ├── 48px-Crystal_Clear_filesystem_lockoverlay.png ├── 48px-Crystal_Clear_filesystem_network_local.png ├── 48px-Crystal_Clear_mimetype_tar.png ├── access_restriction_attrib.gif ├── alt_about.gif ├── alt_launcher.icns ├── alt_launcher.ico ├── alt_launcher.xpm ├── alt_window_32.gif ├── binary_co.gif ├── category_obj.gif ├── crosswalk_add.gif ├── crosswalk_add_disabled.gif ├── crosswalk_decor.gif ├── edtsrclkup_co.gif ├── ejected1.gif ├── filter_tsk.gif ├── info_tsk.gif ├── inst_ptr_top.gif ├── key.gif ├── key_sm.gif ├── keylock.gif ├── link_obj.gif ├── loading.png ├── lockedstate.gif ├── lockedstate_mono.gif ├── lockedstate_small.gif ├── no_preview.png ├── pinned_ovr.gif ├── property_obj.gif ├── provmd_E.gif ├── provmd_who.gif ├── read_obj.gif ├── resource_types.png ├── sample_decorator.gif ├── storage.gif ├── table.gif ├── techmd.gif ├── techmd_doc.gif ├── techmd_docs.gif ├── techmd_folder.gif ├── type_aggr.png ├── type_coll.png ├── type_file.png ├── type_folder.png ├── var_cntnt_prvdr.gif ├── version_controlled.gif ├── waiting_ovr.gif ├── write_obj.gif └── write_obj_gray.gif ├── intro.png ├── intro ├── githubReleases.xml ├── overview.xml ├── webresources.xml └── whatsnew.xml ├── introData.xml ├── mets.xsd ├── mods.xsd ├── notes.txt ├── plugin.xml ├── plugin_customization.ini ├── pom.xml ├── premis.xsd ├── splash.bmp ├── splash.xcf ├── src └── main │ ├── java │ └── unc │ │ └── lib │ │ └── cdr │ │ └── workbench │ │ ├── DivPropertyTester.java │ │ ├── IResourceConstants.java │ │ ├── SelectionPropertyTester.java │ │ ├── acl │ │ ├── AccessControlFormEditor.java │ │ ├── AccessControlFormPage.java │ │ ├── DeleteAccessControlsCommand.java │ │ ├── EditAccessControlsCommand.java │ │ ├── GrantTypeDetailsPage.java │ │ └── ScrolledPropertiesBlock.java │ │ ├── arrange │ │ ├── AddFolderDivHandler.java │ │ ├── ArrangementCommonDropAdapterAssistant.java │ │ ├── ArrangementContentProvider.java │ │ ├── ArrangementDragSourceListener.java │ │ ├── ArrangementLabelProvider.java │ │ ├── ArrangementProjectElement.java │ │ ├── ArrangementTableLabelProvider.java │ │ ├── ArrangementTreeViewPart.java │ │ ├── ArrangementViewerSorter.java │ │ ├── DivAdapterFactory.java │ │ ├── DivLinkBucket.java │ │ ├── RemoveDivHandler.java │ │ ├── RemoveSmLinkHandler.java │ │ └── RenameDivHandler.java │ │ ├── capture │ │ ├── CaptureHandler.java │ │ ├── CaptureJob.java │ │ ├── FileStoreProvider.java │ │ ├── LinkOriginalsHandler.java │ │ ├── LinkOriginalsWizard.java │ │ ├── OriginalFolderEditorInput.java │ │ ├── OriginalFolderEditorPart.java │ │ ├── OriginalFolderSnapshotJob.java │ │ ├── OriginalsContentProvider.java │ │ ├── OriginalsDragSourceListener.java │ │ ├── OriginalsLabelProvider.java │ │ ├── OriginalsLinkJob.java │ │ ├── OriginalsPropertyTester.java │ │ ├── OriginalsTableLabelProvider.java │ │ ├── PickOriginalLocationsPage.java │ │ ├── PropertyTesterTopFolderName.java │ │ ├── RescanOriginalsHandler.java │ │ └── SelectFileExtensionsDialog.java │ │ ├── commands │ │ ├── AutoStageAction.java │ │ ├── CloseProjectHandler.java │ │ ├── CreateProjectHandler.java │ │ ├── CrosswalkCommand.java │ │ ├── DeleteDescriptionsCommand.java │ │ ├── DeleteProjectHandler.java │ │ ├── DivLinkHandler.java │ │ ├── EditDescriptionCommand.java │ │ ├── ExitHandler.java │ │ ├── ExportProjectHandler.java │ │ ├── OpenProjectHandler.java │ │ ├── OpenSystemEditorTempCopyHandler.java │ │ └── SetDivTypeHandler.java │ │ ├── originals │ │ ├── OriginalFileStore.java │ │ ├── OriginalStub.java │ │ ├── OriginalsFileSystem.java │ │ └── VolumeUtil.java │ │ ├── project │ │ ├── AbstractCustomProjectElement.java │ │ ├── AdapterFactory.java │ │ ├── BagItZipExportJob.java │ │ ├── BagItZipExportWizard.java │ │ ├── CSVArrangementExportJob.java │ │ ├── CSVArrangementExportWizard.java │ │ ├── CdrSipExportJob.java │ │ ├── CdrSipExportWizard.java │ │ ├── ICustomEObjectBucket.java │ │ ├── ICustomProjectElement.java │ │ ├── MetsProjectNature.java │ │ ├── MetsProjectNatureSupport.java │ │ ├── NewProjectStagingPage.java │ │ ├── NewSipProjectWizard.java │ │ ├── PickExportFilePage.java │ │ ├── ProjectBagItExportWizard.java │ │ ├── ProjectEMFSession.java │ │ ├── ProjectPropertyTester.java │ │ ├── StagingAreaContributionItem.java │ │ └── VariableResolver.java │ │ ├── rcp │ │ ├── AccessionPerspective.java │ │ ├── Activator.java │ │ ├── Application.java │ │ ├── ApplicationActionBarAdvisor.java │ │ ├── ApplicationWorkbenchAdvisor.java │ │ ├── ApplicationWorkbenchWindowAdvisor.java │ │ ├── ArrangementPerspective.java │ │ ├── BatchMetadataPerspective.java │ │ ├── METSWorkspaceSaveParticipant.java │ │ ├── MetsXmlPerspective.java │ │ ├── PerspectiveTweaks.java │ │ ├── Startup.java │ │ └── WorkbenchHelpContextIds.java │ │ ├── stage │ │ └── StagingJob.java │ │ ├── views │ │ ├── AbstractDivTypeMetadataPropertySection.java │ │ ├── AbstractEcoreXMLPropertySection.java │ │ ├── DescriptionPropertySection.java │ │ ├── DivTypeFileFilter.java │ │ ├── DivTypeWithOriginalFilter.java │ │ ├── FileStoreImageProvider.java │ │ ├── HasMetsProjectNatureFilter.java │ │ ├── HasOriginalFilter.java │ │ ├── HasStagedFileFilter.java │ │ ├── ImageProvider.java │ │ ├── ImageViewer.java │ │ ├── LabelImageFactory.java │ │ ├── MdSecTypeDecorator.java │ │ ├── MdSecTypePropertySection.java │ │ ├── MetsProjectContentProvider.java │ │ ├── MetsProjectLabelProvider.java │ │ ├── MetsProjectNaturePropertiesSection.java │ │ ├── MetsProjectNavigator.java │ │ ├── OriginalAndDivDecorator.java │ │ ├── OriginalFingerprintSection.java │ │ ├── OriginalVolumeSection.java │ │ ├── PropertySheetPropertySection.java │ │ ├── ProvenancePropertySection.java │ │ ├── RightsPropertySection.java │ │ ├── TechnicalPropertySection.java │ │ ├── ViewPartPreviewFile.java │ │ └── WorkbenchWorkbenchRoot.java │ │ └── xwalk │ │ ├── CrosswalkContentProvider.java │ │ ├── CrosswalkJob.java │ │ ├── CrosswalkLabelProvider.java │ │ ├── CrosswalkViewerSorter.java │ │ ├── MapAttributeAdvice.java │ │ ├── MapElementAdvice.java │ │ ├── MappedFeatureChoiceDialog.java │ │ ├── MetadataCompartment.java │ │ ├── MetadataCompartmentDecorator.java │ │ ├── MetadataSourcePropertyTester.java │ │ ├── PickMappedFeatureCommand.java │ │ └── SetMappedFeatureCommand.java │ └── resources │ └── workbench_mets_example.xml ├── staging.properties └── standard_mill.png /.gitignore: -------------------------------------------------------------------------------- 1 | /*/bin 2 | /*/target 3 | /*/.settings 4 | /*/.project 5 | /*/.classpath 6 | /*/.options 7 | /*/.externalToolBuilders 8 | /.settings 9 | /.project 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Command-line Build Instructions 2 | ------------------------------- 3 | The build is maven-based, assisted by a set of Eclipse build plugins called [Tycho](http://tycho.sonatype.org/). 4 | The maven plugin repository for Tycho and all it's particulars are configured in the parent pom.xml file in this directory. 5 | 6 | Full build requires: 7 | * Maven 3 8 | * Java 7 9 | * Java 7 packages for each target platform (optional, for bundling JRE) 10 | 11 | Building without bundling the Java Runtime Environment is easy: 12 | 13 | mvn package 14 | 15 | The Java Runtime Environment (JRE) can be bundled within each distribution package. To perform a bundled build, you must first download and unpack the JRE folder for all the platforms into a directory structure as follows: 16 | 17 | bundledJREs 18 | |-linux-i586 19 | | \jre1.7.0_25 20 | |-linux-x86 21 | | \jre1.7.0_25 22 | |-windows-x86 23 | | \jre1.7.0_25 24 | |-windows-i586 25 | | \jre1.7.0_25 26 | \-macosx-x64 27 | \jre1.7.0_25.jre 28 | 29 | Then the distribution packages and update site are all created in one maven command: 30 | 31 | mvn -DbundleJREs=true -DbundleJREs.dir= package 32 | 33 | The distribution packages can be found here after the build: 34 | 35 | /eclipse-repository/target/products 36 | 37 | Developer Eclipse IDE Setup 38 | --------------------------- 39 | 40 | 1. Install Eclipse IDE and required plugins: 41 | * Eclipse Modelling Project feature or choose this product download (this includes RCP/PDE bundles) 42 | * m2eclipse plugin and connectors, see Maven > Discovery in preferences 43 | * Tycho Configurator m2eclipse connector 44 | * m2e-egit Maven SCM Handler for EGit 45 | 1. Import Maven Projects from SCM 46 | 1. Select git and this project URL. 47 | 1. Open the current target-definition file. (As on this writing, target-definition\indigo_3_8.target) 48 | 1. Click on "Set as Target Platform" in the upper right. 49 | 1. To fix logging classpath markers, maven install these subprojects: 50 | * org.apache.log4j12 51 | * org.slf4j.log4j12 52 | 1. To enable PDE logging via SLF4J, maven install this one too: 53 | * org.slf4j.pde 54 | -------------------------------------------------------------------------------- /eclipse-repository/about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/eclipse-repository/about.png -------------------------------------------------------------------------------- /eclipse-repository/bundleJREs/Workbench: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | 4 | DIR=`dirname $0`/../ 5 | LOG_PATH=`cd ~; pwd`/workbench.log 6 | export JAVA_HOME=$DIR/Resources/jre${jre.version}.jre/Contents/Home 7 | LAUNCHER_JAR=$( find $DIR/Resources/plugins -name org.eclipse.equinox.launcher_*.jar | tail -n1) 8 | 9 | $JAVA_HOME/bin/java \ 10 | -showversion \ 11 | -XX:MaxPermSize=256m \ 12 | -Xms1024m \ 13 | -Xmx1024m \ 14 | -XstartOnFirstThread \ 15 | -Dorg.eclipse.swt.internal.carbon.smallFonts \ 16 | -Dosgi.requiredJavaVersion=1.7 \ 17 | -Dosgi.instance.area=@user.home/curators-workspace \ 18 | -Djargon.debug=0 \ 19 | -Derror.log.path=$LOG_PATH \ 20 | -jar $LAUNCHER_JAR 21 | -------------------------------------------------------------------------------- /eclipse-repository/bundleJREs/linux.gtk.x86_64-assembly.xml: -------------------------------------------------------------------------------- 1 | 4 | linux.gtk.x86_64-jre 5 | 6 | tar.gz 7 | 8 | curators-workbench 9 | 10 | 11 | / 12 | ${basedir}/target/products/curators-workbench/linux/gtk/x86_64/curators-workbench 13 | 14 | ** 15 | 16 | 17 | 18 | 19 | /jre 20 | ${bundleJREs.dir}/linux-x64/jre${jre.version} 21 | 22 | ** 23 | 24 | 25 | 26 | 27 | 28 | 29 | ${bundleJREs.dir}/linux-x64/jre${jre.version}/bin/java 30 | /jre/bin 31 | false 32 | 755 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /eclipse-repository/bundleJREs/macosx.cocoa.x86_64-app-assembly.xml: -------------------------------------------------------------------------------- 1 | 4 | macosx.cocoa.x86_64-app 5 | 6 | tar.gz 7 | 8 | Workbench.app 9 | 10 | 11 | /Contents/Resources 12 | ${basedir}/target/products/curators-workbench/macosx/cocoa/x86_64/curators-workbench 13 | 14 | ** 15 | 16 | 17 | Workbench.app 18 | 19 | 20 | 21 | 22 | /Contents/MacOS 23 | ${basedir}/target/products/curators-workbench/macosx/cocoa/x86_64/curators-workbench/Workbench.app/Contents/MacOS 24 | 25 | ** 26 | 27 | 28 | Workbench 29 | 30 | 31 | 32 | 33 | /Contents/Resources 34 | ${bundleJREs.dir}/macosx-x64 35 | 36 | jre${jre.version}.jre/** 37 | 38 | 39 | 40 | 41 | 42 | 43 | ${basedir}/bundleJREs/Workbench 44 | /Contents/MacOS 45 | true 46 | 755 47 | 48 | 49 | ${bundleJREs.dir}/macosx-x64/jre${jre.version}.jre/Contents/Home/bin/java 50 | /Contents/Resources/jre${jre.version}.jre/Contents/Home/bin 51 | false 52 | 755 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /eclipse-repository/bundleJREs/win32.win32.x86-assembly.xml: -------------------------------------------------------------------------------- 1 | 4 | win32.win32.x86-jre 5 | 6 | zip 7 | 8 | curators-workbench 9 | 10 | 11 | / 12 | ${basedir}/target/products/curators-workbench/win32/win32/x86/curators-workbench 13 | 14 | ** 15 | 16 | 17 | 18 | 19 | /jre 20 | ${bundleJREs.dir}/windows-i586/jre${jre.version} 21 | 22 | ** 23 | 24 | 25 | 26 | 27 | 28 | 29 | ${bundleJREs.dir}/windows-i586/jre${jre.version}/bin/java.exe 30 | /jre/bin 31 | false 32 | 755 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /eclipse-repository/bundleJREs/win32.win32.x86_64-assembly.xml: -------------------------------------------------------------------------------- 1 | 4 | win32.win32.x86_64-jre 5 | 6 | zip 7 | 8 | curators-workbench 9 | 10 | 11 | / 12 | ${basedir}/target/products/curators-workbench/win32/win32/x86_64/curators-workbench 13 | 14 | ** 15 | 16 | 17 | 18 | 19 | /jre 20 | ${bundleJREs.dir}/windows-x64/jre${jre.version} 21 | 22 | ** 23 | 24 | 25 | 26 | 27 | 28 | 29 | ${bundleJREs.dir}/windows-x64/jre${jre.version}/bin/java.exe 30 | /jre/bin 31 | false 32 | 755 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /eclipse-repository/category.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Features related to the Curator's Workbench 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /eclipse-repository/intro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/eclipse-repository/intro.png -------------------------------------------------------------------------------- /eclipse-repository/plugin_customization.ini: -------------------------------------------------------------------------------- 1 | org.eclipse.ui/SHOW_PROGRESS_ON_STARTUP = true 2 | -------------------------------------------------------------------------------- /eclipse-repository/test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/eclipse-repository/test -------------------------------------------------------------------------------- /etc/about.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/etc/about.xcf -------------------------------------------------------------------------------- /etc/header.txt: -------------------------------------------------------------------------------- 1 | Copyright ${year} The University of North Carolina at Chapel Hill 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. -------------------------------------------------------------------------------- /etc/ica-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/etc/ica-logo.png -------------------------------------------------------------------------------- /etc/liddell12.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/etc/liddell12.tif -------------------------------------------------------------------------------- /staging/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: staging.plugin 4 | Bundle-SymbolicName: staging.plugin;singleton:=true 5 | Bundle-Version: 4.1.5.qualifier 6 | Bundle-Activator: staging.plugin.StagingPlugin 7 | Bundle-Vendor: University Libraries, UNC Chapel Hill 8 | Require-Bundle: org.eclipse.ui, 9 | org.eclipse.core.runtime, 10 | org.eclipse.core.resources, 11 | org.eclipse.core.filesystem, 12 | org.apache.commons.codec;bundle-version="1.3.0", 13 | org.junit, 14 | edu.unc.lib.cdr.staging-areas;bundle-version="0.0.1";visibility:=reexport, 15 | org.ops4j.pax.logging.pax-logging-api;bundle-version="1.7.1" 16 | Bundle-RequiredExecutionEnvironment: JavaSE-1.7 17 | Bundle-ActivationPolicy: lazy 18 | Import-Package: org.eclipse.core.filesystem 19 | Bundle-ClassPath: . 20 | Export-Package: staging.plugin, 21 | staging.plugin.views 22 | -------------------------------------------------------------------------------- /staging/build.properties: -------------------------------------------------------------------------------- 1 | bin.includes = plugin.xml,\ 2 | .,\ 3 | META-INF/,\ 4 | initialStagingAreasConfig.json,\ 5 | icons/,\ 6 | contexts.xml,\ 7 | src/main/java/ 8 | src.includes = initialStagingAreasConfig.json,\ 9 | icons/ 10 | jars.compile.order = . 11 | source.. = src/main/java/ 12 | -------------------------------------------------------------------------------- /staging/contexts.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | This is the context help for the sample view with a table viewer. It was generated by a PDE template. 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /staging/icons/folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/staging/icons/folder.png -------------------------------------------------------------------------------- /staging/icons/refresh.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/staging/icons/refresh.gif -------------------------------------------------------------------------------- /staging/icons/stagingareas.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/staging/icons/stagingareas.gif -------------------------------------------------------------------------------- /staging/icons/synch_synch.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/staging/icons/synch_synch.gif -------------------------------------------------------------------------------- /staging/initialStagingAreasConfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "stagingAreas":{ 3 | "data/":{ 4 | "name":"BagIt Data Folder (local only)" 5 | } 6 | }, 7 | "customMappings" :{}, 8 | "repositoryConfigurations": [] 9 | } -------------------------------------------------------------------------------- /staging/plugin.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 8 | 9 | 10 | 12 | 16 | 17 | 18 | 20 | 23 | 24 | 30 | 31 | 32 | 34 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /staging/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 4.0.0 8 | 9 | curators.workbench 10 | parent 11 | 4.1.5-SNAPSHOT 12 | 13 | staging.plugin 14 | eclipse-plugin 15 | 16 | -------------------------------------------------------------------------------- /staging/src/main/java/staging/plugin/EFSResolver.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package staging.plugin; 17 | 18 | import java.net.URI; 19 | import java.net.URLStreamHandlerFactory; 20 | 21 | import org.eclipse.core.filesystem.EFS; 22 | import org.eclipse.core.filesystem.IFileStore; 23 | import org.eclipse.core.runtime.CoreException; 24 | 25 | import edu.unc.lib.staging.LocalResolver; 26 | 27 | /** 28 | * This resolves URLs via the Eclipse File System. 29 | * @author count0 30 | * 31 | */ 32 | public class EFSResolver implements LocalResolver { 33 | 34 | @Override 35 | public boolean exists(URI locationURI) { 36 | try { 37 | IFileStore fs = EFS.getStore(locationURI); 38 | return fs.fetchInfo().exists(); 39 | } catch(CoreException e) { 40 | return false; 41 | } catch(NullPointerException e) { 42 | return false; 43 | } 44 | } 45 | 46 | @Override 47 | public URLStreamHandlerFactory getURLStreamHandlerFactory() { 48 | return new IRODSURLStreamHandlerFactory(); 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /staging/src/main/java/staging/plugin/IRODSURLStreamHandler.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package staging.plugin; 17 | 18 | import java.io.IOException; 19 | import java.net.URL; 20 | import java.net.URLConnection; 21 | 22 | import org.osgi.service.url.AbstractURLStreamHandlerService; 23 | 24 | public class IRODSURLStreamHandler extends AbstractURLStreamHandlerService { 25 | 26 | @Override 27 | public URLConnection openConnection(URL u) throws IOException { 28 | throw new UnsupportedOperationException("This doesn't work yet. We use EFS instead."); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /staging/src/main/java/staging/plugin/IRODSURLStreamHandlerFactory.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package staging.plugin; 17 | 18 | import java.io.IOException; 19 | import java.net.URL; 20 | import java.net.URLConnection; 21 | import java.net.URLStreamHandler; 22 | import java.net.URLStreamHandlerFactory; 23 | 24 | public class IRODSURLStreamHandlerFactory implements URLStreamHandlerFactory { 25 | 26 | public URLStreamHandler createURLStreamHandler(String protocol) { 27 | if("irods".equals(protocol)) { 28 | return new Handler(); 29 | } else { 30 | return null; 31 | } 32 | } 33 | 34 | public class Handler extends URLStreamHandler { 35 | 36 | @Override 37 | protected URLConnection openConnection(URL u) throws IOException { 38 | throw new UnsupportedOperationException("This handler is a stub and does not support opening of iRODS streams."); 39 | } 40 | 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /staging/src/main/java/staging/plugin/StagingAreaPreferenceInitializer.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package staging.plugin; 17 | 18 | import java.io.BufferedReader; 19 | import java.io.IOException; 20 | import java.io.InputStreamReader; 21 | import java.net.URL; 22 | 23 | import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer; 24 | import org.eclipse.core.runtime.preferences.DefaultScope; 25 | import org.eclipse.core.runtime.preferences.IEclipsePreferences; 26 | 27 | public class StagingAreaPreferenceInitializer extends AbstractPreferenceInitializer { 28 | 29 | @Override 30 | public void initializeDefaultPreferences() { 31 | URL cUrl = StagingPlugin.getDefault().getBundle().getResource("initialStagingAreasConfig.json"); 32 | StringBuilder sb = new StringBuilder(); 33 | try(BufferedReader r = new BufferedReader(new InputStreamReader(cUrl.openStream()))) { 34 | for(String line = r.readLine(); line != null; line = r.readLine()) { 35 | sb.append(line).append('\n'); 36 | } 37 | } catch(IOException e) { 38 | throw new Error("Unexpected issue loading JSON file", e); 39 | } 40 | String localStagingConfig = sb.toString(); 41 | IEclipsePreferences prefs = DefaultScope.INSTANCE.getNode(StagingPlugin.PLUGIN_ID); 42 | prefs.put(StagingPlugin.LOCAL_STAGING_CONFIG_JSON, localStagingConfig); 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /target-definition/helios.target: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /target-definition/indigo.target: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /target-definition/juno.target: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /target-definition/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | target-definition 8 | pom 9 | RCP Example Target Definition 10 | 11 | 12 | curators.workbench 13 | parent 14 | 4.1.5-SNAPSHOT 15 | 16 | 17 | 18 | 19 | 20 | org.codehaus.mojo 21 | build-helper-maven-plugin 22 | 1.3 23 | 24 | 25 | attach-artifacts 26 | package 27 | 28 | attach-artifact 29 | 30 | 31 | 32 | 33 | indigo_3_8.target 34 | target 35 | indigo 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /workbench_feature/build.properties: -------------------------------------------------------------------------------- 1 | bin.includes = feature.xml,\ 2 | rootfiles/ 3 | root = rootfiles 4 | src.includes = rootfiles/ 5 | -------------------------------------------------------------------------------- /workbench_feature/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | curators.workbench 7 | parent 8 | 4.1.5-SNAPSHOT 9 | 10 | workbench_feature 11 | eclipse-feature 12 | 13 | -------------------------------------------------------------------------------- /workbench_feature/rootfiles/configurations/factories/stub.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_feature/rootfiles/configurations/factories/stub.txt -------------------------------------------------------------------------------- /workbench_feature/rootfiles/configurations/services/org.ops4j.pax.logging.properties: -------------------------------------------------------------------------------- 1 | log4j.rootLogger=INFO, A1 2 | log4j.appender.A1=org.apache.log4j.FileAppender 3 | log4j.appender.A1.File=${error.log.path} 4 | log4j.appender.A1.layout=org.apache.log4j.PatternLayout 5 | log4j.appender.A1.layout.ConversionPattern=%d{yyyy/MM/dd HH:mm:ss,SSS} [%t] %-5p %c %x - %m%n 6 | log4j.logger.unc.lib=DEBUG 7 | log4j.logger.staging.plugin=DEBUG -------------------------------------------------------------------------------- /workbench_feature/rootfiles/icons/alt_launcher.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_feature/rootfiles/icons/alt_launcher.icns -------------------------------------------------------------------------------- /workbench_feature/rootfiles/icons/alt_launcher.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_feature/rootfiles/icons/alt_launcher.ico -------------------------------------------------------------------------------- /workbench_feature/rootfiles/icons/alt_window_32.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_feature/rootfiles/icons/alt_window_32.gif -------------------------------------------------------------------------------- /workbench_help/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: workbench_help 4 | Bundle-SymbolicName: workbench_help;singleton:=true 5 | Bundle-Version: 4.1.5.qualifier 6 | Bundle-Vendor: University Libraries, UNC Chapel Hill 7 | Bundle-RequiredExecutionEnvironment: JavaSE-1.7 8 | Bundle-ClassPath: . 9 | -------------------------------------------------------------------------------- /workbench_help/build.properties: -------------------------------------------------------------------------------- 1 | source.. = src/main/java/ 2 | bin.includes = plugin.xml,\ 3 | META-INF/,\ 4 | .,\ 5 | html/,\ 6 | *.xml 7 | -------------------------------------------------------------------------------- /workbench_help/html/concepts/arrangement.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Arrangement 7 | 8 | 9 |

Arrangement

10 |

11 | After capture a logical representation of 12 | the original file tree appears in the arrangement section of the 13 | project navigator. The arrangement tree can be edited. All changes 14 | affect the logical representation of files in the METS manifest and 15 | have no affect on the original files. 16 |

17 | 18 |

Files may be removed or deleted from the arrangement, which is 19 | the same as un-capturing them. When initially captured, the 20 | arrangement tree mirrors the original captured folder tree, but you 21 | may modify it and organize materials differently. For instance, you 22 | may want to create an arrangement that facilitates discovery of 23 | materials by end-users.

24 | 25 |

The arrangement represents the objects as they are organized and 26 | described in the manifest and in the repository, after submission. 27 | File and folder-level descriptions may be added in the arrangement. 28 | Files and folders may be renamed. 29 |

If your repository supports compatible metadata, you can use the 30 | arrangement to assign many more properties to your objects: 31 |

39 | 40 | 41 | -------------------------------------------------------------------------------- /workbench_help/html/concepts/capture.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Capture 7 | 8 | 9 |

Capture

10 |

Capture records information about an original file or folder in the METS manifest for a project. 11 | Once captured, originals are represented in the project Arrangement, which 12 | is a view into the METS structMap for the project. Capture also records the original location of the file and date it was 13 | created. Captured originals are marked as captured. Captured files are queued for staging and checksum calculation.

14 | 15 | 16 | -------------------------------------------------------------------------------- /workbench_help/html/concepts/crosswalks.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Metadata Crosswalks 6 | 7 | 8 |

Metadata Crosswalks

9 |

The Curator's Workbench facilitates the mapping of 10 | user-supplied metadata to a descriptive metadata standard. This is 11 | done via a crosswalk.

12 | 13 |

14 | A crosswalk is a table that shows equivalent elements in two metadata 15 | schemas. At it's most basic, a crosswalk shows a user where to put 16 | data from one scheme into a different scheme.1 17 | 18 |

19 | 20 |

The workbench allows the user to map as much (or as little) 21 | metadata to MODS elements as they wish. This is helpful when the 22 | objects in the project have some metadata generated by the original 23 | user or repository staff. Mapping that metadata to MODS elements can 24 | automatically describe objects at the item-level, thereby reducing the 25 | amount of time repository staff must spend on a collection.

26 | 27 |

When you create a crosswalk, you are telling the Workbench where 28 | the metadata resides, to which values it should pay attention, and to 29 | which standard elements the file's homegrown fields apply. This sounds 30 | like a lot of work, but the Workbench does much of it for you via a 31 | graphic interface reminiscint of creating relations between tables in 32 | a database application.

33 | 34 |

35 | To create a crosswalk for your project, see Crosswalk Tabular 37 | Metadata to MODS. 38 |

39 | 40 | References 41 |
42 | 43 | 1 44 | "Schema 45 | Crosswalk", Wikipedia, retrieved 2011-09-26 46 | 47 | 48 | -------------------------------------------------------------------------------- /workbench_help/html/concepts/dictionaries.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Metadata Dictionaries 7 | 8 | 9 |

Metadata Dictionaries

10 |

11 | Dictionaries streamline the process of mapping your custom metadata to 12 | objects in crosswalks and forms. Dictionaries help you create crosswalks 14 | by conveniently packaging up your most common mappings and patterns 15 | for MODS elements. Dictionaries can be designed for all your most 16 | commonly used blocks of metadata and the crosswalk connections that 17 | are used to create them. 18 |

19 |

Dictionaries allows users and groups to share and reuse standard 20 | MODS patterns without having to build complex crosswalks for each 21 | project. Dictionaries include labels and descriptive text to guide 22 | their use. They can be stored on network drives and shared by teams.

23 | 24 | 25 | -------------------------------------------------------------------------------- /workbench_help/html/concepts/forms.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Deposit Forms 7 | 8 | 9 |

Deposit Forms

10 |

The workbench now supports the design of deposit forms for 11 | particular audiences and uses. Forms are built from descriptive text 12 | blocks and data entry fields. The data entry fields are connected via 13 | crosswalk-like mappings to the intended MODS elements. Most of the time the 14 | mappings used in forms are taken from a data dictionary.

15 |

If you need to support web-based deposit of materials, then this 16 | forms feature is one approach to consider. The forms feature 17 | simplifies the creation of ad hoc deposit forms, shifting the design 18 | task from software developers to librarians and archivists, who are more familiar with 19 | the depositor community and MODS descriptive standards.

20 |

Form definitions created in the workbench must be deployed to a 21 | web server in order to be used on the web. The CDR has written a 22 | form-based deposit service that performs repository ingest of 23 | described materials via the SWORD protocol. Similar form-based deposit services 24 | may be written to deposit via other protocols or to package submitted 25 | materials in a staging location.

26 | 27 | 28 | -------------------------------------------------------------------------------- /workbench_help/html/concepts/originals.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Originals 5 | 6 | 7 |

Originals

8 |

Originals refer to the files and folders you are accessioning. 9 | The workbench will only read and make copies of these original files and 10 | will not modify them. They are left in their original location on the local, 11 | removable or network drive. For this reason we say that the project is 12 | "linked to originals", since originals are not really moved inside of the project.

13 |

Once you link your project to some original files, they will 14 | appear in the Project Navigator window under Originals. The file tree 15 | under Originals will reflect their arrangement as it exists in the file system. While 16 | you can view the filenames and structure of the directories, you 17 | cannot modify files in any way.

18 |

Many file viewers in your operating system are also editors. Therefore you 19 | risk altering a file when you open it in such a viewer. For this reason the workbench 20 | makes it convenient to open a temporary copy of any original file in the default viewer. 21 | If you wish to view an original file, right-click on it. 22 | For instance, a .xls file will be copied first and then the copy will open 23 | in Microsoft Excel.

24 | 25 | 26 | -------------------------------------------------------------------------------- /workbench_help/html/concepts/prestaging.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Pre-Staged Files 5 | 6 | 7 | 8 |

Pre-Staged Files

9 |

There are many work flow scenarios in which you do not need to 10 | stage files to a new location. In these situations the normal 11 | workbench staging behavior is unnecessary: 12 |

17 | In these situations, you can simply indicate that the originals are 18 | "pre-staged" at a given location URI. On capture, any pre-staged files will 19 | be checksummed and added to the manifest, but they will not be copied 20 | to a new location. 21 |

22 |

Instead of copying the files, the workbench will compute a new 23 | "pre-staged" location URI for each file and put this URI into the 24 | manifest. This URI is considered the staged location for the file, 25 | even though the workbench did not copy it. Usually this location will 26 | be the network location of the original or some kind of agreed upon 27 | URI prefix.

28 |

Note: If your files are being prestaged for ingest, then your 29 | pre-stage URIs should be resolvable by your repository ingest service. 30 | They can be any type of URI, even forms that are unknown to the 31 | workbench. In the CDR we use HTTP URIs for various pre-staged 32 | storage locations. The ingest code then resolves these URIs to local 33 | file paths.

34 | 35 | 36 | -------------------------------------------------------------------------------- /workbench_help/html/concepts/project_export.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Export and Import 7 | 8 | 9 |

Export and Import of Projects and Files

10 |

Once arrangement and description has been completed to your 11 | satisfaction, you may wish to export the project manifest. You may 12 | wish to export for submission into a repository. Alternately, you may 13 | want a compact, machine-readable inventory of the collection contents 14 | with a record of preliminary authentication, descriptive, and 15 | preservation activities performed. Currently, the workbench supports 16 | one export format: submission to the Carolina Digital Repository. The 17 | export format is a METS XML file, with MODS elements included from a 18 | crosswalk or other user-added description.

19 |

Other forms of export are also available from the Export Menu. These 20 | include: 21 |

27 |

28 |

Project export/import to ZIP can be used to share work between users. For instructions, see Sharing Projects via Import and Export. 29 |

Additional project exports are possible to support work flow 30 | needs. Share your needs on GitHub or via the users forum.

31 | 32 | 33 | -------------------------------------------------------------------------------- /workbench_help/html/concepts/projects.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Projects 6 | 7 | 8 |

Projects

9 |

Materials in the workbench are divided into projects within the 10 | work space. Depending on the size of a collection, the level or levels 11 | of granularity with which you plan to treat the collection, or other 12 | considerations, you may decide to use one or many projects to capture 13 | a collection.

14 | 15 |

When deciding whether a collection will treated by one 16 | overarching project, or divided into a series of smaller projects, it 17 | is helpful to consider that the workbench generates a METS manifest 18 | file for each project. Larger collections may benefit from being 19 | chunked into smaller parts, for instance, an expansive, heterogeneous 20 | collection may be divided into more homogeneous units. 21 |

22 |

Finally, while it is possible to work on many projects at once, 23 | this may slow down workbench performance. By closing projects you will 24 | free up system resources, while 25 | retaining work completed within the closed project.

26 | 27 | 28 | -------------------------------------------------------------------------------- /workbench_help/html/concepts/staging.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Staging 7 | 8 | 9 |

Staging

10 |

At the point of capturing a file, the workbench can also copy it 11 | to a staging location. This location can either be local (e.g. the 12 | Curator's Workbench project work space), in a secure repository (e.g. 13 | an iRODS repository), or on another network location.

14 | 15 |

Before and after a file is copied, the workbench generates 16 | checksums and verifies these against each other. These checksums, 17 | along with the staging location, are added to the workbench manifest.

18 | 19 |

20 | You may not want files to be copied to a staging location. In this 21 | event, you can specify a pre-staged 22 | location for a set of originals. During the capturing process, your 23 | specified location will be added to the manifest and checksums will be 24 | generated and verified, but files will not be copied. 25 |

26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /workbench_help/html/gettingstarted/add_originals.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Adding Original Folders to a Project 5 | 6 | 7 | 8 |

Adding Original Folders to a Project

9 |

10 | After you have created a project and are ready to add files, you will 11 | be linking to original folders (see Figure 2). When you link to 12 | folders, they are not imported or moved into the software. We�ll get 13 | to that later. 14 |

    15 |
  1. Using the navigation view on the left, right-click (or 16 | alt-click on Mac) on the project name or on the "Original Folders" 17 | section.
  2. 18 |
  3. From the context menu, choose "Link Originals".
  4. 19 |
  5. Choose the file system type, either a "Local Folder" or an 20 | "iRODS Collection". In many cases you will choose a local folder.
  6. 21 |
  7. Press the "Select" button and browse to the folder that you 22 | want.
  8. 23 |
  9. When you have found your folder and pressed "Okay", you will 24 | find that the folder is now linked within the "Original Folders" 25 | section.
  10. 26 |
27 | In the Original Folders section you can safely explore the collected 28 | files without worrying about inadvertently modifying them through an 29 | accidental drag and drop or delete action. Hidden files are also shown. 30 |

31 | 32 | Figure 2 33 |

34 | Figure 2. Linking to original folders on a drive. 35 |

36 | 37 | 38 | -------------------------------------------------------------------------------- /workbench_help/html/gettingstarted/capturing_files.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Capturing Files 5 | 6 | 7 | 8 |

Capturing Files

9 |

Capturing files brings files into a staging space (see Figure 10 | 3). This is where you will be bringing those linked files into 11 | dedicated space. 12 |

13 |

14 | To capture files and folders:
15 |

    16 |
  1. Select one or many files in the Original Folders section. 17 | (SHIFT, CTRL or OPTION can assist you in creating your selection.)
  2. 18 |
  3. Right-click on a selected file to bring up the context menu 19 | and choose "Capture".
  4. 20 |
  5. The file and all of its un-captured parent folders (up to the 21 | linked original) will be added to the Arrangement section.
    22 | NOTE: If a folder was previously captured and subsequently renamed or 23 | moved, the newly captured children will still appear in the 24 | rearranged folder.
  6. 25 |
26 | During capture, the workbench automatically generates a checksum and 27 | stages the file to your preferred staging location. A progress bar will 28 | appear to show progress since it can take some time to move files from 29 | one server to another. 30 |

31 | 32 | Figure 3 33 |

34 | Figure 3. Capturing linked folders onto staging space. 35 |

36 | 37 | 38 | -------------------------------------------------------------------------------- /workbench_help/html/gettingstarted/create_project.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Creating Your Project 5 | 6 | 7 |

Creating Your Project

8 |

Each SIP or group of objects you manage in the Workbench is 9 | called a "Project". You can work on numerous projects at once. To 10 | create a project, 11 |

    12 |
  1. Go to the File menu and select New > Workbench Project.
  2. 13 |
  3. Enter a project name and press "Finish".
  4. 14 |
15 |

16 | 17 |

Your project is divided up into three sections: 18 |

31 |

32 | 33 | Figure 1 34 | 35 |

36 | Figure 1. Creating a project and giving it a project name. Note: 37 | three sections of the project indicated in the left-hand sidebar. 38 |

39 | 40 | 41 | -------------------------------------------------------------------------------- /workbench_help/html/gettingstarted/edit_description.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Create or Edit a Description 5 | 6 | 7 | 8 |

Create or Edit a Description

9 |

Any item or folder in the arrangement section can be described 10 | with a MODS record. To create a MODS description for an item, just 11 | double-click on it or right-click and select "Edit MODS description". 12 | The MODS Editor will open. 13 |

In the Editor window, right-click (ctrl-click on a Mac) on the 14 | MODS tag (it should be the only line in the Editor). Select "New Child 15 | Element". From here, you can choose any number of MODS elements to 16 | add. Once you have, click the triangle next to the MODS tag to expand 17 | the record. You can either edit an element's value in the Properties 18 | window below, or add more elements (both siblings and children of your 19 | first element).

20 | 21 | 22 | -------------------------------------------------------------------------------- /workbench_help/html/gettingstarted/finish_export.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Finish Up with an Export 5 | 6 | 7 | 8 |

Finish Up with an Export

9 |

When you are done staging the files and mapping metadata (if you 10 | have any), the system will have built out a robust METS file (see 11 | Figure 6) that contains the arrangement, location, UUID, checksums and 12 | MODS records for all the files you staged.

13 |

To export your METS file, right-click on the project name in the 14 | Project Navigator window. Select "Export", and in the next dialog, 15 | select "Carolina Digital Repository Submission (METS)" under "Other". 16 | Click "Next". In the next dialog, specify the export location. The 17 | Workbench requires this to be in the Project workspace. Click "Finish" 18 | and presto--your METS file will be generated as an XML document.

19 |

If you are not using the METS file as a manifest for ingest into 20 | a repository, you can use this METS file as a wrapper that documents 21 | relationships between files and metadata (both descriptive and 22 | technical). The wrapper can help provide a level of documentary 23 | control over collections if they are residing in a dark archive or 24 | some other secure server space.

25 | Figure 6 26 |

27 | Figure 6. Example of METS output from Workbench 28 |

29 | 30 | 31 | -------------------------------------------------------------------------------- /workbench_help/html/gettingstarted/sshot1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_help/html/gettingstarted/sshot1.jpg -------------------------------------------------------------------------------- /workbench_help/html/gettingstarted/sshot2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_help/html/gettingstarted/sshot2.jpg -------------------------------------------------------------------------------- /workbench_help/html/gettingstarted/sshot3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_help/html/gettingstarted/sshot3.jpg -------------------------------------------------------------------------------- /workbench_help/html/gettingstarted/sshot4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_help/html/gettingstarted/sshot4.jpg -------------------------------------------------------------------------------- /workbench_help/html/gettingstarted/sshot5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_help/html/gettingstarted/sshot5.jpg -------------------------------------------------------------------------------- /workbench_help/html/gettingstarted/sshot6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_help/html/gettingstarted/sshot6.jpg -------------------------------------------------------------------------------- /workbench_help/html/tasks/dictionaries_preference.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Set up Preferred Data Dictionaries 5 | 6 | 7 | 8 |

Set up Preferred Data Dictionaries

9 |

The workbench can add your preferred data dictionaries to the tools palette of the MODS 10 | mapping editors, including the crosswalk editor, forms editor and the dictionary 11 | editor itself. In these editors the metadata blocks for each preferred dictionary are listed in an expandable menu. You 12 | can pick any metadata block from the palette and drop it on the canvas.

13 |

Preferred dictionaries can be stored locally or on a network drive. This makes it possible 14 | to share common dictionaries across a team or institution. Each workbench can be configured with as many 15 | dictionaries as desired.

16 |

Dictionaries are configured via the Preferences dialog, found in the menu under Help > Preferences. 17 | For more information, see data dictionaries.

18 | 19 | 20 | -------------------------------------------------------------------------------- /workbench_help/html/tasks/export-import.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Sharing Projects via Import and Export 5 | 6 | 7 |

Sharing Projects via Import and Export

8 |

The import/export feature allows you to easily transport projects between users or computers. You simply export the projects from their original location and import them into the new location. The projects are exported into .zip files; you can export more than one project in a single .zip file, if you wish.

9 | 10 |

How to Export

11 |
    12 |
  1. Right-click a project and select Export.
  2. 13 |
  3. For the destination, select General>Archive File. Click Next.
  4. 14 |
  5. In the panes at the top of the window, select which projects and project files you wish to export.
  6. 15 |
  7. Click Browse and choose the location you want the exported file to be saved to. Give the exported file a name.
  8. 16 |
  9. Click Finish.
  10. 17 |
18 | 19 |

How to Import

20 |
    21 |
  1. Select File>Import.
  2. 22 |
  3. For the import source, select General>Existing Projects Into Workspace. Click Next.
  4. 23 |
  5. Select the radio button for "Select archive file." Browse to the location of the exported project and select the exported file.
  6. 24 |
  7. Choose which projects from the file you wish to import.
  8. 25 |
  9. Click Finish.
  10. 26 |
27 | 28 | 29 | -------------------------------------------------------------------------------- /workbench_help/html/tasks/staging_preference.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Set up a Preferred Staging Location 5 | 6 | 7 | 8 |

Set up a Preferred Staging Location

9 |

10 | Local staging, where files are staged within the project folder on 11 | your computer, is the default for new projects. However, you can add 12 | new staging locations in the Staging preferences section. A 13 | member of your technical staff might help in configuring this 14 | preference. A custom staging preference will help ensure that 15 | materials are staged in stable storage, file space that is off the 16 | local machine and backed up regularly. 17 |

18 |

Staging preferences consist of a descriptive name and a location 19 | string with a special format. The location string is really a URI that 20 | indicates the location of a folder. Normal file paths start with 21 | "file:", for example on Windows there is usually a folder with this 22 | URI, "file:/C:/Windows". Note that the normal \ character has been 23 | replaced with /. This is a convention for URIs. You may insert special 24 | markers into your location URIs. These markers will be replaced with 25 | names related to the project or the user. Here are the markers you can 26 | use in staging URIs: 27 |

33 | The replacement values will be escaped to match URI syntax. The 34 | default "staging folder within project" preference provides an example of a URI string 35 | with a project location marker: 36 |
${PROJECT_LOC}/stage
37 | Another URI scheme that is supported by the workbench is iRODS. When 38 | dealing with iRODS staging preferences and other network locations the 39 | replacement markers are especially helpful: 40 |
irods://${USER_NAME}@my-vault.lib.edu:1247/myZone/home/${USER_NAME}/staging/${PROJECT_NAME}
41 |

Go to Help > Preferences, to set Staging locations.

42 | 43 | 44 | -------------------------------------------------------------------------------- /workbench_help/html/toc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Table of Contents 7 | 8 | 9 | 10 |

The Curator's Workbench User Guide

11 |

The Curator's Workbench is a tool to aid in the accession, 12 | arrangement, description and staging of digital objects. The tool 13 | helps archivists manage files before they are stored in a repository 14 | or stable storage. While the files are selected, arranged, and 15 | described, a METS file is generated by the software that documents 16 | these processes. In addition, MD5 checksums are generated for each 17 | object and validated after all copy operations. Custom metadata files 18 | may be mapped to MODS records and matched with objects.

19 | 20 |

Status of Help Documentation and User Assistance

21 | We are in the process of migrating and expanding upon existing how-to 22 | information. There isn't much to see in this help interface at the 23 | moment, but it is a work in progress. This embedded help has some 24 | advantages over PDFs and external sites: 25 | 33 | 34 | -------------------------------------------------------------------------------- /workbench_help/plugin.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 10 | 11 | 13 | 14 | 16 | 17 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /workbench_help/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | curators.workbench 8 | parent 9 | 4.1.5-SNAPSHOT 10 | 11 | workbench_help 12 | eclipse-plugin 13 | 14 | -------------------------------------------------------------------------------- /workbench_help/toc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /workbench_help/tocconcepts.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /workbench_help/tocgettingstarted.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /workbench_help/toctasks.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /workbench_plugin/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: workbench_plugin 4 | Bundle-SymbolicName: workbench_plugin;singleton:=true 5 | Bundle-Version: 4.1.5.qualifier 6 | Bundle-Activator: unc.lib.cdr.workbench.rcp.Activator 7 | Bundle-Vendor: University Libraries, UNC Chapel Hill 8 | Require-Bundle: org.eclipse.core.expressions;bundle-version="3.4.300", 9 | org.eclipse.core.filesystem;bundle-version="1.3.100", 10 | org.eclipse.ui.navigator;bundle-version="3.5.100", 11 | crosswalk-gmf.diagram;bundle-version="0.0.0", 12 | mets.model.edit;bundle-version="0.0.0", 13 | mods.model.editor;bundle-version="0.0.0", 14 | org.apache.commons.codec;bundle-version="1.3.0", 15 | org.eclipse.ui.views.properties.tabbed;bundle-version="3.0.0", 16 | org.eclipse.gmf.runtime.emf.type.core;bundle-version="1.4.0", 17 | access-control.edit;bundle-version="0.0.0", 18 | org.eclipse.ui.intro, 19 | crosswalk-gmf.custom;bundle-version="0.0.0", 20 | staging.plugin;bundle-version="4.1.4";visibility:=reexport, 21 | net.sf.opencsv;bundle-version="2.3.0", 22 | org.ops4j.pax.logging.pax-logging-api;bundle-version="1.7.1" 23 | Bundle-RequiredExecutionEnvironment: JavaSE-1.7 24 | Bundle-ActivationPolicy: lazy 25 | Export-Package: unc.lib.cdr.workbench, 26 | unc.lib.cdr.workbench.acl, 27 | unc.lib.cdr.workbench.arrange, 28 | unc.lib.cdr.workbench.capture, 29 | unc.lib.cdr.workbench.commands, 30 | unc.lib.cdr.workbench.originals, 31 | unc.lib.cdr.workbench.project, 32 | unc.lib.cdr.workbench.rcp, 33 | unc.lib.cdr.workbench.stage, 34 | unc.lib.cdr.workbench.views, 35 | unc.lib.cdr.workbench.xwalk 36 | Bundle-ClassPath: . 37 | -------------------------------------------------------------------------------- /workbench_plugin/META-INF/p2.inf: -------------------------------------------------------------------------------- 1 | instructions.configure=\ 2 | addRepository(type:0,location:http${#58}//www.lib.unc.edu/software/workbench/repository);\ 3 | addRepository(type:1,location:http${#58}//www.lib.unc.edu/software/workbench/repository); -------------------------------------------------------------------------------- /workbench_plugin/about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/about.png -------------------------------------------------------------------------------- /workbench_plugin/build.properties: -------------------------------------------------------------------------------- 1 | bin.includes = plugin.xml,\ 2 | META-INF/,\ 3 | splash.bmp,\ 4 | src/main/resources/,\ 5 | src/main/java/,\ 6 | plugin_customization.ini,\ 7 | .,\ 8 | staging.properties,\ 9 | about.png,\ 10 | intro/,\ 11 | introData.xml,\ 12 | helpData.xml,\ 13 | intro.png,\ 14 | icons/ 15 | src.includes = icons/,\ 16 | plugin_customization.ini,\ 17 | splash.bmp,\ 18 | staging.properties,\ 19 | about.png,\ 20 | intro/,\ 21 | introData.xml,\ 22 | helpData.xml,\ 23 | intro.png, 24 | source.. = src/main/java/,\ 25 | src/main/resources/ 26 | -------------------------------------------------------------------------------- /workbench_plugin/helpData.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 8 | 10 | 12 | 14 | 16 | 17 | -------------------------------------------------------------------------------- /workbench_plugin/icons/24px-Crystal_Clear_action_filenew.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/24px-Crystal_Clear_action_filenew.png -------------------------------------------------------------------------------- /workbench_plugin/icons/24px-Crystal_Clear_app_ark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/24px-Crystal_Clear_app_ark.png -------------------------------------------------------------------------------- /workbench_plugin/icons/24px-Crystal_Clear_app_file-manager.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/24px-Crystal_Clear_app_file-manager.png -------------------------------------------------------------------------------- /workbench_plugin/icons/24px-Crystal_Clear_app_harddrive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/24px-Crystal_Clear_app_harddrive.png -------------------------------------------------------------------------------- /workbench_plugin/icons/24px-Crystal_Clear_app_kexi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/24px-Crystal_Clear_app_kexi.png -------------------------------------------------------------------------------- /workbench_plugin/icons/24px-Crystal_Clear_app_kthememgr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/24px-Crystal_Clear_app_kthememgr.png -------------------------------------------------------------------------------- /workbench_plugin/icons/24px-Crystal_Clear_filesystem_folder_grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/24px-Crystal_Clear_filesystem_folder_grey.png -------------------------------------------------------------------------------- /workbench_plugin/icons/24px-Crystal_Clear_filesystem_folder_txt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/24px-Crystal_Clear_filesystem_folder_txt.png -------------------------------------------------------------------------------- /workbench_plugin/icons/48px-Crystal_Clear_action_editcopy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/48px-Crystal_Clear_action_editcopy.png -------------------------------------------------------------------------------- /workbench_plugin/icons/48px-Crystal_Clear_action_filenew.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/48px-Crystal_Clear_action_filenew.png -------------------------------------------------------------------------------- /workbench_plugin/icons/48px-Crystal_Clear_app_ark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/48px-Crystal_Clear_app_ark.png -------------------------------------------------------------------------------- /workbench_plugin/icons/48px-Crystal_Clear_app_ark2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/48px-Crystal_Clear_app_ark2.png -------------------------------------------------------------------------------- /workbench_plugin/icons/48px-Crystal_Clear_app_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/48px-Crystal_Clear_app_error.png -------------------------------------------------------------------------------- /workbench_plugin/icons/48px-Crystal_Clear_app_file-manager.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/48px-Crystal_Clear_app_file-manager.png -------------------------------------------------------------------------------- /workbench_plugin/icons/48px-Crystal_Clear_app_harddrive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/48px-Crystal_Clear_app_harddrive.png -------------------------------------------------------------------------------- /workbench_plugin/icons/48px-Crystal_Clear_app_kexi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/48px-Crystal_Clear_app_kexi.png -------------------------------------------------------------------------------- /workbench_plugin/icons/48px-Crystal_Clear_app_kfm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/48px-Crystal_Clear_app_kfm.png -------------------------------------------------------------------------------- /workbench_plugin/icons/48px-Crystal_Clear_app_kthememgr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/48px-Crystal_Clear_app_kthememgr.png -------------------------------------------------------------------------------- /workbench_plugin/icons/48px-Crystal_Clear_app_lists.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/48px-Crystal_Clear_app_lists.png -------------------------------------------------------------------------------- /workbench_plugin/icons/48px-Crystal_Clear_app_my_documents.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/48px-Crystal_Clear_app_my_documents.png -------------------------------------------------------------------------------- /workbench_plugin/icons/48px-Crystal_Clear_app_package_graphics.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/48px-Crystal_Clear_app_package_graphics.png -------------------------------------------------------------------------------- /workbench_plugin/icons/48px-Crystal_Clear_app_phppg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/48px-Crystal_Clear_app_phppg.png -------------------------------------------------------------------------------- /workbench_plugin/icons/48px-Crystal_Clear_app_sharemanager.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/48px-Crystal_Clear_app_sharemanager.png -------------------------------------------------------------------------------- /workbench_plugin/icons/48px-Crystal_Clear_app_warehause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/48px-Crystal_Clear_app_warehause.png -------------------------------------------------------------------------------- /workbench_plugin/icons/48px-Crystal_Clear_device_blockdevice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/48px-Crystal_Clear_device_blockdevice.png -------------------------------------------------------------------------------- /workbench_plugin/icons/48px-Crystal_Clear_device_cdrom_unmount.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/48px-Crystal_Clear_device_cdrom_unmount.png -------------------------------------------------------------------------------- /workbench_plugin/icons/48px-Crystal_Clear_device_dvd_unmount.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/48px-Crystal_Clear_device_dvd_unmount.png -------------------------------------------------------------------------------- /workbench_plugin/icons/48px-Crystal_Clear_device_floppy_unmount.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/48px-Crystal_Clear_device_floppy_unmount.png -------------------------------------------------------------------------------- /workbench_plugin/icons/48px-Crystal_Clear_device_nfs_unmount.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/48px-Crystal_Clear_device_nfs_unmount.png -------------------------------------------------------------------------------- /workbench_plugin/icons/48px-Crystal_Clear_device_usbpendrive_unmount.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/48px-Crystal_Clear_device_usbpendrive_unmount.png -------------------------------------------------------------------------------- /workbench_plugin/icons/48px-Crystal_Clear_device_zip_unmount.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/48px-Crystal_Clear_device_zip_unmount.png -------------------------------------------------------------------------------- /workbench_plugin/icons/48px-Crystal_Clear_filesystem_folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/48px-Crystal_Clear_filesystem_folder.png -------------------------------------------------------------------------------- /workbench_plugin/icons/48px-Crystal_Clear_filesystem_folder_grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/48px-Crystal_Clear_filesystem_folder_grey.png -------------------------------------------------------------------------------- /workbench_plugin/icons/48px-Crystal_Clear_filesystem_folder_tar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/48px-Crystal_Clear_filesystem_folder_tar.png -------------------------------------------------------------------------------- /workbench_plugin/icons/48px-Crystal_Clear_filesystem_folder_txt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/48px-Crystal_Clear_filesystem_folder_txt.png -------------------------------------------------------------------------------- /workbench_plugin/icons/48px-Crystal_Clear_filesystem_lockoverlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/48px-Crystal_Clear_filesystem_lockoverlay.png -------------------------------------------------------------------------------- /workbench_plugin/icons/48px-Crystal_Clear_filesystem_network_local.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/48px-Crystal_Clear_filesystem_network_local.png -------------------------------------------------------------------------------- /workbench_plugin/icons/48px-Crystal_Clear_mimetype_tar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/48px-Crystal_Clear_mimetype_tar.png -------------------------------------------------------------------------------- /workbench_plugin/icons/access_restriction_attrib.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/access_restriction_attrib.gif -------------------------------------------------------------------------------- /workbench_plugin/icons/alt_about.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/alt_about.gif -------------------------------------------------------------------------------- /workbench_plugin/icons/alt_launcher.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/alt_launcher.icns -------------------------------------------------------------------------------- /workbench_plugin/icons/alt_launcher.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/alt_launcher.ico -------------------------------------------------------------------------------- /workbench_plugin/icons/alt_window_32.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/alt_window_32.gif -------------------------------------------------------------------------------- /workbench_plugin/icons/binary_co.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/binary_co.gif -------------------------------------------------------------------------------- /workbench_plugin/icons/category_obj.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/category_obj.gif -------------------------------------------------------------------------------- /workbench_plugin/icons/crosswalk_add.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/crosswalk_add.gif -------------------------------------------------------------------------------- /workbench_plugin/icons/crosswalk_add_disabled.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/crosswalk_add_disabled.gif -------------------------------------------------------------------------------- /workbench_plugin/icons/crosswalk_decor.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/crosswalk_decor.gif -------------------------------------------------------------------------------- /workbench_plugin/icons/edtsrclkup_co.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/edtsrclkup_co.gif -------------------------------------------------------------------------------- /workbench_plugin/icons/ejected1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/ejected1.gif -------------------------------------------------------------------------------- /workbench_plugin/icons/filter_tsk.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/filter_tsk.gif -------------------------------------------------------------------------------- /workbench_plugin/icons/info_tsk.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/info_tsk.gif -------------------------------------------------------------------------------- /workbench_plugin/icons/inst_ptr_top.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/inst_ptr_top.gif -------------------------------------------------------------------------------- /workbench_plugin/icons/key.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/key.gif -------------------------------------------------------------------------------- /workbench_plugin/icons/key_sm.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/key_sm.gif -------------------------------------------------------------------------------- /workbench_plugin/icons/keylock.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/keylock.gif -------------------------------------------------------------------------------- /workbench_plugin/icons/link_obj.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/link_obj.gif -------------------------------------------------------------------------------- /workbench_plugin/icons/loading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/loading.png -------------------------------------------------------------------------------- /workbench_plugin/icons/lockedstate.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/lockedstate.gif -------------------------------------------------------------------------------- /workbench_plugin/icons/lockedstate_mono.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/lockedstate_mono.gif -------------------------------------------------------------------------------- /workbench_plugin/icons/lockedstate_small.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/lockedstate_small.gif -------------------------------------------------------------------------------- /workbench_plugin/icons/no_preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/no_preview.png -------------------------------------------------------------------------------- /workbench_plugin/icons/pinned_ovr.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/pinned_ovr.gif -------------------------------------------------------------------------------- /workbench_plugin/icons/property_obj.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/property_obj.gif -------------------------------------------------------------------------------- /workbench_plugin/icons/provmd_E.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/provmd_E.gif -------------------------------------------------------------------------------- /workbench_plugin/icons/provmd_who.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/provmd_who.gif -------------------------------------------------------------------------------- /workbench_plugin/icons/read_obj.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/read_obj.gif -------------------------------------------------------------------------------- /workbench_plugin/icons/resource_types.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/resource_types.png -------------------------------------------------------------------------------- /workbench_plugin/icons/sample_decorator.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/sample_decorator.gif -------------------------------------------------------------------------------- /workbench_plugin/icons/storage.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/storage.gif -------------------------------------------------------------------------------- /workbench_plugin/icons/table.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/table.gif -------------------------------------------------------------------------------- /workbench_plugin/icons/techmd.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/techmd.gif -------------------------------------------------------------------------------- /workbench_plugin/icons/techmd_doc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/techmd_doc.gif -------------------------------------------------------------------------------- /workbench_plugin/icons/techmd_docs.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/techmd_docs.gif -------------------------------------------------------------------------------- /workbench_plugin/icons/techmd_folder.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/techmd_folder.gif -------------------------------------------------------------------------------- /workbench_plugin/icons/type_aggr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/type_aggr.png -------------------------------------------------------------------------------- /workbench_plugin/icons/type_coll.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/type_coll.png -------------------------------------------------------------------------------- /workbench_plugin/icons/type_file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/type_file.png -------------------------------------------------------------------------------- /workbench_plugin/icons/type_folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/type_folder.png -------------------------------------------------------------------------------- /workbench_plugin/icons/var_cntnt_prvdr.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/var_cntnt_prvdr.gif -------------------------------------------------------------------------------- /workbench_plugin/icons/version_controlled.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/version_controlled.gif -------------------------------------------------------------------------------- /workbench_plugin/icons/waiting_ovr.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/waiting_ovr.gif -------------------------------------------------------------------------------- /workbench_plugin/icons/write_obj.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/write_obj.gif -------------------------------------------------------------------------------- /workbench_plugin/icons/write_obj_gray.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/icons/write_obj_gray.gif -------------------------------------------------------------------------------- /workbench_plugin/intro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/intro.png -------------------------------------------------------------------------------- /workbench_plugin/intro/githubReleases.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 13 | These links takes you to lists of the issues resolved in each release, on GitHub. You can always see what features 16 | are under development on the project GitHub site. 17 | 23 | This is the current release and comes with many features requested by users. Several features will assist users in a team 24 | environment, such as many project import/export options and more reusable metadata mapping in crosswalks and via 25 | data dictionaries. Support for removable drives was expanded and we added support for alphabetized folders. There 26 | is also now an image preview for originals or items in the arrangement. A new feature added for CDR work flow is 27 | design of ad hoc deposit forms. A visual editor lets users build deposit forms, mapping input fields to MODS records. 28 | These forms can be deployed to a form-hosting service and used to make repository deposits via SWORD. 29 | 30 | 36 | This release added support for pre-staged originals and addressed some usability concerns 37 | raised by production use. You can also now use the context menu to "open a temporary copy" of any original or 38 | arranged item in your system's default editor. 39 | 40 | 46 | Release 2 revamped crosswalk definitions to allow greater flexibility and addressed many production issues for 47 | the Carolina Digital Repository. It added access control settings to the Arranged objects and allowed linking of 48 | folders to their surrogate images. 49 | 50 | 56 | These issues were resolved prior to Release 2 or outside of the normal release cycle. 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /workbench_plugin/introData.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 9 | 10 | 14 | 15 | 19 | 20 | 23 | 26 | 29 | 30 | 33 | 36 | 37 | 38 | 41 | 42 | 44 | 46 | 48 | 49 | 53 | 54 | 58 | 59 | 62 | 65 | 66 | 69 | 72 | 73 | 74 | 77 | 81 | 82 | 86 | 87 | 90 | 93 | 94 | 97 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /workbench_plugin/notes.txt: -------------------------------------------------------------------------------- 1 | Persistence in Workspace/Staging Area: 2 | 3 | project_name.producer_mets.xml 4 | - file section for each data set with identifier 5 | - relative paths.. 6 | - access configuration somewhere outside METS 7 | - original structMap for each data set 8 | - selection (yes/no) 9 | - status (unstaged/staged/original missing) 10 | - digProvMDSec for each div that is altered by curator 11 | - record processing events as they happen to each div 12 | 13 | project_name.submission_mets.xml 14 | - final form METS goes here 15 | 16 | Workbench 17 | * commands: 18 | * Open Project, Save Project, Close Project, Exit 19 | * views: 20 | * navigator 21 | * file summary, file preview 22 | 23 | Navigator Resources: 24 | 25 | File Sets 26 | * maps to a single fileSec in a working METS file 27 | * has associated structMap for original structure 28 | * fileSec contains a fileGrp with USE of SOURCE_PATHS 29 | * contains relative path for each file in source 30 | * fileSec contains a fileGrp with USE of STAGED_PATHS 31 | * as files are staged file elements are added 32 | * checksums are filled in 33 | * source and staged file share a GROUPID 34 | * FileSet API: 35 | * setLabel(String), getLabel() 36 | * setSource(FileSource), getSource() 37 | * TreeFileSource testRoot(), crawl() 38 | * getSourceStructure() 39 | * setStage(FileStage), getStage() 40 | * FileStage openOutputStreamToStage(filepath), checksum(filepath), getURL(filepath), exists(filepath) 41 | * commands: 42 | * test connection, (re)crawl source 43 | * (re)stage, unstage, pause (when staging), resume (when partially staged) 44 | * views: 45 | * properties and status 46 | * file selection 47 | 48 | Extracted Metadata 49 | * harvesters produce XML or tabular metadata on a per file basis (all rows mapped) 50 | * may come bundled with preconfigured mappings to MODS, etc.. 51 | 52 | Supplied Metadata 53 | * map of row to div 54 | * each metadata set is a source to be mapped to divs 55 | 56 | Submission Structure 57 | * METS structMap tree w/annotations 58 | * open editor view or use navigator? -------------------------------------------------------------------------------- /workbench_plugin/plugin_customization.ini: -------------------------------------------------------------------------------- 1 | org.eclipse.ui/PERSPECTIVE_BAR_EXTRAS=cdr-workbench.AccessionPerspective,cdr-workbench.ArrangmentPerspective,cdr-workbench.BatchMetadataPerspective,cdr-workbench.MetsPerspectiveorg.eclipse.ui/SHOW_PROGRESS_ON_STARTUP = false 2 | org.eclipse.ui/SHOW_PROGRESS_ON_STARTUP = true 3 | org.eclipse.ui/SHOW_MEMORY_MONITOR = true 4 | 5 | org.eclipse.ui.intro/INTRO_THEME=org.eclipse.ui.intro.universal.circles 6 | org.eclipse.ui.intro/INTRO_START_PAGE=root 7 | org.eclipse.ui.intro/INTRO_HOME_PAGE=root 8 | 9 | org.eclipse.ui.intro.universal/INTRO_DATA=product:introData.xml 10 | org.eclipse.ui.intro.universal/INTRO_ROOT_PAGES=overview,whatsnew,webresources 11 | # omitting samples, tutorials, migrate, firststeps 12 | 13 | org.eclipse.help/HELP_DATA=helpData.xml -------------------------------------------------------------------------------- /workbench_plugin/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | curators.workbench 8 | parent 9 | 4.1.5-SNAPSHOT 10 | 11 | workbench_plugin 12 | eclipse-plugin 13 | 14 | 15 | edu.unc.lib.cdr 16 | staging-areas 17 | 0.0.1-SNAPSHOT 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /workbench_plugin/splash.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/splash.bmp -------------------------------------------------------------------------------- /workbench_plugin/splash.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/splash.xcf -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/DivPropertyTester.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench; 17 | 18 | import gov.loc.mets.DivType; 19 | import gov.loc.mets.MdSecType; 20 | import gov.loc.mets.MetsPackage; 21 | import gov.loc.mets.util.METSConstants; 22 | import gov.loc.mets.util.METSUtils; 23 | 24 | import org.eclipse.core.expressions.PropertyTester; 25 | 26 | public class DivPropertyTester extends PropertyTester { 27 | public static final String IS_CONTAINER_PROPERTY = "isContainer"; 28 | public static final String IS_FOLDER_PROPERTY = "isFolder"; 29 | public static final String HAS_DESCRIPTION_PROPERTY = "hasDescription"; 30 | public static final String HAS_ACCESS_CONTROLS_PROPERTY = "hasAccessControls"; 31 | 32 | public DivPropertyTester() { 33 | } 34 | 35 | @Override 36 | public boolean test(Object receiver, String property, Object[] args, Object expectedValue) { 37 | if (receiver instanceof DivType) { 38 | DivType div = (DivType) receiver; 39 | if (IS_CONTAINER_PROPERTY.equals(property)) { 40 | return METSUtils.isContainer(div); 41 | } else if (IS_FOLDER_PROPERTY.equals(property)) { 42 | return METSConstants.Div_Folder.equals(div.getTYPE()); 43 | } else if (HAS_ACCESS_CONTROLS_PROPERTY.equals(property)) { 44 | MdSecType rightsSec = null; 45 | for (MdSecType md : div.getMdSec()) { 46 | if (METSConstants.MD_STATUS_USER_EDITED.equals(md.getSTATUS())) { 47 | if (MetsPackage.eINSTANCE.getAmdSecType_RightsMD().equals(md.eContainingFeature())) { 48 | rightsSec = md; 49 | break; 50 | } 51 | } 52 | } 53 | return rightsSec != null; 54 | } else if(HAS_DESCRIPTION_PROPERTY.equals(property)) { 55 | for (MdSecType md : div.getDmdSec()) { 56 | return md != null; 57 | } 58 | } 59 | } 60 | return false; 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/arrange/ArrangementDragSourceListener.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.arrange; 17 | 18 | import org.eclipse.jface.util.LocalSelectionTransfer; 19 | import org.eclipse.jface.viewers.ITreeSelection; 20 | import org.eclipse.jface.viewers.TreeViewer; 21 | import org.eclipse.swt.dnd.DragSourceEvent; 22 | import org.eclipse.swt.dnd.DragSourceListener; 23 | import org.slf4j.Logger; 24 | import org.slf4j.LoggerFactory; 25 | 26 | /** 27 | * @author Gregory Jansen 28 | * 29 | */ 30 | public class ArrangementDragSourceListener implements DragSourceListener { 31 | TreeViewer viewer = null; 32 | 33 | public ArrangementDragSourceListener(TreeViewer viewer) { 34 | super(); 35 | this.viewer = viewer; 36 | } 37 | 38 | private static final Logger LOG = LoggerFactory.getLogger(ArrangementDragSourceListener.class); 39 | 40 | /* 41 | * (non-Javadoc) 42 | * 43 | * @see org.eclipse.swt.dnd.DragSourceListener#dragStart(org.eclipse.swt.dnd. DragSourceEvent) 44 | */ 45 | @Override 46 | public void dragStart(DragSourceEvent event) { 47 | } 48 | 49 | /* 50 | * (non-Javadoc) 51 | * 52 | * @see org.eclipse.swt.dnd.DragSourceListener#dragSetData(org.eclipse.swt.dnd .DragSourceEvent) 53 | */ 54 | @Override 55 | public void dragSetData(DragSourceEvent event) { 56 | ITreeSelection selection = (ITreeSelection) viewer.getSelection(); 57 | LocalSelectionTransfer transfer = LocalSelectionTransfer.getTransfer(); 58 | if (transfer.isSupportedType(event.dataType)) { 59 | transfer.setSelection(selection); 60 | event.data = selection; 61 | } 62 | LOG.debug("drag event data has been set: {}", event.data); 63 | 64 | } 65 | 66 | /* 67 | * (non-Javadoc) 68 | * 69 | * @see org.eclipse.swt.dnd.DragSourceListener#dragFinished(org.eclipse.swt.dnd .DragSourceEvent) 70 | */ 71 | @Override 72 | public void dragFinished(DragSourceEvent event) { 73 | } 74 | 75 | } 76 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/arrange/ArrangementProjectElement.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.arrange; 17 | 18 | import org.eclipse.jface.resource.ImageDescriptor; 19 | 20 | import unc.lib.cdr.workbench.project.AbstractCustomProjectElement; 21 | import unc.lib.cdr.workbench.project.MetsProjectNature; 22 | 23 | /** 24 | * @author Gregory Jansen 25 | * 26 | */ 27 | public class ArrangementProjectElement extends AbstractCustomProjectElement { 28 | /** 29 | * @param n 30 | */ 31 | public ArrangementProjectElement(MetsProjectNature n) { 32 | super(n); 33 | } 34 | 35 | private static final String label = "Arrangement"; 36 | 37 | /* 38 | * (non-Javadoc) 39 | * 40 | * @see unc.lib.cdr.workbench.project.ICustomProjectElement#getImage() 41 | */ 42 | @Override 43 | public ImageDescriptor getImageDescriptor() { 44 | return null; 45 | } 46 | 47 | /* 48 | * (non-Javadoc) 49 | * 50 | * @see unc.lib.cdr.workbench.project.ICustomProjectElement#getChildren() 51 | */ 52 | @Override 53 | public Object[] getChildren() { 54 | return null; 55 | } 56 | 57 | /* 58 | * (non-Javadoc) 59 | * 60 | * @see unc.lib.cdr.workbench.project.ICustomProjectElement#getText() 61 | */ 62 | @Override 63 | public String getText() { 64 | return label; 65 | } 66 | 67 | /* 68 | * (non-Javadoc) 69 | * 70 | * @see unc.lib.cdr.workbench.project.ICustomProjectElement#hasChildren() 71 | */ 72 | @Override 73 | public boolean hasChildren() { 74 | return true; 75 | } 76 | 77 | } 78 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/arrange/ArrangementViewerSorter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.arrange; 17 | 18 | import gov.loc.mets.DivType; 19 | import gov.loc.mets.SmLinkType; 20 | import gov.loc.mets.util.Link; 21 | import gov.loc.mets.util.METSUtils; 22 | 23 | import java.text.Collator; 24 | 25 | import org.eclipse.emf.common.util.EList; 26 | import org.eclipse.emf.ecore.EObject; 27 | import org.eclipse.jface.viewers.StructuredViewer; 28 | import org.eclipse.jface.viewers.Viewer; 29 | import org.eclipse.jface.viewers.ViewerSorter; 30 | 31 | public class ArrangementViewerSorter extends ViewerSorter { 32 | 33 | public ArrangementViewerSorter() { 34 | } 35 | 36 | public ArrangementViewerSorter(Collator collator) { 37 | super(collator); 38 | } 39 | 40 | @Override 41 | public int compare(Viewer viewer, Object e1, Object e2) { 42 | if(e1 instanceof SmLinkType) { 43 | if(e2 instanceof SmLinkType) { 44 | String pred1 = ((SmLinkType)e1).getArcrole(); 45 | String pred2 = ((SmLinkType)e2).getArcrole(); 46 | return this.getComparator().compare(pred1, pred2); 47 | } else { 48 | return -1; 49 | } 50 | } 51 | if(e2 instanceof SmLinkType) { 52 | return 1; 53 | } 54 | if (e1 instanceof DivType && e2 instanceof DivType) { 55 | DivType d1 = (DivType) e1; 56 | EObject parent = d1.eContainer(); 57 | if (parent != null && parent instanceof DivType) { 58 | boolean isAlpha = (METSUtils.findLink(parent, Link.ALPHABETICALORDER.uri, parent) != null); 59 | if(isAlpha) { 60 | return ((StructuredViewer)viewer).getComparator().compare(viewer, e1, e2); 61 | } else { 62 | EList divs = ((DivType) parent).getDiv(); 63 | return divs.indexOf(e1) - divs.indexOf(e2); 64 | } 65 | } 66 | } 67 | return super.compare(viewer, e1, e2); 68 | } 69 | 70 | } 71 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/arrange/DivLinkBucket.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.arrange; 17 | 18 | import gov.loc.mets.DivType; 19 | import gov.loc.mets.MetsType; 20 | import gov.loc.mets.SmLinkType; 21 | 22 | import java.util.ArrayList; 23 | import java.util.List; 24 | 25 | import org.eclipse.jface.resource.ImageDescriptor; 26 | 27 | import unc.lib.cdr.workbench.project.ICustomEObjectBucket; 28 | import unc.lib.cdr.workbench.project.MetsProjectNature; 29 | 30 | /** 31 | * @author Gregory Jansen 32 | * 33 | */ 34 | public class DivLinkBucket implements ICustomEObjectBucket { 35 | private static final String label = "links"; 36 | private DivType div = null; 37 | 38 | public DivLinkBucket(DivType div) { 39 | this.div = div; 40 | } 41 | 42 | /* 43 | * (non-Javadoc) 44 | * 45 | * @see unc.lib.cdr.workbench.project.ICustomEObjectBucket#getImageDescriptor() 46 | */ 47 | @Override 48 | public ImageDescriptor getImageDescriptor() { 49 | // TODO Auto-generated method stub 50 | return null; 51 | } 52 | 53 | /* 54 | * (non-Javadoc) 55 | * 56 | * @see unc.lib.cdr.workbench.project.ICustomEObjectBucket#getChildren() 57 | */ 58 | @Override 59 | public Object[] getChildren() { 60 | List results = new ArrayList(); 61 | MetsProjectNature mpn = MetsProjectNature.getNatureForMetsObject(div); 62 | MetsType mets = mpn.getMets(); 63 | if (mets.getStructLink() != null && mets.getStructLink().getSmLink() != null) { 64 | for (SmLinkType l : mets.getStructLink().getSmLink()) { 65 | if (div.equals(l.getXlinkFrom())) { 66 | results.add(l); 67 | } 68 | } 69 | } 70 | return results.toArray(); 71 | } 72 | 73 | /* 74 | * (non-Javadoc) 75 | * 76 | * @see unc.lib.cdr.workbench.project.ICustomEObjectBucket#getText() 77 | */ 78 | @Override 79 | public String getText() { 80 | return label; 81 | } 82 | 83 | /* 84 | * (non-Javadoc) 85 | * 86 | * @see unc.lib.cdr.workbench.project.ICustomEObjectBucket#hasChildren() 87 | */ 88 | @Override 89 | public boolean hasChildren() { 90 | return true; 91 | } 92 | 93 | /* 94 | * (non-Javadoc) 95 | * 96 | * @see unc.lib.cdr.workbench.project.ICustomEObjectBucket#getParent() 97 | */ 98 | @Override 99 | public DivType getParent() { 100 | return div; 101 | } 102 | 103 | } 104 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/arrange/RemoveDivHandler.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.arrange; 17 | 18 | import gov.loc.mets.DivType; 19 | 20 | import org.eclipse.core.commands.AbstractHandler; 21 | import org.eclipse.core.commands.ExecutionEvent; 22 | import org.eclipse.core.commands.ExecutionException; 23 | import org.eclipse.emf.common.command.Command; 24 | import org.eclipse.emf.edit.command.RemoveCommand; 25 | import org.eclipse.emf.edit.domain.EditingDomain; 26 | import org.eclipse.jface.dialogs.MessageDialog; 27 | import org.eclipse.jface.viewers.IStructuredSelection; 28 | import org.eclipse.ui.handlers.HandlerUtil; 29 | import org.slf4j.Logger; 30 | import org.slf4j.LoggerFactory; 31 | 32 | import unc.lib.cdr.workbench.project.MetsProjectNature; 33 | 34 | /** 35 | * @author Gregory Jansen 36 | * 37 | */ 38 | public class RemoveDivHandler extends AbstractHandler { 39 | 40 | @SuppressWarnings("unused") 41 | private static final Logger LOG = LoggerFactory.getLogger(RemoveDivHandler.class); 42 | 43 | /* 44 | * (non-Javadoc) 45 | * 46 | * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands. ExecutionEvent) 47 | */ 48 | @Override 49 | public Object execute(ExecutionEvent event) throws ExecutionException { 50 | IStructuredSelection select = (IStructuredSelection) HandlerUtil.getCurrentSelectionChecked(event); 51 | boolean confirmed = MessageDialog.openConfirm(HandlerUtil.getActiveShell(event), "Confirm Delete", 52 | "Please confirm that you wish to delete (un-capture) the selected part of the arrangement."); 53 | if(!confirmed) return null; 54 | for (Object o : select.toList()) { 55 | if (o instanceof DivType) { 56 | DivType d = (DivType) o; 57 | EditingDomain ed = MetsProjectNature.getEditingDomain(d); 58 | Command cmd = RemoveCommand.create(ed, o); 59 | try { 60 | if(cmd.canExecute()) { 61 | ed.getCommandStack().execute(cmd); 62 | } 63 | } catch (NullPointerException e) { 64 | e.printStackTrace(); 65 | } 66 | } 67 | } 68 | return null; 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/arrange/RemoveSmLinkHandler.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.arrange; 17 | 18 | import gov.loc.mets.MetsPackage; 19 | import gov.loc.mets.SmLinkType; 20 | 21 | import java.util.HashSet; 22 | import java.util.Iterator; 23 | 24 | import org.eclipse.core.commands.AbstractHandler; 25 | import org.eclipse.core.commands.ExecutionEvent; 26 | import org.eclipse.core.commands.ExecutionException; 27 | import org.eclipse.core.commands.IHandler; 28 | import org.eclipse.emf.common.command.Command; 29 | import org.eclipse.emf.ecore.EObject; 30 | import org.eclipse.emf.edit.command.RemoveCommand; 31 | import org.eclipse.jface.dialogs.MessageDialog; 32 | import org.eclipse.jface.viewers.ISelection; 33 | import org.eclipse.jface.viewers.IStructuredSelection; 34 | import org.eclipse.ui.handlers.HandlerUtil; 35 | 36 | import unc.lib.cdr.workbench.project.MetsProjectNature; 37 | 38 | public class RemoveSmLinkHandler extends AbstractHandler implements IHandler { 39 | 40 | @Override 41 | public Object execute(ExecutionEvent event) throws ExecutionException { 42 | ISelection selection = HandlerUtil.getCurrentSelectionChecked(event); 43 | if (!selection.isEmpty()) { 44 | IStructuredSelection sSelection = (IStructuredSelection) selection; 45 | boolean confirmed = MessageDialog.openConfirm(HandlerUtil.getActiveShell(event), "Confirm Delete", 46 | "Please confirm that you wish to delete this metadata."); 47 | if(!confirmed) return null; 48 | MetsProjectNature mpn = MetsProjectNature.getNatureForMetsObject((EObject)sSelection.getFirstElement()); 49 | HashSet del = new HashSet(); 50 | Iterator it = sSelection.iterator(); 51 | while(it.hasNext()) { 52 | Object sel = it.next(); 53 | if (sel instanceof SmLinkType) { 54 | del.add((SmLinkType) sel); 55 | } 56 | } 57 | Command c = RemoveCommand.create(mpn.getEditingDomain(), mpn.getMets().getStructLink(), 58 | MetsPackage.eINSTANCE.getStructLinkType_SmLink(), del); 59 | mpn.getCommandStack().execute(c); 60 | } 61 | return null; 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/arrange/RenameDivHandler.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.arrange; 17 | 18 | import gov.loc.mets.DivType; 19 | import gov.loc.mets.MetsPackage; 20 | 21 | import org.eclipse.core.commands.AbstractHandler; 22 | import org.eclipse.core.commands.ExecutionEvent; 23 | import org.eclipse.core.commands.ExecutionException; 24 | import org.eclipse.emf.common.command.Command; 25 | import org.eclipse.emf.edit.command.SetCommand; 26 | import org.eclipse.emf.edit.domain.EditingDomain; 27 | import org.eclipse.jface.dialogs.IInputValidator; 28 | import org.eclipse.jface.dialogs.InputDialog; 29 | import org.eclipse.jface.viewers.IStructuredSelection; 30 | import org.eclipse.ui.handlers.HandlerUtil; 31 | 32 | import unc.lib.cdr.workbench.project.MetsProjectNature; 33 | 34 | public class RenameDivHandler extends AbstractHandler { 35 | 36 | @Override 37 | public Object execute(ExecutionEvent event) throws ExecutionException { 38 | IStructuredSelection select = (IStructuredSelection) HandlerUtil.getCurrentSelectionChecked(event); 39 | try { 40 | DivType div = (DivType) select.getFirstElement(); 41 | IInputValidator v = new IInputValidator() { 42 | @Override 43 | public String isValid(String newText) { 44 | if (newText.trim().length() < 1) { 45 | return "Name cannot be empty or blank"; 46 | } 47 | return null; 48 | } 49 | }; 50 | InputDialog d = new InputDialog(HandlerUtil.getActiveShell(event), "Folder Name", "Enter the new name.", 51 | div.getLABEL1(), v); 52 | if (InputDialog.OK == d.open()) { 53 | EditingDomain ed = MetsProjectNature.getEditingDomain(div); 54 | Command cmd = SetCommand.create(ed, div, MetsPackage.eINSTANCE.getDivType_LABEL1(), d.getValue()); 55 | ed.getCommandStack().execute(cmd); 56 | } 57 | } catch (ClassCastException e) { 58 | throw new ExecutionException("Selection is not of Div type.", e); 59 | } 60 | return null; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/capture/LinkOriginalsHandler.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.capture; 17 | 18 | import org.eclipse.core.commands.AbstractHandler; 19 | import org.eclipse.core.commands.ExecutionEvent; 20 | import org.eclipse.core.commands.ExecutionException; 21 | import org.eclipse.jface.viewers.IStructuredSelection; 22 | import org.eclipse.jface.wizard.WizardDialog; 23 | import org.eclipse.ui.handlers.HandlerUtil; 24 | 25 | public class LinkOriginalsHandler extends AbstractHandler { 26 | 27 | /* 28 | * (non-Javadoc) 29 | * 30 | * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands. ExecutionEvent) 31 | */ 32 | @Override 33 | public Object execute(ExecutionEvent event) throws ExecutionException { 34 | IStructuredSelection select = (IStructuredSelection) HandlerUtil.getCurrentSelection(event); 35 | LinkOriginalsWizard wiz = new LinkOriginalsWizard(); 36 | wiz.init(HandlerUtil.getActiveWorkbenchWindow(event).getWorkbench(), select); 37 | WizardDialog dialog = new WizardDialog(HandlerUtil.getActiveShell(event), wiz); 38 | dialog.open(); 39 | return null; 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/capture/OriginalsDragSourceListener.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.capture; 17 | 18 | import org.eclipse.jface.util.LocalSelectionTransfer; 19 | import org.eclipse.jface.viewers.ISelection; 20 | import org.eclipse.jface.viewers.TreeViewer; 21 | import org.eclipse.swt.dnd.DragSourceEvent; 22 | import org.eclipse.swt.dnd.DragSourceListener; 23 | import org.slf4j.Logger; 24 | import org.slf4j.LoggerFactory; 25 | 26 | /** 27 | * @author Gregory Jansen 28 | * 29 | */ 30 | public class OriginalsDragSourceListener implements DragSourceListener { 31 | private static final Logger log = LoggerFactory.getLogger(OriginalsDragSourceListener.class); 32 | 33 | private final TreeViewer viewer; 34 | 35 | public OriginalsDragSourceListener(TreeViewer viewer) { 36 | this.viewer = viewer; 37 | } 38 | 39 | /* 40 | * (non-Javadoc) 41 | * 42 | * @see org.eclipse.swt.dnd.DragSourceListener#dragStart(org.eclipse.swt.dnd. DragSourceEvent) 43 | */ 44 | @Override 45 | public void dragStart(DragSourceEvent event) { 46 | log.debug("drag started"); 47 | ISelection selection = viewer.getSelection(); 48 | LocalSelectionTransfer.getTransfer().setSelection(selection); 49 | LocalSelectionTransfer.getTransfer().setSelectionSetTime(event.time & 0xFFFFFFFFL); 50 | } 51 | 52 | /* 53 | * (non-Javadoc) 54 | * 55 | * @see org.eclipse.swt.dnd.DragSourceListener#dragSetData(org.eclipse.swt.dnd .DragSourceEvent) 56 | */ 57 | @Override 58 | public void dragSetData(DragSourceEvent event) { 59 | log.debug("drag set data called"); 60 | event.data = LocalSelectionTransfer.getTransfer().getSelection(); 61 | // if(ResourceTransfer.getInstance().isSupportedType(event.dataType)) { 62 | // event.data = selection.toArray(); 63 | // } 64 | // if(LocalSelectionTransfer.getTransfer().isSupportedType(event.dataType)) { 65 | // log.debug("local selection data set"); 66 | // LocalSelectionTransfer.getTransfer().setSelection(selection); 67 | // LocalSelectionTransfer.getTransfer().setSelectionSetTime(event.time & 0xFFFF); 68 | // } 69 | } 70 | 71 | /* 72 | * (non-Javadoc) 73 | * 74 | * @see org.eclipse.swt.dnd.DragSourceListener#dragFinished(org.eclipse.swt.dnd .DragSourceEvent) 75 | */ 76 | @Override 77 | public void dragFinished(DragSourceEvent event) { 78 | log.debug("drag finished"); 79 | LocalSelectionTransfer.getTransfer().setSelection(null); 80 | LocalSelectionTransfer.getTransfer().setSelectionSetTime(0); 81 | } 82 | 83 | } 84 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/capture/OriginalsPropertyTester.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.capture; 17 | 18 | import org.eclipse.core.expressions.PropertyTester; 19 | 20 | import unc.lib.cdr.workbench.originals.OriginalFileStore; 21 | 22 | public class OriginalsPropertyTester extends PropertyTester { 23 | 24 | public OriginalsPropertyTester() { 25 | } 26 | 27 | @Override 28 | public boolean test(Object receiver, String property, Object[] args, Object expectedValue) { 29 | OriginalFileStore r = (OriginalFileStore) receiver; 30 | if (receiver instanceof OriginalFileStore && "isFile".equals(property)) { 31 | return expectedValue == null ? !r.fetchInfo().isDirectory() 32 | : r.fetchInfo().isDirectory() != ((Boolean) expectedValue).booleanValue(); 33 | } else { 34 | return false; 35 | } 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/capture/PropertyTesterTopFolderName.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.capture; 17 | 18 | import org.eclipse.core.expressions.PropertyTester; 19 | import org.eclipse.core.resources.IResource; 20 | 21 | public class PropertyTesterTopFolderName extends PropertyTester { 22 | 23 | public PropertyTesterTopFolderName() { 24 | } 25 | 26 | @Override 27 | public boolean test(Object receiver, String property, Object[] args, Object expectedValue) { 28 | try { 29 | if (receiver instanceof IResource && "folderName".equals(property)) { 30 | IResource r = (IResource) receiver; 31 | return expectedValue.equals(r.getProjectRelativePath().segments()[0]); 32 | } else { 33 | return false; 34 | } 35 | } catch (Exception e) { 36 | return false; 37 | } 38 | 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/capture/RescanOriginalsHandler.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.capture; 17 | 18 | import org.eclipse.core.commands.AbstractHandler; 19 | import org.eclipse.core.commands.ExecutionEvent; 20 | import org.eclipse.core.commands.ExecutionException; 21 | import org.eclipse.core.resources.IFolder; 22 | import org.eclipse.core.resources.IResource; 23 | import org.eclipse.core.runtime.CoreException; 24 | import org.eclipse.core.runtime.NullProgressMonitor; 25 | import org.eclipse.jface.viewers.IStructuredSelection; 26 | import org.eclipse.ui.handlers.HandlerUtil; 27 | 28 | public class RescanOriginalsHandler extends AbstractHandler { 29 | 30 | @Override 31 | public Object execute(ExecutionEvent event) throws ExecutionException { 32 | // TODO how to refresh file store originals 33 | IStructuredSelection select = (IStructuredSelection) HandlerUtil.getCurrentSelectionChecked(event); 34 | Object sel = select.getFirstElement(); 35 | IResource target = null; 36 | if (sel instanceof IResource) { 37 | target = (IResource) sel; 38 | } 39 | try { 40 | target.refreshLocal(IFolder.DEPTH_INFINITE, new NullProgressMonitor()); 41 | } catch (CoreException e) { 42 | throw new ExecutionException("Cannot refresh originals.", e); 43 | } 44 | return null; 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/commands/CloseProjectHandler.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.commands; 17 | 18 | import org.eclipse.core.commands.AbstractHandler; 19 | import org.eclipse.core.commands.ExecutionEvent; 20 | import org.eclipse.core.commands.ExecutionException; 21 | import org.eclipse.core.commands.IHandler; 22 | import org.eclipse.core.resources.IProject; 23 | import org.eclipse.core.runtime.CoreException; 24 | import org.eclipse.core.runtime.NullProgressMonitor; 25 | import org.eclipse.jface.viewers.IStructuredSelection; 26 | import org.eclipse.ui.handlers.HandlerUtil; 27 | import org.slf4j.Logger; 28 | import org.slf4j.LoggerFactory; 29 | 30 | public class CloseProjectHandler extends AbstractHandler implements IHandler { 31 | 32 | @SuppressWarnings("unused") 33 | private static final Logger LOG = LoggerFactory.getLogger(CloseProjectHandler.class); 34 | 35 | @Override 36 | public Object execute(ExecutionEvent event) throws ExecutionException { 37 | // IWorkbenchPart part = HandlerUtil.getActivePart(event); 38 | IStructuredSelection sel = (IStructuredSelection) HandlerUtil.getCurrentSelectionChecked(event); 39 | for (Object foo : sel.toArray()) { 40 | if (foo != null && foo instanceof IProject) { 41 | IProject p = (IProject) foo; 42 | try { 43 | p.close(new NullProgressMonitor()); 44 | } catch (CoreException e) { 45 | throw new ExecutionException("Cannot close project.", e); 46 | } 47 | } 48 | } 49 | return null; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/commands/CreateProjectHandler.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.commands; 17 | 18 | import org.eclipse.core.commands.AbstractHandler; 19 | import org.eclipse.core.commands.ExecutionEvent; 20 | import org.eclipse.core.commands.ExecutionException; 21 | import org.eclipse.core.commands.IHandler; 22 | import org.eclipse.jface.wizard.WizardDialog; 23 | import org.eclipse.ui.handlers.HandlerUtil; 24 | 25 | import unc.lib.cdr.workbench.project.NewSipProjectWizard; 26 | 27 | public class CreateProjectHandler extends AbstractHandler implements IHandler { 28 | 29 | @Override 30 | public Object execute(ExecutionEvent event) throws ExecutionException { 31 | NewSipProjectWizard wiz = new NewSipProjectWizard(); 32 | WizardDialog dialog = new WizardDialog(HandlerUtil.getActiveShell(event), wiz); 33 | dialog.open(); 34 | return null; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/commands/CrosswalkCommand.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.commands; 17 | 18 | import org.eclipse.core.commands.AbstractHandler; 19 | import org.eclipse.core.commands.ExecutionEvent; 20 | import org.eclipse.core.commands.ExecutionException; 21 | import org.eclipse.core.commands.IHandler; 22 | import org.eclipse.core.resources.IFile; 23 | import org.eclipse.jface.viewers.IStructuredSelection; 24 | import org.eclipse.swt.widgets.Shell; 25 | import org.eclipse.ui.IWorkbenchPart; 26 | import org.eclipse.ui.handlers.HandlerUtil; 27 | import org.eclipse.ui.progress.IWorkbenchSiteProgressService; 28 | 29 | import unc.lib.cdr.workbench.xwalk.CrosswalkJob; 30 | 31 | public class CrosswalkCommand extends AbstractHandler implements IHandler { 32 | 33 | @Override 34 | public Object execute(ExecutionEvent event) throws ExecutionException { 35 | IStructuredSelection s = (IStructuredSelection) HandlerUtil.getCurrentSelectionChecked(event); 36 | IFile file = (IFile) s.getFirstElement(); 37 | 38 | CrosswalkJob job = new CrosswalkJob(file); 39 | 40 | IWorkbenchPart part = HandlerUtil.getActivePart(event); 41 | if (part != null) { 42 | IWorkbenchSiteProgressService siteService = (IWorkbenchSiteProgressService) part.getSite().getAdapter( 43 | IWorkbenchSiteProgressService.class); 44 | Shell shell = HandlerUtil.getActiveShell(event); 45 | siteService.showInDialog(shell, job); 46 | siteService.schedule(job); 47 | } else { 48 | job.schedule(); 49 | } 50 | return null; 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/commands/DeleteProjectHandler.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.commands; 17 | 18 | import org.eclipse.core.commands.AbstractHandler; 19 | import org.eclipse.core.commands.ExecutionEvent; 20 | import org.eclipse.core.commands.ExecutionException; 21 | import org.eclipse.core.commands.IHandler; 22 | import org.eclipse.core.resources.IProject; 23 | import org.eclipse.core.runtime.CoreException; 24 | import org.eclipse.core.runtime.NullProgressMonitor; 25 | import org.eclipse.jface.dialogs.MessageDialogWithToggle; 26 | import org.eclipse.jface.viewers.IStructuredSelection; 27 | import org.eclipse.ui.handlers.HandlerUtil; 28 | import org.slf4j.Logger; 29 | import org.slf4j.LoggerFactory; 30 | 31 | public class DeleteProjectHandler extends AbstractHandler implements IHandler { 32 | 33 | @SuppressWarnings("unused") 34 | private static final Logger LOG = LoggerFactory.getLogger(DeleteProjectHandler.class); 35 | 36 | @Override 37 | public Object execute(ExecutionEvent event) throws ExecutionException { 38 | IStructuredSelection sel = (IStructuredSelection) HandlerUtil.getCurrentSelectionChecked(event); 39 | for (Object foo : sel.toArray()) { 40 | if (foo != null && foo instanceof IProject) { 41 | IProject p = (IProject) foo; 42 | MessageDialogWithToggle mdwt = MessageDialogWithToggle.openOkCancelConfirm( 43 | HandlerUtil.getActiveShellChecked(event), "Delete Project", 44 | "Are you sure you want to delete this project from the workbench?\n\n\t" + p.getName(), 45 | "Delete project files created by the workbench? (originals never deleted)", false, null, null); 46 | if (mdwt.getReturnCode() == mdwt.OK) { 47 | try { 48 | p.delete(mdwt.getToggleState(), true, new NullProgressMonitor()); 49 | } catch (CoreException e) { 50 | throw new ExecutionException("Cannot delete project.", e); 51 | } 52 | } 53 | } 54 | } 55 | return null; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/commands/ExitHandler.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.commands; 17 | 18 | import org.eclipse.core.commands.AbstractHandler; 19 | import org.eclipse.core.commands.ExecutionEvent; 20 | import org.eclipse.core.commands.ExecutionException; 21 | import org.eclipse.core.commands.IHandler; 22 | import org.eclipse.ui.handlers.HandlerUtil; 23 | 24 | public class ExitHandler extends AbstractHandler implements IHandler { 25 | 26 | @Override 27 | public Object execute(ExecutionEvent event) throws ExecutionException { 28 | HandlerUtil.getActiveWorkbenchWindow(event).close(); 29 | return null; 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/commands/ExportProjectHandler.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.commands; 17 | 18 | import java.util.List; 19 | 20 | import org.eclipse.core.commands.AbstractHandler; 21 | import org.eclipse.core.commands.ExecutionEvent; 22 | import org.eclipse.core.commands.ExecutionException; 23 | import org.eclipse.core.commands.IHandler; 24 | import org.eclipse.core.resources.IProject; 25 | import org.eclipse.core.resources.IResource; 26 | import org.eclipse.core.runtime.CoreException; 27 | import org.eclipse.core.runtime.NullProgressMonitor; 28 | import org.eclipse.jface.viewers.IStructuredSelection; 29 | import org.eclipse.ui.handlers.HandlerUtil; 30 | 31 | import unc.lib.cdr.workbench.project.MetsProjectNature; 32 | 33 | public class ExportProjectHandler extends AbstractHandler implements IHandler { 34 | 35 | @SuppressWarnings("unchecked") 36 | @Override 37 | public Object execute(ExecutionEvent event) throws ExecutionException { 38 | IStructuredSelection s = (IStructuredSelection)HandlerUtil.getCurrentSelection(event); 39 | for(IProject p : (List)s.toList()) { 40 | try { 41 | MetsProjectNature.get(p).save(); 42 | p.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor()); 43 | } catch(CoreException e) { 44 | e.printStackTrace(); 45 | throw new ExecutionException("Unexpected problem", e); 46 | } 47 | } 48 | 49 | @SuppressWarnings("restriction") 50 | IHandler export = new org.eclipse.ui.internal.handlers.WizardHandler.Export(); 51 | export.execute(event); 52 | return null; 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/commands/OpenProjectHandler.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.commands; 17 | 18 | import org.eclipse.core.commands.AbstractHandler; 19 | import org.eclipse.core.commands.ExecutionEvent; 20 | import org.eclipse.core.commands.ExecutionException; 21 | import org.eclipse.core.commands.IHandler; 22 | import org.eclipse.core.resources.IProject; 23 | import org.eclipse.core.runtime.CoreException; 24 | import org.eclipse.core.runtime.NullProgressMonitor; 25 | import org.eclipse.jface.viewers.IStructuredSelection; 26 | import org.eclipse.ui.handlers.HandlerUtil; 27 | import org.slf4j.Logger; 28 | import org.slf4j.LoggerFactory; 29 | 30 | public class OpenProjectHandler extends AbstractHandler implements IHandler { 31 | 32 | @SuppressWarnings("unused") 33 | private static final Logger LOG = LoggerFactory.getLogger(OpenProjectHandler.class); 34 | 35 | @Override 36 | public Object execute(ExecutionEvent event) throws ExecutionException { 37 | // IWorkbenchPart part = HandlerUtil.getActivePart(event); 38 | IStructuredSelection sel = (IStructuredSelection) HandlerUtil.getCurrentSelectionChecked(event); 39 | for (Object foo : sel.toArray()) { 40 | if (foo != null && foo instanceof IProject) { 41 | IProject p = (IProject) foo; 42 | try { 43 | p.open(new NullProgressMonitor()); 44 | } catch (CoreException e) { 45 | throw new ExecutionException("Cannot open project.", e); 46 | } 47 | } 48 | } 49 | return null; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/originals/OriginalsFileSystem.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.originals; 17 | 18 | import java.net.URI; 19 | 20 | import org.eclipse.core.filesystem.EFS; 21 | import org.eclipse.core.filesystem.IFileStore; 22 | import org.eclipse.core.filesystem.provider.FileSystem; 23 | import org.eclipse.core.internal.filesystem.NullFileSystem; 24 | import org.eclipse.core.runtime.CoreException; 25 | 26 | import unc.lib.cdr.workbench.rcp.Activator; 27 | 28 | public class OriginalsFileSystem extends FileSystem { 29 | private static OriginalsFileSystem __instance = new OriginalsFileSystem(); 30 | 31 | public OriginalsFileSystem() { 32 | } 33 | 34 | @Override 35 | public IFileStore getStore(URI uri) { 36 | try { 37 | return new OriginalFileStore(uri, null); 38 | } catch (CoreException e) { 39 | Activator.getDefault().getLog().log(e.getStatus()); 40 | return NullFileSystem.getInstance().getStore(uri); 41 | } 42 | } 43 | 44 | public static IFileStore wrapStore(URI uri, OriginalStub stub) throws CoreException { 45 | IFileStore wrapped = EFS.getStore(uri); 46 | return new OriginalFileStore(wrapped, stub); 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/project/AdapterFactory.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.project; 17 | 18 | import org.eclipse.core.resources.IProject; 19 | import org.eclipse.core.runtime.CoreException; 20 | import org.eclipse.core.runtime.IAdapterFactory; 21 | import org.eclipse.core.runtime.Status; 22 | import org.eclipse.emf.edit.domain.EditingDomain; 23 | 24 | @SuppressWarnings("rawtypes") 25 | public class AdapterFactory implements IAdapterFactory { 26 | private static final Class[] adapters = new Class[] { gov.loc.mets.MetsType.class }; 27 | 28 | @SuppressWarnings("unchecked") 29 | @Override 30 | public Object getAdapter(Object adaptableObject, Class adapterType) { 31 | try { 32 | if (adaptableObject instanceof IProject) { 33 | IProject proj = (IProject) adaptableObject; 34 | MetsProjectNature metsNature = (MetsProjectNature) proj.getNature(MetsProjectNature.NATURE_ID); 35 | if (adapterType.isAssignableFrom(gov.loc.mets.MetsType.class)) { 36 | return metsNature.getMets(); 37 | } else if (EditingDomain.class.equals(adapterType)) { 38 | return metsNature.getEditingDomain(); 39 | } 40 | } 41 | } catch (CoreException e) { 42 | return e.getStatus(); 43 | } 44 | return Status.OK_STATUS; 45 | } 46 | 47 | @Override 48 | public Class[] getAdapterList() { 49 | return adapters; 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/project/ICustomEObjectBucket.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.project; 17 | 18 | import org.eclipse.jface.resource.ImageDescriptor; 19 | 20 | /** 21 | * @author Gregory Jansen 22 | * 23 | */ 24 | public interface ICustomEObjectBucket { 25 | 26 | public ImageDescriptor getImageDescriptor(); 27 | 28 | public Object[] getChildren(); 29 | 30 | public String getText(); 31 | 32 | public boolean hasChildren(); 33 | 34 | public Object getParent(); 35 | } -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/project/ICustomProjectElement.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.project; 17 | 18 | import org.eclipse.core.resources.IProject; 19 | import org.eclipse.jface.resource.ImageDescriptor; 20 | 21 | /** 22 | * @author Gregory Jansen 23 | * 24 | */ 25 | public interface ICustomProjectElement { 26 | 27 | public ImageDescriptor getImageDescriptor(); 28 | 29 | public Object[] getChildren(); 30 | 31 | public String getText(); 32 | 33 | public boolean hasChildren(); 34 | 35 | public MetsProjectNature getProjectNature(); 36 | 37 | public IProject getProject(); 38 | 39 | public Object getParent(); 40 | } -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/project/NewSipProjectWizard.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.project; 17 | 18 | import java.net.URI; 19 | 20 | import org.eclipse.core.resources.IProject; 21 | import org.eclipse.core.runtime.CoreException; 22 | import org.eclipse.jface.viewers.IStructuredSelection; 23 | import org.eclipse.jface.wizard.Wizard; 24 | import org.eclipse.ui.INewWizard; 25 | import org.eclipse.ui.IWorkbench; 26 | import org.eclipse.ui.dialogs.WizardNewProjectCreationPage; 27 | 28 | public class NewSipProjectWizard extends Wizard implements INewWizard { 29 | private WizardNewProjectCreationPage _pageOne; 30 | private NewProjectStagingPage _pageTwo; 31 | IWorkbench workbench = null; 32 | 33 | public NewSipProjectWizard() { 34 | } 35 | 36 | @Override 37 | public boolean performFinish() { 38 | String name = _pageOne.getProjectName(); 39 | URI location = null; 40 | if (!_pageOne.useDefaults()) { 41 | location = _pageOne.getLocationURI(); 42 | } 43 | boolean autostage = _pageTwo.isAutoStage(); 44 | try { 45 | IProject prog = MetsProjectNatureSupport.createProject(name, location, autostage); 46 | URI stageURI = _pageTwo.projectManifestBase; 47 | MetsProjectNature.get(prog).setStagingBase(stageURI.toString()); 48 | } catch(CoreException e) { 49 | e.printStackTrace(); 50 | return false; 51 | } 52 | return true; 53 | } 54 | 55 | @Override 56 | public void addPages() { 57 | super.addPages(); 58 | _pageOne = new WizardNewProjectCreationPage("New Project Wizard"); 59 | _pageOne.setTitle("Project Name"); 60 | _pageOne.setDescription("Give your project a descriptive name."); 61 | _pageTwo = new NewProjectStagingPage("Staging"); 62 | _pageTwo.setTitle("Staging Location"); 63 | _pageTwo.setDescription("Choose a staging location for captured files."); 64 | _pageTwo.setMainPage(_pageOne); 65 | addPage(_pageOne); 66 | addPage(_pageTwo); 67 | } 68 | 69 | @Override 70 | public void init(IWorkbench workbench, IStructuredSelection selection) { 71 | this.workbench = workbench; 72 | } 73 | 74 | } 75 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/project/ProjectBagItExportWizard.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.project; 17 | 18 | import java.util.List; 19 | 20 | import org.eclipse.core.resources.IProject; 21 | import org.eclipse.jface.viewers.IStructuredSelection; 22 | import org.eclipse.jface.viewers.StructuredSelection; 23 | import org.eclipse.jface.wizard.Wizard; 24 | import org.eclipse.ui.IExportWizard; 25 | import org.eclipse.ui.IWorkbench; 26 | import org.eclipse.ui.ide.IDE; 27 | import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin; 28 | import org.eclipse.ui.internal.wizards.datatransfer.DataTransferMessages; 29 | import org.eclipse.ui.internal.wizards.datatransfer.WizardArchiveFileResourceExportPage1; 30 | 31 | public class ProjectBagItExportWizard extends Wizard implements IExportWizard { 32 | IStructuredSelection selection = null; 33 | private IProject project = null; 34 | private WizardArchiveFileResourceExportPage1 mainPage; 35 | 36 | public ProjectBagItExportWizard() { 37 | } 38 | 39 | @Override 40 | public void init(IWorkbench workbench, IStructuredSelection currentSelection) { 41 | this.selection = currentSelection; 42 | List selectedResources = IDE.computeSelectedResources(currentSelection); 43 | if (!selectedResources.isEmpty()) { 44 | this.selection = new StructuredSelection(selectedResources); 45 | } 46 | 47 | setWindowTitle(""); 48 | setDefaultPageImageDescriptor(IDEWorkbenchPlugin.getIDEImageDescriptor("wizban/exportzip_wiz.png"));//$NON-NLS-1$ 49 | setNeedsProgressMonitor(true); 50 | this.project = (IProject)selection.getFirstElement(); 51 | } 52 | 53 | // TODO add destination file chooser page 54 | /* (non-Javadoc) 55 | * Method declared on IWizard. 56 | */ 57 | public void addPages() { 58 | super.addPages(); 59 | mainPage = new WizardArchiveFileResourceExportPage1(selection); 60 | addPage(mainPage); 61 | } 62 | 63 | @Override 64 | public boolean performFinish() { 65 | // create a ZIP 66 | // put all the files in it 67 | // put project root files in a tag folder 68 | // generate manifest files 69 | return mainPage.finish(); 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/project/ProjectPropertyTester.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.project; 17 | 18 | import org.eclipse.core.expressions.PropertyTester; 19 | import org.eclipse.core.resources.IProject; 20 | 21 | public class ProjectPropertyTester extends PropertyTester { 22 | 23 | public ProjectPropertyTester() { 24 | } 25 | 26 | @Override 27 | public boolean test(Object receiver, String property, Object[] args, Object expectedValue) { 28 | try { 29 | if (receiver instanceof IProject) { 30 | IProject project = (IProject) receiver; 31 | if ("open".equals(property)) { 32 | return project.isOpen(); 33 | } else if ("closed".equals(property)) { 34 | return !project.isOpen(); 35 | } 36 | } else { 37 | return false; 38 | } 39 | } catch (Exception e) { 40 | } 41 | return false; 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/project/VariableResolver.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.project; 17 | 18 | import org.eclipse.core.resources.IResource; 19 | import org.eclipse.core.resources.variableresolvers.PathVariableResolver; 20 | 21 | public class VariableResolver extends PathVariableResolver { 22 | 23 | public VariableResolver() { 24 | } 25 | 26 | @Override 27 | public String getValue(String variable, IResource resource) { 28 | String result = null; 29 | if ("PROJECT_NAME".equals(variable)) { 30 | result = resource.getProject().getName(); 31 | } 32 | return result; 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/rcp/AccessionPerspective.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.rcp; 17 | 18 | import org.eclipse.ui.IPageLayout; 19 | import org.eclipse.ui.IPerspectiveFactory; 20 | 21 | public class AccessionPerspective implements IPerspectiveFactory { 22 | private String navViewID = "cdr-workbench.ProjectNavigator"; 23 | 24 | public void createInitialLayout(IPageLayout layout) { 25 | String editorArea = layout.getEditorArea(); 26 | layout.setEditorAreaVisible(true); 27 | // layout.setFixed(false); 28 | 29 | PerspectiveTweaks.addMyPerspectiveShortcuts(layout); 30 | // layout.addStandaloneView(navViewID, true, IPageLayout.LEFT, .3f, editorArea); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/rcp/ApplicationWorkbenchWindowAdvisor.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.rcp; 17 | 18 | import org.eclipse.jface.preference.IPreferenceStore; 19 | import org.eclipse.swt.graphics.Point; 20 | import org.eclipse.ui.IWorkbenchPreferenceConstants; 21 | import org.eclipse.ui.PlatformUI; 22 | import org.eclipse.ui.application.ActionBarAdvisor; 23 | import org.eclipse.ui.application.IActionBarConfigurer; 24 | import org.eclipse.ui.application.IWorkbenchWindowConfigurer; 25 | import org.eclipse.ui.application.WorkbenchWindowAdvisor; 26 | 27 | public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor { 28 | 29 | public ApplicationWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) { 30 | super(configurer); 31 | } 32 | 33 | @Override 34 | public ActionBarAdvisor createActionBarAdvisor(IActionBarConfigurer configurer) { 35 | return new ApplicationActionBarAdvisor(configurer); 36 | } 37 | 38 | @Override 39 | public void preWindowOpen() { 40 | IWorkbenchWindowConfigurer configurer = getWindowConfigurer(); 41 | configurer.setInitialSize(new Point(1024, 768)); 42 | configurer.setShowCoolBar(true); 43 | configurer.setShowStatusLine(true); 44 | configurer.setTitle("Curator's Workbench"); 45 | configurer.setShowPerspectiveBar(false); 46 | configurer.setShowProgressIndicator(true); 47 | // Set the preference toolbar to the left place 48 | // If other menus exists then this will be on the left of them 49 | IPreferenceStore apiStore = PlatformUI.getPreferenceStore(); 50 | apiStore.setValue(IWorkbenchPreferenceConstants.DOCK_PERSPECTIVE_BAR, IWorkbenchPreferenceConstants.TOP_RIGHT); 51 | } 52 | 53 | @Override 54 | public void postWindowOpen() { 55 | super.postWindowOpen(); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/rcp/ArrangementPerspective.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.rcp; 17 | 18 | import org.eclipse.ui.IPageLayout; 19 | import org.eclipse.ui.IPerspectiveFactory; 20 | 21 | public class ArrangementPerspective implements IPerspectiveFactory { 22 | 23 | @Override 24 | public void createInitialLayout(IPageLayout layout) { 25 | // TODO Auto-generated method stub 26 | PerspectiveTweaks.addMyPerspectiveShortcuts(layout); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/rcp/BatchMetadataPerspective.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.rcp; 17 | 18 | import org.eclipse.ui.IPageLayout; 19 | import org.eclipse.ui.IPerspectiveFactory; 20 | 21 | public class BatchMetadataPerspective implements IPerspectiveFactory { 22 | 23 | @Override 24 | public void createInitialLayout(IPageLayout layout) { 25 | // TODO Auto-generated method stub 26 | 27 | PerspectiveTweaks.addMyPerspectiveShortcuts(layout); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/rcp/MetsXmlPerspective.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.rcp; 17 | 18 | import org.eclipse.ui.IPageLayout; 19 | import org.eclipse.ui.IPerspectiveFactory; 20 | 21 | public class MetsXmlPerspective implements IPerspectiveFactory { 22 | 23 | @Override 24 | public void createInitialLayout(IPageLayout layout) { 25 | // TODO Auto-generated method stub 26 | 27 | PerspectiveTweaks.addMyPerspectiveShortcuts(layout); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/rcp/PerspectiveTweaks.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.rcp; 17 | 18 | import org.eclipse.ui.IPageLayout; 19 | 20 | /** 21 | * A place to keep settings common to normal workbench perspectives. 22 | * 23 | * @author Gregory Jansen 24 | * 25 | */ 26 | public class PerspectiveTweaks { 27 | 28 | public static void addMyPerspectiveShortcuts(IPageLayout layout) { 29 | // layout.addPerspectiveShortcut("cdr-workbench.AccessionPerspective"); 30 | // layout.addPerspectiveShortcut("cdr-workbench.ArrangementPerspective"); 31 | // layout.addPerspectiveShortcut("cdr-workbench.BatchMetadataPerspective"); 32 | // layout.addPerspectiveShortcut("cdr-workbench.MetsPerspective"); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/rcp/Startup.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.rcp; 17 | 18 | import org.eclipse.ui.IStartup; 19 | 20 | public class Startup implements IStartup { 21 | 22 | @Override 23 | public void earlyStartup() { 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/rcp/WorkbenchHelpContextIds.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.rcp; 17 | 18 | /** 19 | * @author Gregory Jansen 20 | * 21 | */ 22 | public class WorkbenchHelpContextIds { 23 | 24 | public static final String CDR_SIP_EXPORT_WIZARD_PAGE = null; 25 | 26 | } 27 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/views/DescriptionPropertySection.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.views; 17 | 18 | import gov.loc.mets.MdSecType; 19 | 20 | import java.util.ArrayList; 21 | import java.util.List; 22 | 23 | public class DescriptionPropertySection extends 24 | AbstractDivTypeMetadataPropertySection { 25 | 26 | @Override 27 | List getMdSecs() { 28 | List result = new ArrayList(); 29 | result.addAll(this.div.getDmdSec()); 30 | return result; 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/views/DivTypeFileFilter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.views; 17 | 18 | import gov.loc.mets.DivType; 19 | import gov.loc.mets.util.METSConstants; 20 | 21 | import org.eclipse.jface.viewers.IFilter; 22 | 23 | public class DivTypeFileFilter implements IFilter { 24 | 25 | @Override 26 | public boolean select(Object toTest) { 27 | if (toTest instanceof DivType) { 28 | DivType d = (DivType) toTest; 29 | if (METSConstants.Div_File.equals(d.getTYPE())) { 30 | return true; 31 | // String originalUri = d.getCONTENTIDS().get(0); 32 | // IProject project = MetsProjectNature.getProjectForMetsEObject(d); 33 | } 34 | } 35 | return false; 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/views/DivTypeWithOriginalFilter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.views; 17 | 18 | import gov.loc.mets.DivType; 19 | 20 | import org.eclipse.jface.viewers.IFilter; 21 | 22 | public class DivTypeWithOriginalFilter implements IFilter { 23 | 24 | @Override 25 | public boolean select(Object toTest) { 26 | if (toTest instanceof DivType) { 27 | DivType d = (DivType) toTest; 28 | if (d.getCONTENTIDS() != null && d.getCONTENTIDS().size() > 0) { 29 | return true; 30 | // String originalUri = d.getCONTENTIDS().get(0); 31 | // IProject project = MetsProjectNature.getProjectForMetsEObject(d); 32 | } 33 | } 34 | return false; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/views/FileStoreImageProvider.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.views; 17 | 18 | import java.io.IOException; 19 | import java.io.InputStream; 20 | 21 | import org.eclipse.core.filesystem.EFS; 22 | import org.eclipse.core.filesystem.IFileStore; 23 | import org.eclipse.core.runtime.CoreException; 24 | import org.eclipse.core.runtime.NullProgressMonitor; 25 | import org.eclipse.swt.SWT; 26 | import org.eclipse.swt.SWTException; 27 | import org.eclipse.swt.graphics.Device; 28 | import org.eclipse.swt.graphics.Image; 29 | import org.slf4j.Logger; 30 | import org.slf4j.LoggerFactory; 31 | 32 | public class FileStoreImageProvider implements ImageProvider { 33 | 34 | @SuppressWarnings("unused") 35 | private static final Logger LOG = LoggerFactory.getLogger(FileStoreImageProvider.class); 36 | 37 | private IFileStore fs = null; 38 | 39 | public FileStoreImageProvider(IFileStore fs) { 40 | this.fs = fs; 41 | } 42 | 43 | @Override 44 | public Image getImage(Device device) { 45 | /* 46 | * TODO Do we need to be smarter? It might make sense to check the file extension to see if it's worth attempting 47 | * to extract an image from the file. For now, performance seems adequate and there does not seem to be any 48 | * bizarre side-effects. 49 | */ 50 | InputStream in = null; 51 | try { 52 | in = fs.openInputStream(EFS.NONE, new NullProgressMonitor()); 53 | return new Image(device, in); 54 | } catch (SWTException e) { 55 | if (e.code != SWT.ERROR_UNSUPPORTED_FORMAT) 56 | LOG.info("unsupported image format", e); 57 | } catch (CoreException e) { 58 | //LOG.error("unexpected error", e); 59 | } catch (Exception e) { 60 | LOG.error("unexpected error", e); 61 | } finally { 62 | try { 63 | in.close(); 64 | } catch (IOException e) { 65 | } 66 | } 67 | return null; 68 | } 69 | 70 | @Override 71 | public void disposeImage(Image image) { 72 | image.dispose(); 73 | } 74 | 75 | } 76 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/views/HasMetsProjectNatureFilter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.views; 17 | 18 | import org.eclipse.core.resources.IProject; 19 | import org.eclipse.core.runtime.CoreException; 20 | import org.eclipse.jface.viewers.IFilter; 21 | 22 | import unc.lib.cdr.workbench.project.MetsProjectNature; 23 | 24 | public class HasMetsProjectNatureFilter implements IFilter { 25 | 26 | @Override 27 | public boolean select(Object toTest) { 28 | if(toTest instanceof IProject) { 29 | IProject test = (IProject)toTest; 30 | try { 31 | return (test.isOpen() && test.hasNature(MetsProjectNature.NATURE_ID)); 32 | } catch (CoreException e) { 33 | return false; 34 | } 35 | } 36 | return false; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/views/HasOriginalFilter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.views; 17 | 18 | import gov.loc.mets.DivType; 19 | 20 | import org.eclipse.jface.viewers.IFilter; 21 | 22 | import unc.lib.cdr.workbench.originals.OriginalFileStore; 23 | import unc.lib.cdr.workbench.originals.OriginalStub; 24 | import unc.lib.cdr.workbench.project.MetsProjectNature; 25 | 26 | public class HasOriginalFilter implements IFilter { 27 | 28 | @Override 29 | public boolean select(Object toTest) { 30 | if(toTest instanceof OriginalFileStore) { 31 | return true; 32 | } else if (toTest instanceof DivType) { 33 | DivType d = (DivType) toTest; 34 | OriginalFileStore s = MetsProjectNature.getOriginalFileStore(d); 35 | return s != null; 36 | } else if(toTest instanceof OriginalStub) { 37 | return true; 38 | } 39 | return false; 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/views/HasStagedFileFilter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.views; 17 | 18 | import gov.loc.mets.DivType; 19 | 20 | import org.eclipse.core.filesystem.IFileStore; 21 | import org.eclipse.jface.viewers.IFilter; 22 | 23 | import unc.lib.cdr.workbench.originals.OriginalFileStore; 24 | import unc.lib.cdr.workbench.project.MetsProjectNature; 25 | 26 | public class HasStagedFileFilter implements IFilter { 27 | 28 | @Override 29 | public boolean select(Object toTest) { 30 | if(toTest instanceof OriginalFileStore) { 31 | OriginalFileStore original = (OriginalFileStore)toTest; 32 | return original.getStagingLocatorType() != null; 33 | } else if (toTest instanceof DivType) { 34 | DivType d = (DivType) toTest; 35 | IFileStore stage = MetsProjectNature.getStagedFileStore(d); 36 | return stage != null; 37 | } 38 | return false; 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/views/ImageProvider.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.views; 17 | 18 | import org.eclipse.swt.graphics.Device; 19 | import org.eclipse.swt.graphics.Image; 20 | 21 | public interface ImageProvider { 22 | /** 23 | * This method returns an {@link Image}. The implementor must return an image that can be disposed() by the caller. 24 | * The implementor is not given any notification that the dispose is occurring. 25 | * 26 | * @param target 27 | * The device the image will be displayed on. 28 | * 29 | * @return {@link Image} 30 | */ 31 | Image getImage(Device target); 32 | 33 | /** 34 | * This method is used to dispose an image obtained by the getImage(Device) method. 35 | * 36 | * @param image 37 | * the image that needs to be disposed of. 38 | */ 39 | void disposeImage(Image image); 40 | } 41 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/views/MdSecTypeDecorator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.views; 17 | 18 | import gov.loc.mets.MdSecType; 19 | import gov.loc.mets.util.METSConstants; 20 | 21 | import org.eclipse.jface.viewers.IDecoration; 22 | import org.eclipse.jface.viewers.ILabelProviderListener; 23 | import org.eclipse.jface.viewers.ILightweightLabelDecorator; 24 | 25 | public class MdSecTypeDecorator implements ILightweightLabelDecorator { 26 | 27 | /* (non-Javadoc) 28 | * @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.jface.viewers.ILabelProviderListener) 29 | */ 30 | @Override 31 | public void addListener(ILabelProviderListener listener) { 32 | // TODO Auto-generated method stub 33 | 34 | } 35 | 36 | /* (non-Javadoc) 37 | * @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose() 38 | */ 39 | @Override 40 | public void dispose() { 41 | // TODO Auto-generated method stub 42 | 43 | } 44 | 45 | /* (non-Javadoc) 46 | * @see org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java.lang.Object, java.lang.String) 47 | */ 48 | @Override 49 | public boolean isLabelProperty(Object element, String property) { 50 | return true; 51 | } 52 | 53 | /* (non-Javadoc) 54 | * @see org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(org.eclipse.jface.viewers.ILabelProviderListener) 55 | */ 56 | @Override 57 | public void removeListener(ILabelProviderListener listener) { 58 | // TODO Auto-generated method stub 59 | 60 | } 61 | 62 | /* (non-Javadoc) 63 | * @see org.eclipse.jface.viewers.ILightweightLabelDecorator#decorate(java.lang.Object, org.eclipse.jface.viewers.IDecoration) 64 | */ 65 | @Override 66 | public void decorate(Object element, IDecoration decoration) { 67 | if(element instanceof MdSecType) { 68 | MdSecType md = (MdSecType)element; 69 | if(METSConstants.MD_STATUS_CROSSWALK_LINKED.equals(md.getSTATUS())) { 70 | decoration.addSuffix(" auto linked"); 71 | } else if(METSConstants.MD_STATUS_CROSSWALK_NOT_LINKED.equals(md.getSTATUS())) { 72 | //decoration.addSuffix(" auto-linked"); 73 | } else if(METSConstants.MD_STATUS_CROSSWALK_USER_LINKED.equals(md.getSTATUS())) { 74 | decoration.addSuffix(" user linked"); 75 | } else if(METSConstants.MD_STATUS_USER_EDITED.equals(md.getSTATUS())) { 76 | decoration.addSuffix(" user created"); 77 | } 78 | } 79 | } 80 | 81 | 82 | } 83 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/views/ProvenancePropertySection.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.views; 17 | 18 | import gov.loc.mets.MdSecType; 19 | import gov.loc.mets.MetsPackage; 20 | 21 | import java.util.ArrayList; 22 | import java.util.List; 23 | 24 | public class ProvenancePropertySection extends 25 | AbstractDivTypeMetadataPropertySection { 26 | 27 | @Override 28 | List getMdSecs() { 29 | List result = new ArrayList(); 30 | for(MdSecType md : this.div.getMdSec()) { 31 | if(MetsPackage.eINSTANCE.getAmdSecType_DigiprovMD().equals(md.eContainingFeature())) { 32 | result.add(md); 33 | } 34 | } 35 | return result; 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/views/RightsPropertySection.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.views; 17 | 18 | import gov.loc.mets.MdSecType; 19 | import gov.loc.mets.MetsPackage; 20 | 21 | import java.util.ArrayList; 22 | import java.util.List; 23 | 24 | public class RightsPropertySection extends 25 | AbstractDivTypeMetadataPropertySection { 26 | 27 | @Override 28 | List getMdSecs() { 29 | List result = new ArrayList(); 30 | for(MdSecType md : this.div.getMdSec()) { 31 | if(MetsPackage.eINSTANCE.getAmdSecType_RightsMD().equals(md.eContainingFeature())) { 32 | result.add(md); 33 | } 34 | } 35 | return result; 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/views/TechnicalPropertySection.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.views; 17 | 18 | import gov.loc.mets.MdSecType; 19 | import gov.loc.mets.MetsPackage; 20 | 21 | import java.util.ArrayList; 22 | import java.util.List; 23 | 24 | public class TechnicalPropertySection extends 25 | AbstractDivTypeMetadataPropertySection { 26 | 27 | @Override 28 | List getMdSecs() { 29 | List result = new ArrayList(); 30 | for(MdSecType md : this.div.getMdSec()) { 31 | if(MetsPackage.eINSTANCE.getAmdSecType_TechMD().equals(md.eContainingFeature())) { 32 | result.add(md); 33 | } 34 | } 35 | return result; 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/views/WorkbenchWorkbenchRoot.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.views; 17 | 18 | /** 19 | * @author Gregory Jansen 20 | * 21 | */ 22 | public class WorkbenchWorkbenchRoot { 23 | 24 | } 25 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/xwalk/CrosswalkLabelProvider.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.xwalk; 17 | 18 | import gov.loc.mets.MdSecType; 19 | 20 | import org.eclipse.jface.viewers.DecoratingLabelProvider; 21 | import org.eclipse.jface.viewers.ILabelProvider; 22 | import org.eclipse.jface.viewers.ILabelProviderListener; 23 | import org.eclipse.swt.graphics.Image; 24 | import org.eclipse.ui.model.WorkbenchLabelProvider; 25 | 26 | import unc.lib.cdr.workbench.views.LabelImageFactory; 27 | import unc.lib.cdr.workbench.views.LabelImageFactory.Icon; 28 | 29 | public class CrosswalkLabelProvider implements ILabelProvider { 30 | private DecoratingLabelProvider provider = (DecoratingLabelProvider) WorkbenchLabelProvider 31 | .getDecoratingWorkbenchLabelProvider(); 32 | 33 | @Override 34 | public void addListener(ILabelProviderListener listener) { 35 | this.provider.addListener(listener); 36 | } 37 | 38 | @Override 39 | public void dispose() { 40 | } 41 | 42 | @Override 43 | public boolean isLabelProperty(Object element, String property) { 44 | return true; 45 | } 46 | 47 | @Override 48 | public void removeListener(ILabelProviderListener listener) { 49 | this.provider.removeListener(listener); 50 | } 51 | 52 | @Override 53 | public Image getImage(Object element) { 54 | if(element instanceof MetadataCompartment) { 55 | return LabelImageFactory.getImage(LabelImageFactory.Icon.CrosswalkedRecord); 56 | } else if(element instanceof MdSecType) { 57 | MdSecType mdSec = (MdSecType)element; 58 | if(mdSec.getMdWrap() != null) { 59 | String type = !"OTHER".equals(mdSec.getMdWrap().getMDTYPE().getName()) ? 60 | mdSec.getMdWrap().getMDTYPE().getName() : 61 | mdSec.getMdWrap().getOTHERMDTYPE(); 62 | switch(type) { 63 | case "ACL": 64 | return LabelImageFactory.getImage(Icon.ACLDecor); 65 | case "MODS": 66 | return LabelImageFactory.getImage(Icon.UserEditedDecor); 67 | } 68 | } 69 | } 70 | return provider.getImage(element); 71 | } 72 | 73 | @Override 74 | public String getText(Object element) { 75 | if(element instanceof MetadataCompartment) { 76 | MetadataCompartment mc = (MetadataCompartment)element; 77 | return "data row "+mc.row; 78 | } 79 | return provider.getText(element); 80 | } 81 | 82 | } 83 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/xwalk/CrosswalkViewerSorter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.xwalk; 17 | 18 | import gov.loc.mets.MdSecType; 19 | 20 | import java.text.Collator; 21 | 22 | import org.eclipse.jface.viewers.Viewer; 23 | import org.eclipse.jface.viewers.ViewerSorter; 24 | 25 | public class CrosswalkViewerSorter extends ViewerSorter { 26 | 27 | public CrosswalkViewerSorter() { 28 | } 29 | 30 | public CrosswalkViewerSorter(Collator collator) { 31 | super(collator); 32 | } 33 | 34 | @Override 35 | public int compare(Viewer viewer, Object e1, Object e2) { 36 | if(e1 instanceof MdSecType) { 37 | if(e2 instanceof MdSecType) { 38 | String pred1 = ((MdSecType)e1).getMdWrap().getMDTYPE().getName(); 39 | String pred2 = ((MdSecType)e2).getMdWrap().getMDTYPE().getName(); 40 | return this.getComparator().compare(pred1, pred2); 41 | } else { 42 | return -1; 43 | } 44 | } 45 | if(e2 instanceof MdSecType) { 46 | return 1; 47 | } 48 | if (e1 instanceof MetadataCompartment && e2 instanceof MetadataCompartment) { 49 | MetadataCompartment mc1 = (MetadataCompartment) e1; 50 | MetadataCompartment mc2 = (MetadataCompartment) e2; 51 | return mc1.row - mc2.row; 52 | } 53 | return super.compare(viewer, e1, e2); 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/xwalk/MapAttributeAdvice.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.xwalk; 17 | 18 | import org.eclipse.gmf.runtime.common.core.command.ICommand; 19 | import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice; 20 | import org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditHelperAdvice; 21 | import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; 22 | 23 | import crosswalk.MappedElement; 24 | import crosswalk.diagram.providers.CrosswalkElementTypes; 25 | 26 | public class MapAttributeAdvice extends AbstractEditHelperAdvice implements IEditHelperAdvice { 27 | @Override 28 | protected ICommand getBeforeCreateCommand(final CreateElementRequest request) { 29 | if (isRelevant(request)) { 30 | return new PickMappedFeatureCommand(request); 31 | } 32 | return null; 33 | } 34 | 35 | @Override 36 | protected ICommand getAfterCreateCommand(final CreateElementRequest request) { 37 | if (isRelevant(request)) { 38 | return new SetMappedFeatureCommand(request); 39 | } 40 | return null; 41 | } 42 | 43 | /** 44 | * This is required to such that we don't return commands for the wrong element types, causing meaningless prompts the 45 | * unspecified create type request. 46 | * @param request 47 | * @return 48 | */ 49 | private static boolean isRelevant(CreateElementRequest request) { 50 | if(request.getContainer() instanceof MappedElement && 51 | request.getElementType() == CrosswalkElementTypes.MappedAttribute_3009) { 52 | return true; 53 | } 54 | return false; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/xwalk/MapElementAdvice.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.xwalk; 17 | 18 | import org.eclipse.gmf.runtime.common.core.command.ICommand; 19 | import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice; 20 | import org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditHelperAdvice; 21 | import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; 22 | import org.slf4j.Logger; 23 | import org.slf4j.LoggerFactory; 24 | 25 | import crosswalk.CrossWalk; 26 | import crosswalk.MappedElement; 27 | import crosswalk.MetadataBlock; 28 | import crosswalk.diagram.providers.CrosswalkElementTypes; 29 | 30 | public class MapElementAdvice extends AbstractEditHelperAdvice implements IEditHelperAdvice { 31 | private static final Logger LOG = LoggerFactory.getLogger(MapElementAdvice.class); 32 | 33 | @Override 34 | protected ICommand getBeforeCreateCommand(final CreateElementRequest request) { 35 | if (isRelevant(request)) { 36 | return new PickMappedFeatureCommand(request); 37 | } 38 | return null; 39 | } 40 | 41 | @Override 42 | protected ICommand getAfterCreateCommand(final CreateElementRequest request) { 43 | if (isRelevant(request)) { 44 | return new SetMappedFeatureCommand(request); 45 | } 46 | return null; 47 | } 48 | 49 | /** 50 | * This is required to such that we don't return commands for the wrong element types, causing meaningless prompts the 51 | * unspecified create type request. 52 | * @param request 53 | * @return 54 | */ 55 | private static boolean isRelevant(CreateElementRequest request) { 56 | if(request.getContainer() instanceof CrossWalk && request.getElementType() == CrosswalkElementTypes.MappedElement_3007) { 57 | return true; 58 | } else if(request.getContainer() instanceof MetadataBlock && request.getElementType() == CrosswalkElementTypes.MappedElement_3007) { 59 | return true; 60 | } else if(request.getContainer() instanceof MappedElement && request.getElementType() == CrosswalkElementTypes.MappedElement_3008) { 61 | return true; 62 | } 63 | return false; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/xwalk/MetadataCompartment.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.xwalk; 17 | 18 | import gov.loc.mets.MdSecType; 19 | 20 | import java.util.ArrayList; 21 | import java.util.List; 22 | 23 | public class MetadataCompartment { 24 | public List metadataSections = new ArrayList(); 25 | public String label = null; 26 | public int row = -1; 27 | 28 | public String toString() { 29 | return "data row "+row; 30 | } 31 | } -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/xwalk/MetadataCompartmentDecorator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.xwalk; 17 | 18 | import org.eclipse.jface.viewers.IDecoration; 19 | import org.eclipse.jface.viewers.ILabelProviderListener; 20 | import org.eclipse.jface.viewers.ILightweightLabelDecorator; 21 | 22 | 23 | public class MetadataCompartmentDecorator implements ILightweightLabelDecorator { 24 | 25 | @Override 26 | public void addListener(ILabelProviderListener listener) { 27 | } 28 | 29 | @Override 30 | public void dispose() { 31 | } 32 | 33 | @Override 34 | public boolean isLabelProperty(Object element, String property) { 35 | return true; 36 | } 37 | 38 | @Override 39 | public void removeListener(ILabelProviderListener listener) { 40 | } 41 | 42 | @Override 43 | public void decorate(Object element, IDecoration decoration) { 44 | if(element instanceof MetadataCompartment) { 45 | MetadataCompartment mc = (MetadataCompartment)element; 46 | decoration.addSuffix(" "+mc.metadataSections.size()+" records"); 47 | } 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /workbench_plugin/src/main/java/unc/lib/cdr/workbench/xwalk/MetadataSourcePropertyTester.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2010 The University of North Carolina at Chapel Hill 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package unc.lib.cdr.workbench.xwalk; 17 | 18 | import org.eclipse.core.expressions.PropertyTester; 19 | import org.eclipse.core.resources.IFile; 20 | import org.eclipse.core.runtime.CoreException; 21 | import org.eclipse.core.runtime.Platform; 22 | import org.eclipse.core.runtime.content.IContentDescription; 23 | import org.eclipse.core.runtime.content.IContentType; 24 | import org.slf4j.Logger; 25 | import org.slf4j.LoggerFactory; 26 | 27 | import unc.lib.cdr.workbench.IResourceConstants; 28 | 29 | public class MetadataSourcePropertyTester extends PropertyTester { 30 | 31 | private static final Logger LOG = LoggerFactory.getLogger(MetadataSourcePropertyTester.class); 32 | 33 | public MetadataSourcePropertyTester() { 34 | // TODO Auto-generated constructor stub 35 | } 36 | 37 | @Override 38 | public boolean test(Object receiver, String property, Object[] args, Object expectedValue) { 39 | LOG.debug("property tester called: {} {} {}", receiver, property, expectedValue); 40 | if (receiver instanceof IFile && "isTabularMetadataSource".equals(property)) { 41 | IContentType actualContentType = null; 42 | IFile file = (IFile) receiver; 43 | if (!file.exists()) { 44 | return false; 45 | } 46 | IContentDescription contentDescription = null; 47 | try { 48 | contentDescription = file.getContentDescription(); 49 | } catch (CoreException e) { 50 | throw new Error(e); 51 | } 52 | if (contentDescription != null) { 53 | actualContentType = contentDescription.getContentType(); 54 | } else { 55 | actualContentType = Platform.getContentTypeManager().findContentTypeFor(file.getName()); 56 | } 57 | if (actualContentType != null) { 58 | LOG.debug("found content type: {} {}", actualContentType.getId(), actualContentType.toString()); 59 | // if (isKindOfUsed) 60 | // return actualContentType.isKindOf(Platform.getContentTypeManager().getContentType(expectedValue)); 61 | // return expectedValue.equals(actualContentType.getId()); 62 | } 63 | return false; 64 | } 65 | if (receiver instanceof IFile && "isCrosswalkFile".equals(property)) { 66 | IFile file = (IFile) receiver; 67 | if (!file.exists()) { 68 | return false; 69 | } 70 | return IResourceConstants.CROSSWALK_EXTENSION.equals(file.getFileExtension()); 71 | } 72 | return false; 73 | } 74 | 75 | } 76 | -------------------------------------------------------------------------------- /workbench_plugin/staging.properties: -------------------------------------------------------------------------------- 1 | # Test iRODS staging location 2 | test.irods.host=cdr-dev-vault.libint.unc.edu 3 | test.irods.port=5555 4 | test.irods.zone=cdrTestZone 5 | test.irods.resc=cdrResc 6 | 7 | # Prod iRODS staging location 8 | prod.irods.host=cdr-vault.libint.unc.edu 9 | prod.irods.port=3333 10 | prod.irods.zone=cdrZone 11 | prod.irods.resc=cdrResc 12 | -------------------------------------------------------------------------------- /workbench_plugin/standard_mill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UNC-Libraries/Curators-Workbench/e2b7c1bbc3f9fe7b741265239bf6126f319eda42/workbench_plugin/standard_mill.png --------------------------------------------------------------------------------