Open jimsafley opened 1 month ago
This will just convert to text, resources, and URIs? Not numeric data types or other types created by modules (Value Suggest controlled vocabulary entries, e.g.)?
How would a value be converted into an Omeka resource - by ID, by title?
I tried to convert a linked resource to text, but nothing happened. Nothing in the log about it.
Converting a numeric date to text worked. Converting a URI to text also worked (when it had no label).
When I intentionally tried a URI with a label, nothing happened, but I also got nothing in the log about it.
The code for logging that stuff is definitely there, so as long as you have the S log enabled. Note that the log file has to be writable by the server to log anything.
I was sure I had that all set up ages ago on this installation, but the file was set to 775; now 777. Is that what we recommend? I could be clearer about that in the manual.
Okay, I got a log entry for the URI with label > text test. And a log entry for resource > text. How should that one work?
This will just convert to text, resources, and URIs? Not numeric data types or other types created by modules (Value Suggest controlled vocabulary entries, e.g.)?
I've enabled the conversion of the native data types. I plan to enable types introduced by modules at a later date.
How would a value be converted into an Omeka resource - by ID, by title?
It will convert a value into a resource only if the value already has a resource ID attached to it. It has very specific utility.
And a log entry for resource > text. How should that one work?
A resource cannot be converted to text.
It will convert a value into a resource only if the value already has a resource ID attached to it.
I'm not clear what this means. How can a text or URI value "have a resource ID attached"?
If, for example, a module adds a resource-like data type that attaches a resource ID to the value. A user may want to convert from this module-added data type to the native resource data type.
If you have an example of one of our modules that operates like that, I can test it - if we don't currently have one, but a third party does, I can test that instead. Otherwise, I think I've covered all the bases and everything works as intended.
For documentation I've got: Text value > URI (if it's already a URI) URI > text (if it has no label) Resources cannot be converted to text or URI. Core text and URI values cannot be converted into a resource.
As well as NDT > text (into their ISO equivalents) ValueSuggest > URI but not text for external vocabs (VS sends a URI and a label) ValueSuggest > text but not URI for internal Omeka properties (currently it sends the VS value as a URI with an empty label)
If you'd like me to mention those module details, I can remind users that NDT adds its own batch-conversion feature; maybe you could combine the module's dropdown into this dropdown in the future.
The convert-data-types branch adds the ability to batch-convert resource values from one data type to another data type. To test this, batch edit a few items, click on the "Convert data type" button at the bottom of the page, select a property and a target data type, and submit the form. Go to the items and see if the values have been converted. You should be able to convert more than one data type at a time.
Note that conversions are not possible when data would be lost. For example, a URI value with a label cannot be converted into a Text value because the label would be lost. In these situations, it ignores the conversion and adds a message to the application log describing what happened.