Difference between revisions of "Migration from 4.0 to 4.1"
From OpenKM Documentation
(→Example of conversion) |
|||
Line 28: | Line 28: | ||
== Example of conversion == | == Example of conversion == | ||
+ | {| align="center" border="1" cellpadding="5" cellspacing="0" | ||
+ | | '''my_groups.cnd''' | ||
+ | <source lang="text"> | ||
+ | <okm = 'http://www.openkm.org/1.0'> | ||
+ | <okg = 'http://www.openkm.org/group/1.0'> | ||
+ | <okp = 'http://www.openkm.org/group/property/1.0'> | ||
− | + | [okg:tecnologia] mixin | |
+ | - okp:tecnologia.tipo (string) = '' multiple autocreated | ||
+ | - okp:tecnologia.lenguaje (string) = '' autocreated | ||
+ | - okp:tecnologia.descripcion (string) = '' autocreated | ||
+ | - okp:tecnologia.comentario (string) = '' autocreated | ||
+ | </source> | ||
+ | | '''PropertyGroups.cnd''' (content unchanged, because is the same) | ||
<source lang="text"> | <source lang="text"> | ||
<okm = 'http://www.openkm.org/1.0'> | <okm = 'http://www.openkm.org/1.0'> | ||
Line 41: | Line 53: | ||
- okp:tecnologia.comentario (string) = '' autocreated | - okp:tecnologia.comentario (string) = '' autocreated | ||
</source> | </source> | ||
− | + | |- | |
− | + | | '''PropertyGroupValues.properties''' | |
<source lang="java"> | <source lang="java"> | ||
# Tecnología | # Tecnología | ||
Line 51: | Line 63: | ||
</source> | </source> | ||
− | + | '''PropertyGroupBundle.properties''' | |
<source lang="java"> | <source lang="java"> | ||
# Tecnología | # Tecnología | ||
Line 67: | Line 79: | ||
okp\:tecnologia.comentario=Comentario | okp\:tecnologia.comentario=Comentario | ||
</source> | </source> | ||
− | + | | '''PropertyGroups.xml''' | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<source lang="xml"> | <source lang="xml"> | ||
<?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||
Line 109: | Line 105: | ||
</property-groups> | </property-groups> | ||
</source> | </source> | ||
+ | |} | ||
[[Category: Migration Guide]] | [[Category: Migration Guide]] |
Revision as of 08:50, 28 April 2010
This migration process is under revision, don't try until OpenKM 4.1 is released. |
- Stop the JBoss server.
- Make a backup of your current repository and configuration files... because Murphy's laws :)
- Rename your my_groups.cnd (perhaps you file has other name, but the extension should be .cnd) to PropertyGroups.cnd
- Remember that in OpenKM 4.0 the Property Groups definitions was splitted in two files: the metadata description and the translations. Create a file PropertyGroups.xml which contents should be the combination of old PropertyGroupValues.properties (metadata description) and PropertyGroupsBundle.properties (translations) in the new XML-based format. Refer to Property Groups definition for more info on this format.
- These are the equivalences:
Type | XML |
---|---|
1 | <input label="xxx" name="okp:yyy" /> |
2 | <textarea label="xxx" name="okp:yyy" /> |
3 | <select label="xxx" name="okp:yyy" type="simple"> <option label="xxx" value="yyy" /> ... </select> |
4 | <select label="xxx" name="okp:yyy" type="multiple"> <option label="xxx" value="yyy" /> ... </select> |
- Starts the JBoss server again.
You don't have to register your Property Groups again. |
Example of conversion
my_groups.cnd
<okm = 'http://www.openkm.org/1.0'>
<okg = 'http://www.openkm.org/group/1.0'>
<okp = 'http://www.openkm.org/group/property/1.0'>
[okg:tecnologia] mixin
- okp:tecnologia.tipo (string) = '' multiple autocreated
- okp:tecnologia.lenguaje (string) = '' autocreated
- okp:tecnologia.descripcion (string) = '' autocreated
- okp:tecnologia.comentario (string) = '' autocreated
|
PropertyGroups.cnd (content unchanged, because is the same)
<okm = 'http://www.openkm.org/1.0'>
<okg = 'http://www.openkm.org/group/1.0'>
<okp = 'http://www.openkm.org/group/property/1.0'>
[okg:tecnologia] mixin
- okp:tecnologia.tipo (string) = '' multiple autocreated
- okp:tecnologia.lenguaje (string) = '' autocreated
- okp:tecnologia.descripcion (string) = '' autocreated
- okp:tecnologia.comentario (string) = '' autocreated
|
PropertyGroupValues.properties
# Tecnología
okp\:tecnologia.tipo=0,4,uno,dos,tres
okp\:tecnologia.lenguaje=1,3,java,c,c#,c++,python
okp\:tecnologia.descripcion=2,1
okp\:tecnologia.comentario=3,2
PropertyGroupBundle.properties # Tecnología
okg\:tecnologia=Tecnología
okp\:tecnologia.tipo=Tipo
okp\:tecnologia.tipo.uno=Tipo Uno
okp\:tecnologia.tipo.dos=Tipo Dos
okp\:tecnologia.tipo.tres=Tipo Tres
okp\:tecnologia.lenguaje=Lenguaje
okp\:tecnologia.lenguaje.java=Java
okp\:tecnologia.lenguaje.c=C
okp\:tecnologia.lenguaje.c++=C++
okp\:tecnologia.lenguaje.python=Python
okp\:tecnologia.descripcion=Descripción
okp\:tecnologia.comentario=Comentario
|
PropertyGroups.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE property-groups PUBLIC "-//OpenKM//DTD Property Groups 1.0//EN"
"http://www.openkm.com/dtd/property-groups-1.0.dtd">
<property-groups>
<!-- Tecnología -->
<property-group label="Tecnología" name="okg:tecnologia">
<select label="Tipo" name="okp:tecnologia.tipo" type="multiple">
<option label="Tipo Uno" value="okp:tecnologia.tipo.uno" />
<option label="Tipo Dos" value="okp:tecnologia.tipo.dos" />
<option label="Tipo Tres" value="okp:tecnologia.tipo.tres" />
</select>
<select label="Lenguaje" name="okp:tecnologia.lenguaje" type="simple">
<option label="Java" value="okp:tecnologia.lenguaje.java" />
<option label="C" value="okp:tecnologia.lenguaje.c" />
<option label="C++" value="okp:tecnologia.lenguaje.c++" />
<option label="Python" value="okp:tecnologia.lenguaje.python" />
</select>
<input label="Descripcion" name="okp:tecnologia.descripcion" />
<textarea label="Description" name="okp:tecnologia.comentario" />
</property-group>
</property-groups>
|