These are chat archives for collectiveaccess/support

24th
Jun 2016
Kehan Harman
@kehh
Jun 24 2016 00:45
@tsitsibau the SimpleAPI works pretty well and gives you the opportunity of ensuring that certain access types are restricted, and you can also ensure that only fields you want to share are exposed via the API. You can take a look at some of our configurations here: https://github.com/rwahs/providence-configuration/blob/master/conf/services.conf
we then wrap those responses in a Single Page App https://github.com/rwahs/research-frontend
tsitsibau
@tsitsibau
Jun 24 2016 11:55
hello again
thanks @kehh ... it was very helpful, i'm now trying to use simple api
i've figured out how to do that so far... the only problem is how to get all object representations
Stefan
@stefankeidel
Jun 24 2016 12:05
They have a few media examples in there, for instance here: https://github.com/rwahs/providence-configuration/blob/master/conf/services.conf#L45
tsitsibau
@tsitsibau
Jun 24 2016 12:06
i tried these, but i get only primary image
Stefan
@stefankeidel
Jun 24 2016 12:08
I talked to @kehh about that exact issue just this week I think
tsitsibau
@tsitsibau
Jun 24 2016 12:22
i tried something like this...
Repres = ""<unit relativeTo="ca_object_representations" filterNonPrimaryRepresentations="0" delimiter="," returnAsArray="1"><unit>^ca_object_representations.media.original%returnURL=true</unit>|<unit>^ca_object_representations.media.preview170%returnURL=true</unit></unit>"",
but i am still getting 1 image
Stefan
@stefankeidel
Jun 24 2016 13:26
Again, this option is for ca_objects units only right now
tsitsibau
@tsitsibau
Jun 24 2016 13:27
let me make this clear... because i'm confused
i use simple api... and i want to fetch an object's information
and display all the representations of this object
can i do this?
tsitsibau
@tsitsibau
Jun 24 2016 13:56
i use the following without success
        Repres = <unit relativeTo="ca_object_representations" filterNonPrimaryRepresentations="0" delimiter="," returnAsArray="1"><unit>^ca_object_representations.media.original%returnURL=true</unit>|<unit>^ca_object_representations.media.preview170%returnURL=true</unit></unit>,
i also want to find related collections with public access
and i use the following without success
        Collection = <unit relativeTo="ca_collections" delimiter="," returnAsArray="1"  checkAccess="[1]"><unit>^ca_collections.preferred_labels.name</unit>|<unit>^ca_collections.collection_id</unit></unit>,
tsitsibau
@tsitsibau
Jun 24 2016 14:11
(it returns all of them)
sterlingjenson
@sterlingjenson
Jun 24 2016 17:48
Greetings all. I am running two different C/A instances, one of which is a recent copy of the production system. When I run a mapping on the testbed one, it seems to run just fine; however on the production system, I am getting an error. (i.e. cannot create add or update . . . foreign key constraint.) Any suggestions on how to figure out what the difference is?
I basically created a new mysql db for the testbed database, copied the providence files over to a new folder and updated the setup file
Stefan
@stefankeidel
Jun 24 2016 18:07
@sterlingjenson what's the FK error? @tsitsibau Some of these options won't work on units. You don't need to put checkAccess for each individual unit. Just put it in the service definition of the simpleAPI endpoint
There are working examples here: http://docs.collectiveaccess.org/wiki/SimpleAPI
sterlingjenson
@sterlingjenson
Jun 24 2016 18:09
via copy and paste: (2016-06- 24 09:12:09) [2004-0049- 0001] Could not add related storage location with
relationship location: Cannot add or update a child row: a foreign key constraint fails
fk_ca_objects_x_storage_locations_type_id FOREIGN KEY (type_id)
(providence.ca_objects_x_storage_locations, CONSTRAINT
REFERENCES ca_relationship_types (type_id)) [250]
Stefan
@stefankeidel
Jun 24 2016 18:10
Looks like the relationship type you're trying to use is missing
sterlingjenson
@sterlingjenson
Jun 24 2016 18:11
ah, I see. for object and collection storage relationships, it will be "related," correct?
Stefan
@stefankeidel
Jun 24 2016 18:12
That depends on your profile, but yeah -- that's the default type from base.xml
sterlingjenson
@sterlingjenson
Jun 24 2016 18:13
thanks.
Jesse
@blackadder78
Jun 24 2016 18:40
I'm running a data import, and I'm trying to use the option applyRegularExpressions to convert a file name to an object idno. I can't get the regular expression to apply - it is simply importing the file name as the idno. Here's the text of my applyRegularExpressions statement:
{"applyRegularExpressions": [{"match": "(NYSA_A1810-78_V15_[0-9]{4})_.+", "replaceWith": "\\1"}]}
Can you tell what I'm doing wrong?
ericwm
@eriwm
Jun 24 2016 19:30
@collectiveaccess Hi, I have just run git pull again and now when I try to preview a pdf document I get the tool bar at the top of the screen, the thumbnails of the pages on the left hand side of the screen but only the small rotating block in the main screen so some improvement from my previous post.