Skip to content
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

Should we use @container:@set to ensure arrays? #26

Closed
azaroth42 opened this issue Apr 18, 2017 · 7 comments
Closed

Should we use @container:@set to ensure arrays? #26

azaroth42 opened this issue Apr 18, 2017 · 7 comments
Labels
API The issue is about an API or service enhancement The issue describes an improvement to existing functionality or new functionality priority The issue is high priority for coming to a solution

Comments

@azaroth42
Copy link
Collaborator

As demonstrated by @workergnome here:
https://gist.github.com/workergnome/e6e5bc219c7349ad64190b18e551e051

The trade-off is between having to test for the type and having lots of singleton arrays everywhere.

The equivalent discussion in IIIF is: IIIF/api#1131

@azaroth42 azaroth42 added enhancement The issue describes an improvement to existing functionality or new functionality API The issue is about an API or service labels Apr 18, 2017
@azaroth42 azaroth42 added the priority The issue is high priority for coming to a solution label Jun 27, 2017
@azaroth42
Copy link
Collaborator Author

Tagging as priority as it will break all of our JSON. We should make it before it gets even harder to change.

Thankfully the cromulent library can take care of the serialization invisibly ... but anyone with other code / pipelines might have a lot of work to do.

@workergnome
Copy link
Contributor

None of my pipelines will have problems, since they're native RDF and use framing to take care of this. And the read scripts need to accommodate arrays OR objects, so they're already prepared for this. It will make it easier for everyone I the future, though.

I'm a strong yes on this.

@azaroth42
Copy link
Collaborator Author

My main misgiving is type. It seems painful to always have an array of one, other than the single case of [EndOfExistence, Activity] caused by the crazy inconsistency of CRM.

Other questions are:

  • format -- if a resource has content negotiation, should it be able to have multiple formats?
  • Should label and description be language maps?
    • value can't be a language map, as it can contain integers ... so LinguisticObject.value would be inconsistent with label, requiring the full {"@value":"", "@language":""} construction

I'll try and implement in crom as an optional flag and turn it on in a branch.

@azaroth42
Copy link
Collaborator Author

azaroth42 marks this issue as being discussed in slack

@azaroth42
Copy link
Collaborator Author

My first cut at a profile for whether properties should be multiples or not:

Property Multiples?
P1_is_identified_by yes
P1i_identifies no
P2_has_type yes
P4_has_time-span no
P7_took_place_at yes
P9_consists_of yes
P9i_forms_part_of yes
P12_occurred_in_the_presence_of yes
P12i_was_present_at yes
P14i_performed yes
P14_carried_out_by yes
P15i_influenced yes
P15_was_influenced_by yes
P16_used_specific_object yes
P16i_was_used_for yes
P20i_was_purpose_of yes
P20_had_specific_purpose yes
P22_transferred_title_to no
P22i_acquired_title_through yes
P23i_surrendered_title_through yes
P23_transferred_title_from no
P24_transferred_title_of yes
P24i_changed_ownership_through yes
P28i_surrendered_custody_through yes
P28_custody_surrendered_by no
P29i_received_custody_through yes
P29_custody_received_by no
P30i_custody_transferred_through yes
P30_transferred_custody_of yes
P32_used_general_technique yes
P32i_was_technique_of yes
P43i_is_dimension_of no
P43_has_dimension yes
P45_consists_of yes
P45i_is_incorporated_in yes
P46_is_composed_of yes
P46i_forms_part_of yes
P50i_is_current_keeper_of yes
P50_has_current_keeper no
P52i_is_current_owner_of yes
P52_has_current_owner no
P55i_currently_holds yes
P55_has_current_location no
P56i_is_found_on no
P56_bears_feature yes
P62i_is_depicted_by yes
P62_depicts yes
P65_shows_visual_item yes
P65i_is_shown_by yes
P67_refers_to yes
P67i_is_referred_to_by yes
P72_has_language yes
P72i_is_language_of yes
P75i_is_possessed_by no
P75_possesses yes
P81b_begin_of_the_end no
P81a_end_of_the_begin no
P82b_end_of_the_end no
P82a_begin_of_the_begin no
P89_falls_within yes
P89i_contains yes
P91_has_unit no
P92i_was_brought_into_existence_by no
P92_brought_into_existence yes
P93_took_out_of_existence yes
P93i_was_taken_out_of_existence_by no
P94i_was_created_by no
P94_has_created yes
P95_has_formed yes
P95i_was_formed_by no
P104_is_subject_to yes
P104i_applies_to no
P105_right_held_by no
P105i_has_right_on yes
P106i_forms_part_of yes
P106_is_composed_of yes
P107i_is_current_or_former_member_of yes
P107_has_current_or_former_member yes
P108i_was_produced_by no
P108_has_produced yes
P120i_occurs_after yes
P120_occurs_before yes
P128_carries yes
P128i_is_carried_by yes
P129i_is_subject_of yes
P129_is_about yes
P134i_was_continued_by yes
P134_continued yes
P138i_has_representation yes
P138_represents yes
P140i_was_attributed_by yes
P140_assigned_attribute_to no
P141i_was_assigned_by yes
P141_assigned no
P143_joined no
P143i_was_joined_by yes
P144_joined_with no
P144i_gained_member_by yes
P145_separated no
P145i_left_by yes
P146_separated_from no
P146i_lost_member_by yes
P148i_is_component_of yes
P148_has_component yes
P180i_was_currency_of yes
P180_has_currency no
rdfs:label no
dcterms:conformsTo no
dcterms:relation yes
pi:paid_amount no
dcterms:subject yes
pi:paid_to no
pi:paid_from no
skos:exactMatch yes
rdf:value no
dc:format no
dc:description no

@azaroth42
Copy link
Collaborator Author

Re @type as @container:@set: json-ld/json-ld.org#512

@azaroth42
Copy link
Collaborator Author

Done, and explained in the context design section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API The issue is about an API or service enhancement The issue describes an improvement to existing functionality or new functionality priority The issue is high priority for coming to a solution
Projects
None yet
Development

No branches or pull requests

2 participants