Mixing properties with categories

From semantic-mediawiki.org

> Ok, i read those and have been trying to achieve it through subobjects,

The links were only listed to illuminate the issue about category vs. property and how SMW interprets both entity description types.

> could you please tell me an example?

If you look at the bottom of Template:Event calendar item you can see how a switch function is used to add additional annotations to a subject that depends on the input of the Form:Event calendar item. It should be possible for you to make similar adjustments to achieve your "hidden" property = category assignment (data input post-processing).

In case you want to make some form field to be pre-selected/pre-filled based on some input dependency from another field, you better ask for assistance on SF talk page (this has less to do with SMW in relation on how data are represented or stored).

01:20, 7 April 2015

So there is not actually a direct way of representing "graph" type data, but just individuals with properties, right? Well, we can have something like "graphs" with "subclassOf", but not having pointers from a category to other.


So if i do have 3 categories, department (which includes subjects), teacher (which teaches subjects) and subjects, if i added subjects to department and teacher, i would still not see nothing in "subjects" category.


I understand that properties and categories should be differenced, but i am pretty much surprised there is no way of making a form or template which instead of properties, can use categories as information source.

Something that gives me hope, it that semantic forms has 2 options for it´s properties which are "category" and "categories", so perhaps someone has been trying to solve this issue.

Unluckily the only thing which this does to your form is writting a box with "name" which you can not even fill, so perhaps it was forgotten.


What is that SF talk?


P.D: I would be more direct with this question. "How can we use categories, instead of properties in forms or templates?".

16:58, 7 April 2015

> So there is not actually a direct way of representing "graph" type data, but just individuals with properties, right? Well, we can have something like "graphs" with "subclassOf", but not having pointers from a category to other.

We need to clarify the use of the term "graph" in relation to SMW, OWL and machine-readable descriptions such as RDF.

When you create an article (a subject, the source of a collection of facts about that subject) together with a property-value or class (a category) annotation you express a graph that says "my subject contains an attribute (the property) with an value of ..." or "the subject belongs to a class of ... (a category)". So when editing/creating/annotating an article you declare a "graph" that can be encoded into an equivalent representation such as RDF (for more see RDF export.

> So if i do have 3 categories, department (which includes subjects), teacher (which teaches subjects) and subjects, if i added subjects to department and teacher, i would still not see nothing in "subjects" category.

I'm not clear about what you mean by "still not see nothing". If you query for the relation you should be able to see those which belong to either category. A declaration such as "subclassOf" is automatically resolved (see also category hierarchy, $smwgUseCategoryHierarchy). Relationships will not appear automatically on an article (this is where you have to employ queries to make them visible, see also Inverse properties and Inferencing).

> I understand that properties and categories should be differenced, but i am pretty much surprised there is no way of making a form or template which instead of properties, can use categories as information source.

This is not what I have said. You are free to use both categories or properties as first class citizen. I merely emphasized that input and post-processing need to be detached from each other and that a category and a property are to represent a different statement about an object (also in regards as to how it is encoded in RDF).

> Unluckily the only thing which this does to your form is writing a box with "name" which you can not even fill, so perhaps it was forgotten.

This was an example and was to demonstrate the difference between form and template usage/editing processing.

> Something that gives me hope, it that semantic forms has 2 options for it´s properties which are "category" and "categories", so perhaps someone has been trying to solve this issue.

I don't use SF therefore I can't make any comments on that.

> What is that SF talk?

See, SF.

18:00, 7 April 2015