Mercurial > hg > ismi-richfaces
changeset 2:d18e60c5da80
(none)
author | jurzua |
---|---|
date | Wed, 29 Oct 2014 14:02:11 +0000 |
parents | 2e911857a759 |
children | 80d99e664512 |
files | src/main/resources/build.xml src/main/resources/c3p0.properties src/main/resources/hibernate.cfg.xml src/main/resources/hibernate.cfg.xml.template src/main/resources/log4j.properties src/main/resources/openmind-context.xml src/main/resources/openmind.properties src/main/resources/own-value.cfg.xml src/main/resources/own-value.cfg.xml.template |
diffstat | 9 files changed, 829 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/resources/build.xml Wed Oct 29 14:02:11 2014 +0000 @@ -0,0 +1,182 @@ +<project name="Script" default="print" basedir="../"> + + <path id="om.classpath"> + <fileset dir="${basedir}/lib"> + <include name="*.jar" /> + </fileset> + </path> + + + <target name="ShowRepositoryName"> + <java classname="org.mpi.openmind.scripts.ShowRepositoryName" maxmemory="512m" fork="true" failonerror="true"> + <arg value="" /> + <classpath> + <pathelement path="${basedir}/classes" /> + <path refid="om.classpath" /> + </classpath> + </java> + </target> + + <target name="RepositoryName"> + <java classname="org.mpi.openmind.scripts.RepositoryName" maxmemory="512m" fork="true" failonerror="true"> + <arg value="" /> + <classpath> + <pathelement path="${basedir}/classes" /> + <path refid="om.classpath" /> + </classpath> + </java> + </target> + + <target name="NormalizeOWEntities"> + <java classname="org.mpi.openmind.scripts.NormalizeOW" maxmemory="1024m" fork="true" failonerror="true"> + <arg value="ENTITY" /> + <classpath> + <pathelement path="${basedir}/classes" /> + <path refid="om.classpath" /> + </classpath> + </java> + </target> + + <target name="NormalizeOWAttributes"> + <java classname="org.mpi.openmind.scripts.NormalizeOW" maxmemory="1024m" fork="true" failonerror="true"> + <arg value="ATTRIBUTE" /> + <classpath> + <pathelement path="${basedir}/classes" /> + <path refid="om.classpath" /> + </classpath> + </java> + </target> + + <target name="DoubleRelationsShow"> + <java classname="org.mpi.openmind.scripts.DoubleRelations" maxmemory="1024m" fork="true" failonerror="true"> + <arg value="SHOW" /> + <classpath> + <pathelement path="${basedir}/classes" /> + <path refid="om.classpath" /> + </classpath> + </java> + </target> + + <target name="DoubleRelationsReduce"> + <java classname="org.mpi.openmind.scripts.DoubleRelations" maxmemory="1024m" fork="true" failonerror="true"> + <arg value="REDUCE" /> + <classpath> + <pathelement path="${basedir}/classes" /> + <path refid="om.classpath" /> + </classpath> + </java> + </target> + + <target name="RelationsWithoutSrcOrTar"> + <java classname="org.mpi.openmind.scripts.RelationsWithoutSrcOrTar" maxmemory="1024m" fork="true" failonerror="true"> + <classpath> + <pathelement path="${basedir}/classes" /> + <path refid="om.classpath" /> + </classpath> + </java> + </target> + + <target name="RelationsWithoutSrcOrTarReduce"> + <java classname="org.mpi.openmind.scripts.RelationsWithoutSrcOrTar" maxmemory="1024m" fork="true" failonerror="true"> + <arg value="REDUCE" /> + <classpath> + <pathelement path="${basedir}/classes" /> + <path refid="om.classpath" /> + </classpath> + </java> + </target> + + <target name="GenerateWitnessOwnValue"> + <java classname="org.mpi.openmind.scripts.WitnessOwnValueGenerator" maxmemory="1024m" fork="true" failonerror="true"> + <arg value="" /> + <classpath> + <pathelement path="${basedir}/classes" /> + <path refid="om.classpath" /> + </classpath> + </java> + </target> + + <target name="RoleToRelation"> + <java classname="org.mpi.openmind.scripts.RoleToRelation" maxmemory="1024m" fork="true" failonerror="true"> + <arg value="${filePath}" /> + <classpath> + <pathelement path="${basedir}/classes" /> + <path refid="om.classpath" /> + </classpath> + </java> + </target> + + <target name="CurrentVersionForRelations"> + <java classname="org.mpi.openmind.scripts.CurrentVersionForRelations" maxmemory="1024m" fork="true" failonerror="true"> + <arg value="${filePath}" /> + <classpath> + <pathelement path="${basedir}/classes" /> + <path refid="om.classpath" /> + </classpath> + </java> + </target> + + <target name="CurrentVersionSrcRelation"> + <java classname="org.mpi.openmind.scripts.CurrentVersionSrcRelation" maxmemory="1024m" fork="true" failonerror="true"> + <arg value="${filePath}" /> + <classpath> + <pathelement path="${basedir}/classes" /> + <path refid="om.classpath" /> + </classpath> + </java> + </target> + + <target name="MakeEntitiesPrivate"> + <java classname="org.mpi.openmind.scripts.ChangeEntityPrivacity" maxmemory="1024m" fork="true" failonerror="true"> + <arg value="false" /> + <classpath> + <pathelement path="${basedir}/classes" /> + <path refid="om.classpath" /> + </classpath> + </java> + </target> + + <target name="MakeEntitiesPublic"> + <java classname="org.mpi.openmind.scripts.ChangeEntityPrivacity" maxmemory="1024m" fork="true" failonerror="true"> + <arg value="true" /> + <classpath> + <pathelement path="${basedir}/classes" /> + <path refid="om.classpath" /> + </classpath> + </java> + </target> + <target name="WitnessCreatedByText"> + <java classname="org.mpi.openmind.scripts.WitnessCreatedByText" maxmemory="1024m" fork="true" failonerror="true"> + <arg value="true" /> + <classpath> + <pathelement path="${basedir}/classes" /> + <path refid="om.classpath" /> + </classpath> + </java> + </target> + + <target name="print"> + <echo> + ### SCRIPTS COMMANDS ### + + *** commands list *** + ShowRepositoryName: show the amount of Repositories without name attribute. + RepositoryName: create an attribute name for all repositories without one. + NormalizeOWEntities: generate the normalizedOW for the entities marked as CURRENT_VERSION. + NormalizeOWAttributes: generate the normalizedOW for the attributes marked as CURRENT_VERSION. + DoubleRelationsShow + DoubleRelationsReduce + GenerateWitnessOwnValue + CurrentVersionForRelations + RoleToRelation use -DfilePath to set location of the definition's file. + CurrentVersionSrcRelation + MakeEntitiesPrivate + MakeEntitiesPublic + WitnessCreatedByText removes the relations WITNES created by PERSON + RelationsWithoutSrcOrTar + RelationsWithoutSrcOrTarReduce + + </echo> + </target> + +</project>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/resources/c3p0.properties Wed Oct 29 14:02:11 2014 +0000 @@ -0,0 +1,1 @@ +c3p0.testConnectionOnCheckout=true \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/resources/hibernate.cfg.xml Wed Oct 29 14:02:11 2014 +0000 @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> +<hibernate-configuration> + <session-factory> + + <!-- C3p0 --> + <property name="hibernate.c3p0.acquire_increment">1</property> + <property name="hibernate.c3p0.idle_test_period">300</property> + <property name="hibernate.c3p0.timeout">120</property> + <property name="hibernate.c3p0.max_size">25</property> + <property name="hibernate.c3p0.min_size">1</property> + <property name="hibernate.c3p0.max_statement">0</property> + <property name="hibernate.c3p0.preferredTestQuery">select 1;</property> + + <property name="connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property> + + <!-- <property name="show_sql">true</property> --> + <!-- <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property> --> + + <property name="hibernate.dialect">org.mpi.openmind.repository.utils.CustomMysqlDialect</property> + <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property> + <property name="hibernate.connection.url">jdbc:mysql://localhost/openmind?characterEncoding=UTF-8</property> + <property name="hibernate.connection.charSet">UTF-8</property> + <property name="hibernate.connection.username">root</property> + <property name="hibernate.connection.password">e1nste1n</property> + + <!-- + <property name="hibernate.connection.username">ismi</property> + <property name="hibernate.connection.password">ismipw</property> + <property name="hibernate.connection.username">root</property> + <property name="hibernate.connection.password">e1nste1n</property> + <property name="hibernate.connection.username">root</property> + <property name="hibernate.connection.password">dm2eroot</property> + <property name="hibernate.connection.username">root</property> + <property name="hibernate.connection.password">admin</property> + --> + + <!-- <property name="show_sql">true</property> --> + <property name="current_session_context_class">thread</property> + <!-- <property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property> --> + <!-- <property name="hbm2ddl.auto">create</property> --> + <!-- <property name="hibernate.hbm2ddl.auto">validate</property> --> + + + <mapping class="org.mpi.openmind.repository.bo.Node" /> + <mapping class="org.mpi.openmind.repository.bo.Attribute" /> + <mapping class="org.mpi.openmind.repository.bo.Entity" /> + <mapping class="org.mpi.openmind.repository.bo.Relation" /> + <mapping class="org.mpi.openmind.repository.bo.View" /> + <mapping class="org.mpi.openmind.repository.bo.ViewerAttribute" /> + <mapping class="org.mpi.openmind.repository.bo.ViewerPage" /> + <mapping class="org.mpi.openmind.repository.bo.utils.Sequence" /> + <mapping class="org.mpi.openmind.security.bo.User" /> + <mapping class="org.mpi.openmind.security.bo.Group" /> + <mapping class="org.mpi.openmind.security.bo.Role" /> + <mapping class="org.mpi.openmind.security.bo.Permission" /> + <mapping class="org.mpi.openmind.security.bo.utils.UserRole" /> + <mapping class="org.mpi.openmind.security.bo.utils.GroupRole" /> + <mapping class="org.mpi.openmind.security.bo.utils.UserGroup" /> + <mapping class="org.mpi.openmind.security.bo.utils.RolePermission" /> + </session-factory> +</hibernate-configuration>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/resources/hibernate.cfg.xml.template Wed Oct 29 14:02:11 2014 +0000 @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> +<hibernate-configuration> + <session-factory> + <!-- second level cache configuration --> + <!-- Enable/Disable the second-level cache --> + <property name="cache.use_second_level_cache">true</property> + <property name="cache.provider_class">org.hibernate.cache.EhCacheProvider</property> + <property name="cache.use_structured_entries">true</property> + <property name="cache.use_query_cache">false</property> + <property name="cache.use_minimal_puts">true</property> + + <!-- property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property--> + <property name="hibernate.dialect">org.mpi.openmind.repository.utils.CustomMysqlDialect</property> + <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property> + <property name="hibernate.connection.url">jdbc:mysql://localhost/openmind?characterEncoding=UTF-8</property> + <property name="hibernate.connection.username">root</property> + <property name="hibernate.connection.password">admin</property> + <property name="hibernate.connection.charSet">UTF-8</property> + <!--property name="show_sql">true</property--> + <property name="current_session_context_class">thread</property> + <property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property> + <!--property name="hbm2ddl.auto">create</property--> + <mapping class="org.mpi.openmind.repository.bo.Node" /> + <mapping class="org.mpi.openmind.repository.bo.Attribute" /> + <mapping class="org.mpi.openmind.repository.bo.Entity" /> + <mapping class="org.mpi.openmind.repository.bo.Relation" /> + <mapping class="org.mpi.openmind.repository.bo.View" /> + <mapping class="org.mpi.openmind.repository.bo.utils.Sequence" /> + <mapping class="org.mpi.openmind.security.bo.User" /> + <mapping class="org.mpi.openmind.security.bo.Group" /> + <mapping class="org.mpi.openmind.security.bo.Role" /> + <mapping class="org.mpi.openmind.security.bo.Permission" /> + <mapping class="org.mpi.openmind.security.bo.utils.UserRole" /> + <mapping class="org.mpi.openmind.security.bo.utils.GroupRole" /> + <mapping class="org.mpi.openmind.security.bo.utils.UserGroup" /> + <mapping class="org.mpi.openmind.security.bo.utils.RolePermission" /> + </session-factory> +</hibernate-configuration>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/resources/log4j.properties Wed Oct 29 14:02:11 2014 +0000 @@ -0,0 +1,84 @@ +### direct log messages to stdout ### +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.Target=System.out +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern=%d{dd MMM HH:mm:ss,SSS} %5p %c{1}:%L - %m%n +#%d{dd MMM yyyy HH:mm:ss,SSS} +#%d{ABSOLUTE} +### direct messages to file hibernate.log ### +log4j.appender.file=org.apache.log4j.FileAppender +log4j.appender.file.File=${catalina.home}/logs/hibernate.log +log4j.appender.file.layout=org.apache.log4j.PatternLayout +log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n + +log4j.appender.persistenceServiceFile=org.apache.log4j.FileAppender +log4j.appender.persistenceServiceFile.File=${catalina.home}/logs/persistenceService.log +log4j.appender.persistenceServiceFile.layout=org.apache.log4j.PatternLayout +log4j.appender.persistenceServiceFile.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n + +log4j.appender.ismiFile=org.apache.log4j.FileAppender +log4j.appender.ismiFile.File=${catalina.home}/logs/ismi.log +log4j.appender.ismiFile.layout=org.apache.log4j.PatternLayout +log4j.appender.ismiFile.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n + +### set log levels - for more verbose logging change 'info' to 'debug' ## + +log4j.rootLogger=warn, stdout, ismiFile + +#Others +log4j.logger.org.hibernate.connection.C3P0ConnectionProvider=error + +# Log JDBC bind parameter runtime arguments +#log4j.logger.org.hibernate.type=trace + +#OM +log4j.logger.org.mpi.openmind.repository.services.PersistenceService=info +log4j.logger.org.mpi.openmind.search.SearchService=info +log4j.logger.org.mpi.openmind.cache.CacheService=info +log4j.logger.org.mpi.openmind.cache.AbstractCacheService=info +log4j.logger.org.mpi.openmind.configuration.ConfigurationService=info +log4j.logger.org.mpi.openmind.cache.WrapperService=info +log4j.logger.org.mpi.openmind.repository.services.ServiceRegistry=info +log4j.logger.org.mpi.openmind.repository.bo.Entity=info +#ISMI +log4j.logger.de.mpiwg.itgroup.ismi.search.beans.SimpleSearchBean=info +log4j.logger.de.mpiwg.itgroup.ismi.entry.beans.SessionBean=info +log4j.logger.de.mpiwg.itgroup.ismi.merge.GeneralMerge=info +log4j.logger.de.mpiwg.itgroup.ismi.servlets.JSONInterface=info +log4j.logger.de.mpiwg.itgroup.ismi.entry.beans.CurrentTextBean=info +log4j.logger.de.mpiwg.itgroup.ismi.entry.beans.CurrentPersonBean=info +log4j.logger.de.mpiwg.itgroup.ismi.entry.beans.ApplicationBean=info +log4j.logger.de.mpiwg.itgroup.ismi.entry.beans.CurrentWitnessBean=info +log4j.logger.de.mpiwg.itgroup.ismi.servlets.jsonmethods.JSONGetRels=info +log4j.logger.de.mpiwg.itgroup.ismi.json.utils.JSONUtils=info +log4j.logger.org.mpiwg.itgroup.escidoc.ESciDocCache=info + +log4j.logger.de.mpiwg.itgroup.ismi=info + +log4j.logger.org.mpi.openmind.search.AbstractSearchService=info +log4j.logger.org.mpi.openmind.repository.services.AbstractPersistenceService=info + +log4j.logger.de.mpiwg.itgroup.ismi.entry.beans.CurrentWitnessBean=info +log4j.logger.de.mpiwg.itgroup.ismi.publicView.PublicCodexList=info; +#log4j.logger. +#log4j.logger. +#log4j.logger. + +#log4j.logger.net.sf.hibernate=debug, stdout +#Hibernate +#log4j.logger.org.hibernate.cfg=debug, file +#log4j.logger.org.hibernate.cfg.annotations.Version=info, stdout +#log4j.logger.org.hibernate.cfg.Environment=info, stdout +#log4j.logger.org.hibernate.cfg.AnnotationBinder=info, stdout + + +### enable the following line if you want to track down connection ### +### leakages when using DriverManagerConnectionProvider ### +#log4j.logger.net.sf.hibernate.connection.DriverManagerConnectionProvider=trace + +### log JDBC bind parameters ### +#log4j.logger.net.sf.hibernate.type=debug + + + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/resources/openmind-context.xml Wed Oct 29 14:02:11 2014 +0000 @@ -0,0 +1,75 @@ +<?xml version="1.0" encoding="UTF-8"?> +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"> + + <bean id="persistenceService" class="org.mpi.openmind.repository.services.PersistenceService"> + <property name="configurationService" ref="configurationService"/> + <property name="ownValueGenerator" ref="ownValueGenerator"/> + </bean> + + <bean id="cache" class="org.mpi.openmind.cache.CacheService"> + <property name="ps" ref="persistenceService"/> + </bean> + + <bean id="wrapper" class="org.mpi.openmind.cache.WrapperService"> + <property name="cache" ref="cache"/> + </bean> + + + <bean id="searchService" class="org.mpi.openmind.search.SearchService"> + <property name="om" ref="wrapper"/> + </bean> + + <bean id="ownValueGenerator" class="org.mpi.openmind.repository.utils.OwnValueGenerator"> + <property name="configurationService" ref="configurationService"/> + </bean> + + <bean id="configurationService" class="org.mpi.openmind.configuration.ConfigurationService"> + </bean> + + <!-- + <bean id="ontologyService" class="org.mpi.openmind.repository.services.OntologyService"> + <property name="persistenceService" ref="persistenceService"/> + <property name="searchService" ref="searchService"/> + </bean> + --> + + <bean id="securityService" class="org.mpi.openmind.security.SecurityService"> + <property name="persistenceService" ref="persistenceService"/> + </bean> + + + <!-- Scheduler for Date-Based Mailings --> + <bean id="scheduling" class="org.mpi.openmind.scheduling.utils.Scheduling"> + <property name="persistenceService" ref="persistenceService"/> + <property name="configurationService" ref="configurationService"/> + </bean> + + <bean id="schedulingJobs" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"> + <property name="targetObject" ref="scheduling"/> + <property name="targetMethod" value="dailyKickOff"/> + <!--property name="concurrent" value="false"/--> + </bean> + + <bean id="schedulingCronTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean"> + <property name="jobDetail" ref="schedulingJobs"/> + <!-- daily 6 AM --> + + <property name="cronExpression" value="0 0 6 * * ?"/> + <!-- + every 5 minutes + <property name="cronExpression" value="0 0/5 * * * ?"/> + --> + + </bean> + + <bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean"> + <property name="triggers"> + <list> + <ref bean="schedulingCronTrigger"/> + </list> + </property> + </bean> +</beans> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/resources/openmind.properties Wed Oct 29 14:02:11 2014 +0000 @@ -0,0 +1,4 @@ +scheduling-path=/net/xserve02.mpiwg-berlin.mpg.de/Volumes/data/Users/jurzua/ismi/automatic-backup +#scheduling-path=/home/jurzua/ismi/automatic-backup +scheduling-enable=true +debug-modus=false \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/resources/own-value.cfg.xml Wed Oct 29 14:02:11 2014 +0000 @@ -0,0 +1,342 @@ +<?xml version="1.0" encoding="UTF-8"?> +<own-value-configuration> + <own-value-rules> + + <own-value-rule id="place0"> + <attribute name="name" end-node="true"/> + </own-value-rule> + + <own-value-rule id="reference0"> + <attribute name="endnote-id" end-node="true"/> + </own-value-rule> + + <own-value-rule id="role0"> + <attribute name="name" end-node="true"/> + </own-value-rule> + + <own-value-rule id="repository0"> + <attribute name="name" end-node="true"/> + </own-value-rule> + + <own-value-rule id="floruit"> + <attribute name="date" end-node="true"/> + </own-value-rule> + + <own-value-rule id="collection0"> + <attribute name="name" end-node="true"/> + </own-value-rule> + + <own-value-rule id="alias0"> + <attribute name="alias" end-node="true"/> + </own-value-rule> + + <own-value-rule id="alias1"> + <attribute name="alias_translit" end-node="true"/> + </own-value-rule> + + <own-value-rule id="alias2"> + <xor> + <rule ref="alias1"/> + <rule ref="alias0"/> + <rule type="constant" value="alias-empty"/> + </xor> + </own-value-rule> + + <own-value-rule id="misattr_01"> + <target-relation name="has_author_misattribution" substring="false"> + <source object-class="TEXT"> + <attribute name="full_title_translit" end-node="true"/> + </source> + </target-relation> + </own-value-rule> + + <own-value-rule id="misattr_02"> + <source-relation name="misattributed_to" substring="false"> + <target object-class="PERSON"> + <attribute name="name_translit" end-node="true"/> + </target> + </source-relation> + </own-value-rule> + + + <own-value-rule id="eventCopy_witness"> + <source-relation name="is_a_copy_of" substring="false"> + <target object-class="WITNESS"> + <source-relation name="is_exemplar_of" substring="false"> + <target object-class="TEXT"> + <attribute name="full_title_translit" end-node="true"/> + </target> + </source-relation> + </target> + </source-relation> + </own-value-rule> + + <own-value-rule id="eventTransfer_witness"> + <source-relation name="is_a_transfer_of" substring="false"> + <target object-class="WITNESS"> + <source-relation name="is_exemplar_of" substring="false"> + <target object-class="TEXT"> + <attribute name="full_title_translit" end-node="true"/> + </target> + </source-relation> + </target> + </source-relation> + </own-value-rule> + + <own-value-rule id="eventStudy_witness"> + <source-relation name="is_a_study_of" substring="false"> + <target object-class="WITNESS"> + <source-relation name="is_exemplar_of" substring="false"> + <target object-class="TEXT"> + <attribute name="full_title_translit" end-node="true"/> + </target> + </source-relation> + </target> + </source-relation> + </own-value-rule> + + <own-value-rule id="eventStudy_person"> + <source-relation name="was_studied_by" substring="false"> + <target object-class="PERSON"> + <attribute name="name_translit" end-node="true"/> + </target> + </source-relation> + </own-value-rule> + + + <own-value-rule id="eventStudy_repository"> + <source-relation name="was_studied_in" substring="false"> + <target object-class="REPOSITORY"> + <attribute name="name" end-node="true"/> + </target> + </source-relation> + </own-value-rule> + + <own-value-rule id="text0"> + <target-relation name="is_prime_alias_title_of" substring="false"> + <source object-class="ALIAS"> + <attribute name="alias" end-node="true"/> + </source> + </target-relation> + </own-value-rule> + + <own-value-rule id="text1"> + <attribute name="full_title_translit" end-node="true"/> + </own-value-rule> + + <own-value-rule id="text2"> + <xor> + <rule ref="text1"/> + <rule ref="text0"/> + <rule type="constant" value="empty"/> + </xor> + </own-value-rule> + + <own-value-rule id="person0"> + <target-relation name="is_prime_alias_name_of" substring="false"> + <source object-class="ALIAS"> + <attribute name="alias" end-node="true"/> + </source> + </target-relation> + </own-value-rule> + + <own-value-rule id="person1"> + <attribute name="name_translit" end-node="true"/> + </own-value-rule> + + <own-value-rule id="subject0"> + <attribute name="name" end-node="true"/> + </own-value-rule> + + <own-value-rule id="person2"> + <xor> + <rule ref="person1"/> + <rule ref="person0"/> + <rule type="constant" value="empty"/> + </xor> + </own-value-rule> + + <own-value-rule id="codex0"> + <source-relation name="is_part_of" substring="false"> + <target object-class="COLLECTION"> + <attribute name="name" end-node="true"/> + </target> + </source-relation> + </own-value-rule> + + <own-value-rule id="codex1"> + <source-relation name="is_part_of" substring="false"> + <target object-class="REPOSITORY"> + <attribute name="name" end-node="true"/> + </target> + </source-relation> + </own-value-rule> + + <own-value-rule id="codex2"> + <xor> + <rule ref="codex0"/> + <rule ref="codex1"/> + <rule type="constant" value="empty"/> + </xor> + </own-value-rule> + + + + <own-value-rule id="codex_identifier" object-class="CODEX"> + <attribute name="identifier" end-node="true" /> + </own-value-rule> + + <own-value-rule id="codex_identifier2"> + <xor> + <rule ref="codex_identifier"/> + + <rule type="constant" value="empty"/> + </xor> + </own-value-rule> + + <own-value-rule id="witness-text"> + <source-relation name="is_exemplar_of" substring="false"> + <target object-class="TEXT" end-node="true"/> + </source-relation> + </own-value-rule> + + <own-value-rule id="witness-codex"> + <source-relation name="is_part_of" substring="false"> + <target object-class="CODEX" end-node="true"> + <!-- attribute name="identifier" end-node="true" /--> + </target> + </source-relation> + </own-value-rule> + + <!-- Temporal necessary only for the clean up --> + <own-value-rule id="witness-place"> + <source-relation name="is_part_of" substring="false"> + <target object-class="CODEX"> + <source-relation name="is_part_of" substring="false"> + <target object-class="COLLECTION"> + <source-relation name="is_part_of" substring="false"> + <target object-class="REPOSITORY"> + <source-relation name="is_in" substring="false"> + <target object-class="PLACE" end-node="true"/> + </source-relation> + </target> + </source-relation> + </target> + </source-relation> + </target> + </source-relation> + </own-value-rule> + <own-value-rule id="witness-repository"> + <source-relation name="is_part_of" substring="false"> + <target object-class="CODEX"> + <source-relation name="is_part_of" substring="false"> + <target object-class="COLLECTION"> + <source-relation name="is_part_of" substring="false"> + <target object-class="REPOSITORY" end-node="true"/> + </source-relation> + </target> + </source-relation> + </target> + </source-relation> + </own-value-rule> + </own-value-rules> + + <print-rules> + <print-rule for="PERSON"> + <formatstr value="%person2%"/> + <entry own-value-rule="person2"/> + </print-rule> + + <print-rule for="TEXT"> + <formatstr value="%text2%"/> + <entry own-value-rule="text2"/> + </print-rule> + + <print-rule for="ALIAS"> + <formatstr value="%alias2%"/> + <entry own-value-rule="alias2"/> + </print-rule> + + <print-rule for="ROLE"> + <formatstr value="%role0%"/> + <entry own-value-rule="role0"/> + </print-rule> + + <print-rule for="CODEX"> + <formatstr value="%codex2%_%codex_identifier2%"/> + <entry own-value-rule="codex2"/> + <entry own-value-rule="codex_identifier2"/> + </print-rule> + + <print-rule for="WITNESS"> + <formatstr value="%witness-text%_%witness-place%_%witness-repository%_%witness-codex%"/> + <entry own-value-rule="witness-text"/> + <entry own-value-rule="witness-codex"/> + <entry own-value-rule="witness-place"/> + <entry own-value-rule="witness-repository"/> + </print-rule> + + <!-- + <print-rule for="TEXT"> + <formatstr value="%text3%"/> + <entry own-value-rule="text3"/> + </print-rule> + --> + + <print-rule for="PLACE"> + <formatstr value="%place0%"/> + <entry own-value-rule="place0"/> + </print-rule> + + <print-rule for="SUBJECT"> + <formatstr value="%subject0%"/> + <entry own-value-rule="subject0"/> + </print-rule> + + <print-rule for="REPOSITORY"> + <formatstr value="%repository0%"/> + <entry own-value-rule="repository0"/> + </print-rule> + + <print-rule for="COLLECTION"> + <formatstr value="%collection0%"/> + <entry own-value-rule="collection0"/> + </print-rule> + + <print-rule for="STUDY_EVENT"> + <formatstr value="Study of %eventStudy_witness% by %eventStudy_person% in %eventStudy_repository%"/> + <entry own-value-rule="eventStudy_witness"/> + <entry own-value-rule="eventStudy_person"/> + <entry own-value-rule="eventStudy_repository"/> + </print-rule> + + <print-rule for="COPY_EVENT"> + <formatstr value="Copy of %eventCopy_witness%"/> + <entry own-value-rule="eventCopy_witness"/> + </print-rule> + + <print-rule for="TRANSFER_EVENT"> + <formatstr value="Transfer of %eventTransfer_witness%"/> + <entry own-value-rule="eventTransfer_witness"/> + </print-rule> + + <print-rule for="MISATTRIBUTION"> + <formatstr value="%misattr_01% to %misattr_02%"/> + <entry own-value-rule="misattr_01"/> + <entry own-value-rule="misattr_02"/> + </print-rule> + + <print-rule for="REFERENCE"> + <formatstr value="%reference0%"/> + <entry own-value-rule="reference0"/> + </print-rule> + + <print-rule for="FLORUIT_DATE"> + <formatstr value="%floruit%"/> + <entry own-value-rule="floruit"/> + </print-rule> + + </print-rules> + +</own-value-configuration> +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/resources/own-value.cfg.xml.template Wed Oct 29 14:02:11 2014 +0000 @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<own-value-configuration> + <own-value-rules> + + <own-value-rule id="codex0"> + <source-relation name="is_part_of" substring="false"> + <target object-class="COLLECTION"> + <attribute name="name" end-node="true"/> + </target> + </source-relation> + </own-value-rule> + + <own-value-rule id="codex1"> + <source-relation name="is_part_of" substring="false"> + <target object-class="REPOSITORY"> + <attribute name="name" end-node="true"/> + </target> + </source-relation> + </own-value-rule> + + <own-value-rule id="codex2"> + <xor> + <rule ref="codex0"/> + <rule ref="codex1"/> + <rule type="constant" value="empty"/> + </xor> + </own-value-rule> + + + + </own-value-rules> + + <print-rules> + <print-rule for="CODEX"> + <formatstr value="%codex2%"/> + <entry own-value-rule="codex2"/> + </print-rule> + </print-rules> + +</own-value-configuration>