Skip to content

Commit

Permalink
Merge pull request #4627 from inception-project/refactoring/4550-Clea…
Browse files Browse the repository at this point in the history
…n-up-code

#4550 - Clean up code
  • Loading branch information
reckart authored Mar 15, 2024
2 parents 1190bb7 + d59186a commit 0f15022
Show file tree
Hide file tree
Showing 16 changed files with 58 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ public class FullUnitizingAgreementResult
{
private static final long serialVersionUID = 2092691057728349705L;

public FullUnitizingAgreementResult(String aType, String aFeature, IUnitizingAnnotationStudy aStudy,
List<String> aCasGroupIds, boolean aExcludeIncomplete)
public FullUnitizingAgreementResult(String aType, String aFeature,
IUnitizingAnnotationStudy aStudy, List<String> aCasGroupIds, boolean aExcludeIncomplete)
{
super(aType, aFeature, aStudy, aCasGroupIds, aExcludeIncomplete);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ public AnnotationPreferencesDialogContent(String aId, IModel<AnnotatorState> aMo
editorChoices = getEditorChoices();
onChangeAction = aOnChangeAction;

form = new Form<>("form", new CompoundPropertyModel<>(loadPreferences(stateModel.getObject())));
form = new Form<>("form",
new CompoundPropertyModel<>(loadPreferences(stateModel.getObject())));

var windowSizeField = new NumberTextField<Integer>("windowSize");
windowSizeField.setType(Integer.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,18 @@ org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=11
org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false
org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647
org.eclipse.jdt.core.formatter.align_selector_in_method_invocation_on_expression_first_line=false
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns=false
org.eclipse.jdt.core.formatter.align_with_spaces=false
org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16
org.eclipse.jdt.core.formatter.alignment_for_annotations_on_enum_constant=49
org.eclipse.jdt.core.formatter.alignment_for_annotations_on_field=49
org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable=49
org.eclipse.jdt.core.formatter.alignment_for_annotations_on_method=49
org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package=49
org.eclipse.jdt.core.formatter.alignment_for_annotations_on_parameter=0
org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type=49
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
Expand All @@ -32,6 +40,8 @@ org.eclipse.jdt.core.formatter.alignment_for_conditional_expression_chain=0
org.eclipse.jdt.core.formatter.alignment_for_enum_constants=16
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_switch_case_with_arrow=0
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_switch_case_with_colon=0
org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16
org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
org.eclipse.jdt.core.formatter.alignment_for_module_statements=16
Expand All @@ -40,6 +50,7 @@ org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16
org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_permitted_types_in_type_declaration=37
org.eclipse.jdt.core.formatter.alignment_for_record_components=16
org.eclipse.jdt.core.formatter.alignment_for_relational_operator=0
org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
Expand All @@ -50,8 +61,10 @@ org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=37
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=37
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_record_declaration=37
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=37
org.eclipse.jdt.core.formatter.alignment_for_switch_case_with_arrow=0
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=36
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=36
org.eclipse.jdt.core.formatter.alignment_for_type_annotations=0
org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0
org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0
org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
Expand Down Expand Up @@ -80,7 +93,7 @@ org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=next_line
org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=next_line
org.eclipse.jdt.core.formatter.brace_position_for_record_constructor=next_line
org.eclipse.jdt.core.formatter.brace_position_for_record_declaration=next_line
org.eclipse.jdt.core.formatter.brace_position_for_record_declaration=next_line_on_wrap
org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=next_line
org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped=false
Expand All @@ -100,6 +113,7 @@ org.eclipse.jdt.core.formatter.comment.indent_tag_description=false
org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
org.eclipse.jdt.core.formatter.comment.insert_new_line_between_different_tags=do not insert
org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
org.eclipse.jdt.core.formatter.comment.javadoc_do_not_separate_block_tags=false
org.eclipse.jdt.core.formatter.comment.line_length=100
org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
Expand Down Expand Up @@ -172,6 +186,7 @@ org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arg
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_permitted_types=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_record_components=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_switch_case_expressions=insert
Expand Down Expand Up @@ -263,6 +278,7 @@ org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_ar
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_permitted_types=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_record_components=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_switch_case_expressions=do not insert
Expand Down Expand Up @@ -341,11 +357,13 @@ org.eclipse.jdt.core.formatter.keep_lambda_body_block_on_one_line=one_line_never
org.eclipse.jdt.core.formatter.keep_loop_body_block_on_one_line=one_line_never
org.eclipse.jdt.core.formatter.keep_method_body_on_one_line=one_line_never
org.eclipse.jdt.core.formatter.keep_record_constructor_on_one_line=one_line_never
org.eclipse.jdt.core.formatter.keep_record_declaration_on_one_line=one_line_never
org.eclipse.jdt.core.formatter.keep_record_declaration_on_one_line=one_line_if_empty
org.eclipse.jdt.core.formatter.keep_simple_do_while_body_on_same_line=false
org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line=false
org.eclipse.jdt.core.formatter.keep_simple_getter_setter_on_one_line=false
org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line=false
org.eclipse.jdt.core.formatter.keep_switch_body_block_on_one_line=one_line_never
org.eclipse.jdt.core.formatter.keep_switch_case_with_arrow_on_one_line=one_line_never
org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
org.eclipse.jdt.core.formatter.keep_type_declaration_on_one_line=one_line_never
org.eclipse.jdt.core.formatter.lineSplit=100
Expand Down Expand Up @@ -386,5 +404,6 @@ org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
org.eclipse.jdt.core.formatter.wrap_before_relational_operator=true
org.eclipse.jdt.core.formatter.wrap_before_shift_operator=true
org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true
org.eclipse.jdt.core.formatter.wrap_before_switch_case_arrow_operator=false
org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
eclipse.preferences.version=1
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
formatter_profile=_DKPro Style
formatter_settings_version=20
formatter_settings_version=23
sp_cleanup.add_default_serial_version_id=true
sp_cleanup.add_generated_serial_version_id=false
sp_cleanup.add_missing_annotations=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ public class SpanDiffAdapter
public static final SpanDiffAdapter SENTENCE_DIFF_ADAPTER = new SpanDiffAdapter(
Sentence.class.getName());

public static final SpanDiffAdapter POS_DIFF_ADAPTER = new SpanDiffAdapter(
POS.class.getName(), "PosValue", "coarseValue");
public static final SpanDiffAdapter POS_DIFF_ADAPTER = new SpanDiffAdapter(POS.class.getName(),
"PosValue", "coarseValue");

public static final SpanDiffAdapter NER_DIFF_ADAPTER = new SpanDiffAdapter(
NamedEntity.class.getName(), "value", "identifier");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public boolean isHideScore()
{
return hideScore;
}

public void setHideScore(boolean aHideScore)
{
hideScore = aHideScore;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@ public JsonNode onSubscribeToAnnotationDocument(SimpMessageHeaderAccessor aHeade
vps.addSubscription(aHeaderAccessor.getSessionId(),
aHeaderAccessor.getSubscriptionId());

var json = render(project, aDocumentId, aDataOwner, aViewportBegin, aViewportEnd, aFormat);
var json = render(project, aDocumentId, aDataOwner, aViewportBegin, aViewportEnd,
aFormat);
vps.setJson(json);
return json;
}
Expand Down Expand Up @@ -270,8 +271,8 @@ public JsonNode onSubscribeToAnnotationDocument(SimpMessageHeaderAccessor aHeade
// }
// }

private JsonNode render(Project aProject, long aDocumentId, String aDataOwner, int aViewportBegin,
int aViewportEnd, String aFormat)
private JsonNode render(Project aProject, long aDocumentId, String aDataOwner,
int aViewportBegin, int aViewportEnd, String aFormat)
throws IOException
{
var doc = documentService.getSourceDocument(aProject.getId(), aDocumentId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ include::{include-dir}formats-uimajson.adoc[leveloffset=+2]

include::{include-dir}formats-uimajson-legacy.adoc[leveloffset=+2]

include::{include-dir}formats-rdfcas.adoc.adoc[leveloffset=+2]
include::{include-dir}formats-rdfcas.adoc[leveloffset=+2]

include::{include-dir}formats-uimaxmi.adoc[leveloffset=+2]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ boolean canViewAnnotationDocument(String aUser, String aProjectId, long aDocumen
boolean canEditAnnotationDocument(String aUser, String aProjectId, long aDocumentId,
String aAnnotator);

void assertCanEditAnnotationDocument(User aSessionOwner,
SourceDocument aDocument, String aDataOwner)
void assertCanEditAnnotationDocument(User aSessionOwner, SourceDocument aDocument,
String aDataOwner)
throws AccessDeniedException;

boolean canExportAnnotationDocument(User aUser, Project aProject);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
*/
@ConfigurationProperties("repository")
@ManagedResource
public class RepositoryPropertiesImpl implements RepositoryProperties
public class RepositoryPropertiesImpl
implements RepositoryProperties
{
private File path;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

@Configuration
@ConditionalOnProperty(prefix = "recommender.azureai-openai", name = "enabled", //
havingValue = "true", matchIfMissing = false)
havingValue = "true", matchIfMissing = false)
public class AzureAiOpenAiRecommenderAutoConfiguration
{
@Bean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ public InputStream openResourceStream(File aDocFile, String aResourcePath) throw
}
}

private static SingleBody getResourcePartBody(Message message, String aResourcePath) throws IOException
private static SingleBody getResourcePartBody(Message message, String aResourcePath)
throws IOException
{
if (message.getBody() instanceof Multipart body) {
var documentPart = body.getBodyParts().stream() //
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ public void execute()
}
}

private void addProcessingMetadataAnnotation(SourceDocument doc, CAS cas) throws AnnotationException
private void addProcessingMetadataAnnotation(SourceDocument doc, CAS cas)
throws AnnotationException
{
var metadataAnnotationCache = new HashMap<AnnotationLayer, AnnotationBaseFS>();
for (var metadataEntry : processingMetadata.entrySet()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public BulkRecommenderPanel(String aId, IModel<Project> aModel)
.setRequired(true));

processingMetadata = new FeatureEditorPanel("processingMetadata");
processingMetadata.setOutputMarkupPlaceholderTag(true);
processingMetadata.setOutputMarkupPlaceholderTag(true);
queue(processingMetadata);

var docMetaLayers = LoadableDetachableModel.of(this::listDocumentMetadataLayers);
Expand All @@ -112,7 +112,7 @@ private void actionStartProcessing(AjaxRequestTarget aTarget, Form<FormData> aFo
for (var state : processingMetadata.getModelObject()) {
metadata.put(state.getFeature(), state.getValue());
}

var formData = aForm.getModelObject();
schedulingService.enqueue(BulkPredictionTask.builder() //
.withSessionOwner(userService.getCurrentUser()) //
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ public FeatureEditorPanel(String aId, IModel<List<FeatureState>> aFeatureStates)
queue(createFeaturesList(CID_FEATURE_EDITORS, aFeatureStates));
}

private ListView<FeatureState> createFeaturesList(String aId, IModel<List<FeatureState>> aFeatureStates)
private ListView<FeatureState> createFeaturesList(String aId,
IModel<List<FeatureState>> aFeatureStates)
{
return new ListView<FeatureState>(aId, aFeatureStates)
{
Expand Down
14 changes: 11 additions & 3 deletions inception/installEclipseSettings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ function installPrefs {
installPrefs inception-active-learning
installPrefs inception-agreement
installPrefs inception-annotation-storage
installPrefs inception-annotation-storage-api
installPrefs inception-api-annotation
installPrefs inception-api-dao
installPrefs inception-api-editor
installPrefs inception-api-formats
installPrefs inception-api-render
installPrefs inception-api-schema
installPrefs inception-app-webapp
installPrefs inception-app.iml
installPrefs inception-boot-loader
installPrefs inception-bootstrap
installPrefs inception-brat-editor
Expand All @@ -33,6 +33,7 @@ installPrefs inception-curation
installPrefs inception-curation-legacy
installPrefs inception-diag
installPrefs inception-diam
installPrefs inception-diam-compactv2
installPrefs inception-diam-editor
installPrefs inception-diam-word-alignment-editor
installPrefs inception-doc
Expand All @@ -43,10 +44,12 @@ installPrefs inception-editor-api
installPrefs inception-example-imls-data-majority
installPrefs inception-experimental-editor
installPrefs inception-export
installPrefs inception-export-api
installPrefs inception-external-editor
installPrefs inception-external-search-core
installPrefs inception-external-search-elastic
installPrefs inception-external-search-mtas-embedded
installPrefs inception-external-search-opensearch
installPrefs inception-external-search-pubannotation
installPrefs inception-external-search-pubmed
installPrefs inception-external-search-solr
Expand All @@ -55,12 +58,13 @@ installPrefs inception-html-apache-annotator-editor
installPrefs inception-html-editor
installPrefs inception-html-recogito-editor
installPrefs inception-image
installPrefs inception-imls-azureai-openai
installPrefs inception-imls-dl4j
installPrefs inception-imls-elg
installPrefs inception-imls-external
installPrefs inception-imls-hf
installPrefs inception-imls-lapps
installPrefs inception-imls-openai
installPrefs inception-imls-ollama
installPrefs inception-imls-opennlp
installPrefs inception-imls-stringmatch
installPrefs inception-imls-weblicht
Expand All @@ -74,6 +78,7 @@ installPrefs inception-io-json
installPrefs inception-io-lif
installPrefs inception-io-nif
installPrefs inception-io-perseus
installPrefs inception-io-rdf
installPrefs inception-io-tcf
installPrefs inception-io-tei
installPrefs inception-io-text
Expand All @@ -88,6 +93,7 @@ installPrefs inception-log
installPrefs inception-log-ui
installPrefs inception-model
installPrefs inception-model-export
installPrefs inception-model-vdoc
installPrefs inception-pdf-editor
installPrefs inception-pdf-editor2
installPrefs inception-plugin-api
Expand All @@ -100,13 +106,15 @@ installPrefs inception-project-initializers
installPrefs inception-project-initializers-basic
installPrefs inception-project-initializers-doclabeling
installPrefs inception-project-initializers-sentencelabeling
installPrefs inception-project-initializers-ud
installPrefs inception-project-initializers-wikidatalinking
installPrefs inception-recommendation
installPrefs inception-recommendation-api
installPrefs inception-remote
installPrefs inception-review-editor
installPrefs inception-scheduling
installPrefs inception-schema
installPrefs inception-schema-api
installPrefs inception-search-core
installPrefs inception-search-mtas
installPrefs inception-security
Expand All @@ -126,8 +134,8 @@ installPrefs inception-ui-external-search
installPrefs inception-ui-kb
installPrefs inception-ui-monitoring
installPrefs inception-ui-project
installPrefs inception-ui-search
installPrefs inception-ui-scheduling
installPrefs inception-ui-search
installPrefs inception-ui-tagsets
installPrefs inception-versioning
installPrefs inception-websocket
Expand Down

0 comments on commit 0f15022

Please sign in to comment.