WikiSon
WikiSon - Wiki Simple Object Notation
WikiSon follows the following principles:
- simplicity
- brevity
- platform independence
- problem space orientation
WikiSon is compatible with:
- MediaWiki - Templates/Macros
- SemanticMediaWiki, especially SMW PageSchemas and JSMW PageSchema]
- WikiData
compatible formats
It can be easily transformed from and to the formats:
- csv
- json
- rdf
- html microformats
- xml
- ... you name it
Simple examples
Books
{{ Book | Lord of the Rings | 0261102389 }}
is a valid WikiSon sample for the Three Book Set Edition of the Book with the title "Lord of the Rings" by John R. R. Tolkien which happens to have the ISBN-10 number 0261102389.
Cities
{{City |name=Tokyo |id=JP-13 |localname=東京 |webpage=http://www.tokyo2020.jp |Population=9153953 |wikipedia_url=https://de.wikipedia.org/wiki/Tokio |average_income=56 |Country=Japan }}
is a valid WikiSon sample for the Metro-City of "Tokyo" A possible human readable version of it would look like:
City | |
---|---|
name | Tokyo |
webpage | http://www.tokyo2020.jp |
wikipedia_url | https://de.wikipedia.org/wiki/Tokio |
Population | 9153953 |
Has Wikidata item ID | → |
WikiSon asks for:
{{City|name=Tokyo|id=JP-13}} {{City|name=Tokyo}} {{City|id=JP-13}} {{City|Tokyo|JP-13}} {{City|Tokyo}} {{City|JP-13}}
to render all the same result. The preferred notation is:
{{City|name=Tokyo|id=JP-13}}
Concepts and Properties
In the above example City is a Concept.
In the above example
- name,
- id
- localname
- webpage
- ...
are Properties.
See the Description of the City concept.
Template:SmartMediaWiki extends the meaning of Concept and Property beyond the definition of Template:SemanticMediaWiki
How do derive concepts and properties
Let's assume someone wants a software and tells you: "Could you please create a software for me that will show me
- whether it rained yesterday in Berlin
- whether the sun shines today in Munich
- whether it snows tomorrow in Vienna
"
These sentences might lead you to three concepts:
- City
- Calendardate
- Weather
The customer has given you three examples for each concept: Cities:
City | |
---|---|
name | |
webpage | |
wikipedia_url | |
Population | |
Has Wikidata item ID | → |
{{City|Berlin}}
City | |
---|---|
name | |
webpage | |
wikipedia_url | |
Population | |
Has Wikidata item ID | → |
City | |
---|---|
name | |
webpage | |
wikipedia_url | |
Population | |
Has Wikidata item ID | → |
...
Conventions
We are following the Y-Principle here and the A/T/R Bloodgroup approach of Siedersleben.
Concepts and Attributes
compare to Workdocumentation_2015-01-10
{{<Concept> |<name>=<value> ... }}
where value is of the type specified in the corresponding Attribute.
Concept
Concept has the synonms/ corresponding ideas in the problem space:
- Thing
- Subject
- Topic
- Name
- Group
- Definition
- Class
- Entity
Typical solution space mappings are:
- GUI Form
- Database Table
- Excel Sheet
- Class
- Java Class
- PHP Class
- CORBA Interface
Attribution
Examples
In Berlin (Thema) hat es heute geregnet (Rhema).
==> implicit Concepts: City, heute->Date, geregnet-> Weather
Did i understand you right that
City | |
---|---|
name | berlin |
webpage | |
wikipedia_url | |
Population | |
Has Wikidata item ID | → |
Template:Date Template:Weather
and
City | |
---|---|
name | munich |
webpage | |
wikipedia_url | |
Population | |
Has Wikidata item ID | → |
Template:Date Template:Weather
City | |
---|---|
name | münster |
webpage | |
wikipedia_url | |
Population | |
Has Wikidata item ID | → |
Template:Date Template:Weather
are examples for what you'd like to cover with a computer program?
Ich (Thema) habe gerade einen Anruf bekommen (Rhema). Es war einmal ein König (Rhema). Der (Thema) hatte drei Töchter (Rhema). Frage-Antwort-Paar:
Was hat Papa gestern gemacht? (nur rhematisches Material bzw. kontextabhängige Thema-Rhema-Aufteilung) Papa hat gestern (Thema) das Auto gewaschen (Rhema, erfragte Information).
Durch Verschiebung der Positionen von Thema und Rhema erhält der Satz eine starke Betonung oder emotionale Färbung:
Was hat Papa gestern gemacht? Das Auto (Rhema) hat Papa (Thema) gestern gewaschen!
... =
Attributions done on Concepts can be perceived or ... Attribute has the synonms/ corresponding ideas in the problem space:
- Feature
- Property
- Entry
Typical solution space mappings are:
- SMW triple
- GUI Field
- Database Row
- COBOL Record
- Excel Row
- C# Property
- Java Bean Field
- CORBA Attribute
Identifier / Primary Keys
The first few attributes of a concept are considered to be the key attributes of a concept. E.g. in the WikiSon
{{Person |name=Doe |firstname=John |email=john@doe.org |id=4711 |date of birth=1972-05-06 }}
name and firstname naturally but not unambigiously identify john doe. Technically the email and id are much better suited as unique identifiers. The date of birth is just a regular attribute. By convention in this example id would be the technical primary key.
Primary key convention
The first attribute with a name found in the following list:
- id
- oid
- uid
- uuid
- ...
is considered to be the technical primary key. All attributes declared before such a technical primary key are considered to form natural (effective in SAPese) keys when the values are concatenated using "," as a delimiter.
Examples
{{Person |name=Doe |firstname=John |email=john@doe.org |id=4711 |date of birth=1972-05-06 }}
The primary key is "john@doe.org" and the natural key "Doe,John"
{{Person |firstname=John |name=Doe |id=4711 |email=john@doe.org |date of birth=1972-05-06 }}
The primary key is "4711" and the natural key "John,Doe"
Configuration
Configuration Overview
To map Concepts in the Problem Space to Solutions one or more configurations per Concept are necessary.
Think of
- resource forks
- Java Profiles
- UML Sterotypes/Taggedvalues
The configuration has details on what the solution should look like. E.g. the Concept concept might have the following internationalization Configurations: Template:Configuration
UML diagram describing the Configuration
Synonyms aliases =
Mapppings
Mapping WikiSon to SemanticMediaWiki
Mapping WikiSon to WikiData
Mapping WikiSon to UML
Corresponding UML approach for "Concept"
Example: the City Concept described in UML
Mapping a Concept to a UML Class
- the name of a concept is used as a UML Class name
- the attributes of a concept are mapped to UML attributes aka structural features
- the name of an attribute is mapped to an UML attribute name
- the type of an attribute is mapped to a UML type starting (bootstrapping) from a Wikison generic type system
UML Attributes / Associations and Inheritance
In UML
- Attributes
- Associations
- Inheritance
are three different concepts. In WikiSon we consider all three of them are handled as attributes.
Regular Attributes and 1:1 Associations
If a concept has another concept as it's attribute this corresponds to :1 UML relations/association or UML inheritance between the two concepts. The UML differentiation of attribute, association, inheritance is not essentially necessary on the problem side. On the solutions side it will make a difference when displaying the data. There may be different solution modes:
- displaying the attributes concept's attributes directly (this is like the UML attribute concept)
- displaying the attribute concept as a link (this is like the UML association concept)
- optionally hiding and showing the attributes's concepts attributes and making them available directly in the scope of the concept (this is like the UML inheritance concept)
Examples
Attribute
myCountry is simply an attribute of City of type Country.
1:1 association
Country is simply handled like an attribute of City. metrocity.myCity.myCountry.name will show the name of the country of the MetroCity in typical solution environments. What is the WikiSon equivalent?
Most UML knowlegeable people would be inclined to fix the above model and put an "n" on the City side of the Country-City association.
Inheritance
metrocity.name will show the name of the metrocity metrocity.myCountry.name will show the country of the metrocity
1:n and n:m relations
- If I am a concept and another concept has a an attribute with me as a type than there is a 1:n relation between me and the other concept.
- If additionaly I do have an attribute with the other concept as a type than there is a n:m relation between me and the other concept.