Skip to content

Commit

Permalink
Rename ocr to ocrd
Browse files Browse the repository at this point in the history
  • Loading branch information
markusweigelt committed Jun 26, 2023
1 parent 5cb74c5 commit 20c3d4e
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 57 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@
package org.kitodo.production.dto;

/**
* OCR workflow DTO object.
* Ocrd workflow DTO object.
*/
public class OCRWorkflowDTO extends BaseDTO {
public class OcrdWorkflowDTO extends BaseDTO {

private String file;
private String title;
private Boolean active = true;
private ClientDTO client;

/**
Expand Down Expand Up @@ -59,25 +58,6 @@ public void setTitle(String title) {
this.title = title;
}

/**
* Check if ocr workflow is active.
*
* @return whether ocr workflow is active or not
*/
public Boolean isActive() {
return this.active;
}

/**
* Set if ocr workflow is active.
*
* @param active
* whether ocr workflow is active or not
*/
public void setActive(boolean active) {
this.active = active;
}

/**
* Get client object.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,13 @@ public String save() {
}

/**
* Get list of ocr workflow filenames.
* Get list of OCR-D workflow filenames.
*
* @return list of ocr workflow filenames
* @return list of OCR-D workflow filenames
*/
public List<Path> getOCRWorkflowFilenames() {
try (Stream<Path> ocrWorkflowPaths = Files.walk(Paths.get(ConfigCore.getParameter(ParameterCore.DIR_OCRD_WORKFLOWS)))) {
return ocrWorkflowPaths.filter(f -> f.toString().endsWith(".sh"))
public List<Path> getOcrdWorkflowFilenames() {
try (Stream<Path> ocrdWorkflowPaths = Files.walk(Paths.get(ConfigCore.getParameter(ParameterCore.DIR_OCRD_WORKFLOWS)))) {
return ocrdWorkflowPaths.filter(f -> f.toString().endsWith(".sh"))
.map(Path::getFileName).sorted().collect(Collectors.toList());
} catch (IOException e) {
Helper.setErrorMessage(ERROR_LOADING_MANY, new Object[] {ObjectType.OCRD_WORKFLOW.getTranslationPlural() },
Expand All @@ -95,20 +95,20 @@ public List<Path> getOCRWorkflowFilenames() {
}

/**
* Get importConfiguration.
* Get OCR-D workflow.
*
* @return value of importConfiguration
* @return value of OCR-D workflow
*/
public OcrdWorkflow getOcrWorkflow() {
public OcrdWorkflow getOcrdWorkflow() {
return ocrdWorkflow;
}

/**
* Set ocrWorkflow.
* Set OCR-D workflow.
*
* @param ocrdWorkflow as org.kitodo.data.database.beans.OCRWorkflow
* @param ocrdWorkflow as org.kitodo.data.database.beans.OcrdWorkflow
*/
public void setOcrWorkflow(OcrdWorkflow ocrdWorkflow) {
public void setOcrdWorkflow(OcrdWorkflow ocrdWorkflow) {
this.ocrdWorkflow = ocrdWorkflow;
}

Expand Down
14 changes: 7 additions & 7 deletions Kitodo/src/main/resources/messages/messages_de.properties
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ createNewspaperProcessesTask=Anlegen von Zeitungsvorg\u00E4ngen
createNewBatchFromSelectedProcesses=Neuen Batch aus den gew\u00E4hlten Vorg\u00E4ngen erzeugen
createNewDocket=Neuen Laufzettel anlegen
createNewLdapGroup=Neue LDAP-Gruppe anlegen
createNewOCRWorkflow=Neuen OCR Workflow anlegen
createNewOcrdWorkflow=Neuen OCR-D Workflow anlegen
createNewProcess=Einen neuen Vorgang anlegen
createNewProcessFromTemplate=Einen neuen Vorgang auf Basis der Produktionsvorlage anlegen
createNewRuleset=Neuen Regelsatz anlegen
Expand Down Expand Up @@ -817,7 +817,7 @@ newProcess.titleGeneration.creationRuleNotFound=Es konnte keine Regel zur Titelg
newProject=Neues Projekt
newRole=Neue Rolle
newRuleSet=Neuer Regelsatz
newOCRWorkflow=Neuer OCR Workflow
newOcrdWorkflow=Neuer OCR-D Workflow
newspaperMigrationTask=Migriere Zeitung
newTemplate=Neue Produktionsvorlage
newUser=Neuer Benutzer
Expand Down Expand Up @@ -895,7 +895,7 @@ position=Position
ppn=PPN
priority=Priorit\u00E4t
process=Vorgang
processConfig.useProcessTemplateOCRWorkflow=Produktionsvorlage spezifisch
processConfig.useProcessTemplateOcrdWorkflow=Produktionsvorlage spezifisch
processData=Vorgangsdaten
processDetails=Vorgangsdetails
processList=Vorgangsliste
Expand Down Expand Up @@ -1206,7 +1206,7 @@ addImportConfiguration=Importkonfiguration hinzufügen
addLdapGroup=LDAP-Gruppe hinzuf\u00FCgen
addLdapServer=LDAP-Server hinzuf\u00FCgen
addMappingFile=Abbildungsdatei hinzufügen
addOCRWorkflow=OCR Workflow hinzuf\u00FCgen
addOcrdWorkflow=OCR-D Workflow hinzuf\u00FCgen
addProcess=Vorgang hinzuf\u00FCgen
addProject=Projekt hinzuf\u00FCgen
addProjects=Projekte hinzuf\u00FCgen
Expand All @@ -1233,7 +1233,7 @@ deleteImportConfiguration=Importkonfiguration löschen
deleteLdapGroup=LDAP-Gruppe l\u00F6schen
deleteLdapServer=LDAP-Server l\u00F6schen
deleteMappingFile=Abbildungsdatei löschen
deleteOCRWorkflow=OCR Workflow l\u00F6schen
deleteOcrdWorkflow=OCR-D Workflow l\u00F6schen
deleteProcess=Vorgang l\u00F6schen
deleteProject=Projekt l\u00F6schen
deleteProperty=Eigenschaft l\u00F6schen
Expand All @@ -1257,7 +1257,7 @@ editImportConfiguration=Importkonfiguration bearbeiten
editLdapGroup=LDAP-Gruppe bearbeiten
editLdapServer=LDAP-Server bearbeiten
editMappingFile=Abbildungsdatei bearbeiten
editOCRWorkflow=OCR Workflow bearbeiten
editOcrdWorkflow=OCR-D Workflow bearbeiten
editProcess=Vorgang bearbeiten
editProcessMetaData=Metadaten des Vorgangs bearbeiten
editProcessStructureData=Strukturdaten des Vorgangs bearbeiten
Expand Down Expand Up @@ -1306,7 +1306,7 @@ viewLdapGroup=LDAP-Gruppe anzeigen
viewLdapServer=LDAP-Server anzeigen
viewMappingFile=Abbildungsdatei anzeigen
viewMigration=Migrationsseite anzeigen
viewOCRWorkflow=OCR Workflow anzeigen
viewOcrdWorkflow=OCR-D Workflow anzeigen
viewProcess=Vorgang anzeigen
viewProcessMetaData=Metadaten des Vorgangs anzeigen
viewProcessStructureData=Strukturdaten des Vorgangs anzeigen
Expand Down
6 changes: 3 additions & 3 deletions Kitodo/src/main/resources/messages/messages_en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ confirmDeleteMappingFile=Delete mapping file "{0}"?
confirmDeleteProcess=Delete process "{0}"?
confirmDeleteProject=Delete project "{0}"?
confirmDeleteRuleset=Delete ruleset "{0}"?
confirmDeleteOCRWorkflow=Delete OCR Workflow "{0}"?
confirmDeleteOcrdWorkflow=Delete OCR-D Workflow "{0}"?
confirmDeleteTemplate=Delete template "{0}"?
confirmDeleteUser=Delete user "{0}"?
confirmDeleteUserWithTasks=If you delete this user "{0}", all tasks assigned to him will be reset to 'Open'. Do you want to continue?"
Expand Down Expand Up @@ -256,7 +256,7 @@ createNewspaperProcessesTask=Creation of processes for a newspaper
createNewBatchFromSelectedProcesses=create new batch of the selected processes
createNewDocket=Create new docket
createNewLdapGroup=Create new LDAP group
createNewOCRWorkflow=Create OCR workflow
createNewOcrdWorkflow=Create OCR-D workflow
createNewProcess=Create new process
createNewProcessFromTemplate=Create process from template
createNewRuleset=Create new rule set
Expand Down Expand Up @@ -821,7 +821,7 @@ newProcess.titleGeneration.creationRuleNotFound=No title creation rules found fo
newProject=New project
newRole=New role
newRuleSet=New rule set
newOCRWorkflow=New OCR workflow
newOcrdWorkflow=New OCR-D workflow
newspaperMigrationTask=Migrating newspaper
newTemplate=New process template
newWorkflow=New workflow
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@

<!--@elvariable id="item" type="org.kitodo.data.database.beans.OCRWorkflow"-->
<p:dataTable id="ocrdWorkflowTable"
value="#{OCRWorkflowListView.ocrWorkflows}"
value="#{OcrdWorkflowListView.ocrWorkflows}"
var="item"
styleClass="default-layout"
first="#{OCRWorkflowListView.firstRow}"
first="#{OcrdWorkflowListView.firstRow}"
lazy="true"
paginator="true"
resizableColumns="true"
Expand All @@ -48,33 +48,33 @@
width="70"
styleClass="actionsColumn">
<h:form id="actionForm">
<h:link id="viewOCRWorkflow"
outcome="ocrWorkflowEdit"
<h:link id="viewOcrdWorkflow"
outcome="ocrdWorkflowEdit"
styleClass="action"
title="#{msgs.view}"
rendered="#{SecurityAccessController.hasAuthorityToViewOCRWorkflow() and not SecurityAccessController.hasAuthorityToEditOCRWorkflow()}">
rendered="#{SecurityAccessController.hasAuthorityToViewOcrdWorkflow() and not SecurityAccessController.hasAuthorityToEditOcrdWorkflow()}">
<f:param name="id" value="#{item.id}"/>
<i class="fa fa-eye fa-lg"/>
</h:link>

<h:link id="editOCRWorkflow"
outcome="ocrWorkflowEdit"
<h:link id="editOcrdWorkflow"
outcome="ocrdWorkflowEdit"
styleClass="action"
title="#{msgs.edit}"
rendered="#{SecurityAccessController.hasAuthorityToEditOCRWorkflow()}">
rendered="#{SecurityAccessController.hasAuthorityToEditOcrdWorkflow()}">
<f:param name="id" value="#{item.id}"/>
<i class="fa fa-pencil-square-o fa-lg"/>
</h:link>

<p:commandLink id="deleteOcrdWorkflow"
action="#{OCRWorkflowListView.deleteById(item.id)}"
action="#{OcrdWorkflowListView.deleteById(item.id)}"
styleClass="action"
title="#{msgs.delete}"
rendered="#{SecurityAccessController.hasAuthorityToDeleteOCRWorkflow()}"
rendered="#{SecurityAccessController.hasAuthorityToDeleteOcrdWorkflow()}"
update="ocrdWorkflowTable">
<h:outputText><i class="fa fa-trash-o"/></h:outputText>
<p:confirm header="#{msgs.confirmDelete}"
message="#{OCRWorkflowEditView.formatString('confirmDeleteOCRWorkflow', item.title)}"
message="#{OcrdWorkflowEditView.formatString('confirmDeleteOcrdWorkflow', item.title)}"
icon="ui-icon-alert"/>
</p:commandLink>
</h:form>
Expand Down
2 changes: 1 addition & 1 deletion Kitodo/src/main/webapp/pages/ocrWorkflowEdit.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<ui:define name="contentHeader">
<h:outputScript name="js/save.js" target="body"/>
<h3 id="headerText">
<h:outputText value="#{msgs.createNewOCRWorkflow}" rendered="#{isCreateMode}"/>
<h:outputText value="#{msgs.createNewOcrdWorkflow}" rendered="#{isCreateMode}"/>
<h:outputText value="#{msgs.editOCRWorkflow} (#{OCRWorkflowEditView.ocrdWorkflow.title})"
rendered="#{isEditMode}"/>
<h:outputText value="#{msgs.viewOCRWorkflow} (#{OCRWorkflowEditView.ocrdWorkflow.title})"
Expand Down
4 changes: 2 additions & 2 deletions Kitodo/src/main/webapp/pages/projects.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@
<p:menuitem value="#{msgs['mappingFile.new']}" action="#{MappingFileListView.newMappingFile()}" immediate="true"
rendered="#{SecurityAccessController.hasAuthorityToAddMappingFile()}"
id="newMappingFileButton" icon="fa fa-plus"/>
<p:menuitem value="#{msgs.newOCRWorkflow}" action="#{OCRWorkflowListView.newOCRWorkflow()}" immediate="true"
<p:menuitem value="#{msgs.newOcrdWorkflow}" action="#{OcrdWorkflowListView.newOcrdWorkflow()}" immediate="true"
rendered="#{SecurityAccessController.hasAuthorityToAddOCRWorkflow()}"
id="newOCRWorkflowButton" icon="fa fa-plus"/>
id="newOcrdWorkflowButton" icon="fa fa-plus"/>
</p:menuButton>
</h:form>
</ui:define>
Expand Down

0 comments on commit 20c3d4e

Please sign in to comment.