2014-11-22 3 views
-1
{ 
    ex:repository ex:createdBy ex:repOwner; ex:title “Rep_1”. 

} 
ex:books 
{ 
    ex:book_1 a ex:Science; ex:size “100”; ex:title “Science book 1”. 
    ex:book_2 a ex:Science; ex:size “1000”; ex:title “Science book 2”. 
    ex:book_3 a ex:Fantasy; ex:size “100”; ex:title “Fantasy book 1”. 
} 
+0

은 다음과 같습니다 참깨 삼각 형식을 – Kinuthia

+0

IActually 방금 삼각 형식으로 잘 포맷해야 형식이 잘못되었습니다. 질문을 시도하고 수정할 수 있습니까? 그렇다면 나중에 어떤 점이 더 명확할까요? – Kinuthia

+0

귀하의 질문을 지원하는 –

답변

0

참깨가 TriG 형식을 지원하기 때문에 TriG 파일을 Turtle로 변환하여 Sesame에 업로드 할 필요가 없습니다.

또한, 삼각법에서 변환 데이터 손실 거북합니다 : TRIG가 쿼드를 기록 할 수있는 형식이기 때문에 거북이 레코드 만 세배하는 동안은 하나 개의 파일에 여러라는 이름의 그래프를 넣을 수 있습니다. TriG를 거북로 변환하면 명명 된 모든 그래프 정보가 제거됩니다.

모든 변환 한 형식에서 다른 말로 미루어 보아는 참깨에 간단하다 :

접두사
// writing to System.out as an example, change to a fileoutputstream to write to file 
RDFWriter turtleWriter = Rio.createWriter(RDFFormat.TURTLE, System.out); 
RDFParser trigParser = Rio.createParser(RDFFormat.TRIG); 

// link the parser with the writer 
trigParser.setRDFHandler(turtleWriter); 

File trigFile = new File("/path/to/file.trig"); 

trigParser.parse(new FileInputStream(trigFile), trigFile.getAbsolutePath());