p-ISSN: 2301-5373

e-ISSN: 2654-5101

Jurnal Elektronik Ilmu Komputer Udayana

Volume 9 No. 4, May 2021

Balinese Kulkul Semantic Ontology: REST API Mobile Application Development

I Putu Agus Wahyu Widiatmikaa1, Cokorda Pramarthaa2

aInformatics Department, Udayana University Badung, Indonesia 1[email protected]

2 [email protected]

Abstract

Kulkul is one of Bali's cultural heritage. Kulkul is used in Balinese society for communication when there is a danger, death, a ritual, and so on. The current phenomenon is that many Balinese people are only able to know and without knowing much knowledge about kulkul. It is because this knowledge is the only word of mouth, making it difficult for it to be collected, stored, retrieved, shared, and renewed. Current technological developments, especially mobile technology, allow the development of mobile applications on cultural knowledge with an ontology approach that will help provide an explicit explanation of this knowledge. In this study, the authors propose the application of a web service with a REST API architecture to help mobile applications integrate Balinese Kulkul Semantic Ontology. This research has succeeded in producing a good REST API, it is proven from the results of the tests that have been done that the REST API can successfully receive requests and send responses that prove that the integration of the mobile application has been successful.

Keywords: Kulkul, Ontology, Prototyping, REST API, Web Service

  • 1.    Introduction

Kulkul is one of Bali's cultural heritage. Kulkul is an elongated bamboo containing holes used for traditional communication tools in ancient times and is usually be assembled to the Bale kulkul (or it can usually be installed near temples, villages, and banjars) in each village. Kulkul is used in Balinese society for communication when there is a danger, death, a ritual, mutual cooperation, marriage, and so on [1]. The current phenomenon is that many Balinese people are only able to know and without knowing much knowledge about this cultural heritage. It is because this knowledge is the only word of mouth, making it difficult for it to be collected, stored, retrieved, shared, and renewed.

Ancient technology made this knowledge not well documented. This results in a lack of information to reshape actual contextual objects and practices [2]. Therefore, this knowledge must be documented in a digital and explicit form. Current technological developments, especially mobile technology, allow the development of mobile applications on cultural knowledge with an ontology approach that will help provide an explicit explanation of this knowledge. In computer science, ontology is a way to represent knowledge from a domain in an explicit form regarding a concept by giving meaning to objects, properties, and relations on these objects so that they are collected in a knowledge domain and form a knowledge base [3–5]. The ontology is formed into Web Ontology Language (OWL) which is a semantic markup language. The use of OWL can allow a machine to understand information.

The research from [1, 2, 6, 7] discusses preservation of the digital Balinese traditional communication system (kulkul). The research developed a website-based digital portal that features browsing, searching, and collecting data on the cultural heritage of the kulkul. However, it is generally known that the retrieval of the data kulkul into websites deemed to be a bit difficult. This is because the data to be uploaded is in the form of multimedia data (text, images, and audio)

which was initially taken via mobile, after which it was transferred to a computer/laptop to be uploaded to a website-based digital portal.

Therefore, the authors want to cut the process so that multimedia data retrieval can be done on mobile applications only. But in practice, mobile applications require real-time access to receive and process data on a cloud-based knowledge base. Therefore, we need a web service to solve problems related to integration and data exchange separately. One of the web service architectures that is widely accepted in the mobile cloud paradigm is the Representational State Transfer Application Programming Interface (REST API) which is useful in requesting and receiving data using the Hypertext Transfer Protocol (HTTP) [8].

The purpose of this study is to understand the integration and data exchange that is carried out between mobile applications and a knowledge base that focuses on finding kulkul. This research is expected to develop a good REST API to support mobile applications in changing and processing kulkul data.

  • 2.    Reseach Methods

This research will use the prototyping method. This prototyping method aims to obtain the information needed so that users can interact with the prototype used because this model is an early version of the system that will evolve into a real system [9]. The steps for the prototyping method are as follows.

  • 2.1.    Requirements Analysis

At this stage, it aims to define and identify the initial requirements of the prototype to be built. The initial requirements of the prototype include functional requirements, non-functional requirements, and data requirements. The prototype will be developed to support the Android platform as a starting point. The specifications of the functional, non-functional, and data requirements of the prototype to be developed.

  • a.    Functional requirement of the prototype to be developed is a prototype designed to allow for searching kulkul using criteria in order to get specific results.

  • b.    Non-functional requirements that will support the system to be developed are as follows.

  • 1.    Hardware Requirements

The hardware required is a computer or laptop that is used to develop REST API.

  • 2.    Software Requirements

The software that will be used in this research includes Apache Jena Fuseki as the server of Ontology, Apache HTTP Server as the backend server of the system, and Visual Studio Code is a text editor for changing the code in the programming language PHP and SPARQL.Kebutuhan data untuk menunjang dari sistem yang akan dikembangkan.

  • c.    Data and ontology that will be used are taken through research related to Kulkul Ontology [7].

Figure 1 Kulkul Ontology

The classes that are modeled in the kulkul ontology are as follows.

  • •    Object entities: for example, several kinds of temples or places, activities such as the five yadnya, the symbolic classification of the kulkul, and so on.

  • •    Physical entity: for example, the name of the village adat / pakraman, banjar, raw material.

  • •    All kinds of panca yadnya ritual: eg cremation (ngaben), meeting (sangkep).

  • •    Various types of hazards: for example floods, fires, and so on.

  • 2.2.    Designing Prototype

Prototype is designed to be able to process data into a form of data exchange format, namely JavaScript Object Notation (JSON) which is adjusted by requests from the mobile. The goal is that the mobile can easily read and process the data. The design of the prototype will follow the workflow of Figure 2. Each request to the prototype will contain a JSON format that contains data related to Balinese Kulkul Semantics.



Arbsearcn

Execute SPAQL Query


tempat: PuraPuseh

tempat: PuraPuscn

params: {

output: aktivitas

params: {

output: aktivitas

SELECT DISTINCT (TaJcLita= as T output} { TkuikuINatna IhkisUMitfor T

IOtTinai MihasKukuI TfcuIkuINatno . ?

Iomnal IhkihasKukuI TfcuIkuINomc . ?

Iampai a IhkiPtraPusoih FILTER (T

Iompal NOT IN (σ*J Namadtndividualjl 9

Iompal IhkiisPartOI* Tkabupalon . 9 Kabupaion a IhkiKabupatan _ ) ORDER BY Tculput


SPARQL Result

output

1 thlcBetaraLuriga

2 IhkiMeIasti

3 IhkiMemendakBelaraDatiMeIis

4 IhkOdaIan

5 thk: Piodalan

6 IhkiPiodaIanRingPuseh

Showing 1 to 6 of 6 entries

Figure 2 Workflow REST API

First, users with mobile applications access the endpoints that have been provided. Next, the prototype will take the parameters entered by. Then, the prototype will generate a SPARQL query according to the requirements of the entered parameters. After that, SPARQL will run to get data from kulkul which will then be converted into JSON format. Finally, the prototype will provide a response with kulkul data in JSON format.

  • 2.3.    Developing Prototype

Prototype will be designed using PHP and SPARQL as the main language. Ontology will be stored in Apache Jena Fuseki Server. Prototype development is done by stopping the code using the PHP language which plays a major role in controlling requests and providing responses to mobile

applications. Then, the SPARQL language is used in performing a number of queries on the knowledge management system to obtain the required kulkul data.

  • 2.4.    Testing

This stage is where when the prototype is ready for use, then the prototype will be tested based on the validation of the system's functional requirements.

  • 3.    Result and Discussion

The first stage that will be carried out is making a prototype. Prototype is made to be able to search kulkul data based on the criteria entered by the user. Endpoints that have been defined on the prototype are as follows.

  • a. Get Parameter Output and Filter

Endpoint      : /v1/params

HTTP Method  : GET

Definition       : Used to retrieve output and filter parameters.

Parameter(s) : There are no parameters.

b.


Kulkul Search Endpoint HTTP Method Definition Parameter(s)


/v1/search

POST

Used to search kulkul data.

Table 1 Kulkul Search Parameters

Parameter

Require d

Definition

output

Yes

The possible values are arah, aktivitas, jumlah, suara, ukuran, pengangge, bahan_baku, tempat, tipe_suara

filter

No

The possible values are as follows.

arah :

Berhadapan/Beriringan/Membelakangi/Sejajar/TidakTau aktivitas :

KegiatanSosial/Bencana/BencanaAlam/BencanaNonAlam/Benca naSosial/Upacara/and so on

jumlah :

1/2/3/4

suara :

Tigang Klentungan Sedeng/Tigang Tulud/Tigang Tulud Bulus/A Kelentungan/A Pisan/A Tulud/A Tulud Alon/and so on ukuran :

UkuranKulkul1/UkuranKulkul2/UkuranKulkul3/UkuranKulkul4/Ukur anKulkul5/UkuranKulkul6/UkuranKulkul7

pengangge :

HitamPutih/HitamPutihDanPutih/KainMerahPutihHitam/KainPolen g/KainPolengDanKainMerahPoleng/and soon bahan_baku :

Bambu/Bintawas/Kayu/KayuBedau/KayuCamplung/KayuIntaran/K ayuJati/KayuKetewel/and so on tipe_suara :

Actual/Simulation

tempat :

Banjar/Desa/PuraDalem/PuraDesa/PuraPuseh

3.1. Implementation

At this stage, the prototype has been successfully developed into a REST API which can help mobile applications integrate Balinese Kulkul Semantic Ontology.

  • 1.  $query_output = $this->findQueryOutput($request->output);

  • 2.

  • 3.  $query_filter = $this->findQueryFilter($request->filter);

  • 4.

  • 6.     SELECT DISTINCT (?' . $request->output . ' as ?output)

  • 16.

  • 26.    } ORDER BY ?output

  • 28.

  • 29.    $result = $this->sparql->query($genered_query);

  • 30.

  • 33.    foreach($result as $data){

  • 34.      $uri = $data->output->getUri();

  • 36.         'id'    => $this->parseData($uri, true),

  • 37.         'value' => $this->parseData($uri)

  • 39.      array_push($datas, $output);

42.

  • 43.    return response()->json([

  • 44.    'status' => 'success',

  • 45.    'data'     => $datas,

  • 46.    'total'   => $result->numRows(),

  • 47.    'query'   => trim(preg_replace('/\s\s+/', ' ', $genered_query))

  • 48.  ]);

Above is a line of code to search for kulkul that has been implemented in the REST API. The code uses the PHP language as a controller in the REST API. Before conducting the test, REST API integrated into mobile apps. The integration process is carried out by making a request to the endpoint on the mobile application prototype. The following is a display of the integrated mobile application prototype. The following is a display of the integrated mobile application prototype. The following is a display of the integrated mobile application prototype.

Figure 3 Home Page


Figure 4 Select Output


Figure 5 Search Result


Figure 6 Reset Filter


Figure 7 Select Filter


Figure 8 Filter Selected


3.2. Testing

The REST API will be checked using Insomnia Core1. Insomnia Core is one of the many applications used for debugging the REST API. The author will also see the REST API results that have been integrated into the mobile application. Testing is done by checking the validation of the functional requirements of the REST API. The scenario that will be carried out is as follows.

Table 2 Test Scenario

No

Test Scenario

Expected Result

Observe Result

Conclusion

1

Performs a search by

REST API responds by

REST API result:

Valid

89.9 ms 66 B

request to endpoint /v1/search with no parameter “output”

issuing a warning to add “output” parameter

Preview *     Header 7     Cookie Timeline

{

∖   2    "status": "validator",

3» "message": [

  • 4      "The output field is required."

  • 5       ]

  • 6    }

Integration on mobile:

Apa yang ingin Anda cari?

Filter

B τbeoo!>ui Wd ^required,

2

Performs

REST API

REST API result:

Valid

a search by request to endpoint /v1/search with parameter “output: aktivitas”

responds by providing data "kulkul activity"

I         I 300 ms 8.2 KB

Preview -     Header 7     Cookie Timeline

{

2 "status": "success",

3» "data": (

4-    <

5        "id": "AcaraPiodalandiBanjar",

6        "value": "Acara Piodalandi Banjar"

7

  • 8 -     {

  • 9        "id": "AdaKegiatanNantiSore",

  • 10        "value": "Ada Kegiatan Nanti Sore"

H   L

  • 12 -     {

  • 13        "id": "AdaKematian",

14        "value": "Ada Kematian"

  • 15        >,

  • 16 -    {

17        "id": "Amuk"r

18        "value": "AmuK"

19        }1

Integration on mobile:

Apa yang ingin Anda cari?

Filter

Hasil Pencarian

  • 1.    AcwaPiodBlandiawijai

  • 2.    Adg KeφβunHant> Sore

  • 3    AdaKeimMn

⅛S∙ FiBer

3

Performs a search by request to endpoint /v1/search with parameter “output: aktivitas” and “filter: { tempat: PuraPuse h }”

REST API responds by providing data " Kulkul activities in Puseh Temple"

REST API result: I 303 ms 663 B

Preview ▼     Header 7     Cookie     Timelin

2 "status": "success",

  • 3 - "data": [

  • 4        {

  • 5         "id": "BetaraLunga",

  • 6        "value": "Betara Lunga"

  • 7        I.

  • 8 -     {

  • 9         "id": "Melasti",

10        "value": "Melasti"

  • 11      L

  • 12 -     {

  • 13        "id": "MemendakBetaraDariMelis",

14        "value": "Memendak Betara Dari Melis"

15       },

Integration on mobile:

Apa yang ingin Anda cari?

Filter

Tempai: Pura Pose*

Hasil Pencarian

I 1. BMaraLungg

3 MemendakBMargDgriUeU

Valid

4


Performs data request to endpoint /v1/param s


The REST API can output the required "output" and "filter" parameter data for mobile applications


200 OK


REST API result:


Preview * Header 7 Cookie Timeline

  • 1-    {

  • 2    "status": “success",

  • 3-    “data": {

4» "output": I

  • 6           "id": “arah",

  • 7           "value": "Arah"

BL

9’{

IB           "id": "aktivitas",

11          "value": "Aktivitas"

  • 14           "id": "jumlah",

15          "value": "Jumlah"

16L


Integration on mobile:


Valid


  • 4.    Conclusion

From the results of the research that has been done, it can be concluded that the REST API that has been developed is successful in carrying out the integration of Balinese Kulkul Semantic Ontology on the mobile application. From the test scenario in the Table 2 it is shown that every test carried out gets a satisfactory conclusion.

References

  • [1]     C. Pramartha and J. G. Davis, “Digital Preservation of Cultural Heritage: Balinese Kulkul

Artefact and Practices,” in Digital Heritage. Progress in Cultural Heritage: Documentation, Preservation, and Protection, 2016, pp. 491–500.

  • [2]     C. Pramartha, J. G. Davis, and K. K. Y. Kuan, “A Semantically-Enriched Digital Portal for

the Digital Preservation of Cultural Heritage with Community Participation,” in Digital Heritage. Progress in Cultural Heritage: Documentation, Preservation, and Protection, 2018, pp. 560–571.

  • [3]   P. Ganeswara and C. Pramartha, “ONTOLOGY-BASED APPROACH FOR

KLUNGKUNG ROYAL FAMILY,” JELIKU - J. Elektron. Ilmu Komput. Udayana, vol. 8, no. 4, pp. 497–505, 2020.

  • [4]    I. L. Koten and C. Pramartha, “Semantic Representation of Balinese Traditional Dance,”

JELIKU - J. Elektron. Ilmu Komput. Udayana, vol. 8, no. 4, pp. 411–419, 2020.

  • [5]    M. Wardana and C. Pramartha, “Development of Semantic Ontology Modeling in

Knowledge Representation of Balinese Gamelan Instruments,” JELIKU - J. Elektron. Ilmu Komput. Udayana, vol. 8, no. 2, pp. 145–152, 2020.

  • [6]     C. Pramartha, J. G. Davis, and K. K. Y. Kuan, “Digital preservation of cultural heritage:

An ontology-based approach,” Proc. 28th Australas. Conf. Inf. Syst. ACIS 2017, pp. 1– 12, 2017.

  • [7]    C. R. A. Pramartha, “Assembly the Semantic Cultural Heritage Knowledge,” J. Ilmu

Komput., vol. 11, no. 2, p. 83, 2018, doi: 10.24843/jik.2018.v11.i02.p03.

  • [8]     I. O. Suzanti, N. Fitriani, A. Jauhari, and A. Khozaimi, “REST API Implementation on

Android Based Monitoring Application,” J. Phys. Conf. Ser., vol. 1569, p. 022088, 2020, doi: 10.1088/1742-6596/1569/2/022088.

  • [9]    D. Purnomo, “Model Prototyping Pada Pengembangan Sistem Informasi,” J I M P - J.

Inform. Merdeka Pasuruan, vol. 2, no. 2, pp. 54–61, 2017, doi: 10.37438/jimp.v2i2.67.

466