USRE-85 Fixed the error for docs build

This commit is contained in:
YuCheng Hu 2021-11-29 10:37:30 -05:00
parent 7b8fac5b1d
commit 6a67a236c6
4 changed files with 25 additions and 35 deletions

View File

@ -9,7 +9,7 @@ import java.util.Vector;
/** /**
* A class to provide a {@link javax.activation.DataSource} interface to * A class to provide a {@link javax.activation.DataSource} interface to
* an input stream of unknown characteristics. The <code>DataSource</cdoe> * an input stream of unknown characteristics. The <code>DataSource</code>
* interface requires that its implementor be able to repeatedly restart * interface requires that its implementor be able to repeatedly restart
* the read from the beginning. This isn't guaranteed by InputStream, so * the read from the beginning. This isn't guaranteed by InputStream, so
* we encapsulate the InputStream with an object that will buffer the * we encapsulate the InputStream with an object that will buffer the

View File

@ -90,7 +90,7 @@ public class RETSConnection extends java.lang.Object {
/** /**
* Executes a transaction * Executes a transaction
* *
* @param RETSTransaction transaction to execute * @param transaction transaction to execute
*/ */
public void execute(RETSTransaction transaction) { public void execute(RETSTransaction transaction) {
execute(transaction, false); execute(transaction, false);
@ -99,7 +99,7 @@ public class RETSConnection extends java.lang.Object {
/** /**
* Executes a transaction * Executes a transaction
* *
* @param RETSTransaction transaction to execute * @param transaction transaction to execute
*/ */
public void executeStreamResponse(RETSTransaction transaction) { public void executeStreamResponse(RETSTransaction transaction) {
execute(transaction, true); execute(transaction, true);

View File

@ -16,11 +16,10 @@ import java.util.Iterator;
/** /**
* RETSGetObjectTransaction.java * RETSGetObjectTransaction.java
* *
* @author jbrush
* @version 1.0 * @version 1.0
* @author jbrush
*/ */
public class RETSGetObjectTransaction extends RETSTransaction public class RETSGetObjectTransaction extends RETSTransaction {
{
/** /**
* Encapsulates the RETS GetObject transaction, and provides services for * Encapsulates the RETS GetObject transaction, and provides services for
* interpreting the result. As with all {@link RETSTransaction} classes, * interpreting the result. As with all {@link RETSTransaction} classes,
@ -66,10 +65,11 @@ public class RETSGetObjectTransaction extends RETSTransaction
setRequestVariable("Resource", str); setRequestVariable("Resource", str);
} }
/** /**
* Sets the type attribute to the string passed in. * Sets the type attribute to the string passed in.
* *
* @param type type attribute value * @param str type attribute value
*/ */
public void setType(String str) { public void setType(String str) {
logger.debug("set Type=" + str); logger.debug("set Type=" + str);
@ -82,7 +82,7 @@ public class RETSGetObjectTransaction extends RETSTransaction
* @param str ID of the object * @param str ID of the object
*/ */
public void setID(String str) { public void setID(String str) {
if ( str != null ) { if (str != null) {
logger.debug("set ID=" + str.trim()); logger.debug("set ID=" + str.trim());
setRequestVariable("ID", str.trim()); setRequestVariable("ID", str.trim());
} else { } else {
@ -103,7 +103,7 @@ public class RETSGetObjectTransaction extends RETSTransaction
/** /**
* Sets the response stream. This triggers various actions depending on the * Sets the response stream. This triggers various actions depending on the
* content-type of the response stream: * content-type of the response stream:
* <p>
* If the content-type is text/plain or text/xml, then assume we have a * If the content-type is text/plain or text/xml, then assume we have a
* RETS response and parse it accordingly. Note that we'll not have * RETS response and parse it accordingly. Note that we'll not have
* anything in the RETS response except error information. (We might * anything in the RETS response except error information. (We might
@ -111,21 +111,20 @@ public class RETSGetObjectTransaction extends RETSTransaction
* is that we made a request with Location=1 and the server has * is that we made a request with Location=1 and the server has
* responded in kind.) We still make this available, in case there *is* * responded in kind.) We still make this available, in case there *is*
* something else in the response. * something else in the response.
* <p>
* A content-type of<code> multipart</code>, with any subtype, is interpreted as a * A content-type of<code> multipart</code>, with any subtype, is interpreted as a
* multipart response. This is parsed to create a list of MIME parts. * multipart response. This is parsed to create a list of MIME parts.
* Any other content type is simply made available as a single MIME part. * Any other content type is simply made available as a single MIME part.
* <p>
* This method is called by {@link RETSConnection} to provide access to * This method is called by {@link RETSConnection} to provide access to
* the response from a transaction. You don't normally call this method * the response from a transaction. You don't normally call this method
* yourself. * yourself.
* *
* @param responseStream The response stream to associate with this transaction. * @param responseStream The response stream to associate with this transaction.
* @call Rarely. * Rarely. You can override this method if you want to provide
* @override Rarely. You can override this method if you want to provide * special processing of a GetObject response stream, but
* special processing of a GetObject response stream, but * it will usually be more convenient to override one
* it will usually be more convenient to override one * of the methods that handles particular MIME types.
* of the methods that handles particular MIME types.
*/ */
public void setResponseStream(InputStream responseStream) { public void setResponseStream(InputStream responseStream) {
@ -172,8 +171,7 @@ public class RETSGetObjectTransaction extends RETSTransaction
* deal with it. If not, handle as for an unknown response. * deal with it. If not, handle as for an unknown response.
* *
* @param responseStream The response stream containing the XML data. * @param responseStream The response stream containing the XML data.
* @call Only from subclasses. * Override to provide your own handling of XML data
* @ @override Override to provide your own handling of XML data
* streams. * streams.
*/ */
protected void handleXMLStream(InputStream responseStream, String mimeType, String contentType) { protected void handleXMLStream(InputStream responseStream, String mimeType, String contentType) {
@ -203,11 +201,7 @@ public class RETSGetObjectTransaction extends RETSTransaction
* *
* @param responseStream The stream to parse. * @param responseStream The stream to parse.
* @param mimeType The MIME type and subtype associated with the stream. * @param mimeType The MIME type and subtype associated with the stream.
* @param contentType The Content-Type header, including the MIME type and its parameters, if any. * @param contentType The Content-Type header, including the MIME type and its parameters, if any
* @call Only from subclasses.
* @override Override to provide your own handling of MIME multipart
* <p/>
* data.
*/ */
protected void handleMultipartStream(InputStream responseStream, String mimeType, String contentType) { protected void handleMultipartStream(InputStream responseStream, String mimeType, String contentType) {
@ -239,7 +233,7 @@ public class RETSGetObjectTransaction extends RETSTransaction
setResponseStatusText("RETSAPI: I/O exception while creating multipart stream from response: " + ioException.getMessage()); setResponseStatusText("RETSAPI: I/O exception while creating multipart stream from response: " + ioException.getMessage());
} finally { } finally {
// We always want at least an empty body part list. // We always want at least an empty body part list.
if ( parts == null ) parts = new ArrayList(); if (parts == null) parts = new ArrayList();
} }
} }
@ -250,8 +244,6 @@ public class RETSGetObjectTransaction extends RETSTransaction
* *
* @param inputBytes A byte array containing the response data. * @param inputBytes A byte array containing the response data.
* @param contentType The content-type header. * @param contentType The content-type header.
* @call Rarely.
* @override Rarely.
*/ */
protected void makeSinglePartFromByteStream(byte[] inputBytes, String contentType) { protected void makeSinglePartFromByteStream(byte[] inputBytes, String contentType) {
// First, we need to gather the response headers into an InternetHeader object // First, we need to gather the response headers into an InternetHeader object
@ -264,7 +256,7 @@ public class RETSGetObjectTransaction extends RETSTransaction
headerName = (String) headerIterator.next(); headerName = (String) headerIterator.next();
// String headerContent = (String) getResponseHeaderMap().get(headerName); // String headerContent = (String) getResponseHeaderMap().get(headerName);
headerContent = getResponseHeaderMap().get(headerName); headerContent = getResponseHeaderMap().get(headerName);
if ( headerContent != null ) if (headerContent != null)
originalHeaders.addHeader(headerName, headerContent.toString()); originalHeaders.addHeader(headerName, headerContent.toString());
} }
parts = new ArrayList(1); // We may not have *any*, but we won't have more than 1. parts = new ArrayList(1); // We may not have *any*, but we won't have more than 1.
@ -286,10 +278,8 @@ public class RETSGetObjectTransaction extends RETSTransaction
* @param responseStream The stream to parse. * @param responseStream The stream to parse.
* @param mimeType The MIME type and subtype associated with the stream. * @param mimeType The MIME type and subtype associated with the stream.
* @param contentType The Content-Type header, including the MIME type and its parameters, if any. * @param contentType The Content-Type header, including the MIME type and its parameters, if any.
* @call Only from subclasses. * <p>
* @override Override to provide your own handling of data with special * MIME types.
* <p/>
* MIME types.
*/ */
protected void handleStreamWithType(InputStream responseStream, String mimeType, String contentType) { protected void handleStreamWithType(InputStream responseStream, String mimeType, String contentType) {
try { try {
@ -306,7 +296,7 @@ public class RETSGetObjectTransaction extends RETSTransaction
* Returns the count of retrieved objects. * Returns the count of retrieved objects.
*/ */
public int getObjectCount() { public int getObjectCount() {
if ( parts == null ) return 0; if (parts == null) return 0;
return parts.size(); return parts.size();
} }
@ -325,7 +315,7 @@ public class RETSGetObjectTransaction extends RETSTransaction
* @param objectIndex The index of the object to retrieve. * @param objectIndex The index of the object to retrieve.
*/ */
public MimeBodyPart partAtIndex(int objectIndex) { public MimeBodyPart partAtIndex(int objectIndex) {
if ( parts == null || objectIndex < 0 || objectIndex >= parts.size() ) if (parts == null || objectIndex < 0 || objectIndex >= parts.size())
return null; return null;
return (MimeBodyPart) parts.get(objectIndex); return (MimeBodyPart) parts.get(objectIndex);
} }
@ -334,7 +324,7 @@ public class RETSGetObjectTransaction extends RETSTransaction
InputStream inputStream = null; InputStream inputStream = null;
MimeBodyPart part = this.partAtIndex(objectIndex); MimeBodyPart part = this.partAtIndex(objectIndex);
try { try {
if ( part != null ) { if (part != null) {
Object content = part.getContent(); Object content = part.getContent();
inputStream = (InputStream) content; inputStream = (InputStream) content;
logger.debug("--- MimeBodyPart Content--> " + content); logger.debug("--- MimeBodyPart Content--> " + content);

View File

@ -23,7 +23,7 @@ public class RETSSearchAgentTransaction extends RETSSearchTransaction {
/** Search by last name, pass in the lastname of a user /** Search by last name, pass in the lastname of a user
* as the "query" argument. * as the "query" argument.
* @param searchByLastName lastname of the user to search. * @param searchByLastname lastname of the user to search.
*/ */
public void setSearchByLastname(String searchByLastname) { public void setSearchByLastname(String searchByLastname) {
// convert to DMQL // convert to DMQL