Skip to content

Test geonetwork link checker 6-aws-syd #7

@bhasin85

Description

@bhasin85

1. Build core-geonetwork locally

2. Deploy to vagrant

11:17:00 (master) ~/AODN/chef$ cp /home/ankit/AODN/core-geonetwork/web/target/geonetwork.war .

vagrant@vagrant-6-aws-syd:/mnt/ebs/tomcat7/geonetwork_aodn/webapps$ sudo rm -rf geonetwork.war geonetwork
vagrant@vagrant-6-aws-syd:/mnt/ebs/tomcat7/geonetwork_aodn/webapps$ sudo cp /vagrant/geonetwork.war .
vagrant@vagrant-6-aws-syd:/mnt/ebs/tomcat7/geonetwork_aodn/webapps$ sudo service tomcat_geonetwork_aodn restart

3. Verify link checker config

vagrant@vagrant-6-aws-syd:/mnt/ebs/tomcat7/geonetwork_aodn/webapps$ sudo nano /mnt/ebs/tomcat7/geonetwork_aodn/webapps/geonetwork/WEB-INF/classes/JZkitApplicationContext.xml

4. Modify geonetwork_aodn/webapps/geonetwork/WEB-INF/config.xml change LinkMonitorEnabled to true

5. Update core-geonetwork/web/src/main/webapp/WEB-INF/classes/JZkitApplicationContext.xml and comment the resource monitor you don't want to check

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
           http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
           http://www.springframework.org/schema/context
           http://www.springframework.org/schema/context/spring-context-2.5.xsd">

  <context:component-scan base-package="org.jzkit.search.provider">
    <context:include-filter type="regex" expression=".*PluginMetadata.*"/>
  </context:component-scan>
  <context:component-scan base-package="org.jzkit.search.util.QueryBuilder"/>
  <context:component-scan base-package="org.jzkit.search.util.QueryFormatter"/>
  <context:component-scan base-package="org.jzkit.search.util.RecordBuilder"/>


  <!-- ========================= GENERAL DEFINITIONS ========================= -->

  <bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
    <property name="basename"><value>messages</value></property>
  </bean>


  <!-- ========================= PERSISTENCE DEFINITIONS ========================= -->

  <!-- ========================= BUSINESS DEFINITIONS ========================= -->

  <bean id="ContextGateway" class="org.fao.geonet.ContextContainer">
  </bean>

  <bean id="OnlineResourceMonitor" class="org.fao.geonet.monitor.onlineresource.OnlineResourceMonitorService">
  </bean>

<!--  <bean id="OnlineResourceCheckerDefault" class="org.fao.geonet.monitor.onlineresource.OnlineResourceCheckerDefault">
    <property name="onlineResourceTypes">
      <set>
        <value>WWW:DOWNLOAD-1.0-http&#45;&#45;downloadother</value>
      </set>
    </property>
  </bean>

  <bean id="OnlineResourceCheckerWmsGetCapabilities" class="org.fao.geonet.monitor.onlineresource.OnlineResourceCheckerWmsGetCapabilities">
    <property name="onlineResourceTypes">
      <set>
        <value>OGC:WMS-1.1.1-http-get-map</value>
      </set>
    </property>
  </bean>-->

<!--  <bean id="OnlineResourceCheckerWms" class="org.fao.geonet.monitor.onlineresource.OnlineResourceCheckerWms">
    <property name="onlineResourceTypes">
      <set>
        <value>OGC:WMS-1.1.1-http-get-map</value>
      </set>
    </property>
  </bean>

  <bean id="OnlineResourceCheckerNcwmsAbom" class="org.fao.geonet.monitor.onlineresource.OnlineResourceCheckerNcwmsAbom">
    <property name="onlineResourceTypes">
      <set>
        <value>IMOS:NCWMS&#45;&#45;proto</value>
      </set>
    </property>
  </bean>

  <bean id="OnlineResourceCheckerWfs" class="org.fao.geonet.monitor.onlineresource.OnlineResourceCheckerWfs">
    <property name="onlineResourceTypes">
      <set>
        <value>OGC:WFS-1.0.0-http-get-capabilities</value>
        <value>IMOS:AGGREGATION&#45;&#45;bodaac</value>
      </set>
    </property>
  </bean>-->

  <bean id="OIDRegister" class="org.jzkit.a2j.codec.util.OIDRegister">
    <constructor-arg index="0"><value>/a2j.properties</value></constructor-arg>
  </bean>

  <bean id="Z3950Listener" class="org.jzkit.z3950.server.Z3950Listener">
    <property name="backendBeanName"><value>JZKit2SearchBackend</value></property>
    <property name="default"><value>GeonetworkDB</value></property>
  </bean>

  <bean id="JZKit2SearchBackend" class="org.jzkit.service.z3950server.JZKitBackend">
  </bean>

  <bean id="JZKitConfig" class="org.jzkit.configuration.provider.xml.XMLImpl" init-method="init">
    <constructor-arg index="0"><value>/JZKitConfig.xml</value></constructor-arg>
  </bean>

  <bean id="ProfileService" class="org.fao.geonet.services.util.z3950.jzkitextensions.GNProfileService">
    <property name="configuration"><ref bean="JZKitConfig"/></property>
  </bean>

  <bean id="TransformationService" class="org.jzkit.search.util.RecordConversion.FragmentTransformerService" init-method="init">
    <constructor-arg index="0"><ref bean="JZKitConfig"/></constructor-arg>
  </bean>
 
 

  <bean id="RecordBuilderService" class="org.jzkit.search.util.RecordBuilder.RecordBuilderService" init-method="init"/>

  <bean id="StatelessQueryService" class="org.jzkit.search.impl.StatelessQueryService" init-method="init">
    <constructor-arg index="0"><value>50</value></constructor-arg>
    <constructor-arg index="1"><value>180000</value></constructor-arg>
  </bean>

  <bean id="SearchSession" class="org.jzkit.search.impl.SearchSessionImpl" scope="prototype">
    <constructor-arg index="0"><ref bean="ProfileService"/></constructor-arg>
    <constructor-arg index="1"><ref bean="TransformationService"/></constructor-arg>
    <constructor-arg index="2"><ref bean="RecordBuilderService"/></constructor-arg>
  </bean>

  <bean id="SearchSessionFactory"
        class="org.fao.geonet.services.util.z3950.GNSearchSessionFactory"
        init-method="init">
  </bean>

  <!-- conversion rules -->
  <bean id="RPNToInternalRules" class="org.jzkit.util.PropsHolder">
    <constructor-arg index="0"><value>/InternalAttrTypes.properties</value></constructor-arg>
  </bean>

  <bean id="InternalToType1ConversionRules" class="org.jzkit.z3950.QueryModel.PropsBasedInternalToType1ConversionRules">
    <constructor-arg index="0"><value>/InternalToType1Rules.properties</value></constructor-arg>
  </bean>

</beans>

6. Delete all metadata records except one in geonetwork

  1. Give the record you don't want to delete 5 star rating
  2. Search by popularity
  3. Select all the records
  4. Unselect the 5 star record
  5. Delete the selected records

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions