public abstract class LinkedDataFragmentBase extends Object implements ILinkedDataFragment
ILinkedDataFragment that uses
paging.| Modifier and Type | Field and Description |
|---|---|
String |
datasetURL |
String |
fragmentURL |
boolean |
isLastPage |
long |
pageNumber |
| Modifier | Constructor and Description |
|---|---|
protected |
LinkedDataFragmentBase(String fragmentURL,
String datasetURL,
long pageNumber,
boolean isLastPage) |
| Modifier and Type | Method and Description |
|---|---|
void |
addControls(org.apache.jena.rdf.model.Model model)
Adds an RDF description of page links to the given RDF model.
|
void |
addMetadata(org.apache.jena.rdf.model.Model model)
Adds some basic metadata to the given RDF model.
|
void |
close()
Does nothing.
|
org.apache.jena.rdf.model.StmtIterator |
getControls()
This implementation uses
addControls(Model), which should be
overridden in subclasses (instead of overriding this method). |
String |
getDatasetURI() |
long |
getMaxPageSize()
Returns the maximum number of triples per page if
ILinkedDataFragment.getTriples()
returns a page of data only (that is, if ILinkedDataFragment.isPageOnly() returns
true). |
org.apache.jena.rdf.model.StmtIterator |
getMetadata()
This implementation uses
addMetadata(Model), which should be
overridden in subclasses (instead of overriding this method). |
long |
getPageNumber()
Returns the number of the page of data returned by
ILinkedDataFragment.getTriples()
if the data is paged (that is, if ILinkedDataFragment.isPageOnly() returns true). |
boolean |
isLastPage()
Returns true if
ILinkedDataFragment.getTriples() returns a page of data only and
this is the last page of the fragment. |
boolean |
isPageOnly()
Returns true if
ILinkedDataFragment.getTriples() returns a page of data only. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetTriplespublic final String fragmentURL
public final String datasetURL
public final long pageNumber
public final boolean isLastPage
public void close()
close in interface Closeableclose in interface AutoCloseablepublic boolean isPageOnly()
ILinkedDataFragmentILinkedDataFragment.getTriples() returns a page of data only.
In this case, ILinkedDataFragment.getPageNumber() can be used to obtain the
corresponding page number.isPageOnly in interface ILinkedDataFragmentpublic long getPageNumber()
ILinkedDataFragmentILinkedDataFragment.getTriples()
if the data is paged (that is, if ILinkedDataFragment.isPageOnly() returns true).
If the data is not paged, this method throws an exception.getPageNumber in interface ILinkedDataFragmentpublic boolean isLastPage()
ILinkedDataFragmentILinkedDataFragment.getTriples() returns a page of data only and
this is the last page of the fragment.
If the data is not paged (i.e., if ILinkedDataFragment.isPageOnly() returns false),
this method throws an exception.isLastPage in interface ILinkedDataFragmentpublic long getMaxPageSize()
ILinkedDataFragmentILinkedDataFragment.getTriples()
returns a page of data only (that is, if ILinkedDataFragment.isPageOnly() returns
true).
If the data is not paged, this method throws an exception.getMaxPageSize in interface ILinkedDataFragmentpublic org.apache.jena.rdf.model.StmtIterator getMetadata()
addMetadata(Model), which should be
overridden in subclasses (instead of overriding this method).getMetadata in interface ILinkedDataFragmentpublic org.apache.jena.rdf.model.StmtIterator getControls()
addControls(Model), which should be
overridden in subclasses (instead of overriding this method).getControls in interface ILinkedDataFragmentpublic void addMetadata(org.apache.jena.rdf.model.Model model)
model - public void addControls(org.apache.jena.rdf.model.Model model)
model - public String getDatasetURI()
Copyright © 2021. All rights reserved.