Transformation rules of Cellfie Considering Rows and not columns
Closed this issue · 6 comments
the way we write
Class: @C*, where C is a column and the entities in the column become a class, won't it be nice to have such transformation rules where we could convert all the elements of a row into Classes and objects ?
If they are Can someone tell me what they are ?
@pranav0008 your question is not very clear. What do you mean by "convert all the elements of a row into Classes and objects ?"
Is this related to protegeproject/protege/issues/688? Because for that we already have an issue here:
protegeproject/mapping-master/issues/9 (as it is more a request for an extension of the MappingMaster mapping language, rather than the Cellfie plugin itself).
I meant, where we write for declaration of a class in Column C as :- Class: @C*
Why can't I write Class: @3*(where 3 is the Row number) to declare all the elements in the row to become a class.
It is not related to protegeproject/protege#688 , this issue you referred me to is completely irrelevant to my issue, but if this request gets implemented where axioms are used for Dataproperty and ObjectProperty, it will be a big relief :) because I am undergoing this problem a lot.
Coming back to the topic, the reason I wanted to implement this rule because the mapping of information is done from rows to rows, whereas in Cellfie only column to column mapping is done.
I have 20 Excel Sheets where mapping is to be done rows to rows , my option is transposing each 20 tables and then use column to column mapping but that is not a long run solution.
I think I see your point now. You can do that by writing @*3
.
Here is the documentation about this specific issue, but I would recommend to read the entire entry on the MappingMaster DSL if you want to take full advantage of its power:
https://github.com/protegeproject/mapping-master/wiki/MappingMasterDSL#iterating-over-a-range-of-cells-in-a-reference
thanks a bunch
BTW, you can create datatype and object properties on the fly (but not with an explicit declaration, for which we created this issue protegeproject/mapping-master#9).
Check out this:
http://protege-project.136.n4.nabble.com/Ways-to-create-Object-property-td4666308.html#a4666317
And here is another example...
If you have a table like
A | B | C | |
---|---|---|---|
1 | Student | class1 | class2 |
2 | ABC | Mat | Eng |
3 | XYZ | Eng | Ger |
and a rule like this over the range B2:C+ :
Individual: @A*
Types: @A1
Facts: @*1(ObjectProperty) @**
Executing the rule would create object properties for all the column headers (B1 and C1) on the fly. Of course you can extend this to arbitrary number of columns.