001: /*
002: * The contents of this file are subject to the terms of the Common Development
003: * and Distribution License (the License). You may not use this file except in
004: * compliance with the License.
005: *
006: * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
007: * or http://www.netbeans.org/cddl.txt.
008: *
009: * When distributing Covered Code, include this CDDL Header Notice in each file
010: * and include the License file at http://www.netbeans.org/cddl.txt.
011: * If applicable, add the following below the CDDL Header, with the fields
012: * enclosed by brackets [] replaced by your own identifying information:
013: * "Portions Copyrighted [year] [name of copyright owner]"
014: *
015: * The Original Software is NetBeans. The Initial Developer of the Original
016: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
017: * Microsystems, Inc. All Rights Reserved.
018: */
019: package org.netbeans.modules.xslt.project.anttasks.jbi;
020:
021: import javax.xml.namespace.QName;
022: import org.w3c.dom.Node;
023:
024: public class TMapServiceEntry {
025: //Member variable representing partner link name
026: private QName mPartnerLinkNameQname = null;
027: private String mRoleName = null;
028: private String mOperation = null;
029: private String mFile = null;
030: private String mTransformJBI = null;
031:
032: private Node mNode;
033:
034: /**
035: * Constructor
036: * @param partnerLinkName Partner link name
037: * @param portName Port name
038: * @param partnerLinkNS Namespace URI of the Partner Link
039: * @param portNameNS Namespace URI of the portname
040: * @param rolename role name
041: */
042: public TMapServiceEntry(QName partnerLinkNameQname,
043: String roleName, String operation, String file,
044: String transformJBI, Node node) {
045: assert partnerLinkNameQname != null;
046:
047: mPartnerLinkNameQname = partnerLinkNameQname;
048: mRoleName = roleName;
049: mOperation = operation;
050: mFile = file;
051: mTransformJBI = transformJBI;
052:
053: mNode = node;
054: }
055:
056: public QName getPartnerLinkNameQname() {
057: return mPartnerLinkNameQname;
058: }
059:
060: /**
061: * Return Role name
062: * @return String role name
063: */
064: public String getRoleName() {
065: return mRoleName;
066: }
067:
068: /**
069: * Return operation
070: * @return String operation
071: */
072: public String getOperation() {
073: return mOperation;
074: }
075:
076: /**
077: * Return file
078: * @return String file
079: */
080: public String getFile() {
081: return mFile;
082: }
083:
084: /**
085: * Return TransformJBI
086: * @return String transformJBI
087: */
088: public String getTransformJBI() {
089: return mTransformJBI;
090: }
091:
092: public Node getNode() {
093: return mNode;
094: }
095:
096: public boolean equals(Object obj) {
097: if (!(obj instanceof TMapServiceEntry)) {
098: return false;
099: }
100: TMapServiceEntry serviceEntry = (TMapServiceEntry) obj;
101: String pltLocalName = this .mPartnerLinkNameQname.getLocalPart();
102: String servicePltLocalName = serviceEntry
103: .getPartnerLinkNameQname().getLocalPart();
104:
105: if (pltLocalName != null
106: && pltLocalName.equals(servicePltLocalName)
107: && this .mRoleName.equals(serviceEntry.getRoleName())
108: && this .mOperation.equals(serviceEntry.getOperation())) {
109: return true;
110: }
111: return false;
112: }
113:
114: public int hashCode() {
115: return (this.mPartnerLinkNameQname.getLocalPart()
116: + this.mRoleName + this.mOperation).hashCode();
117: }
118:
119: }
|