ejp-rd-vp / ejprd-resource-semantic-metadata-publisher

This is meant for checking resources metadata and validating the resources metadata
0 stars 0 forks source link

Code review #4

Open henrietteharmse opened 3 years ago

henrietteharmse commented 3 years ago

Some observations of on the code:

  1. You seem to have copied some website as basis to build this 1 from. Thus, there are lots of files that has no relevance for EJPRD. This will confuse any other developer who wants to use or extend this code. This needs to be cleaned up. 1.1. Most of the images under webapp/img can be deleted. 1.2. Under webapp/forms there are some .php files that are not used. 1.3 Most files under webapp/assets are not used.

  2. The class names in the project do not follow typical Java guidance on class names. See this. 2.1 Change SemerdServlet to SemanticERDServlet. 2.2 Move convertRDFJSON into convert package. 2.3 /convert/FileWriter - What is HDT? Make it more apparent what it is and why you are checking for it. 2.4 Rename FromRDF to RDFtoJsonLDConverter 2.5 Remove convert/Main class. 2.6 Move /convert/PublisherCommandLine to utils package 2.7 Move /utils/Report to validator package 2.8 Rename ShexVal to ShexValidator 2.9 In ShexVal rename method shexVal to doShexValidation

  3. Variable names 3.1 Write variable names out. I.e. in SerializePattern change p to pattern and m to matcher.

  4. Hardcodes 4.1 Remove hardcodes in SerializePattern 4.2 Remove hardcodes in ShexVal

  5. Unused code 5.1 Remove ReadByLine class as it is not used.

S2Ola commented 3 years ago

Actions:

All done

1.1. Most of the images under webapp/img can be deleted. 1.2. Under webapp/forms there are some .php files that are not used. 1.3 Most files under webapp/assets are not used.

The class names in the project do not follow typical Java guidance on class names. See this. 2.1 Change SemerdServlet to SemanticERDServlet. 2.2 Move convertRDFJSON into convert package. 2.3 /convert/FileWriter - What is HDT? Make it more apparent what it is and why you are checking for it. 2.4 Rename FromRDF to RDFtoJsonLDConverter 2.5 Remove convert/Main class. 2.6 Move /convert/PublisherCommandLine to utils package 2.7 Move /utils/Report to validator package 2.8 Rename ShexVal to ShexValidator 2.9 In ShexVal rename method shexVal to doShexValidation

Variable names 3.1 Write variable names out. I.e. in SerializePattern change p to pattern and m to matcher.

Unused code 5.1 Remove ReadByLine class as it is not used.