/** * Please use this equals method instead of using :<code> * value().equals(mep) * </code> which is almost 10 times slower... * * @param mep * @return */ public boolean equals(final URI version) { return this.toString().equals(version.toString()); }
/** * @param pattern * @return */ public static WSDLVersionConstants valueOf(final URI pattern) { WSDLVersionConstants result = null; if (pattern != null) { for (final WSDLVersionConstants version : WSDLVersionConstants.values()) { if (version.nameSpace.equals(pattern.toString())) { result = version; } } } return result; }
if(this.getImportType().toString().equals(WSDLVersionConstants.WSDL11.value().toString())) { if(this.getLocation() != null) { URL location = null; } else if(this.getImportType().toString().equals(WSDLVersionConstants.WSDL20.value().toString())) { if(this.getLocation() != null) { URL location = null;
public void validate() { // validation // validation if null or empty if((this._import.getImportType() == null) || (this._import.getImportType().toString().trim().length() == 0)) { BPELStaticAnalysisImpl.getInstance().addError(new BPELErrorImpl(this._import, new BPELException("In one import => the importType cannot be null or empty"))); } if((this._import.getLocation() == null) || (this._import.getLocation().toString().trim().length() == 0)) { BPELStaticAnalysisImpl.getInstance().addWarning(new BPELWarningImpl(this._import, "In one import => the location is null or empty")); } if((this._import.getNamespace() == null) || (this._import.getNamespace().toString().trim().length() == 0)) { BPELStaticAnalysisImpl.getInstance().addWarning(new BPELWarningImpl(this._import, "In one import => the namespace is null or empty")); } // validation the content final BPELProcess process = ScopeUtil.getProcess(this._import); final URI baseUri = process.getDocumentBaseURI(); if(this._import.getImportType() != null) { if((!this._import.getImportType().toString().equals(WSDLVersionConstants.WSDL11.value().toString())) && (!this._import.getImportType().toString().equals(WSDLVersionConstants.WSDL20.value().toString())) && (! this._import.getImportType().toString().equals(XMLConstants.W3C_XML_SCHEMA_NS_URI))) { BPELStaticAnalysisImpl.getInstance().addError(new BPELErrorImpl(this._import, new BPELException(BPELStaticAnalysis.SA0013))); } } }
/** * Create a new instance of a Definition, with an instance of a * PopulatedExtensionRegistry as its ExtensionRegistry. * @throws WSDLException * * @see com.ibm.wsdl.extensions.PopulatedExtensionRegistry */ @Override public Description newDescription(WSDLVersionConstants version) throws WSDLException { Description desc = null; if(version.equals(WSDLVersionConstants.WSDL11)) { desc = new org.ow2.easywsdl.wsdl.impl.wsdl11.DescriptionImpl(); } else if(version.equals(WSDLVersionConstants.WSDL20)) { desc = new org.ow2.easywsdl.wsdl.impl.wsdl20.DescriptionImpl(); } return desc; }