-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#429 extract placeholders, integrate module
- Loading branch information
1 parent
d8a147d
commit 7ea9529
Showing
7 changed files
with
126 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 13 additions & 22 deletions
35
sparql-anything-slides/src/test/java/io/github/sparqlanything/slides/test/PptxTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,30 @@ | ||
package io.github.sparqlanything.slides.test; | ||
|
||
import io.github.sparqlanything.model.BaseFacadeXGraphBuilder; | ||
import io.github.sparqlanything.model.FacadeXGraphBuilder; | ||
import io.github.sparqlanything.model.IRIArgument; | ||
import io.github.sparqlanything.model.*; | ||
import io.github.sparqlanything.slides.PptxTriplifier; | ||
import io.github.sparqlanything.testutils.AbstractTriplifierTester; | ||
import org.apache.jena.riot.Lang; | ||
import org.apache.jena.riot.RDFDataMgr; | ||
import org.apache.jena.sparql.core.DatasetGraph; | ||
import org.apache.poi.xslf.usermodel.XMLSlideShow; | ||
import org.apache.poi.xslf.usermodel.XSLFSlide; | ||
import org.apache.poi.xslf.usermodel.XSLFTextShape; | ||
import org.junit.Test; | ||
|
||
import java.io.IOException; | ||
import java.io.InputStream; | ||
import java.net.URL; | ||
import java.util.Properties; | ||
import java.util.concurrent.atomic.AtomicInteger; | ||
|
||
public class PptxTest { | ||
public class PptxTest extends AbstractTriplifierTester { | ||
|
||
public static void main(String[] args) { | ||
System.out.println("test"); | ||
public PptxTest() { | ||
super(new PptxTriplifier(), new Properties(), "pptx"); | ||
} | ||
|
||
@Test | ||
public void test(){ | ||
|
||
PptxTriplifier st = new PptxTriplifier(); | ||
URL doc = st.getClass().getClassLoader().getResource("./Presentation1.pptx"); | ||
Properties p = new Properties(); | ||
DatasetGraph dg; | ||
try { | ||
p.setProperty(IRIArgument.LOCATION.toString(), doc.toString()); | ||
FacadeXGraphBuilder b = new BaseFacadeXGraphBuilder(p); | ||
st.triplify(p, b); | ||
dg = b.getDatasetGraph(); | ||
RDFDataMgr.write(System.out, dg, Lang.TRIG); | ||
}catch (Exception ignored){ | ||
|
||
} | ||
|
||
public void testPresentation1() { | ||
this.assertResultIsIsomorphicWithExpected(); | ||
} | ||
} |
57 changes: 57 additions & 0 deletions
57
sparql-anything-slides/src/test/resources/Presentation1.ttl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
@prefix dc: <http://purl.org/dc/elements/1.1/> . | ||
@prefix eg: <http://www.example.org/> . | ||
@prefix fx: <http://sparql.xyz/facade-x/ns/> . | ||
@prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> . | ||
@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 rss: <http://purl.org/rss/1.0/> . | ||
@prefix vcard: <http://www.w3.org/2001/vcard-rdf/3.0#> . | ||
@prefix whatwg: <https://html.spec.whatwg.org/#> . | ||
@prefix xhtml: <http://www.w3.org/1999/xhtml#> . | ||
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . | ||
@prefix xyz: <http://sparql.xyz/facade-x/data/> . | ||
|
||
<http://www.example.org/document/Slide_1/CENTERED_TITLE> | ||
rdf:type xyz:CENTERED_TITLE ; | ||
rdf:_1 "This is a test presentation" . | ||
|
||
<http://www.example.org/document/Slide_2> | ||
rdf:type xyz:Slide ; | ||
rdf:_1 <http://www.example.org/document/Slide_2/TITLE> ; | ||
rdf:_2 <http://www.example.org/document/Slide_2/CONTENT> . | ||
|
||
eg:document rdf:type xyz:Presentation , fx:root ; | ||
rdf:_1 <http://www.example.org/document/Slide_1> ; | ||
rdf:_2 <http://www.example.org/document/Slide_2> ; | ||
rdf:_3 <http://www.example.org/document/Slide_3> . | ||
|
||
<http://www.example.org/document/Slide_3> | ||
rdf:type xyz:Slide ; | ||
rdf:_1 <http://www.example.org/document/Slide_3/TITLE> ; | ||
rdf:_2 <http://www.example.org/document/Slide_3/CONTENT> . | ||
|
||
<http://www.example.org/document/Slide_2/CONTENT> | ||
rdf:type xyz:CONTENT ; | ||
rdf:_1 "Bullet 1\nBullet 2" . | ||
|
||
<http://www.example.org/document/Slide_1/SUBTITLE> | ||
rdf:type xyz:SUBTITLE ; | ||
rdf:_1 "This is the subtitle" . | ||
|
||
<http://www.example.org/document/Slide_3/CONTENT> | ||
rdf:type xyz:CONTENT ; | ||
rdf:_1 "Bullet 1\nBullet 2" . | ||
|
||
<http://www.example.org/document/Slide_1> | ||
rdf:type xyz:Slide ; | ||
rdf:_1 <http://www.example.org/document/Slide_1/CENTERED_TITLE> ; | ||
rdf:_2 <http://www.example.org/document/Slide_1/SUBTITLE> . | ||
|
||
<http://www.example.org/document/Slide_2/TITLE> | ||
rdf:type xyz:TITLE ; | ||
rdf:_1 "First slide" . | ||
|
||
<http://www.example.org/document/Slide_3/TITLE> | ||
rdf:type xyz:TITLE ; | ||
rdf:_1 "Second slide" . |