Difference between revisions of "Property Groups"

From OpenKM Documentation
Jump to: navigation, search
 
(29 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== Metadata ==
+
This is an easy and powerful way for building custom properties. You can use this feature to add information to documents. For example, if you store the invoices in a folder you can add a property group to set the client name and the quantity. You will see this important data without opening the documents. Also you can search by these custom properties later.
OpenKM comes with metadata support.<br>
+
 
You need to create some file, for example '''my_groups.cnd''' and insert some values in other two files '''PropertyGroupBundle.properties''' and '''PropertyGroupValues.properties'''.
+
{{Advice|Refer to [[Property Groups definition]] where you can see the new way to describe Property Groups.}}
+
 
*$JBOSS_HOME/my_groups.cnd
+
By default sample Property Groups are bundle with your OpenKM installation. If you don't see these Property Groups, click in the '''Register property groups''' button to register them.
*$JBOSS_HOME/PropertyGroupBundle.properties
+
 
*$JBOSS_HOME/PropertyGroupValues.properties
+
 
+
[[File:Okm admin 011.jpeg|717px|center]]
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.<br>
+
 
 +
 
 +
You can also add, remove or modify these Property Groups editing the '''PropertyGroups.xml''' definition file with your preferred editor or directly from OpenKM Administration if you click in the '''Edit property groups''' button. Once edited you need to register them again.
 +
 
 +
 
 +
[[File:Edit Property Group.png|717px|center]]
 +
 
 +
 
 +
The users can assign a property group to a document using these toolbar buttons:
 +
 
 +
* Add property group → [[File:Add_property_group.gif]]
 +
* Remove property group → [[File:Remove_property_group.gif]]
 +
 
 +
And the properties will be shown in the information area. You can edit the values of the properties using the Change button. Then you can change these values. You can also remove a property group from a document by clicking the Delete button.
 +
 
 +
 
 +
[[File:Okm 003.png|388px|center]]
 +
 
 +
=== OpenKM 5.1 ===
 +
To try this, login as okmAdmin and go to Administration → Utilities → Register property groups. Set full path with the location of the local file ''PropertyGroups.cnd'' and click on the register button. The properties will be registered.
 +
 
  
[[File:Okm_001.jpeg]]
+
[[File:Okm_001.jpeg|center]]
  
'''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.<br><br>
+
{{Warning|'''REGISTERED GROUPS CANNOT NOT BE UNREGISTERED'''. They can always be updated but they cannot be deleted after registration !!! Try it out on a test installation first.}}
  
'''About files:'''
+
=== OpenKM 4.0 and older ===
------------
+
You need to create some file, for example '''PropertyGroup.cnd''' and insert some values in two other files '''PropertyGroupBundle.properties''' and '''PropertyGroupValues.properties'''.
On '''my_groups.cnd''' there are general definitions on each parameter ( for example the parameter okp:tecnologia.tipo )<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>
 
For example here are some translations:
 
  
<source lang="text">
+
* $JBOSS_HOME/PropertyGroup.cnd
okp\:tecnologia.tipo=Tipo
+
* $JBOSS_HOME/PropertyGroupBundle.properties
okp\:tecnologia.tipo.uno=Tipo Uno
+
* $JBOSS_HOME/PropertyGroupValues.properties
okp\:tecnologia.tipo.dos=Tipo Dos
 
okp\:tecnologia.tipo.tres=Tipo Tres
 
</source>
 
  
OpenKM tries to find the correct language in your property files. If it does not exist uses it uses PropertyBundle.properties.<br>
+
About files:
 
This is easy and powerfull for building custom properties.<br>
 
  
== Full metadata example ==
+
* '''PropertyGroup.cnd''': There are general definitions on each parameter (for example the parameter okp:technology.type)
File my_groups.cnd
+
<source lang="xml">
<source lang="text">
 
 
<okm = 'http://www.openkm.org/1.0'>
 
<okm = 'http://www.openkm.org/1.0'>
 
<okg = 'http://www.openkm.org/group/1.0'>
 
<okg = 'http://www.openkm.org/group/1.0'>
 
<okp = 'http://www.openkm.org/group/property/1.0'>
 
<okp = 'http://www.openkm.org/group/property/1.0'>
  
[okg:tecnologia] mixin
+
[okg:technology] mixin
- okp:tecnologia.tipo (string) = '' multiple autocreated
+
- okp:technology.type (string) = '' multiple autocreated
- okp:tecnologia.lenguaje (string) = '' autocreated
+
- okp:technology.language (string) = '' autocreated
- okp:tecnologia.descripcion (string) = '' autocreated
+
- okp:technology.description (string) = '' autocreated
- okp:tecnologia.comentario (string) = '' autocreated
+
- okp:technology.comment (string) = '' autocreated
  
[okg:consultoria] mixin
+
[okg:consulting] mixin
- okp:consultoria.tipo (string) = '' autocreated
+
- okp:consulting.type (string) = '' autocreated
- okp:consultoria.comentario (string) = '' autocreated
+
- okp:consulting.comment (string) = '' autocreated
 
</source>
 
</source>
 +
 +
* '''PropertyGroupValues.properties''': In this file you can see the property values, for example for parameter (okp\:technology.type=4,one,two,three) has 3 values (one, two, three) the first number indicates the order, the second one the type (1 = list, 2 = input, 3 = select multiple, 4 = Text area)
  
File PropertyGroupValues.properties
+
<source lang="java">
<source lang="text">
+
okp\:technology.type=1,4,one,two,three
okp\:tecnologia.tipo=0,4,uno,dos,tres
+
okp\:technology.language=2,3,java,c,c#,c++,python
okp\:tecnologia.lenguaje=1,3,java,c,c#,c++,python
+
okp\:technology.description=3,1
okp\:tecnologia.descripcion=2,1
+
okp\:technology.comment=4,2
okp\:tecnologia.comentario=3,2
+
okp\:consulting.type=1,3,one,two,three
okp\:consultoria.tipo=0,3,uno,dos,tres
+
okp\:consulting.comment=2,2
okp\:consultoria.comentario=1,2
 
 
</source>
 
</source>
  
File PropertyGroupBundle.properties
+
* '''PropertyGroupBundle.properties''': This file contains general translations for each value. You can have more files for each language like PropertyGroupBundle_ES.properties etc.
<source lang="text">
+
 
okg\:tecnologia=Tecnología
+
<source lang="java">
okp\:tecnologia.tipo=Tipo
+
okg\:technology=Tecnology
okp\:tecnologia.tipo.uno=Tipo Uno
+
okp\:technology.type=Type
okp\:tecnologia.tipo.dos=Tipo Dos
+
okp\:technology.type.one=Type One
okp\:tecnologia.tipo.tres=Tipo Tres
+
okp\:technology.type.two=Type Two
okp\:tecnologia.lenguaje=Lenguaje
+
okp\:technology.type.three=Type Three
okp\:tecnologia.lenguaje.java=Java
+
okp\:technology.language=Language
okp\:tecnologia.lenguaje.c=C
+
okp\:technology.language.java=Java
okp\:tecnologia.lenguaje.c++=C++
+
okp\:technology.language.c=C
okp\:tecnologia.lenguaje.python=Python
+
okp\:technology.language.c++=C++
okp\:tecnologia.descripcion=Descripción
+
okp\:technology.language.python=Python
okp\:tecnologia.comentario=Comentario
+
okp\:tecnology.description=Description
okg\:consultoria=Consultoría
+
okp\:technology.comment=Comment
okp\:consultoria.tipo=Tipo
+
okg\:consulting=Consulting
okp\:consultoria.tipo.uno=Tipo Uno
+
okp\:consulting.type=Type
okp\:consultoria.tipo.dos=Tipo Dos
+
okp\:consulting.type.one=Type One
okp\:consultoria.tipo.tres=Tipo Tres
+
okp\:consulting.type.two=Type Two
okp\:consultoria.comentario=Comentario
+
okp\:consulting.type.three=Type Three
 +
okp\:consulting.comment=Comment
 
</source>
 
</source>
 +
 +
OpenKM tries to find the correct language in your property files. If it does not exist it uses ''PropertyBundle.properties''.
 +
 +
[[Category: Installation Guide]]

Latest revision as of 11:57, 3 January 2013

This is an easy and powerful way for building custom properties. You can use this feature to add information to documents. For example, if you store the invoices in a folder you can add a property group to set the client name and the quantity. You will see this important data without opening the documents. Also you can search by these custom properties later.


Nota idea.png Refer to Property Groups definition where you can see the new way to describe Property Groups.

By default sample Property Groups are bundle with your OpenKM installation. If you don't see these Property Groups, click in the Register property groups button to register them.


Okm admin 011.jpeg


You can also add, remove or modify these Property Groups editing the PropertyGroups.xml definition file with your preferred editor or directly from OpenKM Administration if you click in the Edit property groups button. Once edited you need to register them again.


Edit Property Group.png


The users can assign a property group to a document using these toolbar buttons:

  • Add property group → Add property group.gif
  • Remove property group → Remove property group.gif

And the properties will be shown in the information area. You can edit the values of the properties using the Change button. Then you can change these values. You can also remove a property group from a document by clicking the Delete button.


Okm 003.png

OpenKM 5.1

To try this, login as okmAdmin and go to Administration → Utilities → Register property groups. Set full path with the location of the local file PropertyGroups.cnd and click on the register button. The properties will be registered.


Okm 001.jpeg

Nota advertencia.png REGISTERED GROUPS CANNOT NOT BE UNREGISTERED. They can always be updated but they cannot be deleted after registration !!! Try it out on a test installation first.

OpenKM 4.0 and older

You need to create some file, for example PropertyGroup.cnd and insert some values in two other files PropertyGroupBundle.properties and PropertyGroupValues.properties.

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

About files:

  • PropertyGroup.cnd: There are general definitions on each parameter (for example the parameter okp:technology.type)
<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:technology] mixin
- okp:technology.type (string) = '' multiple autocreated
- okp:technology.language (string) = '' autocreated
- okp:technology.description (string) = '' autocreated
- okp:technology.comment (string) = '' autocreated

[okg:consulting] mixin
- okp:consulting.type (string) = '' autocreated
- okp:consulting.comment (string) = '' autocreated
  • PropertyGroupValues.properties: In this file you can see the property values, for example for parameter (okp\:technology.type=4,one,two,three) has 3 values (one, two, three) the first number indicates the order, the second one the type (1 = list, 2 = input, 3 = select multiple, 4 = Text area)
okp\:technology.type=1,4,one,two,three
okp\:technology.language=2,3,java,c,c#,c++,python
okp\:technology.description=3,1
okp\:technology.comment=4,2
okp\:consulting.type=1,3,one,two,three
okp\:consulting.comment=2,2
  • PropertyGroupBundle.properties: This file contains general translations for each value. You can have more files for each language like PropertyGroupBundle_ES.properties etc.
okg\:technology=Tecnology
okp\:technology.type=Type
okp\:technology.type.one=Type One
okp\:technology.type.two=Type Two
okp\:technology.type.three=Type Three
okp\:technology.language=Language
okp\:technology.language.java=Java
okp\:technology.language.c=C
okp\:technology.language.c++=C++
okp\:technology.language.python=Python
okp\:tecnology.description=Description
okp\:technology.comment=Comment
okg\:consulting=Consulting
okp\:consulting.type=Type
okp\:consulting.type.one=Type One
okp\:consulting.type.two=Type Two
okp\:consulting.type.three=Type Three
okp\:consulting.comment=Comment

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