wiki:DataFormat

Version 4 (modified by jri, 13 years ago) (diff)

--

Data Format

Topic

Example 1: a simple topic

{
  "id": 2816,
  "uri": "",
  "type_uri": "dm4.contacts.city",
  "value": "Berlin",
  "composite": {
  }
}

Example 2: a complex topic

{
  "id": 2900,
  "uri": "",
  "type_uri": "dm4.files.file",
  "value": "freifunk-geomap.png",
  "composite": {
    "dm4.files.file_name": "freifunk-geomap.png",
    "dm4.files.path": "/home/jri/freifunk-geomap.png",
    "dm4.files.size": 767016,
    "dm4.files.media_type": "image/png",
    "dm4.files.content": "<img src=\"/proxy/file:%2Fhome%2Fjri%2Ffreifunk-geomap.png\"></img>"
  }
}

Example 3: an even more complex topic

{
  "id": 2735,
  "uri": "",
  "type_uri": "dm4.contacts.person",
  "value": "Jörg",
  "composite": {
    "dm4.contacts.person_name": {
      "dm4.contacts.first_name": "Jörg",
      "dm4.contacts.last_name": "Richter"
    },
    "dm4.contacts.phone_entry": {
      "dm4.contacts.phone_label": "home",
      "dm4.contacts.phone_number": "123 456 78"
    },
    "dm4.contacts.email_address": "jri@deepamehta.de",
    "dm4.webbrowser.url": "www.deepamehta.de",
    "dm4.contacts.address_entry": {
      "dm4.contacts.address_label": "home",
      "dm4.contacts.address": {
        "dm4.contacts.street": "My Street 23",
        "dm4.contacts.postal_code": "12345",
        "dm4.contacts.city": "Berlin",
        "dm4.contacts.country": "Germany"
      }
    },
    "dm4.notes.text": "<p>Software Developer</p>"
  }
}

Association

Example 2: an association that connects 2 topics

{
  "id": 2797,
  "uri": "",
  "type_uri": "dm4.core.composition",
  "value": "",
  "composite": {
  },
  "role_1": {
    "topic_id": 2735,
    "role_type_uri": "dm4.core.whole"
  },
  "role_2": {
    "topic_id": 2794,
    "role_type_uri": "dm4.core.part"
  }
}

Example 2: an association that connects a topic with an association

{
  "id": 2798,
  "uri": "",
  "type_uri": "dm4.core.instantiation",
  "value": "",
  "composite": {
  },
  "role_1": {
    "topic_id": 60,
    "role_type_uri": "dm4.core.type"
  },
  "role_2": {
    "assoc_id": 2797,
    "role_type_uri": "dm4.core.instance"
  }
}

Topic Type

Example 1: a simple topic type

{
  "id": 943,
  "uri": "dm4.webbrowser.url",
  "type_uri": "dm4.core.topic_type",
  "value": "URL",
  "composite": {
  },
  "data_type_uri": "dm4.core.text",
  "index_mode_uris": [
    "dm4.core.key",
    "dm4.core.fulltext"
  ],
  "assoc_defs": [
  ],
  "view_config_topics": [
  ]
}

Example 2: a complex topic type

{
  "id": 959,
  "uri": "dm4.webbrowser.web_resource",
  "type_uri": "dm4.core.topic_type",
  "value": "Web Resource",
  "composite": {
  },
  "data_type_uri": "dm4.core.composite",
  "index_mode_uris": [
  ],
  "assoc_defs": [
    {
      "id": 964,
      "uri": "dm4.webbrowser.url",
      "assoc_type_uri": "dm4.core.composition_def",
      "whole_topic_type_uri": "dm4.webbrowser.web_resource",
      "whole_role_type_uri": "dm4.core.whole",
      "whole_cardinality_uri": "dm4.core.one",
      "part_topic_type_uri": "dm4.webbrowser.url",
      "part_role_type_uri": "dm4.core.part",
      "part_cardinality_uri": "dm4.core.one",
      "view_config_topics": [
      ]
    },
    {
      "id": 974,
      "uri": "dm4.webbrowser.web_resource_description",
      "assoc_type_uri": "dm4.core.composition_def",
      "whole_topic_type_uri": "dm4.webbrowser.web_resource",
      "whole_role_type_uri": "dm4.core.whole",
      "whole_cardinality_uri": "dm4.core.one",
      "part_topic_type_uri": "dm4.webbrowser.web_resource_description",
      "part_role_type_uri": "dm4.core.part",
      "part_cardinality_uri": "dm4.core.one",
      "view_config_topics": [
      ]
    }
  ],
  "view_config_topics": [
    {
      "id": 988,
      "uri": "",
      "type_uri": "dm4.webclient.view_config",
      "value": "/de.deepamehta.webbrowser/images/earth.png",
      "composite": {
        "dm4.webclient.icon": "/de.deepamehta.webbrowser/images/earth.png",
        "dm4.webclient.add_to_create_menu": true,
        "dm4.webclient.is_searchable_unit": true
      }
    }
  ]
}

Association Type

Association Definition

View Configuration

Topic Map