46 |
46 |
47 python main.py |
47 python main.py |
48 |
48 |
49 ## Additional/Advanced informations ## |
49 ## Additional/Advanced informations ## |
50 |
50 |
51 ** Changing the property list : ** If you want to change the property list available to users editing/creating categories, you have to edit the following entry in config.py |
51 ** Changing the property list : ** If you want to change the default property list available to users editing/creating categories, you have to edit the following entry in config.py |
52 |
52 |
53 * PROPERTY_LIST : My list of properties ... |
53 * PROPERTY_LIST : My list of properties ... |
54 |
54 |
55 The list of property has a fixed structure. The property list is a dict of python dicts, each following the fixed structure: |
55 The list of property has a fixed structure. The property list is a dict of python dicts, each following the fixed structure: |
56 |
56 |
57 "propertyKey" : { |
57 "propertyURI" : { |
58 "descriptive_label_fr" : "mylabelfr", |
58 "descriptive_label_fr" : "mylabelfr", |
59 "descriptive_label_en" : "mylabelen", |
59 "descriptive_label_en" : "mylabelen", |
60 "object_type": "my-object-type", |
60 "object_type": "my-object-type", |
61 "rdflib_class": some-RDFLib-concept, |
61 "rdflib_class": some-RDFLib-concept, |
62 "object_rdflib_class": some-RDFLib-class, |
62 "usable_in_editor: boolean so the property appears or not in the editor |
63 } |
63 } |
64 |
64 |
|
65 * "propertyURI" is the complete URI of the property, for a rdflib property that will be the string you get when calling NAMESPACE.property.toPython() |
65 * "object_type" : "my-object-type", -> either "literal", "uriref-category" or "uriref-link" at the moment |
66 * "object_type" : "my-object-type", -> either "literal", "uriref-category" or "uriref-link" at the moment |
66 * "rdflib_class" : some-RDFLib-concept, -> a rdflib class of some sort with its namespace, examples: SKOS.related or RDF.Type representing the predicate |
67 * "usable_in_editor": if true, the property will appear in the editor and users will be able to apply it to categories, if false they won't be able to. |
67 * "object_rdflib_class" : some-RDFLib-class: -> a rdflib class representing the object, either Literal or URIRef |
68 * "rdflib_class" : some-RDFLib-concept, -> a rdflib namespaced property with its namespace, examples: SKOS.related or RDF.Type representing the predicate |
|
69 |
|
70 ** Custom property list ** |
|
71 |
|
72 To setup a custom set of property you need to add a properties/properties.json file in the repository that has 2 values: |
|
73 * namespace_title is the string that defines the namespace of your custom properties for this repository (not really used right now but will be useful in the future) |
|
74 * property_list is a dict that follows the exact same format as the config.py property list, of course in json format, so the propertyURI that is used as a key must be written explicitely |
|
75 |
|
76 If you make the property list evolve, don't forget to keep the old properties you don't want your users to use anymore to ensure backward compatibility. You just need to set the "usable_in_editor" key to false in the property you don't want your users to have access to. Note this won't affect existing categories with this property, but only ensure that they will be readable. Then it's up to the users to "clean up" if a deprecated property is still used. |
68 |
77 |
69 ## Testing Protocol for CatEdit (development) ## |
78 ## Testing Protocol for CatEdit (development) ## |
70 |
79 |
71 These tests are meant to be run alongside unit tests (that are not completely implemented yet) to test that everything (and specifically Javascript) works properly. |
80 These tests are meant to be run alongside unit tests (that are not completely implemented yet) to test that everything (and specifically Javascript) works properly. |
72 |
81 |