Skip to content

Commit a6a782e

Browse files
committed
Add base implementation of BasicLinkedDataFragment.
1 parent fa16c19 commit a6a782e

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
package org.linkeddatafragments.datasource;
2+
3+
import com.hp.hpl.jena.rdf.model.Model;
4+
5+
/**
6+
* Base implementation of a Basic Linked Data Fragment.
7+
* @author Ruben Verborgh
8+
*/
9+
public class BasicLinkedDataFragmentImpl implements BasicLinkedDataFragment {
10+
private final Model triples;
11+
private final long totalSize;
12+
13+
/**
14+
* Create a new Basic Linked Data Fragment.
15+
* @param triples the triples (possibly partial)
16+
* @param totalSize the total size
17+
*/
18+
public BasicLinkedDataFragmentImpl(Model triples, long totalSize) {
19+
this.triples = triples;
20+
this.totalSize = totalSize;
21+
}
22+
23+
@Override
24+
public Model getTriples() {
25+
return triples;
26+
}
27+
28+
@Override
29+
public long getTotalSize() {
30+
return totalSize;
31+
}
32+
}

0 commit comments

Comments
 (0)