// Path: src/main/java/org/nanopub/Nanopub.java
// public interface Nanopub {
// 
// 	// URIs in the nanopub namespace:
// 	public static final IRI NANOPUB_TYPE_URI = SimpleValueFactory.getInstance().createIRI("http://www.nanopub.org/nschema#Nanopublication");
// 	public static final IRI HAS_ASSERTION_URI = SimpleValueFactory.getInstance().createIRI("http://www.nanopub.org/nschema#hasAssertion");
// 	public static final IRI HAS_PROVENANCE_URI = SimpleValueFactory.getInstance().createIRI("http://www.nanopub.org/nschema#hasProvenance");
// 	public static final IRI HAS_PUBINFO_URI = SimpleValueFactory.getInstance().createIRI("http://www.nanopub.org/nschema#hasPublicationInfo");
// 
// 	// URIs that link nanopublications:
// 	public static final IRI SUPERSEDES = SimpleValueFactory.getInstance().createIRI("http://purl.org/nanopub/x/supersedes");
// 
// 	public IRI getUri();
// 
// 	public IRI getHeadUri();
// 
// 	public Set<Statement> getHead();
// 
// 	public IRI getAssertionUri();
// 
// 	public Set<Statement> getAssertion();
// 
// 	public IRI getProvenanceUri();
// 
// 	public Set<Statement> getProvenance();
// 
// 	public IRI getPubinfoUri();
// 
// 	public Set<Statement> getPubinfo();
// 
// 	public Set<IRI> getGraphUris();
// 
// 	// TODO: Now that we have SimpleCreatorPattern and SimpleTimestampPattern,
// 	// we might not need the following three methods anymore...
// 
// 	public Calendar getCreationTime();
// 
// 	public Set<IRI> getAuthors();
// 
// 	public Set<IRI> getCreators();
// 
// 	public int getTripleCount();
// 
// 	public long getByteCount();
// 
// }


import java.util.Set;
import org.eclipse.rdf4j.model.IRI;
import org.eclipse.rdf4j.model.impl.SimpleValueFactory;
import org.nanopub.Nanopub;
package org.nanopub.extra.index;



/**
 * A nanopublication index is a nanopublication that refers to the URIs of other nanopublications,
 * thereby defining a set or collection of nanopubs. A single index can only contain references to
 * up to 1000 nanopublications (or sub-indexes), but indexes can refer to sub-indexes or append
 * existing indexes and thereby define sets of arbitrary size. Indexes that are appended by other
 * indexes and do not define a meaningful set on their own are called "incomplete". Indexes that
 * are not appended by other indexes or despite being appended define a meaningful set of nanopubs
 * on their own, are called "complete". For example, to define a set of 2500 nanopublications, one
 * can define a first incomlete index with 1000 nanopubs, then a second incomplete one that appends
 * the first and refers to the next 1000 nanopubs, and finally a complete index that appends the
 * second and adds the remaining 500 nanopubs, thereby containing in total 2500 of them.
 *
 * See the following paper for a description of the general approach: http://arxiv.org/pdf/1411.2749
 *
 * @author Tobias Kuhn
 */
public interface NanopubIndex extends Nanopub {

	public static final IRI NANOPUB_INDEX_URI = SimpleValueFactory.getInstance().createIRI("http://purl.org/nanopub/x/NanopubIndex");
	public static final IRI INCOMPLETE_INDEX_URI = SimpleValueFactory.getInstance().createIRI("http://purl.org/nanopub/x/IncompleteIndex");
	public static final IRI INDEX_ASSERTION_URI = SimpleValueFactory.getInstance().createIRI("http://purl.org/nanopub/x/IndexAssertion");
	public static final IRI INCLUDES_ELEMENT_URI = SimpleValueFactory.getInstance().createIRI("http://purl.org/nanopub/x/includesElement");
	public static final IRI INCLUDES_SUBINDEX_URI = SimpleValueFactory.getInstance().createIRI("http://purl.org/nanopub/x/includesSubindex");
	public static final IRI APPENDS_INDEX_URI = SimpleValueFactory.getInstance().createIRI("http://purl.org/nanopub/x/appendsIndex");

	public static final int MAX_SIZE = 1000;

	public Set<IRI> getElements();

	public Set<IRI> getSubIndexes();

// Path: src/main/java/org/nanopub/Nanopub.java
// public interface Nanopub {
// 
// 	// URIs in the nanopub namespace:
// 	public static final IRI NANOPUB_TYPE_URI = SimpleValueFactory.getInstance().createIRI("http://www.nanopub.org/nschema#Nanopublication");
// 	public static final IRI HAS_ASSERTION_URI = SimpleValueFactory.getInstance().createIRI("http://www.nanopub.org/nschema#hasAssertion");
// 	public static final IRI HAS_PROVENANCE_URI = SimpleValueFactory.getInstance().createIRI("http://www.nanopub.org/nschema#hasProvenance");
// 	public static final IRI HAS_PUBINFO_URI = SimpleValueFactory.getInstance().createIRI("http://www.nanopub.org/nschema#hasPublicationInfo");
// 
// 	// URIs that link nanopublications:
// 	public static final IRI SUPERSEDES = SimpleValueFactory.getInstance().createIRI("http://purl.org/nanopub/x/supersedes");
// 
// 	public IRI getUri();
// 
// 	public IRI getHeadUri();
// 
// 	public Set<Statement> getHead();
// 
// 	public IRI getAssertionUri();
// 
// 	public Set<Statement> getAssertion();
// 
// 	public IRI getProvenanceUri();
// 
// 	public Set<Statement> getProvenance();
// 
// 	public IRI getPubinfoUri();
// 
// 	public Set<Statement> getPubinfo();
// 
// 	public Set<IRI> getGraphUris();
// 
// 	// TODO: Now that we have SimpleCreatorPattern and SimpleTimestampPattern,
// 	// we might not need the following three methods anymore...
// 
// 	public Calendar getCreationTime();
// 
// 	public Set<IRI> getAuthors();
// 
// 	public Set<IRI> getCreators();
// 
// 	public int getTripleCount();
// 
// 	public long getByteCount();
// 
// }


// Path: src/main/java/org/nanopub/extra/index/NanopubIndex.java
import java.util.Set;
import org.eclipse.rdf4j.model.IRI;
import org.eclipse.rdf4j.model.impl.SimpleValueFactory;
import org.nanopub.Nanopub;

package org.nanopub.extra.index;



/**
 * A nanopublication index is a nanopublication that refers to the URIs of other nanopublications,
 * thereby defining a set or collection of nanopubs. A single index can only contain references to
 * up to 1000 nanopublications (or sub-indexes), but indexes can refer to sub-indexes or append
 * existing indexes and thereby define sets of arbitrary size. Indexes that are appended by other
 * indexes and do not define a meaningful set on their own are called "incomplete". Indexes that
 * are not appended by other indexes or despite being appended define a meaningful set of nanopubs
 * on their own, are called "complete". For example, to define a set of 2500 nanopublications, one
 * can define a first incomlete index with 1000 nanopubs, then a second incomplete one that appends
 * the first and refers to the next 1000 nanopubs, and finally a complete index that appends the
 * second and adds the remaining 500 nanopubs, thereby containing in total 2500 of them.
 *
 * See the following paper for a description of the general approach: http://arxiv.org/pdf/1411.2749
 *
 * @author Tobias Kuhn
 */
public interface NanopubIndex extends Nanopub {

	public static final IRI NANOPUB_INDEX_URI = SimpleValueFactory.getInstance().createIRI("http://purl.org/nanopub/x/NanopubIndex");
	public static final IRI INCOMPLETE_INDEX_URI = SimpleValueFactory.getInstance().createIRI("http://purl.org/nanopub/x/IncompleteIndex");
	public static final IRI INDEX_ASSERTION_URI = SimpleValueFactory.getInstance().createIRI("http://purl.org/nanopub/x/IndexAssertion");
	public static final IRI INCLUDES_ELEMENT_URI = SimpleValueFactory.getInstance().createIRI("http://purl.org/nanopub/x/includesElement");
	public static final IRI INCLUDES_SUBINDEX_URI = SimpleValueFactory.getInstance().createIRI("http://purl.org/nanopub/x/includesSubindex");
	public static final IRI APPENDS_INDEX_URI = SimpleValueFactory.getInstance().createIRI("http://purl.org/nanopub/x/appendsIndex");

	public static final int MAX_SIZE = 1000;

	public Set<IRI> getElements();

	public Set<IRI> getSubIndexes();

	public IRI getAppendedIndex();