티스토리 뷰

아래의 그림과 같은 Excel을 RDF로 변환하고자 한다.

이 시트는 Sheet2 이고 test.xls 라는 파일명으로 저장되어 있다.





# baseURI: http://joyhong.tistory.com/test

# imports: http://joyhong.tistory.com/tro/


@prefix :        <http://joyhong.tistory.com/test#> .

@prefix owl:     <http://www.w3.org/2002/07/owl#> .

@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .

@prefix tro:     <http://joyhong.tistory.com/tro/> .

@prefix xsd:     <http://www.w3.org/2001/XMLSchema#> .


:ExcelTrans_1

      rdf:type tro:ExcelTrans ;

      tro:hasOriginalSource

              :Excel_1 ;

      tro:serialize :Result_1 ;

      tro:setBaseURI :Prefix_1 ;

      tro:collect :ExcelCollection_2 ;

      tro:isEnabled "true"^^xsd:boolean ;

      tro:setURI :joyp .


<http://joyhong.tistory.com/test>

      rdf:type owl:Ontology ;

      owl:imports tro: ;

      owl:versionInfo "Created with TopBraid Composer"^^xsd:string .


:Excel_1

      rdf:type tro:Excel ;

      tro:filePath "./sample/test.xls"^^xsd:string .


:Result_1

      rdf:type tro:Result ;

      tro:filePath "./result/tro_test.ttl"^^xsd:string ;

      tro:resultType <http://joyhong.tistory.com/tro/resulttype/ttl> .


:Prefix_1

      rdf:type tro:Prefix ;

      tro:namespace "http://joyhong.tistory.com/"^^xsd:string ;

      tro:prefixName "joy"^^xsd:string .

      

:ExcelCollection_2

      rdf:type tro:ExcelCollection ;

      tro:refersTo :ExcelRule_5 , :ExcelRule_6 , :ExcelRule_9 , :ExcelRule_10 , :ExcelRule_11 ;

      tro:sheetNumber 1 ;

      tro:startRowNumber 1 .


:joyp

      rdf:type tro:Prefix ;

      tro:namespace "http://joyhong.tistory.com/Person/"^^xsd:string ;

      tro:prefixName "joyp"^^xsd:string .


:ExcelRule_5

      rdf:type tro:ExcelRule ;

      tro:classNameOfSubject

              "http://joyhong.tistory.com/Movie"^^xsd:string ;

      tro:conformWith <http://joyhong.tistory.com/tro/comptype/singleS_dp_singleO> ;

      tro:hasSubject <http://joyhong.tistory.com/tro/cell/A> ;

      tro:hasPredicate <http://joyhong.tistory.com/tro/property/dc_title> ;

      tro:hasObject <http://joyhong.tistory.com/tro/cell/B> ;

      tro:langTypeOfObject

              <http://joyhong.tistory.com/tro/languagetype/en> ;

      tro:suffixOfObject "_"^^xsd:string .


:ExcelRule_6

      rdf:type tro:ExcelRule ;

      tro:conformWith <http://joyhong.tistory.com/tro/comptype/singleS_dp_singleO> ;

      tro:hasSubject <http://joyhong.tistory.com/tro/cell/D> ;

      tro:hasPredicate :Property_1 ;

      tro:hasObject <http://joyhong.tistory.com/tro/cell/A> ;

      tro:if_not_null <http://joyhong.tistory.com/tro/cell/C> ;

      tro:langTypeOfObject

              <http://joyhong.tistory.com/tro/languagetype/ko> .


:ExcelRule_9

      rdf:type tro:ExcelRule ;

      rdfs:label "Excel rule 9"^^xsd:string ;

      tro:conformWith <http://joyhong.tistory.com/tro/comptype/singleS_op_singleO> ;

      tro:externalUtility_object

              tro:getEngNameOfProvincialArea ;

      tro:hasSubject <http://joyhong.tistory.com/tro/cell/A> ;

      tro:hasPredicate :InputString_7 ;

      tro:hasObject <http://joyhong.tistory.com/tro/cell/F> .


:ExcelRule_10

      rdf:type tro:ExcelRule ;

      rdfs:label "Excel rule 10"^^xsd:string ;

      tro:conformWith <http://joyhong.tistory.com/tro/comptype/singleS_dp_singleO> ;

      tro:hasSubject <http://joyhong.tistory.com/tro/cell/A> ;

      tro:hasPredicate <http://joyhong.tistory.com/tro/property/dc_title> ;

      tro:hasObject <http://joyhong.tistory.com/tro/cell/G> ;

      tro:if_object :Case_3 , :Case_1, :Case_2 .


:ExcelRule_11

      rdf:type tro:ExcelRule ;

      rdfs:label "Excel rule 11"^^xsd:string ;

      tro:conformWith <http://joyhong.tistory.com/tro/comptype/singleS_dp_singleO> ;

      tro:hasSubject <http://joyhong.tistory.com/tro/cell/A> ;

      tro:hasPredicate <http://joyhong.tistory.com/tro/cell/G> ;

      tro:hasObject <http://joyhong.tistory.com/tro/cell/C> ;

      tro:if_predicate :Case_4 .


:Property_1

      rdf:type tro:Property ;

      rdfs:label "Property 1"@en ;

      tro:resourceName "testtest"^^xsd:string .


:InputString_7

      rdf:type tro:InputString ;

      rdfs:label "Input string 7"^^xsd:string ;

      tro:resourceName "provincialArea"^^xsd:string .


:Case_3

      rdf:type tro:Case ;

      rdfs:label "Case 3"^^xsd:string ;

      tro:else "bb"^^xsd:string ;

      tro:if  "학제"^^xsd:string ;

      tro:then "abc"^^xsd:string .


:Case_1

      rdf:type tro:Case ;

      rdfs:label "Case 1"^^xsd:string ;

      tro:if  "국립"^^xsd:string ;

      tro:then "National"^^xsd:string .


:Case_2

      rdf:type tro:Case ;

      rdfs:label "Case 2"^^xsd:string ;

      tro:if  "사립"^^xsd:string ;

      tro:then "Private"^^xsd:string .


:Case_4

      rdf:type tro:Case ;

      rdfs:label "Case 4"^^xsd:string ;

      tro:if  "국립"^^xsd:string ;

      tro:then "http://www.tqk.co.kr/joyhong/ttt"^^xsd:string .




최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함