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

Webservices with dataverse #4282

Closed
Thalia-Uranga opened this issue Nov 14, 2017 · 13 comments
Closed

Webservices with dataverse #4282

Thalia-Uranga opened this issue Nov 14, 2017 · 13 comments

Comments

@Thalia-Uranga
Copy link

Hello every all, Well, I am interesting about that by creating a dataset I can consult web services that give me back the data in json, they can be consulted by id but I would like some ideas of how I can do this, I have been told that I can do it with AJAX and JSON, but without modifying the Dataverse code that comes by default.

"As a user, I want to create a dataset and pick from a list of authors or language or type of publication, etc."

Thanks for your answer.
Regards
Thalia Ur Mtz

@pdurbin
Copy link
Member

pdurbin commented Nov 14, 2017

I encouraged @thalia25 to create an issue in the form of a user story at http://irclog.iq.harvard.edu/dataverse/2017-11-14#i_60217

She could probably use some help formulating user stories since the concept is new to her.

@edzale made a similar suggestion (but for LDAP) at #3622.

@Thalia-Uranga
Copy link
Author

Hello, At the moment I have the list of values but what I need is how to add the list of values to the label:

<p:selectManyCheckbox value="#{dsf.controlledVocabularyValues}" converter="controlledVocabularyValueConverter" layout="pageDirection">
<f:selectItem itemLabel="#{bundle.select}" class="chkbox-label-margin" itemValue="" noSelectionOption="true"/>
<f:selectItems value="#{dsf.datasetFieldType.controlledVocabularyValues}" var="cvv" itemLabel="#{cvv.strValue}" itemValue="#{cvv}" />
</p:selectManyCheckbox>

How can I do that?
Regards
Thalia Ur Mtz

captura de pantalla de 2017-12-04 11-23-12

@Thalia-Uranga
Copy link
Author

captura de pantalla de 2017-12-05 12-15-52
captura de pantalla de 2017-12-05 12-15-58

@jggautier
Copy link
Contributor

Hi @thalia25, I spoke with @scolapasta about adding controlled vocabulary terms from a remote source to Dataverse metadata fields, specifically the subjects. When we chatted on IRC earlier this week, you wrote that your team didn’t want have to modify the database. But we think there are lots of good reasons to do this (needing to call the web service every time the page loads might cause performance and reliability issues), and modifying the database with updated terms can be done through Dataverse’s APIs, so we would like to urge you to consider this.

Storing and updating copies of vocabulary terms is the approach we’re going to take for building more support for controlled vocabularies.

@Thalia-Uranga
Copy link
Author

I added some values to the database for the matter section and now I want to change the input by select to break down other values.
captura de pantalla de 2017-12-11 09-56-05

@Thalia-Uranga
Copy link
Author

github

@jggautier
Copy link
Contributor

jggautier commented Dec 11, 2017

Thanks! Pasting my reply from our IRC chat here: @pdurbin reminded us of an effort to improve Dataverse's documentation for changing metadata blocks (#3168).

The doc needs some work and we haven't had time unfortunately. But here's the doc that tries to explain how the metadata block .tsv files work.

@pdurbin
Copy link
Member

pdurbin commented Dec 11, 2017

@thalia25 it sounds like you'd like Author Affiliation to be a controlled vocabulary dropdown list like Identifier Scheme rather than a text box that the user types into. Because this is the citation metadata block, I'm hesitant to encourage you to customize how it works because it may make upgrading harder in the future. I don't know if we're planning any massive changes to the citation metadata block, but we have an assumption that installations of Dataverse leave it alone. All that said, you could probably look into how the Identifier Scheme field works to see how the GUI constructs a dropdown based on the field being a controlled vocabulary.

@Thalia-Uranga
Copy link
Author

@pdurbin If so, I want a drop-down list and also tried to interpret how it is programmed in XHTML and I see that they duplicate a code for all fields and does mention the values that correspond to it.

@scolapasta
Copy link
Contributor

For this what you'll want to do is change the the allows controlled vocabulary flag for that field (in datasetfieldtype) to true, then add the controlled vocabulary values to that table.

@RightInTwo
Copy link
Contributor

RightInTwo commented Jun 22, 2018

The issue #4772 proposes a gerneralized solution to use external API sources in the metadata.

@djbrooke
Copy link
Contributor

Hi @thalia25 and all, I'm going to close this as it's very similar to #4772 and #5938. I'll be doing some consolidation of issues in this space and I'll link up the consolidated issue here so we can discuss further if needed.

@djbrooke
Copy link
Contributor

#6030 created!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants