org.linkeddatafragments.fragments.tpf.TriplePatternFragmentRequestImpl Maven / Gradle / Ivy
The newest version!
package org.linkeddatafragments.fragments.tpf;
import org.linkeddatafragments.fragments.LinkedDataFragmentRequestBase;
/**
* An implementation of {@link ITriplePatternFragmentRequest}.
*
* @author Olaf Hartig
* @param
* @param
* @param
*/
public class TriplePatternFragmentRequestImpl
extends LinkedDataFragmentRequestBase
implements ITriplePatternFragmentRequest
{
/**
*
*/
public final ITriplePatternElement subject;
/**
*
*/
public final ITriplePatternElement predicate;
/**
*
*/
public final ITriplePatternElement object;
/**
*
* @param fragmentURL
* @param datasetURL
* @param pageNumberWasRequested
* @param pageNumber
* @param subject
* @param predicate
* @param object
*/
public TriplePatternFragmentRequestImpl( final String fragmentURL,
final String datasetURL,
final boolean pageNumberWasRequested,
final long pageNumber,
final ITriplePatternElement subject,
final ITriplePatternElement predicate,
final ITriplePatternElement object )
{
super( fragmentURL, datasetURL, pageNumberWasRequested, pageNumber );
if ( subject == null )
throw new IllegalArgumentException();
if ( predicate == null )
throw new IllegalArgumentException();
if ( object == null )
throw new IllegalArgumentException();
this.subject = subject;
this.predicate = predicate;
this.object = object;
}
@Override
public ITriplePatternElement getSubject() {
return subject;
}
@Override
public ITriplePatternElement getPredicate() {
return predicate;
}
@Override
public ITriplePatternElement getObject() {
return object;
}
@Override
public String toString()
{
return "TriplePatternFragmentRequest(" +
"class: " + getClass().getName() +
", subject: " + subject.toString() +
", predicate: " + predicate.toString() +
", object: " + object.toString() +
", fragmentURL: " + fragmentURL +
", isPageRequest: " + pageNumberWasRequested +
", pageNumber: " + pageNumber +
")";
}
}