02-06-2012 08:10 AM
<?xml version="1.0" encoding="UTF-8"?>
<!– Custom Model –>
<!– Note: This model is pre-configured to load at startup of the Repository. So, all custom –>
<!– types and aspects added here will automatically be registered –>
<model name="herinnering:demomodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<!– Optional meta-data about the model –>
<description>Herinneringsbrief</description>
<author>Red Tree</author>
<version>0.1</version>
<imports>
<!– Import Alfresco Dictionary Definitions –>
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
<!– Import Alfresco Content Domain Model Definitions –>
<import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
</imports>
<!– Introduction of new namespaces defined by this model –>
<!– NOTE: The following namespace custom.model should be changed to reflect your own namespace –> <namespaces> <namespace uri="com.ephesoftalfrescoherinnering.demo" prefix="herinnering"/> </namespaces>
<constraints>
<constraint name="herinnering:talen" type="LIST">
<parameter name="allowedValues">
<list>
<value>Fr</value>
<value>Nl</value>
<value>De</value>
<value>En</value>
</list>
</parameter>
</constraint>
</constraints>
<types>
<type name="herinnering:document">
<title>herinnering</title>
<parent>cm:content</parent>
<properties>
<property name="herinnering:factuurnummer">
<title>factuurnummer</title>
<type>d:text</type>
</property>
<property name="herinnering:geadresseerde">
<title>geadreseerde</title>
<type>d:text</type>
</property>
<property name="herinnering:qrcode">
<title>qrcode</title>
<type>d:text</type>
<index enabled="true">
<atomic>true</atomic>
<stored>true</stored>
<tokenised>both</tokenised>
</index>
</property>
<property name="herinnering:type">
<title>Type document</title>
<type>d:text</type>
</property>
<property name="herinnering:voorwerp">
<title>voorwerp</title>
<type>d:text</type>
</property>
<property name="herinnering:dienst">
<title>dienst</title>
<type>d:text</type>
</property>
<property name="herinnering:aantalblz">
<title>aantal blz</title>
<type>d:text</type>
</property>
<property name="herinnering:datumopmaak">
<title>datum opmaak</title>
<type>d:text</type>
</property>
<property name="herinnering:taal">
<title>taal</title>
<type>d:text</type>
<constraints>
<constraint ref="herinnering:talen"></constraint>
</constraints>
</property>
</properties>
</type>
</types>
<aspects>
<aspect name="herinnering:relatedDoc">
<title>Gerelateerde documenten</title>
<associations>
<association name="herinnering:relatedDocList">
<title>Gerelateerde documenten:</title>
<source>
<mandatory>false</mandatory>
<many>true</many>
</source>
<target>
<class>herinnering:document</class>
<mandatory>false</mandatory>
<many>true</many>
</target>
</association>
</associations>
</aspect>
</aspects>
</model>
var qrcode = document.properties["herinnering:qrcode"];
var query= "@herinnering\\:qrcode:" + qrcode;
var queryEncoded = search.ISO9075Encode(query);
document.properties["herinnering:dienst"] = query;
var results = search.luceneSearch(query);
for (var i = 0; i<results.length; i++){
document.createAssociation(results[i], "herinnering:relatedDocList" );
}
document.save();
<config evaluator="aspect-name" condition="herinnering:relatedDoc">
<property-sheet>
<show-association name="herinnering:relatedDocList" />
</property-sheet>
</config>
02-07-2012 07:46 AM
02-21-2012 03:36 AM
02-24-2012 06:44 PM
02-27-2012 04:35 AM
05-14-2012 10:28 AM
05-14-2012 10:40 AM
05-15-2012 04:53 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.