org.patrodyne.etl.transformio.xml.Locator Maven / Gradle / Ivy
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.5-b10
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2012.06.21 at 09:44:19 PM EDT
//
package org.patrodyne.etl.transformio.xml;
import java.math.BigInteger;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import org.jvnet.jaxb2_commons.lang.Equals;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
import org.jvnet.jaxb2_commons.lang.HashCode;
import org.jvnet.jaxb2_commons.lang.HashCodeStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
import org.jvnet.jaxb2_commons.lang.ToString;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
/**
*
* A locator type represents a Uniform Resource Locator.
* It can be specified as a single attribute or in parts:
*
* - protocol - Communication standard.
* - username - Authentication account.
* - password - Authentication credential.
* - host - Server address name.
* - port - Channel number.
* - path - Resource location.
* - query - Criteria parameters.
* - anchor - Resource offset.
*
* To specify the locator as a single value use the url attribute.
*
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "locatorType", propOrder = {
"protocol",
"username",
"password",
"host",
"port",
"path",
"query",
"anchor"
})
public class Locator
implements Equals, HashCode, ToString
{
protected String protocol;
protected String username;
protected String password;
protected String host;
@XmlSchemaType(name = "nonNegativeInteger")
protected BigInteger port;
protected String path;
protected String query;
protected String anchor;
@XmlAttribute(name = "url")
@XmlSchemaType(name = "anyURI")
protected String url;
/**
* Gets the value of the protocol property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getProtocol() {
return protocol;
}
/**
* Sets the value of the protocol property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setProtocol(String value) {
this.protocol = value;
}
/**
* Gets the value of the username property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getUsername() {
return username;
}
/**
* Sets the value of the username property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setUsername(String value) {
this.username = value;
}
/**
* Gets the value of the password property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getPassword() {
return password;
}
/**
* Sets the value of the password property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setPassword(String value) {
this.password = value;
}
/**
* Gets the value of the host property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getHost() {
return host;
}
/**
* Sets the value of the host property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setHost(String value) {
this.host = value;
}
/**
* Gets the value of the port property.
*
* @return
* possible object is
* {@link BigInteger }
*
*/
public BigInteger getPort() {
return port;
}
/**
* Sets the value of the port property.
*
* @param value
* allowed object is
* {@link BigInteger }
*
*/
public void setPort(BigInteger value) {
this.port = value;
}
/**
* Gets the value of the path property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getPath() {
return path;
}
/**
* Sets the value of the path property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setPath(String value) {
this.path = value;
}
/**
* Gets the value of the query property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getQuery() {
return query;
}
/**
* Sets the value of the query property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setQuery(String value) {
this.query = value;
}
/**
* Gets the value of the anchor property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getAnchor() {
return anchor;
}
/**
* Sets the value of the anchor property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setAnchor(String value) {
this.anchor = value;
}
/**
* Gets the value of the url property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getUrl() {
return url;
}
/**
* Sets the value of the url property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setUrl(String value) {
this.url = value;
}
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
if (!(object instanceof Locator)) {
return false;
}
if (this == object) {
return true;
}
final Locator that = ((Locator) object);
{
String lhsProtocol;
lhsProtocol = this.getProtocol();
String rhsProtocol;
rhsProtocol = that.getProtocol();
if (!strategy.equals(LocatorUtils.property(thisLocator, "protocol", lhsProtocol), LocatorUtils.property(thatLocator, "protocol", rhsProtocol), lhsProtocol, rhsProtocol)) {
return false;
}
}
{
String lhsUsername;
lhsUsername = this.getUsername();
String rhsUsername;
rhsUsername = that.getUsername();
if (!strategy.equals(LocatorUtils.property(thisLocator, "username", lhsUsername), LocatorUtils.property(thatLocator, "username", rhsUsername), lhsUsername, rhsUsername)) {
return false;
}
}
{
String lhsPassword;
lhsPassword = this.getPassword();
String rhsPassword;
rhsPassword = that.getPassword();
if (!strategy.equals(LocatorUtils.property(thisLocator, "password", lhsPassword), LocatorUtils.property(thatLocator, "password", rhsPassword), lhsPassword, rhsPassword)) {
return false;
}
}
{
String lhsHost;
lhsHost = this.getHost();
String rhsHost;
rhsHost = that.getHost();
if (!strategy.equals(LocatorUtils.property(thisLocator, "host", lhsHost), LocatorUtils.property(thatLocator, "host", rhsHost), lhsHost, rhsHost)) {
return false;
}
}
{
BigInteger lhsPort;
lhsPort = this.getPort();
BigInteger rhsPort;
rhsPort = that.getPort();
if (!strategy.equals(LocatorUtils.property(thisLocator, "port", lhsPort), LocatorUtils.property(thatLocator, "port", rhsPort), lhsPort, rhsPort)) {
return false;
}
}
{
String lhsPath;
lhsPath = this.getPath();
String rhsPath;
rhsPath = that.getPath();
if (!strategy.equals(LocatorUtils.property(thisLocator, "path", lhsPath), LocatorUtils.property(thatLocator, "path", rhsPath), lhsPath, rhsPath)) {
return false;
}
}
{
String lhsQuery;
lhsQuery = this.getQuery();
String rhsQuery;
rhsQuery = that.getQuery();
if (!strategy.equals(LocatorUtils.property(thisLocator, "query", lhsQuery), LocatorUtils.property(thatLocator, "query", rhsQuery), lhsQuery, rhsQuery)) {
return false;
}
}
{
String lhsAnchor;
lhsAnchor = this.getAnchor();
String rhsAnchor;
rhsAnchor = that.getAnchor();
if (!strategy.equals(LocatorUtils.property(thisLocator, "anchor", lhsAnchor), LocatorUtils.property(thatLocator, "anchor", rhsAnchor), lhsAnchor, rhsAnchor)) {
return false;
}
}
{
String lhsUrl;
lhsUrl = this.getUrl();
String rhsUrl;
rhsUrl = that.getUrl();
if (!strategy.equals(LocatorUtils.property(thisLocator, "url", lhsUrl), LocatorUtils.property(thatLocator, "url", rhsUrl), lhsUrl, rhsUrl)) {
return false;
}
}
return true;
}
public boolean equals(Object object) {
final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE;
return equals(null, null, object, strategy);
}
public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
int currentHashCode = 1;
{
String theProtocol;
theProtocol = this.getProtocol();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "protocol", theProtocol), currentHashCode, theProtocol);
}
{
String theUsername;
theUsername = this.getUsername();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "username", theUsername), currentHashCode, theUsername);
}
{
String thePassword;
thePassword = this.getPassword();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "password", thePassword), currentHashCode, thePassword);
}
{
String theHost;
theHost = this.getHost();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "host", theHost), currentHashCode, theHost);
}
{
BigInteger thePort;
thePort = this.getPort();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "port", thePort), currentHashCode, thePort);
}
{
String thePath;
thePath = this.getPath();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "path", thePath), currentHashCode, thePath);
}
{
String theQuery;
theQuery = this.getQuery();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "query", theQuery), currentHashCode, theQuery);
}
{
String theAnchor;
theAnchor = this.getAnchor();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "anchor", theAnchor), currentHashCode, theAnchor);
}
{
String theUrl;
theUrl = this.getUrl();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "url", theUrl), currentHashCode, theUrl);
}
return currentHashCode;
}
public int hashCode() {
final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
return this.hashCode(null, strategy);
}
public String toString() {
final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
final StringBuilder buffer = new StringBuilder();
append(null, buffer, strategy);
return buffer.toString();
}
public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
strategy.appendStart(locator, this, buffer);
appendFields(locator, buffer, strategy);
strategy.appendEnd(locator, this, buffer);
return buffer;
}
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
{
String theProtocol;
theProtocol = this.getProtocol();
strategy.appendField(locator, this, "protocol", buffer, theProtocol);
}
{
String theUsername;
theUsername = this.getUsername();
strategy.appendField(locator, this, "username", buffer, theUsername);
}
{
String thePassword;
thePassword = this.getPassword();
strategy.appendField(locator, this, "password", buffer, thePassword);
}
{
String theHost;
theHost = this.getHost();
strategy.appendField(locator, this, "host", buffer, theHost);
}
{
BigInteger thePort;
thePort = this.getPort();
strategy.appendField(locator, this, "port", buffer, thePort);
}
{
String thePath;
thePath = this.getPath();
strategy.appendField(locator, this, "path", buffer, thePath);
}
{
String theQuery;
theQuery = this.getQuery();
strategy.appendField(locator, this, "query", buffer, theQuery);
}
{
String theAnchor;
theAnchor = this.getAnchor();
strategy.appendField(locator, this, "anchor", buffer, theAnchor);
}
{
String theUrl;
theUrl = this.getUrl();
strategy.appendField(locator, this, "url", buffer, theUrl);
}
return buffer;
}
}