Skip to content

Commit

Permalink
Merge pull request DSpace#9750 from cclauss/codespell
Browse files Browse the repository at this point in the history
Fix typos discovered by codespell
  • Loading branch information
kshepherd committed Aug 6, 2024
2 parents 8e82640 + dbf33f2 commit cbea61c
Show file tree
Hide file tree
Showing 263 changed files with 443 additions and 442 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* Configuration properties: (with examples)
* {@code
* # values for the forever embargo date threshold
* # This threshold date is used in the default access status helper to dermine if an item is
* # This threshold date is used in the default access status helper to determine if an item is
* # restricted or embargoed based on the start date of the primary (or first) file policies.
* # In this case, if the policy start date is inferior to the threshold date, the status will
* # be embargo, else it will be restricted.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ public final void addItem(Item i) throws Exception {
key = key + "." + metadataField.getQualifier();
}

// Add the language if there is one (schema.element.qualifier[langauge])
// Add the language if there is one (schema.element.qualifier[language])
//if ((value.language != null) && (!"".equals(value.language)))
if (value.getLanguage() != null) {
key = key + "[" + value.getLanguage() + "]";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ public void internalRun() throws Exception {
displayChanges(changes, true);
}

// Finsh off and tidy up
// Finish off and tidy up
c.restoreAuthSystemState();
c.complete();
} catch (Exception e) {
Expand Down Expand Up @@ -1653,7 +1653,7 @@ private void validateExpressedRelations(Context c) throws MetadataImportExceptio
.getLabel();
} else {
// Target item may be archived; check there.
// Add to errors if Realtionship.type cannot be derived
// Add to errors if Relationship.type cannot be derived
Item targetItem = null;
if (itemService.find(c, UUID.fromString(targetUUID)) != null) {
targetItem = itemService.find(c, UUID.fromString(targetUUID));
Expand Down Expand Up @@ -1698,7 +1698,7 @@ private void validateExpressedRelations(Context c) throws MetadataImportExceptio
validateTypesByTypeByTypeName(c, targetType, originType, typeName, originRow);
} else {
// Origin item may be archived; check there.
// Add to errors if Realtionship.type cannot be derived.
// Add to errors if Relationship.type cannot be derived.
Item originItem = null;
if (itemService.find(c, UUID.fromString(targetUUID)) != null) {
DSpaceCSVLine dSpaceCSVLine = this.csv.getCSVLines()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ public void run() {
try {
emailErrorMessage(eperson, e1.getMessage());
} catch (Exception e) {
// wont throw here
// won't throw here
}
throw new IllegalStateException(e1);
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public void exportAsZip(Context context, Iterator<Item> items,
boolean excludeBitstreams) throws Exception;

/**
* Convenience methot to create export a single Community, Collection, or
* Convenience method to create export a single Community, Collection, or
* Item
*
* @param dso - the dspace object to export
Expand All @@ -93,7 +93,7 @@ public void createDownloadableExport(List<DSpaceObject> dsObjects,
Context context, boolean migrate) throws Exception;

/**
* Convenience methot to create export a single Community, Collection, or
* Convenience method to create export a single Community, Collection, or
* Item
*
* @param dso - the dspace object to export
Expand Down Expand Up @@ -156,7 +156,7 @@ public String getExportDownloadDirectory(EPerson ePerson)
public String getExportWorkDirectory() throws Exception;

/**
* Used to read the export archived. Inteded for download.
* Used to read the export archived. Intended for download.
*
* @param fileName the name of the file to download
* @param eperson the eperson requesting the download
Expand Down Expand Up @@ -233,7 +233,7 @@ public List<String> getExportsAvailable(EPerson eperson)

/**
* Since the archive is created in a new thread we are unable to communicate
* with calling method about success or failure. We accomplis this
* with calling method about success or failure. We accomplish this
* communication with email instead. Send a success email once the export
* archive is complete and ready for download
*
Expand All @@ -248,7 +248,7 @@ public void emailSuccessMessage(Context context, EPerson eperson,

/**
* Since the archive is created in a new thread we are unable to communicate
* with calling method about success or failure. We accomplis this
* with calling method about success or failure. We accomplish this
* communication with email instead. Send an error email if the export
* archive fails
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2210,7 +2210,7 @@ public void run() {
emailErrorMessage(eperson, exceptionString);
throw new Exception(e.getMessage());
} catch (Exception e2) {
// wont throw here
// won't throw here
}
} finally {
// Make sure the database connection gets closed in all conditions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public void emailSuccessMessage(Context context, EPerson eperson,

/**
* If a batch import is done in a new thread we are unable to communicate
* with calling method about success or failure. We accomplis this
* with calling method about success or failure. We accomplish this
* communication with email instead. Send an error email if the batch
* import fails
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ private Item itemFromHandleInput(Context context)
throws SQLException, Exception {
DtoMetadata dtom = getMetadataField("dc.identifier.uri");
if (dtom == null) {
throw new Exception("No dc.identier.uri field found for handle");
throw new Exception("No dc.identifier.uri field found for handle");
}

this.addUndoMetadataField(dtom); //seed the undo list with the uri
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import java.util.Properties;

/**
* Bitstream filter targetting the THUMBNAIL bundle
* Bitstream filter targeting the THUMBNAIL bundle
*/
public class ThumbnailBitstreamFilter extends BitstreamFilterByBundleName {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import org.springframework.beans.factory.annotation.Autowired;

/**
* Action to send email to receipients provided in actionSendFilter. The email
* Action to send email to recipients provided in actionSendFilter. The email
* body will be result of templating actionSendFilter.
*/
public class LDNEmailAction implements LDNAction {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* "Offer", "coar-notify:IngestAction"
* "Offer", "coar-notify:ReviewAction"
*
* and their acknownledgements - if any
* and their acknowledgements - if any
*
* @author Francesco Bacchelli (francesco.bacchelli at 4science dot it)
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
package org.dspace.app.ldn.model;

/**
* Informations about the Offer and Acknowledgements targeting a specified Item
* Information about the Offer and Acknowledgements targeting a specified Item
*
* @author Francesco Bacchelli (francesco.bacchelli at 4science.com)
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public void setActions(List<LDNAction> actions) {
}

/**
* Lookup associated item to the notification context. If UUID in URL, lookup bu
* Lookup associated item to the notification context. If UUID in URL, lookup by
* UUID, else lookup by handle.
*
* @param context current context
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public File getImageFile(File f, boolean verbose)
// the thumbnail because the CropBox is generally used to define the
// area displayed when a user opens the PDF on a screen, whereas the
// MediaBox is used for print. Not all PDFs set these correctly, so
// we can use ImageMagick's default behavior unless we see an explit
// we can use ImageMagick's default behavior unless we see an explicit
// CropBox. Note: we don't need to do anything special to detect if
// the CropBox is missing or empty because pdfbox will set it to the
// same size as the MediaBox if it doesn't exist. Also note that we
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public SHERPAService() {
@SuppressWarnings("unused")
@PostConstruct
private void init() {
// Get endoint and API key from configuration
// Get endpoint and API key from configuration
endpoint = configurationService.getProperty("sherpa.romeo.url",
"https://v2.sherpa.ac.uk/cgi/retrieve");
apiKey = configurationService.getProperty("sherpa.romeo.apikey");
Expand Down Expand Up @@ -156,7 +156,7 @@ public SHERPAPublisherResponse performPublisherRequest(String type, String field

// If the response body is valid, pass to SHERPAResponse for parsing as JSON
if (null != responseBody) {
log.debug("Non-null SHERPA resonse received for query of " + value);
log.debug("Non-null SHERPA response received for query of " + value);
InputStream content = null;
try {
content = responseBody.getContent();
Expand Down Expand Up @@ -259,7 +259,7 @@ public SHERPAResponse performRequest(String type, String field, String predicate

// If the response body is valid, pass to SHERPAResponse for parsing as JSON
if (null != responseBody) {
log.debug("Non-null SHERPA resonse received for query of " + value);
log.debug("Non-null SHERPA response received for query of " + value);
InputStream content = null;
try {
content = responseBody.getContent();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import org.ehcache.event.CacheEventListener;

/**
* This is a EHCache listner responsible for logging sherpa cache events. It is
* This is a EHCache listener responsible for logging sherpa cache events. It is
* bound to the sherpa cache via the dspace/config/ehcache.xml file. We need a
* dedicated Logger for each cache as the CacheEvent doesn't include details
* about where the event occur
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public void setConfiguration(SHERPASubmitConfigurationService configuration) {
}

/**
* Setter for SHERPA service, reponsible for actual HTTP API calls
* Setter for SHERPA service, responsible for actual HTTP API calls
* @see "dspace-dspace-addon-sherpa-configuration-services.xml"
* @param sherpaService
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public static void generateSitemapsScheduled() throws IOException, SQLException
public static void deleteSitemaps() throws IOException {
File outputDir = new File(configurationService.getProperty("sitemap.dir"));
if (!outputDir.exists() && !outputDir.isDirectory()) {
log.error("Unable to delete sitemaps directory, doesn't exist or isn't a directort");
log.error("Unable to delete sitemaps directory, doesn't exist or isn't a directory");
} else {
FileUtils.deleteDirectory(outputDir);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ public String footer() {
}

/**
* Clean Stirngs for display in HTML
* Clean Strings for display in HTML
*
* @param s The String to clean
* @return The cleaned String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ public static String processLogs(Context context, String myLogDir,
// of the log file are sequential, but can we assume the files are
// provided in a data sequence?
for (i = 0; i < logFiles.length; i++) {
// check to see if this file is a log file agains the global regex
// check to see if this file is a log file against the global regex
Matcher matchRegex = logRegex.matcher(logFiles[i].getName());
if (matchRegex.matches()) {
// if it is a log file, open it up and lets have a look at the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ public static void processReport(Context context, Report report,
report.setEndDate(endDate);
report.setMainTitle(name, serverName);

// define our standard variables for re-use
// define our standard variables for reuse
// FIXME: we probably don't need these once we've finished re-factoring
Iterator<String> keys = null;
int i = 0;
Expand Down Expand Up @@ -518,7 +518,7 @@ public static void processReport(Context context, Report report,

/**
* a standard stats block preparation method for use when an aggregator
* has to be put out in its entirity. This method will not be able to
* has to be put out in its entirety. This method will not be able to
* deal with complex cases, although it will perform sorting by value and
* translations as per the map file if requested
*
Expand Down Expand Up @@ -783,7 +783,7 @@ public static String getItemInfo(Context context, String handle)
return null;
}

// build the referece
// build the reference
// FIXME: here we have blurred the line between content and presentation
// and it should probably be un-blurred
List<MetadataValue> title = itemService.getMetadata(item, MetadataSchemaEnum.DC.getName(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ private static synchronized void loadFileList(File[] fileList) {
* by the formatter provided, then we return null.
*
* @param thisFile file
* @param thisPattern patter
* @param thisPattern pattern
* @param sdf date format
* @return StatsFile
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public interface SuggestionService {
/** find a {@link SuggestionTarget } by source name and suggestion id */
public SuggestionTarget find(Context context, String source, UUID id);

/** count all suggetion targets by suggestion source */
/** count all suggestion targets by suggestion source */
public long countAll(Context context, String source);

/** find all suggestion targets by source (paged) */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ public static boolean authorizeNewAccountRegistration(Context context, HttpServl
throws SQLException {
if (DSpaceServicesFactory.getInstance().getConfigurationService()
.getBooleanProperty("user.registration", true)) {
// This allowSetPassword is currently the only mthod that would return true only when it's
// This allowSetPassword is currently the only method that would return true only when it's
// actually expected to be returning true.
// For example the LDAP canSelfRegister will return true due to auto-register, while that
// does not imply a new user can register explicitly
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public static void main(String[] argv)
// First argument is the Index path. Determine its version
String indexVersion = getIndexVersion(argv[0]);

// Second argumet is an optional version number to compare to
// Second argument is an optional version number to compare to
String compareToVersion = argv.length > 1 ? argv[1] : null;

// If indexVersion comes back as null, then it is not a valid index directory.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public static void main(String[] argv) throws SQLException, AuthorizeException,
private static void checkHelpEntered(Options options, CommandLine line) {
if (line.hasOption("h")) {
HelpFormatter formatter = new HelpFormatter();
formatter.printHelp("Intialize Entities", options);
formatter.printHelp("Initialize Entities", options);
System.exit(0);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class RegexPatternUtils {
* Computes a pattern starting from a regex definition with flags that
* uses the standard format: <code>/{regex}/{flags}</code> (ECMAScript format).
* This method can transform an ECMAScript regex into a java {@code Pattern} object
* wich can be used to validate strings.
* which can be used to validate strings.
* <br/>
* If regex is null, empty or blank a null {@code Pattern} will be retrieved
* If it's a valid regex, then a non-null {@code Pattern} will be retrieved,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public void reload() throws SubmissionConfigReaderException {
* <li>Hashmap of Collection to Submission definition mappings -
* defines which Submission process a particular collection uses
* <li>Hashmap of all Submission definitions. List of all valid
* Submision Processes by name.
* Submission Processes by name.
* </ul>
*/
private void buildInputs(String fileName) throws SubmissionConfigReaderException {
Expand Down Expand Up @@ -358,7 +358,7 @@ public SubmissionStepConfig getStepConfig(String stepID)
throws SubmissionConfigReaderException {
// We should already have the step definitions loaded
if (stepDefns != null) {
// retreive step info
// retrieve step info
Map<String, String> stepInfo = stepDefns.get(stepID);

if (stepInfo != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ protected String urlOfBitstream(HttpServletRequest request, Bitstream logo) {
*/
protected String resolveURL(HttpServletRequest request, DSpaceObject dso) {
// If no object given then just link to the whole repository,
// since no offical handle exists so we have to use local resolution.
// since no official handle exists so we have to use local resolution.
if (dso == null) {
if (baseURL == null) {
if (request == null) {
Expand Down
4 changes: 2 additions & 2 deletions dspace-api/src/main/java/org/dspace/app/util/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public static String encodeBitstreamName(String stringIn) throws java.io.Unsuppo
* @return the file size as a String
*/
public static String formatFileSize(double in) {
// Work out the size of the file, and format appropriatly
// Work out the size of the file, and format appropriately
// FIXME: When full i18n support is available, use the user's Locale
// rather than the default Locale.
NumberFormat nf = NumberFormat.getNumberInstance(Locale.getDefault());
Expand Down Expand Up @@ -238,7 +238,7 @@ public static UUID getUUIDParameter(HttpServletRequest request, String param) {
} catch (Exception e) {
// at least log this error to make debugging easier
// do not silently return null only.
log.warn("Unable to recoginze UUID from String \""
log.warn("Unable to recognize UUID from String \""
+ val + "\". Will return null.", e);
// Problem with parameter
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public interface OpenSearchService {
* @param start - start result index
* @param pageSize - page size
* @param scope - search scope, null or the community/collection
* @param results the retreived DSpace objects satisfying search
* @param results the retrieved DSpace objects satisfying search
* @param labels labels to apply - format specific
* @return formatted search results
* @throws IOException if IO error
Expand All @@ -105,7 +105,7 @@ public String getResultsString(Context context, String format, String query, int
* @param start - start result index
* @param pageSize - page size
* @param scope - search scope, null or the community/collection
* @param results the retreived DSpace objects satisfying search
* @param results the retrieved DSpace objects satisfying search
* @param labels labels to apply - format specific
* @return formatted search results
* @throws IOException if IO error
Expand Down
Loading

0 comments on commit cbea61c

Please sign in to comment.