// Path: src/main/java/org/nanopub/MalformedNanopubException.java
// public class MalformedNanopubException extends Exception {
// 
// 	private static final long serialVersionUID = -1022546557206977739L;
// 
// 	public MalformedNanopubException(String message) {
// 		super(message);
// 	}
// 
// }
// 
// 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/NanopubWithNs.java
// public interface NanopubWithNs extends Nanopub {
// 
// 	public List<String> getNsPrefixes();
// 
// 	public String getNamespace(String prefix);
// 
// 	public void removeUnusedPrefixes();
// 
// }


import java.util.Calendar;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.eclipse.rdf4j.model.IRI;
import org.eclipse.rdf4j.model.Literal;
import org.eclipse.rdf4j.model.Statement;
import org.eclipse.rdf4j.model.vocabulary.DC;
import org.eclipse.rdf4j.model.vocabulary.DCTERMS;
import org.eclipse.rdf4j.model.vocabulary.RDF;
import org.eclipse.rdf4j.model.vocabulary.RDFS;
import org.nanopub.MalformedNanopubException;
import org.nanopub.Nanopub;
import org.nanopub.NanopubWithNs;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
package org.nanopub.extra.index;




public class NanopubIndexImpl implements NanopubIndex, NanopubWithNs {

	private final Nanopub np;
	private final Set<IRI> elementSet;
	private final Set<IRI> subIndexSet;
	private final IRI appendedIndex;
	private boolean isIncompleteIndex = false;

// Path: src/main/java/org/nanopub/MalformedNanopubException.java
// public class MalformedNanopubException extends Exception {
// 
// 	private static final long serialVersionUID = -1022546557206977739L;
// 
// 	public MalformedNanopubException(String message) {
// 		super(message);
// 	}
// 
// }
// 
// 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/NanopubWithNs.java
// public interface NanopubWithNs extends Nanopub {
// 
// 	public List<String> getNsPrefixes();
// 
// 	public String getNamespace(String prefix);
// 
// 	public void removeUnusedPrefixes();
// 
// }


// Path: src/main/java/org/nanopub/extra/index/NanopubIndexImpl.java
import java.util.Calendar;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.eclipse.rdf4j.model.IRI;
import org.eclipse.rdf4j.model.Literal;
import org.eclipse.rdf4j.model.Statement;
import org.eclipse.rdf4j.model.vocabulary.DC;
import org.eclipse.rdf4j.model.vocabulary.DCTERMS;
import org.eclipse.rdf4j.model.vocabulary.RDF;
import org.eclipse.rdf4j.model.vocabulary.RDFS;
import org.nanopub.MalformedNanopubException;
import org.nanopub.Nanopub;
import org.nanopub.NanopubWithNs;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;

package org.nanopub.extra.index;




public class NanopubIndexImpl implements NanopubIndex, NanopubWithNs {

	private final Nanopub np;
	private final Set<IRI> elementSet;
	private final Set<IRI> subIndexSet;
	private final IRI appendedIndex;
	private boolean isIncompleteIndex = false;

	protected NanopubIndexImpl(Nanopub npIndex) throws MalformedNanopubException {