Skip to content

Defaults array#34

Merged
cledvina merged 13 commits intodevelopmentfrom
defaults-array
Sep 14, 2018
Merged

Defaults array#34
cledvina merged 13 commits intodevelopmentfrom
defaults-array

Conversation

@cledvina
Copy link
Copy Markdown
Collaborator

This is the twin to the changes in the profile editor that will work with the new data model-- the new data model being defaults (defaultURI and defaultLiteral) are no longer singletons. These two properties are combined into an object and pushed to the "defaults" array. We now can have multiple default values.

The changes basically will create a defaults array from singletons (if available) and continue on with filling in the form using the array. This way the update will work with both data models and all of the profiles will not need to be changed in advance.

As I pointed out earlier in an email, the lines that save the default triples to bfestore have been previously commented out. I didn't uncomment the commented out lines, figuring this was done for a reason. Therefore, the defaults never get stored or saved. It will be easy enough to get this to work again in the future.

@cledvina cledvina requested a review from kirkhess September 13, 2018 15:25
@cledvina
Copy link
Copy Markdown
Collaborator Author

I merged the validate stuff into this branch.

@cledvina
Copy link
Copy Markdown
Collaborator Author

These changes do pattern matching against valueConstrant.validatePattern property created in the profile editor. This uses simple HTML5 pattern validation (which is a regexp). If there is valueConstrant.validatePattern present for the property it will add a "pattern" attribute to the input box. Invalid entries will have red text until it matches. Also, if the input is invalid, it will raise an alert box saying so when clicking the "+" button, and the value will not be added to the store.

Copy link
Copy Markdown
Contributor

@kirkhess kirkhess left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The defaults were not working correctly, I think I fixed it in the latest commit. Basically, if you have a literal value there's should be no default uri.

The validation appears to work.

@kirkhess
Copy link
Copy Markdown
Contributor

I think 6956208 fixed everything.

@cledvina cledvina merged commit 85175c1 into development Sep 14, 2018
@kirkhess kirkhess deleted the defaults-array branch September 18, 2018 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants