-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add translation support #11
Conversation
@@ -22,8 +22,7 @@ | |||
/** | |||
* A reader for LKMap INTERLIS transfer files. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PP: Kommentar anpassen
} | ||
if (!(viewable instanceof Table classDef)) { | ||
throw new IllegalArgumentException("Viewable is not an AbstractClassDef for object with id \"" + objectClass + "\"."); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PP: Die Variable viewable
kann sich auf ein beliebiges Element (nicht nur Viewables) beziehen. Ich würde es z.B. element
nennen und die Exception Messages auch entsprechend anpassen.
System.out.println("No viewable found for object with id \"" + iomObject.getobjectoid() + "\"."); | ||
return Optional.empty(); | ||
} | ||
if (!(viewable instanceof AbstractClassDef<?> classDef)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PP: gleich wie oben, Variable viewable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Q: Was hältst du davon, z.B. die Methoden für Translations in eine Helper-Klasse auszulagern?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Einfach so auslagern liessen sich nur getTranslatedAttributeOrRole und getTranslatedEnumValue.
getTranslatedPath hätte ich dann auch gerne ausgelagert aber das braucht noch den record PathElement.
Darum tendiere ich eher zu drinlassen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dann lassen wir es wie besprochen in der ObjectMapper Klasse.
No description provided.