openMINDS_core icon indicating copy to clipboard operation
openMINDS_core copied to clipboard

adding 'format' property to StringProperty?

Open lzehl opened this issue 3 years ago • 5 comments

Idea: a StringProperty is a user-defined key-value pair that assumes a string. It would be great if a user could define in addition the format of the string value he/she provided.

Example:

  • name: applicationDate
  • value: 2022-09-13T20:20:39+00:00
  • format: datetime

@apdavison @Peyman-N @UlrikeS91 what do you think?

lzehl avatar Sep 13 '22 12:09 lzehl

I support this!

UlrikeS91 avatar Sep 14 '22 09:09 UlrikeS91

@UlrikeS91 @apdavison @Peyman-N if we implement this should 'format' be optional or required?

lzehl avatar Nov 08 '22 09:11 lzehl

If it was required, we would need a "format" that represents the absence of it when there is just a string value used that doesn't follow a specific format. So, I would lean towards optional to avoid that.

UlrikeS91 avatar Nov 08 '22 10:11 UlrikeS91

optional

apdavison avatar Nov 14 '22 07:11 apdavison

@UlrikeS91 and @apdavison thanks. optional it is. Another question: a) Do we define a StringFormat schema that format links to? That schema should have the properties label and regex. b) Should we define this as controlledTerm and predefine there the most popular string formats? c) Leave this as string (which might end up in a mess).

lzehl avatar Dec 12 '22 15:12 lzehl