Difference between revisions of "Property Groups"

From OpenKM Documentation
Jump to: navigation, search
Line 19: Line 19:
 
On '''PropertyGroupValues.properties''' are the values, for example for parameter (okp\:tecnologia.tipo=0,4,uno,dos,tres ) has 3 values (uno,dos,tres) the first number indicates the ordering - starting with 0 - the second number indicates the type ( 1=list, 2=input, 3= select multiple, 4=Text area )<br>
 
On '''PropertyGroupValues.properties''' are the values, for example for parameter (okp\:tecnologia.tipo=0,4,uno,dos,tres ) has 3 values (uno,dos,tres) the first number indicates the ordering - starting with 0 - the second number indicates the type ( 1=list, 2=input, 3= select multiple, 4=Text area )<br>
 
   
 
   
In PropertyGroupBundle.properties are general translations for each value you can have more files for each language like PropertyGroupBundle_ES.properties etc... <br>
+
On '''PropertyGroupBundle.properties''' are general translations for each value you can have more files for each language like PropertyGroupBundle_ES.properties etc... <br>
 
For example here are some translations:
 
For example here are some translations:
  
Line 34: Line 34:
  
 
== Full metadata example ==
 
== Full metadata example ==
File my_groups.cnd
+
'''File my_groups.cnd'''
 
<source lang="text">
 
<source lang="text">
 
<okm = 'http://www.openkm.org/1.0'>
 
<okm = 'http://www.openkm.org/1.0'>
Line 51: Line 51:
 
</source>
 
</source>
  
File PropertyGroupValues.properties
+
'''File PropertyGroupValues.properties'''
 
<source lang="text">
 
<source lang="text">
 
okp\:tecnologia.tipo=0,4,uno,dos,tres
 
okp\:tecnologia.tipo=0,4,uno,dos,tres
Line 61: Line 61:
 
</source>
 
</source>
  
File PropertyGroupBundle.properties
+
'''File PropertyGroupBundle.properties'''
 
<source lang="text">
 
<source lang="text">
 
okg\:tecnologia=Tecnología
 
okg\:tecnologia=Tecnología

Revision as of 12:49, 21 January 2010

Metadata

OpenKM comes with metadata support.
You need to create some file, for example my_groups.cnd and insert some values in other two files PropertyGroupBundle.properties and PropertyGroupValues.properties.

  • $JBOSS_HOME/my_groups.cnd
  • $JBOSS_HOME/PropertyGroupBundle.properties
  • $JBOSS_HOME/PropertyGroupValues.properties

To try this test login as okmAdmin ( or user with adminitration grants ), put your local path for the my_groups.cnd file, and the properties will be registered.

Okm 001.jpeg

WARNING !! Registered metadata can not be unregistered. They can always be updated but they cannot be deleted after registration !!! Try it out on a test installation first not in a production environment.

About files:


On my_groups.cnd there are general definitions on each parameter ( for example the parameter okp:tecnologia.tipo )

On PropertyGroupValues.properties are the values, for example for parameter (okp\:tecnologia.tipo=0,4,uno,dos,tres ) has 3 values (uno,dos,tres) the first number indicates the ordering - starting with 0 - the second number indicates the type ( 1=list, 2=input, 3= select multiple, 4=Text area )

On PropertyGroupBundle.properties are general translations for each value you can have more files for each language like PropertyGroupBundle_ES.properties etc...
For example here are some translations:

okp\:tecnologia.tipo=Tipo
okp\:tecnologia.tipo.uno=Tipo Uno
okp\:tecnologia.tipo.dos=Tipo Dos
okp\:tecnologia.tipo.tres=Tipo Tres

OpenKM tries to find the correct language in your property files. If it does not exist uses it uses PropertyBundle.properties.

This is easy and powerfull for building custom properties.

Full metadata example

File 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

[okg:consultoria] mixin
- okp:consultoria.tipo (string) = '' autocreated
- okp:consultoria.comentario (string) = '' autocreated

File PropertyGroupValues.properties

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
okp\:consultoria.tipo=0,3,uno,dos,tres
okp\:consultoria.comentario=1,2

File PropertyGroupBundle.properties

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
okg\:consultoria=Consultoría
okp\:consultoria.tipo=Tipo
okp\:consultoria.tipo.uno=Tipo Uno
okp\:consultoria.tipo.dos=Tipo Dos
okp\:consultoria.tipo.tres=Tipo Tres
okp\:consultoria.comentario=Comentario