7
7
*
8
8
* @author <a href="http://olafhartig.de">Olaf Hartig</a>
9
9
*/
10
- public class TriplePatternFragmentRequestImpl
10
+ public class TriplePatternFragmentRequestImpl < TermType , VarType >
11
11
extends LinkedDataFragmentRequestBase
12
- implements TriplePatternFragmentRequest
12
+ implements TriplePatternFragmentRequest < TermType , VarType >
13
13
{
14
- public final String subject ;
15
- public final String predicate ;
16
- public final String object ;
14
+ public final TriplePatternElement < TermType , VarType > subject ;
15
+ public final TriplePatternElement < TermType , VarType > predicate ;
16
+ public final TriplePatternElement < TermType , VarType > object ;
17
17
18
18
public TriplePatternFragmentRequestImpl ( final String fragmentURL ,
19
19
final String datasetURL ,
20
20
final boolean pageNumberWasRequested ,
21
21
final long pageNumber ,
22
- final String subject ,
23
- final String predicate ,
24
- final String object )
22
+ final TriplePatternElement < TermType , VarType > subject ,
23
+ final TriplePatternElement < TermType , VarType > predicate ,
24
+ final TriplePatternElement < TermType , VarType > object )
25
25
{
26
26
super ( fragmentURL , datasetURL , pageNumberWasRequested , pageNumber );
27
27
28
+ if ( subject == null )
29
+ throw new IllegalArgumentException ();
30
+
31
+ if ( predicate == null )
32
+ throw new IllegalArgumentException ();
33
+
34
+ if ( object == null )
35
+ throw new IllegalArgumentException ();
36
+
28
37
this .subject = subject ;
29
38
this .predicate = predicate ;
30
39
this .object = object ;
31
40
}
32
41
33
42
@ Override
34
- public String getSubject () {
43
+ public TriplePatternElement < TermType , VarType > getSubject () {
35
44
return subject ;
36
45
}
37
46
38
47
@ Override
39
- public String getPredicate () {
48
+ public TriplePatternElement < TermType , VarType > getPredicate () {
40
49
return predicate ;
41
50
}
42
51
43
52
@ Override
44
- public String getObject () {
53
+ public TriplePatternElement < TermType , VarType > getObject () {
45
54
return object ;
46
55
}
47
56
@@ -50,9 +59,9 @@ public String toString()
50
59
{
51
60
return "TriplePatternFragmentRequest(" +
52
61
"class: " + getClass ().getName () +
53
- ", subject: " + subject +
54
- ", predicate: " + predicate +
55
- ", object: " + object +
62
+ ", subject: " + subject . toString () +
63
+ ", predicate: " + predicate . toString () +
64
+ ", object: " + object . toString () +
56
65
", fragmentURL: " + fragmentURL +
57
66
", isPageRequest: " + pageNumberWasRequested +
58
67
", pageNumber: " + pageNumber +
0 commit comments