Skip to content
This repository has been archived by the owner on Jan 3, 2019. It is now read-only.

Commit

Permalink
Update javadocs
Browse files Browse the repository at this point in the history
  • Loading branch information
nianma authored and Andrew Woods committed Feb 17, 2015
1 parent 6d6a9ef commit 3f5f08f
Show file tree
Hide file tree
Showing 14 changed files with 42 additions and 28 deletions.
Expand Up @@ -31,7 +31,7 @@ public class AbsentTransformPropertyException extends RuntimeException {
private static final long serialVersionUID = 1L;

/**
* @param msg
* @param msg the message
*/
public AbsentTransformPropertyException(final String msg) {
super(msg);
Expand Down
Expand Up @@ -84,15 +84,15 @@ public void run() {
}

/**
* @param identifier
* @return
* @param identifier the URI identifier
* @return callable
*/
public abstract Callable<Result> removeSynch(final URI identifier);

/**
* @param identifier
* @param content
* @return
* @param identifier the URI identifier
* @param content the update content
* @return callable
*/
public abstract Callable<Result> updateSynch(final URI identifier, final Content content);

Expand Down
Expand Up @@ -53,7 +53,7 @@ public class FileSerializer extends SynchIndexer<NamedFields, File> {
/**
* Set path to write files.
*
* @param pathName
* @param pathName the path name
*/
public void setPath( final String pathName ) {
this.path = new File(pathName);
Expand All @@ -64,15 +64,15 @@ public void setPath( final String pathName ) {
/**
* Return path where files are written.
*
* @return
* @return the path where files are written
*/
public String getPath() {
return path.getAbsolutePath();
}

/**
* Create or update an index entry for the object.
* @return
* @return the index entry for the object
**/
@Override
public Callable<File> updateSynch(final URI id, final NamedFields content) {
Expand Down
Expand Up @@ -22,7 +22,7 @@
/**
* Main interface for individual indexers to implement. Each type of
* destination (Solr, triplestore, files, etc.) should have its own
* implementation. Abstract classes {@link AsynchIndexer} and {@link SynchIndexer
* implementation. Abstract classes {@link AsynchIndexer} and {@link SynchIndexer}
* are provided for convenience.
*
* @author ajs6f
Expand All @@ -37,19 +37,19 @@ public interface Indexer<Content> {
/**
* Create or update an index entry for the object.
*
* @param id
* @param content
* @param id the object id
* @param content the object content
* @return the results of addition
* @throws IOException
* @throws IOException if IO exception occurred
*/
public ListenableFuture<?> update(final URI id, final Content content) throws IOException;

/**
* Remove the object from the index.
*
* @param id
* @param id the object id
* @return the results of removal
* @throws IOException
* @throws IOException if IO exception occurred
*/
public ListenableFuture<?> remove(final URI id) throws IOException;

Expand Down
Expand Up @@ -149,6 +149,9 @@ public class IndexerGroup implements MessageListener {

/**
* Default constructor.
* @param indexers the set of indexers
* @param fedoraUsername the fedora user name
* @param fedoraPassword the fedora password
**/
public IndexerGroup(final Set<Indexer<Object>> indexers,
final String fedoraUsername,
Expand All @@ -164,6 +167,8 @@ public IndexerGroup(final Set<Indexer<Object>> indexers,

/**
* Constructor with provided default HttpClient instance added for testing.
* @param indexers the set of indexers
* @param httpClient the http client for testing
**/
public IndexerGroup(final Set<Indexer<Object>> indexers, final DefaultHttpClient httpClient) {
LOGGER.debug("Creating IndexerGroup: {}", this);
Expand Down Expand Up @@ -366,6 +371,7 @@ private void index( final URI uri, final String eventType ) throws URISyntaxExce
* Reindex a resource (and optionally all of its children).
* @param uri The resource URI to reindex.
* @param recursive If true, also recursively reindex all children.
* @throws URISyntaxException if URI syntax exception occurred
**/
public void reindex( final URI uri, final boolean recursive ) throws URISyntaxException {
reindexed = new HashSet<>();
Expand Down
Expand Up @@ -51,8 +51,8 @@ public class JcrXmlRetriever implements Supplier<InputStream> {

/**
* Constructor
* @param identifier
* @param client
* @param identifier the URI identifier
* @param client the http client
*/
public JcrXmlRetriever(final URI identifier, final HttpClient client) {
this.identifier = identifier;
Expand Down
Expand Up @@ -31,7 +31,7 @@ public class NamedFields extends HashMap<String, Collection<String>> {
/**
* Default constructor
*
* @param values
* @param values the values
*/
public NamedFields(final Map<String, Collection<String>> values) {
super(values);
Expand Down
Expand Up @@ -62,8 +62,8 @@ public class NamedFieldsRetriever implements Supplier<NamedFields> {
private static final Logger LOGGER = getLogger(NamedFieldsRetriever.class);

/**
* @param uri
* @param client
* @param uri the URI identifier
* @param client the http client
* @param rdfr Used to determine the transform to use with this indexing
* step
*/
Expand Down
Expand Up @@ -59,8 +59,8 @@ public class RdfRetriever implements Supplier<Model> {
private static final Logger LOGGER = getLogger(RdfRetriever.class);

/**
* @param identifier
* @param client
* @param identifier the URI identifier
* @param client the http client
*/
public RdfRetriever(final URI identifier, final HttpClient client) {
this.identifier = identifier;
Expand Down
Expand Up @@ -20,7 +20,7 @@
import com.google.common.util.concurrent.ListeningExecutorService;

/**
* An {@Indexer} that completes its operations synchronously.
* An {@link Indexer} that completes its operations synchronously.
*
* @author ajs6f
* @since Dec 8, 2013
Expand Down
Expand Up @@ -58,6 +58,8 @@ public BasePersistenceIndexer( final String pathName, final String extension ) {
/**
* Return the path where a given record should be persisted.
* @param id The record's URI
* @return the path where a given record should be persisted
* @throws IOException if IO exception occurred
**/
protected Path pathFor(final URI id) throws IOException {

Expand Down
Expand Up @@ -72,8 +72,8 @@ public class SolrIndexer extends AsynchIndexer<NamedFields, UpdateResponse> {
private static final Logger LOGGER = getLogger(SolrIndexer.class);

/**
* @Autowired solrServer instance is auto-@Autowired in indexer-core.xml
* @param solrServer
* solrServer instance is autowired in indexer-core.xml
* @param solrServer the solr server
*/
@Autowired
public SolrIndexer(final SolrServer solrServer) {
Expand Down
Expand Up @@ -76,7 +76,7 @@ public class SparqlIndexer extends AsynchIndexer<Model, Void> {
/**
* Remove any current triples about the Fedora object and replace them with
* the provided content.
* @content RDF in N3 format.
* {@literal @content RDF in N3 format.}
**/
@Override
public Callable<Void> updateSynch(final URI pid, final Model model) {
Expand Down Expand Up @@ -249,20 +249,23 @@ public IndexerType getIndexerType() {

/**
* Set whether to use SPARQL Update or form updates.
* @param b boolean value for whether to use SPARQL update or form update
**/
public void setFormUpdates( final boolean b ) {
this.formUpdates = b;
}

/**
* Set base URL for SPARQL Query requests.
* @param url base URL for SPARQL query request
**/
public void setQueryBase( final String url ) {
this.queryBase = url;
}

/**
* Set base URL for SPARQL Update requests.
* @param url base URL for SPARQL update requests
**/
public void setUpdateBase( final String url ) {
this.updateBase = url;
Expand All @@ -275,13 +278,16 @@ public ListeningExecutorService executorService() {

/**
* Note: Protected for Unit Tests to overwrite.
* @param describeQuery the describe query
* @return the query engine http
*/
protected QueryEngineHTTP buildQueryEngineHTTP(final String describeQuery) {
return new QueryEngineHTTP( queryBase, describeQuery );
}

/**
* Note: Protected for Unit Tests to overwrite.
* @return update request
*/
protected UpdateRequest buildUpdateRequest() {
return new UpdateRequest();
Expand Down
Expand Up @@ -35,7 +35,7 @@
import com.google.common.util.concurrent.ListeningExecutorService;

/**
* {@link Indexer} for Elasticsearch.
* {@link org.fcrepo.indexer.Indexer} for Elasticsearch.
*
* @author ajs6f
* @since Dec 14, 2013
Expand All @@ -60,7 +60,7 @@ public class ElasticIndexer extends AsynchIndexer<NamedFields, ActionResponse> {

/**
* Constructs an index with the name supplied.
* @throws InterruptedException
* @throws InterruptedException if interrupted exception occurred
*/
@PostConstruct
public void initIndex() throws InterruptedException {
Expand Down

0 comments on commit 3f5f08f

Please sign in to comment.