Skip to content

Commit

Permalink
Add’l Javadoc updates
Browse files Browse the repository at this point in the history
  • Loading branch information
gothub committed Oct 29, 2019
1 parent 706e9ae commit 9fc865c
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 21 deletions.
Expand Up @@ -33,11 +33,12 @@
* A complex data value mining SolrField. This class returns a value to
* an indexing subprocessor from its dependent class. See FilterRootElement for
* a typical usage.
* <p>
* Based on CommonRootSolrField by sroseboo
* </p>
*
* @author slaughter
*
* Based on CommonRootSolrField by sroseboo
*
*/
public class FilterCommonRootSolrField extends SolrField {

Expand All @@ -50,11 +51,13 @@ public FilterCommonRootSolrField(String name) {
}

/**
*
* @param doc
* @param identifier
* @return
* Prepare a Solr fields by extracting information from an input XML document, using the document processor configured
* by Spring context files
* @param doc the document to process
* @param identifier a specific identifier to process
* @return the Solr fields to be added to the index
* @throws Exception
* @see "application-context-collections.xml"
*/
@Override
public List<SolrElementField> getFields(Document doc, String identifier) throws Exception {
Expand All @@ -70,25 +73,25 @@ public List<SolrElementField> getFields(Document doc, String identifier) throws
}

/**
*
* @param xpathObject
* Inialize the XPath expression that will be used to location XML nodes to process
* @param xpathObject the XPath to initialize
*/
@Override
public void initExpression(XPath xpathObject) {
root.initXPathExpressions(xpathObject);
}

/**
*
* @return
* Get the root element that will be processed
* @return the root element that will be processed
*/
public FilterRootElement getRoot() {
return root;
}

/**
*
* @param root
* Set the root element that will be processed
* @param root the root element that will be processed
*/
public void setRoot(FilterRootElement root) {
this.root = root;
Expand Down
Expand Up @@ -30,14 +30,14 @@
import java.util.regex.Pattern;

/**
* Used by FilterRootElement.
*
* For each matching 'filter' element in a document, build a query term from it. These individual
* query terms will assembled into a complete query by calling routine.
*
* Each filter type can have a set of leaf elements that will be used to build the search term
* contributed by that filter to the entire query being assembled.
* Each filter can have parameters defined that control how the query is built.
* <p>
* Each filter type can have a set of leaf elements that will be used to build the search term
* contributed by that filter to the entire query being assembled.
* Each filter can have parameters defined that control how the query is built.
* </p>
*
* @author slaughter
*
Expand Down Expand Up @@ -268,16 +268,16 @@ public String getFilterValue(Node node) throws XPathExpressionException {

/**
*
* <p>
* Templates are used to convert XML elements, attributes and values into the form defined by
* the template.
* <p>
* Several templates may be available for a filter to use. The 'best' template will be selected
* by determining which template can be completely filled in by the values that are provided
* in a given XML document to be processed.
* </p>
* <p>
* The 'leaf' values for a filter are compared to the tokens in the template to find a match
* </p>
* <p>The 'leaf' values for a filter are compared to the tokens in the template to find a match</p>
* @param leafNames - XML 'leaf' elements available to the filter
* @param allLeafNames - all possible leaf name values
* @return the template string that the filter processor will use.
Expand Down Expand Up @@ -372,12 +372,10 @@ private String applyItem(String name, String value, String filterValue) {

/**
* Add a leaf element value to the hash of leaf values.
*
* <p>
* The leaf value may be compound, i.e. "keyword--text", so add an entry for each of these
* compound values.
* </p>
*
* @param leafName the name of the leaf, which is the hashmap key
* @param leafValue a single value to add to the list of values for this entry
* @return the hash containing all current leaf values
Expand Down
Expand Up @@ -61,6 +61,7 @@ public FilterRootElement() {
}

/**
* Get the document processor values for the document or node
*
* @param docOrNode - An XML document root or sub-node of a DataONE collection document
* @return the value of the query derived from the document
Expand Down

0 comments on commit 9fc865c

Please sign in to comment.