talk@lists.collectionspace.org

WE HAVE SUNSET THIS LISTSERV - Join us at collectionspace@lyrasislists.org

View all threads

Set default of Title Translation Language to Chinese

JK
James Keeline
Sun, Jun 12, 2016 5:53 PM

The help so far has been very useful as I try to meet near deadlines.  Thank you for the past and future help.  I will follow up on the threads to indicate what we did so that the Talk archive can have solutions as well as questions._____
We would like the object form's Title Translation Language to default to Chinese.
I think the way to achieve this is to change the line of a copy of base-collectionobject.xml from the master copy:
~/cspace_source/cspace-application/tomcat-main/src/main/resources/defaults/base-collectionobject.xml
The useful lines appear to be:
      <repeat id="titleTranslationSubGroupList/titleTranslationSubGroup">        <field id="titleTranslation">          <selector>object-identification-object-title-translation</selector>        </field>        <field id="titleTranslationLanguage" autocomplete="vocab-languages" ui-type="enum">          <enum>            <default>urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(eng)'English'</default>            <blank-value>Please select a value</blank-value>          </enum>        </field>      </repeat>
And I believe the one line should be changed to:
            <default>urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(zho)'Chinese'</default>
My question at this point is where to store my customized copy of this base-collectionobject.xml file.  My inclination is to put it in the bundle directory for the Tenant (sdchm here).  I have searched but have not found a document that gives advice on this.  Perhaps mentioning the specific XML file is not the way to go for this search.
Also, I suppose that it is necessary to run mvn install again to make the file part of the active system.
These tests are presently being done on a local copy in VirtualBox but will be migrated to production when we are happy with all of the customizations.
 James D. Keeline

The help so far has been very useful as I try to meet near deadlines.  Thank you for the past and future help.  I will follow up on the threads to indicate what we did so that the Talk archive can have solutions as well as questions._____ We would like the object form's Title Translation Language to default to Chinese. I think the way to achieve this is to change the line of a copy of base-collectionobject.xml from the master copy: ~/cspace_source/cspace-application/tomcat-main/src/main/resources/defaults/base-collectionobject.xml The useful lines appear to be:       <repeat id="titleTranslationSubGroupList/titleTranslationSubGroup">        <field id="titleTranslation">          <selector>object-identification-object-title-translation</selector>        </field>        <field id="titleTranslationLanguage" autocomplete="vocab-languages" ui-type="enum">          <enum>            <default>urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(eng)'English'</default>            <blank-value>Please select a value</blank-value>          </enum>        </field>      </repeat> And I believe the one line should be changed to:             <default>urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(zho)'Chinese'</default> My question at this point is where to store my customized copy of this base-collectionobject.xml file.  My inclination is to put it in the bundle directory for the Tenant (sdchm here).  I have searched but have not found a document that gives advice on this.  Perhaps mentioning the specific XML file is not the way to go for this search. Also, I suppose that it is necessary to run mvn install again to make the file part of the active system. These tests are presently being done on a local copy in VirtualBox but will be migrated to production when we are happy with all of the customizations.  James D. Keeline
AR
Aron Roberts
Sun, Jun 12, 2016 6:18 PM

Hi James,

There's a recent example of how a tenant's configuration can override
defaults, for CollectionObjects and other record types, here:

https://github.com/collectionspace/application/tree/master/tomcat-main/src/main/resources/tenants/herbarium

And here - this is how you reference your customized configuration files:

https://github.com/collectionspace/application/blob/master/tomcat-main/src/main/resources/herbarium-tenant.xml

An overview of customizing configuration can be found here:

https://wiki.collectionspace.org/display/DOC/Configuring+CollectionSpace#ConfiguringCollectionSpace-Configuringyourtenant

And here's a detailed walk-through of the process:

https://wiki.collectionspace.org/display/DOC/Configuring+CollectionSpace%27s+Application+Layer+-+An+Overview

Aron

On Sun, Jun 12, 2016 at 10:53 AM, James Keeline james@keeline.com wrote:

The help so far has been very useful as I try to meet near deadlines.
Thank you for the past and future help.  I will follow up on the threads to
indicate what we did so that the Talk archive can have solutions as well as
questions.


We would like the object form's Title Translation Language to default to
Chinese.

I think the way to achieve this is to change the line of a copy of
base-collectionobject.xml from the master copy:

~/cspace_source/cspace-application/tomcat-main/src/main/resources/defaults/base-collectionobject.xml

The useful lines appear to be:

   <repeat id="titleTranslationSubGroupList/titleTranslationSubGroup">
     <field id="titleTranslation">
       <selector>object-identification-object-title-translation
</selector> </field> <field id="titleTranslationLanguage" autocomplete= "vocab-languages" ui-type="enum"> <enum> <default>urn:cspace:core.collectionspace.org: vocabularies:name(languages):item:name(*eng*)'*English*'</default> <blank-value>Please select a value</blank-value> </enum> </field> </repeat>

And I believe the one line should be changed to:

         <default>urn:cspace:core.collectionspace.org:

vocabularies:name(languages):item:name(zho)'Chinese'</default>

My question at this point is where to store my customized copy of this
base-collectionobject.xml file.  My inclination is to put it in the
bundle directory for the Tenant (sdchm here).  I have searched but have
not found a document that gives advice on this.  Perhaps mentioning the
specific XML file is not the way to go for this search.

Also, I suppose that it is necessary to run mvn install again to make
the file part of the active system.

These tests are presently being done on a local copy in VirtualBox but
will be migrated to production when we are happy with all of the
customizations.

James D. Keeline


Talk mailing list
Talk@lists.collectionspace.org

http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org

Hi James, There's a recent example of how a tenant's configuration can override defaults, for CollectionObjects and other record types, here: https://github.com/collectionspace/application/tree/master/tomcat-main/src/main/resources/tenants/herbarium And here - this is how you reference your customized configuration files: https://github.com/collectionspace/application/blob/master/tomcat-main/src/main/resources/herbarium-tenant.xml An overview of customizing configuration can be found here: https://wiki.collectionspace.org/display/DOC/Configuring+CollectionSpace#ConfiguringCollectionSpace-Configuringyourtenant And here's a detailed walk-through of the process: https://wiki.collectionspace.org/display/DOC/Configuring+CollectionSpace%27s+Application+Layer+-+An+Overview Aron On Sun, Jun 12, 2016 at 10:53 AM, James Keeline <james@keeline.com> wrote: > The help so far has been very useful as I try to meet near deadlines. > Thank you for the past and future help. I will follow up on the threads to > indicate what we did so that the Talk archive can have solutions as well as > questions. > _____ > > We would like the object form's Title Translation Language to default to > Chinese. > > I think the way to achieve this is to change the line of a copy of > *base-collectionobject.xml* from the master copy: > > > ~/cspace_source/cspace-application/tomcat-main/src/main/resources/defaults/base-collectionobject.xml > > The useful lines appear to be: > > <repeat id="titleTranslationSubGroupList/titleTranslationSubGroup"> > <field id="titleTranslation"> > <selector>object-identification-object-title-translation > </selector> > </field> > <field id="titleTranslationLanguage" autocomplete= > "vocab-languages" ui-type="enum"> > <enum> > <default>urn:cspace:core.collectionspace.org: > vocabularies:name(languages):item:name(*eng*)'*English*'</default> > <blank-value>Please select a value</blank-value> > </enum> > </field> > </repeat> > > And I believe the one line should be changed to: > > <default>urn:cspace:core.collectionspace.org: > vocabularies:name(languages):item:name(*zho*)'*Chinese*'</default> > > My question at this point is where to store my customized copy of this > *base-collectionobject.xml* file. My inclination is to put it in the > *bundle* directory for the Tenant (sdchm here). I have searched but have > not found a document that gives advice on this. Perhaps mentioning the > specific XML file is not the way to go for this search. > > Also, I suppose that it is necessary to run *mvn install* again to make > the file part of the active system. > > These tests are presently being done on a local copy in VirtualBox but > will be migrated to production when we are happy with all of the > customizations. > > > James D. Keeline > > > _______________________________________________ > Talk mailing list > Talk@lists.collectionspace.org > > http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org > >
JK
James Keeline
Sun, Jun 12, 2016 10:25 PM

I think I am getting closer but I am still not able to get the Chinese selection on the Title Translation Language field.  I have other changes to make along this line but figure that until I get this working, I can't proceed to the others that involve changing values of the static and dynamic term lists used in the object cataloging form.
I've tried to follow the examples that were given in the linked documents and adapt them to our situation.  Here is where I stand:
I have a local VirtualBox with CSpace 4.3 installed on an Ubuntu 14.04.4 installation.  It has been initialized and I can save both terms and objects.  When I start to catalog a new object, I expect the Title Translation Language field to be selected as Chinese.
I am working from the "step by step" link provided._____
No changes were made to the settings.xml file ( ~/cspace_source/application/tomcat-main/src/main/resources/tenants/sdchm/settings.xml )._____
I did slightly modify the sdchm-tenant.xml file ( ~/cspace_source/application/tomcat-main/src/main/resources/sdchm-tenant.xml ) to reflect the desired merge file:
<cspace-config tenantname="sdchm">
        <version>11</version>        <include src="settings.xml,local-sdchm-settings.xml" merge="xmlmerge-settings.properties"                 strip-root="yes" />
        <spec>                <include src="base-relations.xml"/>                <include src="base-schemas.xml"/>
                <records>                        <enum-blank>Please select a value</enum-blank>
                        <!-- JK 2016-06-12 add custom sdchm-collectionobject.xml file to system -->                        <include src="base-collectionobject.xml,sdchm-collectionobject.xml" merge="xmlmerge.properties"/>                        <include src="base-authority.xml"/>
The rest of the file is unchanged._____
I have a sdchm-collectionobject.xml file ( ~/cspace_source/application/tomcat-main/src/main/resources/tenants/sdchm/sdchm-collectionobject.xml ) with just the changes that I thought were needed (for now).  This is the complete content of that file:
<record id="collection-object" is-extension="true">  <services-record-path id="sdchm">collectionobjects_sdchm:http://collectionspace.org/services/collectionobject/local/sdchm,collectionobjects_sdchm</services-record-path>
  <!-- This file contains just the override changes from core-collectionobject.xml -->  <section id="identificationInformation">    <repeat id="titleGroupList/titleGroup">      <!-- selector>collection-object-titleGroup</selector -->      <field id="title" ui-search="repeatable" in-title="yes" mini="search,list">        <title-selector>titleBar-object-identification-object-title</title-selector>        <selector>object-identification-object-title</selector>      </field>      <field id="titleLanguage" autocomplete="vocab-languages" ui-type="enum">        <enum>          <default>urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(eng)'English'</default>        </enum>        <selector>object-identification-object-title-language</selector>      </field>
      <repeat id="titleTranslationSubGroupList/titleTranslationSubGroup">        <field id="titleTranslation">          <selector>object-identification-object-title-translation</selector>        </field>        <field id="titleTranslationLanguage" autocomplete="vocab-languages" ui-type="enum">          <enum>            <!-- <default>urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(eng)'English'</default> -->            <default>urn:cspace:sdchm.bpoc.org:vocabularies:name(languages):item:name(zho)'Chinese'</default><!-- JK 2016-06-12 set default to Chinese -->            <blank-value>Please select a value</blank-value>          </enum>        </field>      </repeat>
      <field id="titleType" seperate_ui_container="true">        <selector>object-identification-object-title-type</selector>        <options>          <option id="">Please select a value</option>          <option id="assigned-by-artist">Assigned by Artist</option>          <option id="collection">Collection</option>          <option id="generic">Generic</option>          <option id="popular">Popular</option>          <option id="series">Series</option>          <option id="trade">Trade</option>        </options>      </field>    </repeat>  </section>
</record>
The files are owned by the cspace user and group and have what look to be correct permissions (664).
Next the files were installed:
cd ~/cspace_source/application; mvn clean install -DskipTests
The services layer was updated and the servers started again:
$CSPACE_JEESERVER_HOME/bin/shutdown.sh -forcesleep 30cd ~/cspace_source/services/services/JaxRsServiceProviderant deploy_services_artifacts$CSPACE_JEESERVER_HOME/bin/startup.sh

The messages seemed normal enough, if verbose.
I cleared the browser cache (Chrome: Download History, Cookies, Cached Images and Files, Hosted app data) for the past week.  
I tested in the browser by logging in, starting a new record.  Right now no language is selected in Title Translation Language.  For the longest time it was defaulting to English.
Since my values were not showing up, I followed the first suggestion and visited the following local URL to initialize the application layer:
http://192.168.56.10:8180/collectionspace/tenant/sdchm/init

My hopes were raised when I saw part of my edited sdchm-tenant.xml file as a response:
cspace-config re-loaded<cspace-config tenantname="sdchm">

<version>11</version>
<include src="settings.xml,local-sdchm-settings.xml" merge="xmlmerge-settings.properties" 
	strip-root="yes" />

<spec>
	<include src="base-relations.xml"/>
	<include src="base-schemas.xml"/>

	<records>
		<enum-blank>Please select a value</enum-blank>

                    <!-- JK 2016-06-12 add custom sdchm-collectionobject.xml file to system -->
		<include src="base-collectionobject.xml,sdchm-collectionobject.xml" merge="xmlmerge.properties"/>
		<include src="base-authority.xml"/>

I did another shut down and start up of the servers and cleared the caches again per suggestions._____
Next I looked for the most recent merged cache file and found this file:
/usr/local/share/apache-tomcat-7.0.57/temp/merged-app-config-6386489495469381254/merged-base-collectionobject.xml_sdchm-collectionobject.xml-.xml
Looking inside it showed what I hoped to see:
      <repeat id="titleTranslationSubGroupList/titleTranslationSubGroup">        <field id="titleTranslation">          <selector>object-identification-object-title-translation</selector>        </field>        <field id="titleTranslationLanguage" autocomplete="vocab-languages" ui-type="enum">          <enum>            <!-- <default>urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(eng)'English'</default> -->            <default>urn:cspace:sdchm.bpoc.org:vocabularies:name(languages):item:name(zho)'Chinese'</default>            <!-- JK 2016-06-12 set default to Chinese -->            <blank-value>Please select a value</blank-value>          </enum>        </field>      </repeat>_____
At this point it feels very close but some little detail is preventing it from working as it should.
Perhaps at some point I changed too much when trying to follow the examples and apply it to this case.
I think I have the right values for the select list based on a Chrome Inspect Element of the rendered HTML.
Perhaps a fresh and experienced set of eyes will spot something I have missed.
 James D. Keeline
From: Aron Roberts aron@socrates.berkeley.edu
To: James Keeline james@keeline.com
Cc: Talk talk@lists.collectionspace.org
Sent: Sunday, June 12, 2016 11:18 AM
Subject: Re: [Talk] Set default of Title Translation Language to Chinese

Hi James,

  There's a recent example of how a tenant's configuration can override defaults, for CollectionObjects and other record types, here:

  https://github.com/collectionspace/application/tree/master/tomcat-main/src/main/resources/tenants/herbarium

  And here - this is how you reference your customized configuration files:

  https://github.com/collectionspace/application/blob/master/tomcat-main/src/main/resources/herbarium-tenant.xml

  An overview of customizing configuration can be found here:

  https://wiki.collectionspace.org/display/DOC/Configuring+CollectionSpace#ConfiguringCollectionSpace-Configuringyourtenant

  And here's a detailed walk-through of the process:

  https://wiki.collectionspace.org/display/DOC/Configuring+CollectionSpace%27s+Application+Layer+-+An+Overview

Aron

On Sun, Jun 12, 2016 at 10:53 AM, James Keeline james@keeline.com wrote:

The help so far has been very useful as I try to meet near deadlines.  Thank you for the past and future help.  I will follow up on the threads to indicate what we did so that the Talk archive can have solutions as well as questions._____
We would like the object form's Title Translation Language to default to Chinese.
I think the way to achieve this is to change the line of a copy of base-collectionobject.xml from the master copy:
~/cspace_source/cspace-application/tomcat-main/src/main/resources/defaults/base-collectionobject.xml
The useful lines appear to be:
      <repeat id="titleTranslationSubGroupList/titleTranslationSubGroup">        <field id="titleTranslation">          <selector>object-identification-object-title-translation</selector>        </field>        <field id="titleTranslationLanguage" autocomplete="vocab-languages" ui-type="enum">          <enum>            <default>urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(eng)'English'</default>            <blank-value>Please select a value</blank-value>          </enum>        </field>      </repeat>
And I believe the one line should be changed to:
            <default>urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(zho)'Chinese'</default>
My question at this point is where to store my customized copy of this base-collectionobject.xml file.  My inclination is to put it in the bundle directory for the Tenant (sdchm here).  I have searched but have not found a document that gives advice on this.  Perhaps mentioning the specific XML file is not the way to go for this search.
Also, I suppose that it is necessary to run mvn install again to make the file part of the active system.
These tests are presently being done on a local copy in VirtualBox but will be migrated to production when we are happy with all of the customizations.
 James D. Keeline


Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org

I think I am getting closer but I am still not able to get the Chinese selection on the Title Translation Language field.  I have other changes to make along this line but figure that until I get this working, I can't proceed to the others that involve changing values of the static and dynamic term lists used in the object cataloging form. I've tried to follow the examples that were given in the linked documents and adapt them to our situation.  Here is where I stand: I have a local VirtualBox with CSpace 4.3 installed on an Ubuntu 14.04.4 installation.  It has been initialized and I can save both terms and objects.  When I start to catalog a new object, I expect the Title Translation Language field to be selected as Chinese. I am working from the "step by step" link provided._____ No changes were made to the settings.xml file ( ~/cspace_source/application/tomcat-main/src/main/resources/tenants/sdchm/settings.xml )._____ I did slightly modify the sdchm-tenant.xml file ( ~/cspace_source/application/tomcat-main/src/main/resources/sdchm-tenant.xml ) to reflect the desired merge file: <cspace-config tenantname="sdchm">         <version>11</version>        <include src="settings.xml,local-sdchm-settings.xml" merge="xmlmerge-settings.properties"                 strip-root="yes" />         <spec>                <include src="base-relations.xml"/>                <include src="base-schemas.xml"/>                 <records>                        <enum-blank>Please select a value</enum-blank>                         <!-- JK 2016-06-12 add custom sdchm-collectionobject.xml file to system -->                        <include src="base-collectionobject.xml,sdchm-collectionobject.xml" merge="xmlmerge.properties"/>                        <include src="base-authority.xml"/> The rest of the file is unchanged._____ I have a sdchm-collectionobject.xml file ( ~/cspace_source/application/tomcat-main/src/main/resources/tenants/sdchm/sdchm-collectionobject.xml ) with just the changes that I thought were needed (for now).  This is the complete content of that file: <record id="collection-object" is-extension="true">  <services-record-path id="sdchm">collectionobjects_sdchm:http://collectionspace.org/services/collectionobject/local/sdchm,collectionobjects_sdchm</services-record-path>   <!-- This file contains just the override changes from core-collectionobject.xml -->  <section id="identificationInformation">    <repeat id="titleGroupList/titleGroup">      <!-- selector>collection-object-titleGroup</selector -->      <field id="title" ui-search="repeatable" in-title="yes" mini="search,list">        <title-selector>titleBar-object-identification-object-title</title-selector>        <selector>object-identification-object-title</selector>      </field>      <field id="titleLanguage" autocomplete="vocab-languages" ui-type="enum">        <enum>          <default>urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(eng)'English'</default>        </enum>        <selector>object-identification-object-title-language</selector>      </field>       <repeat id="titleTranslationSubGroupList/titleTranslationSubGroup">        <field id="titleTranslation">          <selector>object-identification-object-title-translation</selector>        </field>        <field id="titleTranslationLanguage" autocomplete="vocab-languages" ui-type="enum">          <enum>            <!-- <default>urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(eng)'English'</default> -->            <default>urn:cspace:sdchm.bpoc.org:vocabularies:name(languages):item:name(zho)'Chinese'</default><!-- JK 2016-06-12 set default to Chinese -->            <blank-value>Please select a value</blank-value>          </enum>        </field>      </repeat>       <field id="titleType" seperate_ui_container="true">        <selector>object-identification-object-title-type</selector>        <options>          <option id="">Please select a value</option>          <option id="assigned-by-artist">Assigned by Artist</option>          <option id="collection">Collection</option>          <option id="generic">Generic</option>          <option id="popular">Popular</option>          <option id="series">Series</option>          <option id="trade">Trade</option>        </options>      </field>    </repeat>  </section> </record> The files are owned by the cspace user and group and have what look to be correct permissions (664). Next the files were installed: cd ~/cspace_source/application; mvn clean install -DskipTests The services layer was updated and the servers started again: $CSPACE_JEESERVER_HOME/bin/shutdown.sh -forcesleep 30cd ~/cspace_source/services/services/JaxRsServiceProviderant deploy_services_artifacts$CSPACE_JEESERVER_HOME/bin/startup.sh The messages seemed normal enough, if verbose. I cleared the browser cache (Chrome: Download History, Cookies, Cached Images and Files, Hosted app data) for the past week.   I tested in the browser by logging in, starting a new record.  Right now no language is selected in Title Translation Language.  For the longest time it was defaulting to English. Since my values were not showing up, I followed the first suggestion and visited the following local URL to initialize the application layer: http://192.168.56.10:8180/collectionspace/tenant/sdchm/init My hopes were raised when I saw part of my edited sdchm-tenant.xml file as a response: cspace-config re-loaded<cspace-config tenantname="sdchm"> <version>11</version> <include src="settings.xml,local-sdchm-settings.xml" merge="xmlmerge-settings.properties" strip-root="yes" /> <spec> <include src="base-relations.xml"/> <include src="base-schemas.xml"/> <records> <enum-blank>Please select a value</enum-blank> <!-- JK 2016-06-12 add custom sdchm-collectionobject.xml file to system --> <include src="base-collectionobject.xml,sdchm-collectionobject.xml" merge="xmlmerge.properties"/> <include src="base-authority.xml"/> I did another shut down and start up of the servers and cleared the caches again per suggestions._____ Next I looked for the most recent merged cache file and found this file: /usr/local/share/apache-tomcat-7.0.57/temp/merged-app-config-6386489495469381254/merged-base-collectionobject.xml_sdchm-collectionobject.xml-.xml Looking inside it showed what I hoped to see:       <repeat id="titleTranslationSubGroupList/titleTranslationSubGroup">        <field id="titleTranslation">          <selector>object-identification-object-title-translation</selector>        </field>        <field id="titleTranslationLanguage" autocomplete="vocab-languages" ui-type="enum">          <enum>            <!-- <default>urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(eng)'English'</default> -->            <default>urn:cspace:sdchm.bpoc.org:vocabularies:name(languages):item:name(zho)'Chinese'</default>            <!-- JK 2016-06-12 set default to Chinese -->            <blank-value>Please select a value</blank-value>          </enum>        </field>      </repeat>_____ At this point it feels very close but some little detail is preventing it from working as it should. Perhaps at some point I changed too much when trying to follow the examples and apply it to this case. I think I have the right values for the select list based on a Chrome Inspect Element of the rendered HTML. Perhaps a fresh and experienced set of eyes will spot something I have missed.  James D. Keeline From: Aron Roberts <aron@socrates.berkeley.edu> To: James Keeline <james@keeline.com> Cc: Talk <talk@lists.collectionspace.org> Sent: Sunday, June 12, 2016 11:18 AM Subject: Re: [Talk] Set default of Title Translation Language to Chinese Hi James,   There's a recent example of how a tenant's configuration can override defaults, for CollectionObjects and other record types, here:   https://github.com/collectionspace/application/tree/master/tomcat-main/src/main/resources/tenants/herbarium   And here - this is how you reference your customized configuration files:   https://github.com/collectionspace/application/blob/master/tomcat-main/src/main/resources/herbarium-tenant.xml   An overview of customizing configuration can be found here:   https://wiki.collectionspace.org/display/DOC/Configuring+CollectionSpace#ConfiguringCollectionSpace-Configuringyourtenant   And here's a detailed walk-through of the process:   https://wiki.collectionspace.org/display/DOC/Configuring+CollectionSpace%27s+Application+Layer+-+An+Overview Aron On Sun, Jun 12, 2016 at 10:53 AM, James Keeline <james@keeline.com> wrote: The help so far has been very useful as I try to meet near deadlines.  Thank you for the past and future help.  I will follow up on the threads to indicate what we did so that the Talk archive can have solutions as well as questions._____ We would like the object form's Title Translation Language to default to Chinese. I think the way to achieve this is to change the line of a copy of base-collectionobject.xml from the master copy: ~/cspace_source/cspace-application/tomcat-main/src/main/resources/defaults/base-collectionobject.xml The useful lines appear to be:       <repeat id="titleTranslationSubGroupList/titleTranslationSubGroup">        <field id="titleTranslation">          <selector>object-identification-object-title-translation</selector>        </field>        <field id="titleTranslationLanguage" autocomplete="vocab-languages" ui-type="enum">          <enum>            <default>urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(eng)'English'</default>            <blank-value>Please select a value</blank-value>          </enum>        </field>      </repeat> And I believe the one line should be changed to:             <default>urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(zho)'Chinese'</default> My question at this point is where to store my customized copy of this base-collectionobject.xml file.  My inclination is to put it in the bundle directory for the Tenant (sdchm here).  I have searched but have not found a document that gives advice on this.  Perhaps mentioning the specific XML file is not the way to go for this search. Also, I suppose that it is necessary to run mvn install again to make the file part of the active system. These tests are presently being done on a local copy in VirtualBox but will be migrated to production when we are happy with all of the customizations.  James D. Keeline _______________________________________________ Talk mailing list Talk@lists.collectionspace.org http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
JK
James Keeline
Sun, Jun 12, 2016 11:55 PM

Awaiting a chance to get answers from the forum, I started to make other changes to the static lists for the select inputs on the object cataloging form.  I was heartened when these worked (after a number of steps) so I went back to look at the language selector in the rendered HTML.  I found that the namespace I changed was wrong.
This is what I tried.
<default>urn:cspace:sdchm.bpoc.org:vocabularies:name(languages):item:name(zho)'Chinese'</default>

This is what ultimately worked:
<default>urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(zho)'Chinese'</default>

So, now I have a form that is close to what was discussed with the museum.  I will see about installing it on production and getting approval.
Even though I answered my latest question for myself, I want to extend my thanks again for the suggestions.  I'm sure I'll have more as the process continues.  In time I may be in a position to answer questions for others.  I do so in other forums on technical and historical topics. James D. Keeline

  From: James Keeline <james@keeline.com>

To: Talk talk@lists.collectionspace.org
Cc: Aron Roberts aron@socrates.berkeley.edu
Sent: Sunday, June 12, 2016 3:25 PM
Subject: Re: [Talk] Set default of Title Translation Language to Chinese

I think I am getting closer but I am still not able to get the Chinese selection on the Title Translation Language field.  I have other changes to make along this line but figure that until I get this working, I can't proceed to the others that involve changing values of the static and dynamic term lists used in the object cataloging form.
I've tried to follow the examples that were given in the linked documents and adapt them to our situation.  Here is where I stand:
I have a local VirtualBox with CSpace 4.3 installed on an Ubuntu 14.04.4 installation.  It has been initialized and I can save both terms and objects.  When I start to catalog a new object, I expect the Title Translation Language field to be selected as Chinese.
I am working from the "step by step" link provided._____
No changes were made to the settings.xml file ( ~/cspace_source/application/tomcat-main/src/main/resources/tenants/sdchm/settings.xml )._____
I did slightly modify the sdchm-tenant.xml file ( ~/cspace_source/application/tomcat-main/src/main/resources/sdchm-tenant.xml ) to reflect the desired merge file:
<cspace-config tenantname="sdchm">
        <version>11</version>        <include src="settings.xml,local-sdchm-settings.xml" merge="xmlmerge-settings.properties"                 strip-root="yes" />
        <spec>                <include src="base-relations.xml"/>                <include src="base-schemas.xml"/>
                <records>                        <enum-blank>Please select a value</enum-blank>
                        <!-- JK 2016-06-12 add custom sdchm-collectionobject.xml file to system -->                        <include src="base-collectionobject.xml,sdchm-collectionobject.xml" merge="xmlmerge.properties"/>                        <include src="base-authority.xml"/>
The rest of the file is unchanged._____
I have a sdchm-collectionobject.xml file ( ~/cspace_source/application/tomcat-main/src/main/resources/tenants/sdchm/sdchm-collectionobject.xml ) with just the changes that I thought were needed (for now).  This is the complete content of that file:
<record id="collection-object" is-extension="true">  <services-record-path id="sdchm">collectionobjects_sdchm:http://collectionspace.org/services/collectionobject/local/sdchm,collectionobjects_sdchm</services-record-path>
  <!-- This file contains just the override changes from core-collectionobject.xml -->  <section id="identificationInformation">    <repeat id="titleGroupList/titleGroup">      <!-- selector>collection-object-titleGroup</selector -->      <field id="title" ui-search="repeatable" in-title="yes" mini="search,list">        <title-selector>titleBar-object-identification-object-title</title-selector>        <selector>object-identification-object-title</selector>      </field>      <field id="titleLanguage" autocomplete="vocab-languages" ui-type="enum">        <enum>          <default>urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(eng)'English'</default>        </enum>        <selector>object-identification-object-title-language</selector>      </field>
      <repeat id="titleTranslationSubGroupList/titleTranslationSubGroup">        <field id="titleTranslation">          <selector>object-identification-object-title-translation</selector>        </field>        <field id="titleTranslationLanguage" autocomplete="vocab-languages" ui-type="enum">          <enum>            <!-- <default>urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(eng)'English'</default> -->            <default>urn:cspace:sdchm.bpoc.org:vocabularies:name(languages):item:name(zho)'Chinese'</default><!-- JK 2016-06-12 set default to Chinese -->            <blank-value>Please select a value</blank-value>          </enum>        </field>      </repeat>
      <field id="titleType" seperate_ui_container="true">        <selector>object-identification-object-title-type</selector>        <options>          <option id="">Please select a value</option>          <option id="assigned-by-artist">Assigned by Artist</option>          <option id="collection">Collection</option>          <option id="generic">Generic</option>          <option id="popular">Popular</option>          <option id="series">Series</option>          <option id="trade">Trade</option>        </options>      </field>    </repeat>  </section>
</record>
The files are owned by the cspace user and group and have what look to be correct permissions (664).
Next the files were installed:
cd ~/cspace_source/application; mvn clean install -DskipTests
The services layer was updated and the servers started again:
$CSPACE_JEESERVER_HOME/bin/shutdown.sh -forcesleep 30cd ~/cspace_source/services/services/JaxRsServiceProviderant deploy_services_artifacts$CSPACE_JEESERVER_HOME/bin/startup.sh

The messages seemed normal enough, if verbose.
I cleared the browser cache (Chrome: Download History, Cookies, Cached Images and Files, Hosted app data) for the past week.  
I tested in the browser by logging in, starting a new record.  Right now no language is selected in Title Translation Language.  For the longest time it was defaulting to English.
Since my values were not showing up, I followed the first suggestion and visited the following local URL to initialize the application layer:
http://192.168.56.10:8180/collectionspace/tenant/sdchm/init

My hopes were raised when I saw part of my edited sdchm-tenant.xml file as a response:
cspace-config re-loaded<cspace-config tenantname="sdchm">

<version>11</version>
<include src="settings.xml,local-sdchm-settings.xml" merge="xmlmerge-settings.properties" 
	strip-root="yes" />

<spec>
	<include src="base-relations.xml"/>
	<include src="base-schemas.xml"/>

	<records>
		<enum-blank>Please select a value</enum-blank>

                    <!-- JK 2016-06-12 add custom sdchm-collectionobject.xml file to system -->
		<include src="base-collectionobject.xml,sdchm-collectionobject.xml" merge="xmlmerge.properties"/>
		<include src="base-authority.xml"/>

I did another shut down and start up of the servers and cleared the caches again per suggestions._____
Next I looked for the most recent merged cache file and found this file:
/usr/local/share/apache-tomcat-7.0.57/temp/merged-app-config-6386489495469381254/merged-base-collectionobject.xml_sdchm-collectionobject.xml-.xml
Looking inside it showed what I hoped to see:
      <repeat id="titleTranslationSubGroupList/titleTranslationSubGroup">        <field id="titleTranslation">          <selector>object-identification-object-title-translation</selector>        </field>        <field id="titleTranslationLanguage" autocomplete="vocab-languages" ui-type="enum">          <enum>            <!-- <default>urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(eng)'English'</default> -->            <default>urn:cspace:sdchm.bpoc.org:vocabularies:name(languages):item:name(zho)'Chinese'</default>            <!-- JK 2016-06-12 set default to Chinese -->            <blank-value>Please select a value</blank-value>          </enum>        </field>      </repeat>_____
At this point it feels very close but some little detail is preventing it from working as it should.
Perhaps at some point I changed too much when trying to follow the examples and apply it to this case.
I think I have the right values for the select list based on a Chrome Inspect Element of the rendered HTML.
Perhaps a fresh and experienced set of eyes will spot something I have missed.
 James D. Keeline
From: Aron Roberts aron@socrates.berkeley.edu
To: James Keeline james@keeline.com
Cc: Talk talk@lists.collectionspace.org
Sent: Sunday, June 12, 2016 11:18 AM
Subject: Re: [Talk] Set default of Title Translation Language to Chinese

Hi James,

  There's a recent example of how a tenant's configuration can override defaults, for CollectionObjects and other record types, here:

  https://github.com/collectionspace/application/tree/master/tomcat-main/src/main/resources/tenants/herbarium

  And here - this is how you reference your customized configuration files:

  https://github.com/collectionspace/application/blob/master/tomcat-main/src/main/resources/herbarium-tenant.xml

  An overview of customizing configuration can be found here:

  https://wiki.collectionspace.org/display/DOC/Configuring+CollectionSpace#ConfiguringCollectionSpace-Configuringyourtenant

  And here's a detailed walk-through of the process:

  https://wiki.collectionspace.org/display/DOC/Configuring+CollectionSpace%27s+Application+Layer+-+An+Overview

Aron

On Sun, Jun 12, 2016 at 10:53 AM, James Keeline james@keeline.com wrote:

The help so far has been very useful as I try to meet near deadlines.  Thank you for the past and future help.  I will follow up on the threads to indicate what we did so that the Talk archive can have solutions as well as questions._____
We would like the object form's Title Translation Language to default to Chinese.
I think the way to achieve this is to change the line of a copy of base-collectionobject.xml from the master copy:
~/cspace_source/cspace-application/tomcat-main/src/main/resources/defaults/base-collectionobject.xml
The useful lines appear to be:
      <repeat id="titleTranslationSubGroupList/titleTranslationSubGroup">        <field id="titleTranslation">          <selector>object-identification-object-title-translation</selector>        </field>        <field id="titleTranslationLanguage" autocomplete="vocab-languages" ui-type="enum">          <enum>            <default>urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(eng)'English'</default>            <blank-value>Please select a value</blank-value>          </enum>        </field>      </repeat>
And I believe the one line should be changed to:
            <default>urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(zho)'Chinese'</default>
My question at this point is where to store my customized copy of this base-collectionobject.xml file.  My inclination is to put it in the bundle directory for the Tenant (sdchm here).  I have searched but have not found a document that gives advice on this.  Perhaps mentioning the specific XML file is not the way to go for this search.
Also, I suppose that it is necessary to run mvn install again to make the file part of the active system.
These tests are presently being done on a local copy in VirtualBox but will be migrated to production when we are happy with all of the customizations.
 James D. Keeline


Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org

Awaiting a chance to get answers from the forum, I started to make other changes to the static lists for the select inputs on the object cataloging form.  I was heartened when these worked (after a number of steps) so I went back to look at the language selector in the rendered HTML.  I found that the namespace I changed was wrong. This is what I tried. <default>urn:cspace:sdchm.bpoc.org:vocabularies:name(languages):item:name(zho)'Chinese'</default> This is what ultimately worked: <default>urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(zho)'Chinese'</default> So, now I have a form that is close to what was discussed with the museum.  I will see about installing it on production and getting approval. Even though I answered my latest question for myself, I want to extend my thanks again for the suggestions.  I'm sure I'll have more as the process continues.  In time I may be in a position to answer questions for others.  I do so in other forums on technical and historical topics. James D. Keeline From: James Keeline <james@keeline.com> To: Talk <talk@lists.collectionspace.org> Cc: Aron Roberts <aron@socrates.berkeley.edu> Sent: Sunday, June 12, 2016 3:25 PM Subject: Re: [Talk] Set default of Title Translation Language to Chinese I think I am getting closer but I am still not able to get the Chinese selection on the Title Translation Language field.  I have other changes to make along this line but figure that until I get this working, I can't proceed to the others that involve changing values of the static and dynamic term lists used in the object cataloging form. I've tried to follow the examples that were given in the linked documents and adapt them to our situation.  Here is where I stand: I have a local VirtualBox with CSpace 4.3 installed on an Ubuntu 14.04.4 installation.  It has been initialized and I can save both terms and objects.  When I start to catalog a new object, I expect the Title Translation Language field to be selected as Chinese. I am working from the "step by step" link provided._____ No changes were made to the settings.xml file ( ~/cspace_source/application/tomcat-main/src/main/resources/tenants/sdchm/settings.xml )._____ I did slightly modify the sdchm-tenant.xml file ( ~/cspace_source/application/tomcat-main/src/main/resources/sdchm-tenant.xml ) to reflect the desired merge file: <cspace-config tenantname="sdchm">         <version>11</version>        <include src="settings.xml,local-sdchm-settings.xml" merge="xmlmerge-settings.properties"                 strip-root="yes" />         <spec>                <include src="base-relations.xml"/>                <include src="base-schemas.xml"/>                 <records>                        <enum-blank>Please select a value</enum-blank>                         <!-- JK 2016-06-12 add custom sdchm-collectionobject.xml file to system -->                        <include src="base-collectionobject.xml,sdchm-collectionobject.xml" merge="xmlmerge.properties"/>                        <include src="base-authority.xml"/> The rest of the file is unchanged._____ I have a sdchm-collectionobject.xml file ( ~/cspace_source/application/tomcat-main/src/main/resources/tenants/sdchm/sdchm-collectionobject.xml ) with just the changes that I thought were needed (for now).  This is the complete content of that file: <record id="collection-object" is-extension="true">  <services-record-path id="sdchm">collectionobjects_sdchm:http://collectionspace.org/services/collectionobject/local/sdchm,collectionobjects_sdchm</services-record-path>   <!-- This file contains just the override changes from core-collectionobject.xml -->  <section id="identificationInformation">    <repeat id="titleGroupList/titleGroup">      <!-- selector>collection-object-titleGroup</selector -->      <field id="title" ui-search="repeatable" in-title="yes" mini="search,list">        <title-selector>titleBar-object-identification-object-title</title-selector>        <selector>object-identification-object-title</selector>      </field>      <field id="titleLanguage" autocomplete="vocab-languages" ui-type="enum">        <enum>          <default>urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(eng)'English'</default>        </enum>        <selector>object-identification-object-title-language</selector>      </field>       <repeat id="titleTranslationSubGroupList/titleTranslationSubGroup">        <field id="titleTranslation">          <selector>object-identification-object-title-translation</selector>        </field>        <field id="titleTranslationLanguage" autocomplete="vocab-languages" ui-type="enum">          <enum>            <!-- <default>urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(eng)'English'</default> -->            <default>urn:cspace:sdchm.bpoc.org:vocabularies:name(languages):item:name(zho)'Chinese'</default><!-- JK 2016-06-12 set default to Chinese -->            <blank-value>Please select a value</blank-value>          </enum>        </field>      </repeat>       <field id="titleType" seperate_ui_container="true">        <selector>object-identification-object-title-type</selector>        <options>          <option id="">Please select a value</option>          <option id="assigned-by-artist">Assigned by Artist</option>          <option id="collection">Collection</option>          <option id="generic">Generic</option>          <option id="popular">Popular</option>          <option id="series">Series</option>          <option id="trade">Trade</option>        </options>      </field>    </repeat>  </section> </record> The files are owned by the cspace user and group and have what look to be correct permissions (664). Next the files were installed: cd ~/cspace_source/application; mvn clean install -DskipTests The services layer was updated and the servers started again: $CSPACE_JEESERVER_HOME/bin/shutdown.sh -forcesleep 30cd ~/cspace_source/services/services/JaxRsServiceProviderant deploy_services_artifacts$CSPACE_JEESERVER_HOME/bin/startup.sh The messages seemed normal enough, if verbose. I cleared the browser cache (Chrome: Download History, Cookies, Cached Images and Files, Hosted app data) for the past week.   I tested in the browser by logging in, starting a new record.  Right now no language is selected in Title Translation Language.  For the longest time it was defaulting to English. Since my values were not showing up, I followed the first suggestion and visited the following local URL to initialize the application layer: http://192.168.56.10:8180/collectionspace/tenant/sdchm/init My hopes were raised when I saw part of my edited sdchm-tenant.xml file as a response: cspace-config re-loaded<cspace-config tenantname="sdchm"> <version>11</version> <include src="settings.xml,local-sdchm-settings.xml" merge="xmlmerge-settings.properties" strip-root="yes" /> <spec> <include src="base-relations.xml"/> <include src="base-schemas.xml"/> <records> <enum-blank>Please select a value</enum-blank> <!-- JK 2016-06-12 add custom sdchm-collectionobject.xml file to system --> <include src="base-collectionobject.xml,sdchm-collectionobject.xml" merge="xmlmerge.properties"/> <include src="base-authority.xml"/> I did another shut down and start up of the servers and cleared the caches again per suggestions._____ Next I looked for the most recent merged cache file and found this file: /usr/local/share/apache-tomcat-7.0.57/temp/merged-app-config-6386489495469381254/merged-base-collectionobject.xml_sdchm-collectionobject.xml-.xml Looking inside it showed what I hoped to see:       <repeat id="titleTranslationSubGroupList/titleTranslationSubGroup">        <field id="titleTranslation">          <selector>object-identification-object-title-translation</selector>        </field>        <field id="titleTranslationLanguage" autocomplete="vocab-languages" ui-type="enum">          <enum>            <!-- <default>urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(eng)'English'</default> -->            <default>urn:cspace:sdchm.bpoc.org:vocabularies:name(languages):item:name(zho)'Chinese'</default>            <!-- JK 2016-06-12 set default to Chinese -->            <blank-value>Please select a value</blank-value>          </enum>        </field>      </repeat>_____ At this point it feels very close but some little detail is preventing it from working as it should. Perhaps at some point I changed too much when trying to follow the examples and apply it to this case. I think I have the right values for the select list based on a Chrome Inspect Element of the rendered HTML. Perhaps a fresh and experienced set of eyes will spot something I have missed.  James D. Keeline From: Aron Roberts <aron@socrates.berkeley.edu> To: James Keeline <james@keeline.com> Cc: Talk <talk@lists.collectionspace.org> Sent: Sunday, June 12, 2016 11:18 AM Subject: Re: [Talk] Set default of Title Translation Language to Chinese Hi James,   There's a recent example of how a tenant's configuration can override defaults, for CollectionObjects and other record types, here:   https://github.com/collectionspace/application/tree/master/tomcat-main/src/main/resources/tenants/herbarium   And here - this is how you reference your customized configuration files:   https://github.com/collectionspace/application/blob/master/tomcat-main/src/main/resources/herbarium-tenant.xml   An overview of customizing configuration can be found here:   https://wiki.collectionspace.org/display/DOC/Configuring+CollectionSpace#ConfiguringCollectionSpace-Configuringyourtenant   And here's a detailed walk-through of the process:   https://wiki.collectionspace.org/display/DOC/Configuring+CollectionSpace%27s+Application+Layer+-+An+Overview Aron On Sun, Jun 12, 2016 at 10:53 AM, James Keeline <james@keeline.com> wrote: The help so far has been very useful as I try to meet near deadlines.  Thank you for the past and future help.  I will follow up on the threads to indicate what we did so that the Talk archive can have solutions as well as questions._____ We would like the object form's Title Translation Language to default to Chinese. I think the way to achieve this is to change the line of a copy of base-collectionobject.xml from the master copy: ~/cspace_source/cspace-application/tomcat-main/src/main/resources/defaults/base-collectionobject.xml The useful lines appear to be:       <repeat id="titleTranslationSubGroupList/titleTranslationSubGroup">        <field id="titleTranslation">          <selector>object-identification-object-title-translation</selector>        </field>        <field id="titleTranslationLanguage" autocomplete="vocab-languages" ui-type="enum">          <enum>            <default>urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(eng)'English'</default>            <blank-value>Please select a value</blank-value>          </enum>        </field>      </repeat> And I believe the one line should be changed to:             <default>urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(zho)'Chinese'</default> My question at this point is where to store my customized copy of this base-collectionobject.xml file.  My inclination is to put it in the bundle directory for the Tenant (sdchm here).  I have searched but have not found a document that gives advice on this.  Perhaps mentioning the specific XML file is not the way to go for this search. Also, I suppose that it is necessary to run mvn install again to make the file part of the active system. These tests are presently being done on a local copy in VirtualBox but will be migrated to production when we are happy with all of the customizations.  James D. Keeline _______________________________________________ Talk mailing list Talk@lists.collectionspace.org http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
AR
Aron Roberts
Mon, Jun 13, 2016 12:10 AM

Nice work, James! Truly appreciate your sharing these detailed notes with
the community!

On Sun, Jun 12, 2016 at 4:55 PM, James Keeline james@keeline.com wrote:

Awaiting a chance to get answers from the forum, I started to make other
changes to the static lists for the select inputs on the object cataloging
form.  I was heartened when these worked (after a number of steps) so I
went back to look at the language selector in the rendered HTML.  I found
that the namespace I changed was wrong.

This is what I tried.

<default>urn:cspace:sdchm.bpoc.org
http://sdchm.bpoc.org:vocabularies:name(languages):item:name(zho)'Chinese'</default>

This is what ultimately worked:

<default>urn:cspace:core.collectionspace.org
http://core.collectionspace.org:vocabularies:name(languages):item:name(zho)'Chinese'</default>

So, now I have a form that is close to what was discussed with the
museum.  I will see about installing it on production and getting approval.

Even though I answered my latest question for myself, I want to extend my
thanks again for the suggestions.  I'm sure I'll have more as the process
continues.  In time I may be in a position to answer questions for others.
I do so in other forums on technical and historical topics.

James D. Keeline


From: James Keeline james@keeline.com
To: Talk talk@lists.collectionspace.org
Cc: Aron Roberts aron@socrates.berkeley.edu
Sent: Sunday, June 12, 2016 3:25 PM

Subject: Re: [Talk] Set default of Title Translation Language to Chinese

I think I am getting closer but I am still not able to get the Chinese
selection on the Title Translation Language field.  I have other
changes to make along this line but figure that until I get this working, I
can't proceed to the others that involve changing values of the static and
dynamic term lists used in the object cataloging form.

I've tried to follow the examples that were given in the linked documents
and adapt them to our situation.  Here is where I stand:

I have a local VirtualBox with CSpace 4.3 installed on an Ubuntu 14.04.4
installation.  It has been initialized and I can save both terms and
objects.  When I start to catalog a new object, I expect the Title
Translation Language
field to be selected as Chinese.

I am working from the "step by step" link provided.


No changes were made to the settings.xml file (
~/cspace_source/application/tomcat-main/src/main/resources/tenants/sdchm/settings.xml
).


I did slightly modify the sdchm-tenant.xml file (
~/cspace_source/application/tomcat-main/src/main/resources/sdchm-tenant.xml
) to reflect the desired merge file:

<cspace-config tenantname="sdchm">
     <version>11</version>
     <include src="settings.xml,local-sdchm-settings.xml" merge=

"xmlmerge-settings.properties"
strip-root="yes" />

     <spec>
             <include src="base-relations.xml"/>
             <include src="base-schemas.xml"/>

             <records>
                     <enum-blank>Please select a value</enum-blank>

                     *<!-- JK 2016-06-12 add custom

sdchm-collectionobject.xml file to system -->*
<include src="base-collectionobject.xml
,sdchm-collectionobject.xml"* merge="xmlmerge.properties"*/>
<include src="base-authority.xml"/>

The rest of the file is unchanged.


I have a sdchm-collectionobject.xml file (
~/cspace_source/application/tomcat-main/src/main/resources/tenants/sdchm/sdchm-collectionobject.xml )
with just the changes that I thought were needed (for now).  This is the
complete content of that file:

<record id="collection-object" is-extension="true"> <services-record-path id="*sdchm*">collectionobjects_*sdchm*: http://collectionspace.org/services/collectionobject/local/*sdchm* ,collectionobjects_*sdchm*</services-record-path>

<!-- This file contains just the override changes from core-collectionobject.xml -->

<section id="identificationInformation"> <repeat id="titleGroupList/titleGroup"> <!-- selector>collection-object-titleGroup</selector --> <field id="title" ui-search="repeatable" in-title="yes" mini= "search,list"> <title-selector>titleBar-object-identification-object-title </title-selector> <selector>object-identification-object-title</selector> </field> <field id="titleLanguage" autocomplete="vocab-languages" ui-type= "enum"> <enum> <default>urn:cspace:core.collectionspace.org: vocabularies:name(languages):item:name(eng)'English'</default> </enum> <selector>object-identification-object-title-language</selector> </field>
   <repeat id="titleTranslationSubGroupList/titleTranslationSubGroup">
     <field id="titleTranslation">
       <selector>object-identification-object-title-translation
</selector> </field> <field id="titleTranslationLanguage" autocomplete= "vocab-languages" ui-type="enum"> <enum> *<!--* <default>urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(eng)'English'</default> *-->* *<default>urn:cspace:sdchm.bpoc.org:vocabularies:name(languages):item:name(zho)'Chinese'</default><!-- JK 2016-06-12 set default to Chinese -->* <blank-value>Please select a value</blank-value> </enum> </field> </repeat>
   <field id="titleType" seperate_ui_container="true">
     <selector>object-identification-object-title-type</selector>
     <options>
       <option id="">Please select a value</option>
       <option id="assigned-by-artist">Assigned by Artist</option>
       <option id="collection">Collection</option>
       <option id="generic">Generic</option>
       <option id="popular">Popular</option>
       <option id="series">Series</option>
       <option id="trade">Trade</option>
     </options>
   </field>
 </repeat>
</section> </record>

The files are owned by the cspace user and group and have what look to be
correct permissions (664).

Next the files were installed:

cd ~/cspace_source/application; mvn clean install -DskipTests

The services layer was updated and the servers started again:

$CSPACE_JEESERVER_HOME/bin/shutdown.sh -force
sleep 30
cd ~/cspace_source/services/services/JaxRsServiceProvider
ant deploy_services_artifacts

$CSPACE_JEESERVER_HOME/bin/startup.sh

The messages seemed normal enough, if verbose.

I cleared the browser cache (Chrome: Download History, Cookies, Cached
Images and Files, Hosted app data) for the past week.

I tested in the browser by logging in, starting a new record.  Right now
no language is selected in Title Translation Language.  For the longest
time it was defaulting to English.

Since my values were not showing up, I followed the first suggestion and
visited the following local URL to initialize the application layer:

http://192.168.56.10:8180/collectionspace/tenant/sdchm/init

My hopes were raised when I saw part of my edited sdchm-tenant.xml file as
a response:

cspace-config re-loaded<cspace-config tenantname="sdchm">

<version>11</version>
<include src="settings.xml,local-sdchm-settings.xml" merge="xmlmerge-settings.properties"
	strip-root="yes" />

<spec>
	<include src="base-relations.xml"/>
	<include src="base-schemas.xml"/>

	<records>
		<enum-blank>Please select a value</enum-blank>

                     *<!-- JK 2016-06-12 add custom sdchm-collectionobject.xml file to system -->*
		<include src="base-collectionobject.xml,*sdchm-collectionobject.xml" merge="xmlmerge.properties"*/>
		<include src="base-authority.xml"/>

I did another shut down and start up of the servers and cleared the caches
again per suggestions.


Next I looked for the most recent merged cache file and found this file:

/usr/local/share/apache-tomcat-7.0.57/temp/merged-app-config-6386489495469381254/merged-base-collectionobject.xml_sdchm-collectionobject.xml-.xml

Looking inside it showed what I hoped to see:

   <repeat id="titleTranslationSubGroupList/titleTranslationSubGroup">
     <field id="titleTranslation">
       <selector>object-identification-object-title-translation
</selector> </field> <field id="titleTranslationLanguage" autocomplete= "vocab-languages" ui-type="enum"> <enum> <!-- <default>urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(eng)'English'</default> -->

<default>urn:cspace:sdchm.bpoc.org:vocabularies:name(languages):item:name(zho)'Chinese'</default>
<!-- JK 2016-06-12 set default to Chinese -->
<blank-value>Please select a value</blank-value>
</enum>
</field>
</repeat>


At this point it feels very close but some little detail is preventing it
from working as it should.

Perhaps at some point I changed too much when trying to follow the
examples and apply it to this case.

I think I have the right values for the select list based on a Chrome
Inspect Element of the rendered HTML.

Perhaps a fresh and experienced set of eyes will spot something I have
missed.

James D. Keeline


From: Aron Roberts aron@socrates.berkeley.edu
To: James Keeline james@keeline.com
Cc: Talk talk@lists.collectionspace.org
Sent: Sunday, June 12, 2016 11:18 AM
Subject: Re: [Talk] Set default of Title Translation Language to Chinese

Hi James,

There's a recent example of how a tenant's configuration can override
defaults, for CollectionObjects and other record types, here:

https://github.com/collectionspace/application/tree/master/tomcat-main/src/main/resources/tenants/herbarium

And here - this is how you reference your customized configuration files:

https://github.com/collectionspace/application/blob/master/tomcat-main/src/main/resources/herbarium-tenant.xml

An overview of customizing configuration can be found here:

https://wiki.collectionspace.org/display/DOC/Configuring+CollectionSpace#ConfiguringCollectionSpace-Configuringyourtenant

And here's a detailed walk-through of the process:

https://wiki.collectionspace.org/display/DOC/Configuring+CollectionSpace%27s+Application+Layer+-+An+Overview

Aron

On Sun, Jun 12, 2016 at 10:53 AM, James Keeline james@keeline.com wrote:

The help so far has been very useful as I try to meet near deadlines.
Thank you for the past and future help.  I will follow up on the threads to
indicate what we did so that the Talk archive can have solutions as well as
questions.


We would like the object form's Title Translation Language to default to
Chinese.

I think the way to achieve this is to change the line of a copy of
base-collectionobject.xml from the master copy:

~/cspace_source/cspace-application/tomcat-main/src/main/resources/defaults/base-collectionobject.xml

The useful lines appear to be:

   <repeat id="titleTranslationSubGroupList/titleTranslationSubGroup">
     <field id="titleTranslation">
       <selector>object-identification-object-title-translation
</selector> </field> <field id="titleTranslationLanguage" autocomplete= "vocab-languages" ui-type="enum"> <enum> <default>urn:cspace:core.collectionspace.org: vocabularies:name(languages):item:name(*eng*)'*English*'</default> <blank-value>Please select a value</blank-value> </enum> </field> </repeat>

And I believe the one line should be changed to:

         <default>urn:cspace:core.collectionspace.org:

vocabularies:name(languages):item:name(zho)'Chinese'</default>

My question at this point is where to store my customized copy of this
base-collectionobject.xml file.  My inclination is to put it in the
bundle directory for the Tenant (sdchm here).  I have searched but have
not found a document that gives advice on this.  Perhaps mentioning the
specific XML file is not the way to go for this search.

Also, I suppose that it is necessary to run mvn install again to make
the file part of the active system.

These tests are presently being done on a local copy in VirtualBox but
will be migrated to production when we are happy with all of the
customizations.

James D. Keeline


Talk mailing list
Talk@lists.collectionspace.org

http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org

Nice work, James! Truly appreciate your sharing these detailed notes with the community! On Sun, Jun 12, 2016 at 4:55 PM, James Keeline <james@keeline.com> wrote: > Awaiting a chance to get answers from the forum, I started to make other > changes to the static lists for the select inputs on the object cataloging > form. I was heartened when these worked (after a number of steps) so I > went back to look at the language selector in the rendered HTML. I found > that the namespace I changed was wrong. > > This is what I tried. > > *<default>urn:cspace:sdchm.bpoc.org > <http://sdchm.bpoc.org>:vocabularies:name(languages):item:name(zho)'Chinese'</default>* > > This is what ultimately worked: > > *<default>urn:cspace:core.collectionspace.org > <http://core.collectionspace.org>:vocabularies:name(languages):item:name(zho)'Chinese'</default>* > > So, now I have a form that is close to what was discussed with the > museum. I will see about installing it on production and getting approval. > > Even though I answered my latest question for myself, I want to extend my > thanks again for the suggestions. I'm sure I'll have more as the process > continues. In time I may be in a position to answer questions for others. > I do so in other forums on technical and historical topics. > > James D. Keeline > > ------------------------------ > *From:* James Keeline <james@keeline.com> > *To:* Talk <talk@lists.collectionspace.org> > *Cc:* Aron Roberts <aron@socrates.berkeley.edu> > *Sent:* Sunday, June 12, 2016 3:25 PM > > *Subject:* Re: [Talk] Set default of Title Translation Language to Chinese > > I think I am getting closer but I am still not able to get the Chinese > selection on the *Title Translation Language* field. I have other > changes to make along this line but figure that until I get this working, I > can't proceed to the others that involve changing values of the static and > dynamic term lists used in the object cataloging form. > > I've tried to follow the examples that were given in the linked documents > and adapt them to our situation. Here is where I stand: > > I have a local VirtualBox with CSpace 4.3 installed on an Ubuntu 14.04.4 > installation. It has been initialized and I can save both terms and > objects. When I start to catalog a new object, I expect the *Title > Translation Language* field to be selected as Chinese. > > I am working from the "step by step" link provided. > _____ > > No changes were made to the *settings.xml* file ( > *~/cspace_source/application/tomcat-main/src/main/resources/tenants/sdchm/settings.xml* > ). > _____ > > I did slightly modify the *sdchm-tenant.xml* file ( > *~/cspace_source/application/tomcat-main/src/main/resources/sdchm-tenant.xml* > ) to reflect the desired merge file: > > <cspace-config tenantname="sdchm"> > > <version>11</version> > <include src="settings.xml,local-sdchm-settings.xml" merge= > "xmlmerge-settings.properties" > strip-root="yes" /> > > <spec> > <include src="base-relations.xml"/> > <include src="base-schemas.xml"/> > > <records> > <enum-blank>Please select a value</enum-blank> > > *<!-- JK 2016-06-12 add custom > sdchm-collectionobject.xml file to system -->* > <include src="base-collectionobject.xml > *,sdchm-collectionobject.xml"** merge="xmlmerge.properties"*/> > <include src="base-authority.xml"/> > > The rest of the file is unchanged. > _____ > > I have a *sdchm-collectionobject.xml* file ( > *~/cspace_source/application/tomcat-main/src/main/resources/tenants/sdchm/sdchm-collectionobject.xml* ) > with just the changes that I thought were needed (for now). This is the > complete content of that file: > > <record id="collection-object" is-extension="true"> > <services-record-path id="*sdchm*">collectionobjects_*sdchm*: > http://collectionspace.org/services/collectionobject/local/*sdchm* > ,collectionobjects_*sdchm*</services-record-path> > > *<!-- This file contains just the override changes from > core-collectionobject.xml -->* > <section id="identificationInformation"> > <repeat id="titleGroupList/titleGroup"> > <!-- selector>collection-object-titleGroup</selector --> > <field id="title" ui-search="repeatable" in-title="yes" mini= > "search,list"> > <title-selector>titleBar-object-identification-object-title > </title-selector> > <selector>object-identification-object-title</selector> > </field> > <field id="titleLanguage" autocomplete="vocab-languages" ui-type= > "enum"> > <enum> > <default>urn:cspace:core.collectionspace.org: > vocabularies:name(languages):item:name(eng)'English'</default> > </enum> > <selector>object-identification-object-title-language</selector> > </field> > > <repeat id="titleTranslationSubGroupList/titleTranslationSubGroup"> > <field id="titleTranslation"> > <selector>object-identification-object-title-translation > </selector> > </field> > <field id="titleTranslationLanguage" autocomplete= > "vocab-languages" ui-type="enum"> > <enum> > *<!--* <default>urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(eng)'English'</default> > *-->* > *<default>urn:cspace:sdchm.bpoc.org:vocabularies:name(languages):item:name(zho)'Chinese'</default><!-- > JK 2016-06-12 set default to Chinese -->* > <blank-value>Please select a value</blank-value> > </enum> > </field> > </repeat> > > <field id="titleType" seperate_ui_container="true"> > <selector>object-identification-object-title-type</selector> > <options> > <option id="">Please select a value</option> > <option id="assigned-by-artist">Assigned by Artist</option> > <option id="collection">Collection</option> > <option id="generic">Generic</option> > <option id="popular">Popular</option> > <option id="series">Series</option> > <option id="trade">Trade</option> > </options> > </field> > </repeat> > </section> > > </record> > > The files are owned by the cspace user and group and have what look to be > correct permissions (664). > > Next the files were installed: > > *cd ~/cspace_source/application; mvn clean install -DskipTests* > > The services layer was updated and the servers started again: > > *$CSPACE_JEESERVER_HOME/bin/shutdown.sh -force* > *sleep 30* > *cd ~/cspace_source/services/services/JaxRsServiceProvider* > *ant deploy_services_artifacts* > > *$CSPACE_JEESERVER_HOME/bin/startup.sh* > > The messages seemed normal enough, if verbose. > > I cleared the browser cache (Chrome: Download History, Cookies, Cached > Images and Files, Hosted app data) for the past week. > > I tested in the browser by logging in, starting a new record. Right now > no language is selected in *Title Translation Language*. For the longest > time it was defaulting to English. > > Since my values were not showing up, I followed the first suggestion and > visited the following local URL to initialize the application layer: > > http://192.168.56.10:8180/collectionspace/tenant/sdchm/init > > My hopes were raised when I saw part of my edited sdchm-tenant.xml file as > a response: > > cspace-config re-loaded<cspace-config tenantname="sdchm"> > > <version>11</version> > <include src="settings.xml,local-sdchm-settings.xml" merge="xmlmerge-settings.properties" > strip-root="yes" /> > > <spec> > <include src="base-relations.xml"/> > <include src="base-schemas.xml"/> > > <records> > <enum-blank>Please select a value</enum-blank> > > *<!-- JK 2016-06-12 add custom sdchm-collectionobject.xml file to system -->* > <include src="base-collectionobject.xml,*sdchm-collectionobject.xml" merge="xmlmerge.properties"*/> > <include src="base-authority.xml"/> > > I did another shut down and start up of the servers and cleared the caches > again per suggestions. > _____ > > Next I looked for the most recent merged cache file and found this file: > > > /usr/local/share/apache-tomcat-7.0.57/temp/merged-app-config-6386489495469381254/merged-base-collectionobject.xml_sdchm-collectionobject.xml-.xml > > Looking inside it showed what I hoped to see: > > <repeat id="titleTranslationSubGroupList/titleTranslationSubGroup"> > <field id="titleTranslation"> > <selector>object-identification-object-title-translation > </selector> > </field> > <field id="titleTranslationLanguage" autocomplete= > "vocab-languages" ui-type="enum"> > <enum> > <!-- <default>urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(eng)'English'</default> > --> > > *<default>urn:cspace:sdchm.bpoc.org:vocabularies:name(languages):item:name(zho)'Chinese'</default>* > <!-- JK 2016-06-12 set default to Chinese --> > <blank-value>Please select a value</blank-value> > </enum> > </field> > </repeat> > _____ > > At this point it feels very close but some little detail is preventing it > from working as it should. > > Perhaps at some point I changed too much when trying to follow the > examples and apply it to this case. > > I think I have the right values for the select list based on a Chrome > Inspect Element of the rendered HTML. > > Perhaps a fresh and experienced set of eyes will spot something I have > missed. > > > James D. Keeline > > ------------------------------ > *From:* Aron Roberts <aron@socrates.berkeley.edu> > *To:* James Keeline <james@keeline.com> > *Cc:* Talk <talk@lists.collectionspace.org> > *Sent:* Sunday, June 12, 2016 11:18 AM > *Subject:* Re: [Talk] Set default of Title Translation Language to Chinese > > Hi James, > > There's a recent example of how a tenant's configuration can override > defaults, for CollectionObjects and other record types, here: > > > https://github.com/collectionspace/application/tree/master/tomcat-main/src/main/resources/tenants/herbarium > > And here - this is how you reference your customized configuration files: > > > https://github.com/collectionspace/application/blob/master/tomcat-main/src/main/resources/herbarium-tenant.xml > > An overview of customizing configuration can be found here: > > > https://wiki.collectionspace.org/display/DOC/Configuring+CollectionSpace#ConfiguringCollectionSpace-Configuringyourtenant > > And here's a detailed walk-through of the process: > > > https://wiki.collectionspace.org/display/DOC/Configuring+CollectionSpace%27s+Application+Layer+-+An+Overview > > Aron > > On Sun, Jun 12, 2016 at 10:53 AM, James Keeline <james@keeline.com> wrote: > > The help so far has been very useful as I try to meet near deadlines. > Thank you for the past and future help. I will follow up on the threads to > indicate what we did so that the Talk archive can have solutions as well as > questions. > _____ > > We would like the object form's Title Translation Language to default to > Chinese. > > I think the way to achieve this is to change the line of a copy of > *base-collectionobject.xml* from the master copy: > > > ~/cspace_source/cspace-application/tomcat-main/src/main/resources/defaults/base-collectionobject.xml > > The useful lines appear to be: > > <repeat id="titleTranslationSubGroupList/titleTranslationSubGroup"> > <field id="titleTranslation"> > <selector>object-identification-object-title-translation > </selector> > </field> > <field id="titleTranslationLanguage" autocomplete= > "vocab-languages" ui-type="enum"> > <enum> > <default>urn:cspace:core.collectionspace.org: > vocabularies:name(languages):item:name(*eng*)'*English*'</default> > <blank-value>Please select a value</blank-value> > </enum> > </field> > </repeat> > > And I believe the one line should be changed to: > > <default>urn:cspace:core.collectionspace.org: > vocabularies:name(languages):item:name(*zho*)'*Chinese*'</default> > > My question at this point is where to store my customized copy of this > *base-collectionobject.xml* file. My inclination is to put it in the > *bundle* directory for the Tenant (sdchm here). I have searched but have > not found a document that gives advice on this. Perhaps mentioning the > specific XML file is not the way to go for this search. > > Also, I suppose that it is necessary to run *mvn install* again to make > the file part of the active system. > > These tests are presently being done on a local copy in VirtualBox but > will be migrated to production when we are happy with all of the > customizations. > > > James D. Keeline > > > _______________________________________________ > Talk mailing list > Talk@lists.collectionspace.org > > http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org > > > > > > >