![JAR search and dependency download from the Maven repository](/logo.png)
com.lordofthejars.nosqlunit.marklogic.content.Content Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nosqlunit-marklogic Show documentation
Show all versions of nosqlunit-marklogic Show documentation
NoSQLUnit adapter for MarkLogic
The newest version!
package com.lordofthejars.nosqlunit.marklogic.content;
import java.io.IOException;
import java.io.InputStream;
import java.util.HashSet;
import java.util.Set;
public abstract class Content {
private static final String[] EMPTY_STRING_ARRAY = new String[0];
private String uri;
private Set collections = new HashSet<>();
protected Content() {
}
protected Content(Set collections) {
this.collections.addAll(collections);
}
public String getUri() {
return uri;
}
public void setUri(String uri) {
this.uri = uri;
}
public String[] getCollections() {
return collections.toArray(EMPTY_STRING_ARRAY);
}
public void addCollection(String collection) {
collections.add(collection);
}
public abstract InputStream content() throws IOException;
public abstract D getData();
@Override
public String toString() {
return "Content{" +
"uri='" + uri + '\'' +
", collections=" + collections +
'}';
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy