SKOS template/example for importing Places, Subjects, etc? Or some troubleshooting help?

232 views
Skip to first unread message

ty...@lre-tech.com

unread,
Apr 3, 2014, 4:37:14 PM4/3/14
to ica-ato...@googlegroups.com
Hi all,

I am less familiar with SKOS XML and while there is a depth of very detailed material that I have perused on the specification, I am having trouble coming up with valid XML import files for the simple purpose of importing a set of very basic terms into a taxonomy.

My goal is to import a batch of named Subjects, as well as a batch of named Places.  It also would be nice to be able to import information into Scope note(s), Source note(s), Display note(s), Use for.  But I'm having trouble even just importing any SKOS, attributed to my lack of familiarity with the standard.

Basing SKOS import files on single SKOS exports, I came up with this sort of thing, replacing the real url with (url) and a named item with (x) for the sake of demonstrating the concepts.  It does not import, nor do versions with various tag sections removed.  If anyone has any sort of template for importing a batch of Subjects and Places, it would be very helpful, or even just some direction as to where I'm going wrong. 

Also, do the URLs in "<skos:Concept rdf:about="(url)/(x)">" get automatically created when being imported?  And am I correct in assuming that importing an SKOS with multiple <skos:Concept> tags will import multiple Places (or Subjects).

===========

<?xml version="1.0" encoding="utf-8" ?>
<rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
  xmlns:skos="http://www.w3.org/2004/02/skos/core#"
  xmlns:dc="http://purl.org/dc/elements/1.1/">

  <skos:ConceptScheme rdf:about="(url)/places">

                  <dc:title xml:lang="ca">Llocs</dc:title>
                        <dc:title xml:lang="de">Orte</dc:title>
                        <dc:title xml:lang="en">Places</dc:title>
                        <dc:title xml:lang="es">Lugares</dc:title>
                        <dc:title xml:lang="fa">مكان ها</dc:title>
                        <dc:title xml:lang="fr">Lieux</dc:title>
                        <dc:title xml:lang="gl">Lugares</dc:title>
                        <dc:title xml:lang="id">Tempat</dc:title>
                        <dc:title xml:lang="it">Luoghi</dc:title>
                        <dc:title xml:lang="ja">場所</dc:title>
                        <dc:title xml:lang="ka">ადგილები</dc:title>
                        <dc:title xml:lang="ko">장소</dc:title>
                        <dc:title xml:lang="nl">Plaatsen</dc:title>
                        <dc:title xml:lang="pl">Miejsca</dc:title>
                        <dc:title xml:lang="pt">locais</dc:title>
                        <dc:title xml:lang="pt_BR">locais</dc:title>
                        <dc:title xml:lang="sl">Kraji</dc:title>
                        <dc:title xml:lang="th">สถานที</dc:title>
         
          <skos:hasTopConcept rdf:resource="(url)"/>
   
  </skos:ConceptScheme>

    <skos:Concept rdf:about="(url)/(x)">

                        <skos:prefLabel xml:lang="en">(x)</skos:prefLabel>
             
     
      <skos:inScheme rdf:resource="(url)/places"/>

============

Alternatively, any simple example of a valid SKOS that can be imported into Atom would be extremely valuable.

Thank you very much.

Dan Gillean

unread,
Apr 3, 2014, 8:19:10 PM4/3/14
to ica-ato...@googlegroups.com
Hi Tyler,

The AtoM SKOS implementation is fairly basic - I'm sure there is plenty more RDF complexity you could have in a SKOS file that is not currently supported in AtoM. For reference, I am attaching a SKOS file of Places I created in AtoM and managed to roundtrip (export, delete in AtoM, reimport successfully) using AtoM 2.0.1.

It's some silly test data based on the Canadian province of Alberta, but I have tried in some of the top-level terms to include related terms, alternate labels, scope notes, etc.

As you can see in the attached example, you are correct - multiple <skos:Concept> elements will import multiple terms.

I have discovered that the Source notes will not roundtrip - they are not exported with the description. Upon re-import, the URL of the source of the export is automatically added to the Source notes field - in this case, the same URL that the resource appeared at after being deleted and reimported. Our source field in the template is a free-text multi-value field, so this appears to be a bug. I forgot to add Display notes in the test set to test the behavior of those, but I'll try to look into it further soon.

We have a "code" field in the template as well, which does not export -  this is a feature that was added in an early version of 1.x and not maintained or developed further, but if you add lat/long coordinates to the field, a static Google map will be generated when the record is saved. Unfortunately this data can't be roundtripped at the moment.

Information on working with terms in AtoM can be found here: https://www.accesstomemory.org/docs/2.0/user-manual/add-edit-content/terms/#terms

I haven't yet had a chance to add new documentation for imports (I'm getting there!).


I think the idea of having a CSV template for importing Places/Subjects is a very good one, which I would love to see developed for AtoM. If you are a developer, or have access to one, and intend to tackle this, feel free to ask for further help in the User Forum! Alternatively, if your institution is interested in sponsoring the development of such a template, please feel free to contact me off-list, and Artefactual can always prepare a quote for you.

In the meantime, my hope is that using the attached sample as a template, you'll be able to create a SKOS xml file that you can successfully import into your AtoM instance.

Hope that helps!

Regards,

Dan Gillean, MAS, MLIS
AtoM Product Manager / Systems Analyst,
Artefactual Systems, Inc.
604-527-2056
@accesstomemory


--
You received this message because you are subscribed to the Google Groups "ICA-AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To post to this group, send email to ica-ato...@googlegroups.com.
Visit this group at http://groups.google.com/group/ica-atom-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/4cf2581e-1780-4656-bc9a-1c707310f4e1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

alberta-2;skos.xml

ty...@lre-tech.com

unread,
Apr 4, 2014, 6:10:05 PM4/4/14
to ica-ato...@googlegroups.com
Thanks Dan!

I appreciate this very much.  Right off the bat, do you know what would cause this error?

===
Fatal error: Call to a member function __get() on a non-object in /mnt/atom-hosting/rbcm/atom-de7b13ac31a82e2492aa7e060ea1bcc9a2f7871b/lib/model/om/BaseObject.php on line 483
===

What modifications would be needed on this XML file to be imported on any Atom instance?  Changing the root of the address (http://2x.test.artefactual.com/) to match the instance it's being imported to?  I tried that which yielded the same error.  I am using the SKOS Import page.

Dan Gillean

unread,
Apr 4, 2014, 8:21:55 PM4/4/14
to ica-ato...@googlegroups.com
Hello again Tyler,

You got that error from attempting to import the sample SKOS file I sent? The 2x URL shouldn't be the cause - this is just meant to point back to the original source of the file. I will have to ask a developer to take a look - but in the meantime, have you tried performing the import in Debug mode, to see if you can get a more verbose error report? Debug mode still works the same in AtoM 2.

To my untrained eyes, it appears to be a PHP error, so you might also try using a phpinfo() - see here.

On Monday I will try to ping a developer to take a look. If you discover anything more in the meantime, let us know!

Dan Gillean, MAS, MLIS
AtoM Product Manager / Systems Analyst,
Artefactual Systems, Inc.
604-527-2056
@accesstomemory


--
You received this message because you are subscribed to the Google Groups "ICA-AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To post to this group, send email to ica-ato...@googlegroups.com.
Visit this group at http://groups.google.com/group/ica-atom-users.

ty...@lre-tech.com

unread,
Apr 7, 2014, 5:26:31 PM4/7/14
to ica-ato...@googlegroups.com
Yes, that is correct, I get that error using the file you sent. 

This is possibly a separate issue, but I am not able to enable debug mode using the second option in that link (which it would appear is my only option since I am accessing the server remotely).  I am able to change the "false" to "true" but for some reason when it is "true", index.php will not load and is just perpetually loading in my browser.  When reverting back to index.php with "false" it loads fine. 

Let me know if you have any ideas and thank you as always for the help, I appreciate it very much.

Tyler

Hutchinson, Tim

unread,
Apr 7, 2014, 5:58:18 PM4/7/14
to ica-ato...@googlegroups.com

Hi Tyler,

 

In terms of debug mode, you can also edit the qubit_dev.php file to add your IP address to the $allowedIPs list. After doing that you’ll need to clear the cache:

php symfony cc

 

(No, helpful Outlook autocorrect, I really do mean symfony)

 

Tim

--

You received this message because you are subscribed to the Google Groups "ICA-AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To post to this group, send email to ica-ato...@googlegroups.com.
Visit this group at http://groups.google.com/group/ica-atom-users.

ty...@lre-tech.com

unread,
Apr 7, 2014, 6:44:25 PM4/7/14
to ica-ato...@googlegroups.com
Thank you Tim,

I was able to access domain/qubit_dev.php using the information that you provided in modifying the file.  This "front controller" remained in the URL as I navigated to upload an XML file, selected SKOS, etc. 

However, importing the file resulted in the same error as before, completely identical and with no additional information.  I can see the debug mode toolbar, is there anything in the log that would help identify the issue?

Tyler

Hutchinson, Tim

unread,
Apr 7, 2014, 6:55:43 PM4/7/14
to ica-ato...@googlegroups.com

Hi Tyler,

 

If you didn’t get a stack trace, I’m afraid I don’t know my way around the debug interface. Hopefully someone can assist further.

 

Tim

 

From: ica-ato...@googlegroups.com [mailto:ica-ato...@googlegroups.com] On Behalf Of ty...@lre-tech.com
Sent: April-07-14 4:44 PM
To: ica-ato...@googlegroups.com
Subject: Re: [ica-atom-users] SKOS template/example for importing Places, Subjects, etc? Or some troubleshooting help?

 

Thank you Tim,

--

You received this message because you are subscribed to the Google Groups "ICA-AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To post to this group, send email to ica-ato...@googlegroups.com.
Visit this group at http://groups.google.com/group/ica-atom-users.

Mike G

unread,
Apr 8, 2014, 7:08:04 PM4/8/14
to ica-ato...@googlegroups.com
( ! ) Fatal error: Call to a member function __get() on a non-object in /home/mikeg/workspace/atom2.0.1/lib/model/om/BaseObject.php on line 483
Call Stack
#TimeMemoryFunctionLocation
10.0000644344{main}( )../qubit_dev.php:0
20.12578101272sfContext->dispatch( )../qubit_dev.php:21
30.12578101352sfFrontWebController->dispatch( )../sfContext.class.php:170
40.12588114744sfController->forward( )../sfFrontWebController.class.php:48
50.13318370480sfFilterChain->execute( )../sfController.class.php:238
60.13338372568QubitTransactionFilter->execute( )../sfFilterChain.class.php:53
70.13338372568sfFilterChain->execute( )../QubitTransactionFilter.class.php:40
80.13358374576sfHistoryPluginFilter->execute( )../sfFilterChain.class.php:53
90.13368374576sfFilterChain->execute( )../sfHistoryPluginFilter.class.php:18
100.13388376576sfRenderingFilter->execute( )../sfFilterChain.class.php:53
110.13388376576sfFilterChain->execute( )../sfRenderingFilter.class.php:33
120.13408378640QubitSettingsFilter->execute( )../sfFilterChain.class.php:53
130.13448445408sfFilterChain->execute( )../QubitSettingsFilter.class.php:43
140.13468447408QubitLimitIpFilter->execute( )../sfFilterChain.class.php:53
150.13478448312sfFilterChain->execute( )../QubitLimitIp.class.php:39
160.13498450320QubitSslRequirementFilter->execute( )../sfFilterChain.class.php:53
170.13508450400sfFilterChain->execute( )../QubitSslRequirementFilter.class.php:35
180.13528452392QubitMeta->execute( )../sfFilterChain.class.php:53
190.13538453480sfFilterChain->execute( )../QubitMeta.class.php:29
200.13558455480QubitLimitResults->execute( )../sfFilterChain.class.php:53
210.13568456112sfFilterChain->execute( )../QubitLimitResults.class.php:34
220.13588458112sfExecutionFilter->execute( )../sfFilterChain.class.php:53
230.13598459624sfExecutionFilter->handleAction( )../sfExecutionFilter.class.php:42
240.13598459624sfExecutionFilter->executeAction( )../sfExecutionFilter.class.php:78
250.13608459704sfSkosPluginImportAction->execute( )../sfExecutionFilter.class.php:92
260.284310756264sfSkosPlugin::parse( )../importAction.class.php:92
270.303310805952sfSkosPlugin->addTerm( )../sfSkosPlugin.class.php:81
280.303410809464BaseTerm->__set( )../BaseTerm.php:0
290.303410811392call_user_func_array ( )../BaseTerm.php:948
300.303410812008QubitObject->__set( )../BaseTerm.php:0
310.303410813624call_user_func_array ( )../QubitObject.php:93
320.303410814240BaseObject->__set( )../QubitObject.php:0

Hi guys, here's a stack trace of the issue. This is a bug in AtoM 2.0.1 I believe, but has since been fixed in 2.x (Dan has confirmed it works in 2.x). I unfortunately don't have time to debug this right now, but you may be able to see where it was fixed in the 2.x github repository history. Either way, we highly recommend if you're doing custom AtoM development to start from the latest (2.x).

Cheers


On Monday, April 7, 2014 3:55:43 PM UTC-7, Tim Hutchinson wrote:

Hi Tyler,

 

If you didn’t get a stack trace, I’m afraid I don’t know my way around the debug interface. Hopefully someone can assist further.

 

Tim

 

From: ica-ato...@googlegroups.com [mailto:ica-ato...@googlegroups.com] On Behalf Of ty...@lre-tech.com
Sent: April-07-14 4:44 PM
To: ica-ato...@googlegroups.com
Subject: Re: [ica-atom-users] SKOS template/example for importing Places, Subjects, etc? Or some troubleshooting help?

 

Thank you Tim,

I was able to access domain/qubit_dev.php using the information that you provided in modifying the file.  This "front controller" remained in the URL as I navigated to upload an XML file, selected SKOS, etc. 

However, importing the file resulted in the same error as before, completely identical and with no additional information.  I can see the debug mode toolbar, is there anything in the log that would help identify the issue?

Tyler

--
You received this message because you are subscribed to the Google Groups "ICA-AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.

To post to this group, send email to ica-at...@googlegroups.com.

ty...@lre-tech.com

unread,
Apr 9, 2014, 1:30:00 PM4/9/14
to ica-ato...@googlegroups.com
Thanks Mike!

It's nice to confirm that all my issues were not stemming from improper SKOS XML but rather AtoM itself.  I am concerned with switching AtoM versions since the one that has been tested and demoed was 2.0.1 (trying to avoid "I don't like this new feature, this isn't what we were shown" type comments).  If it's as easy as swapping in a couple of files from 2.x, that would be ideal.  I poked around the commits page and don't see anything.  Searching the issues page for "line 483" doesn't seem to bring anything up either.  I believe this is the last "outstanding issue" on our list thanks to the help on this group and email correspondence with David.  I will continue to see if I can find when/how it was solved but I must humbly admit that a tiny bit of help would be extremely useful.  If my approach in this is incorrect, please let me know.

Tyler

Mike G

unread,
Apr 11, 2014, 1:36:44 PM4/11/14
to ica-ato...@googlegroups.com
Hey Tyler,

For what it's worth, I tried the SKOS file against on 2.0.1 last night on a different system and it worked. The main difference I could see is the system that failed was running PHP 5.3.10 vs. the one that worked, running PHP 5.4.6. It might be worth a shot upgrading your PHP if it's an older version.

Cheers

David Juhasz

unread,
Apr 11, 2014, 2:48:50 PM4/11/14
to ica-ato...@googlegroups.com
Hi Mike,

I merged a fix (made by you) to the stable/2.0.x branch of AtoM on Wednesday, which I believe resolved the import error for Tyler:
https://github.com/artefactual/atom/commit/e393fc8a6e977a8b554112b644a1e3b92c9886bc

Sorry, I should have posted this back to the discussion sooner.

Regards,
David

--

David Juhasz
Director, AtoM Technical Services Artefactual Systems Inc. www.artefactual.com


--
You received this message because you are subscribed to the Google Groups "ICA-AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To post to this group, send email to ica-ato...@googlegroups.com.
Message has been deleted
Message has been deleted

ty...@lre-tech.com

unread,
May 16, 2014, 7:10:02 PM5/16/14
to ica-ato...@googlegroups.com
Hi all,

So I have been able to get Dan's Alberta information in.  I am continuing this thread because I would like to follow up with questions relating to the original topic as posted.

So I'm revisiting the SKOS import and I've identified the following tags result in the following fields (this does not include the correct order or hierarchy but is otherwise clear):
<skos:Concept rdf:about="Source Notes"> - Source Notes
<skos:prefLabel xml:lang="en">Name</skos:prefLabel> - Name
<skos:altLabel xml:lang="en">Use for</skos:altLabel> - Use for
<skos:scopeNote xml:lang="en">Scope Note</skos:scopeNote> - Scope Note

What about Code or Display note(s)?  Does anyone know the tags for these?  And one last question, is it possible to import a Places or Subjects XML file from the command line?  If so, what is the syntax? 

I have seen this:
https://www.qubit-toolkit.org/wiki/XML_import/export#Command-line_import_of_XML_files
And this:
https://groups.google.com/forum/#!topic/ica-atom-users/UJK83-w1B98

But both seem to refer to older versions and I am unclear of how to specify Places or Subjects based on this.

Thanks in advance!

Tyler

Sarah Romkey

unread,
May 21, 2014, 1:18:05 PM5/21/14
to ica-ato...@googlegroups.com
Hi Tyler,

First an apology for the delay replying to your question!

I am just learning more about SKOS myself, but from what I understand, there are no SKOS classes for Code or Display note (see: http://www.w3.org/TR/skos-reference/#L7130) which is why you will not see them when you export an SKOS file from AtoM, and unfortunately I do not believe there would be no method of importing these fields either.

Regarding the bulk XML imports, I'm just waiting on word from our developers about whether that information is still valid- I'll get back to you soon.

Cheers,

Sarah

Dan Gillean

unread,
May 21, 2014, 2:12:09 PM5/21/14
to ica-ato...@googlegroups.com
Hi Tyler,

You'll find a more complete explanation of the current use of the code field here: https://www.accesstomemory.org/docs/2.0/user-manual/add-edit-content/terms/#term-data-entry

As Sarah has pointed out, it's not something covered by SKOS. At the moment, neither is display note - in fact, this field in AtoM is apprarently particular to to the Events taxonomy - see the note below the field in the above link.

Regards,

Dan Gillean, MAS, MLIS
AtoM Product Manager / Systems Analyst,
Artefactual Systems, Inc.
604-527-2056
@accesstomemory


--
You received this message because you are subscribed to the Google Groups "ICA-AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To post to this group, send email to ica-ato...@googlegroups.com.
Visit this group at http://groups.google.com/group/ica-atom-users.

ty...@lre-tech.com

unread,
May 21, 2014, 4:58:05 PM5/21/14
to ica-ato...@googlegroups.com
Thank you Sarah and Dan.  This is a helpful answer that provides me with the certainty I needed when pondering this.  It is not immediately apparent which fields may be imported and which may not without a template or documentation, but I understand this is being worked on and I think that until then, I think this forum thread will provide AtoM users with the answers they're looking for, as it has helped me.  Thanks again.

Dan Gillean

unread,
May 27, 2014, 6:46:51 PM5/27/14
to ica-ato...@googlegroups.com
Hi Tyler,

Belatedly following up on the bulk XML import instructions:

I have double-checked with the developers, and the instructions you referenced on the Qubit wiki are the same in 2x - though 2.0.1 actually includes a new option parameter that may be of use to you for Places imports:

you can use same commands to import SKOS files, and the new option --taxonomy to specify the taxonomy into which you would like your terms to import (if no taxonomy is specified, then Subjects is the default).

Note that the taxonomy must be specified not by name, but by ID - you can find a list of the taxonomy IDs here:
https://github.com/artefactual/atom/blob/2.x/lib/model/QubitTaxonomy.php#L22

So for example, the places taxonomy ID is 42 - so to run a SKOS import that would target the Places taxonomy, you might express it like so:

$ php symfony import:bulk --taxonomy=42

... followed by the path to your SKOS file or folder of SKOS files, as per the instructions on the wiki.

Regards (and sorry for the delay),

Dan Gillean, MAS, MLIS
AtoM Product Manager / Systems Analyst,
Artefactual Systems, Inc.
604-527-2056
@accesstomemory


On Wed, May 21, 2014 at 1:58 PM, <ty...@lre-tech.com> wrote:
Thank you Sarah and Dan.  This is a helpful answer that provides me with the certainty I needed when pondering this.  It is not immediately apparent which fields may be imported and which may not without a template or documentation, but I understand this is being worked on and I think that until then, I think this forum thread will provide AtoM users with the answers they're looking for, as it has helped me.  Thanks again.

--
You received this message because you are subscribed to the Google Groups "ICA-AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To post to this group, send email to ica-ato...@googlegroups.com.
Visit this group at http://groups.google.com/group/ica-atom-users.
Reply all
Reply to author
Forward
0 new messages