![JAR search and dependency download from the Maven repository](/logo.png)
org.codehaus.enunciate.modules.xml.SchemaInfoComparator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of enunciate-xml Show documentation
Show all versions of enunciate-xml Show documentation
The Enunciate XML module generates the XML artifacts (schema, WSDL) for the Enunciated project.
The newest version!
/*
* Copyright 2006-2008 Web Cohesion
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codehaus.enunciate.modules.xml;
import org.codehaus.enunciate.config.SchemaInfo;
import java.util.Comparator;
/**
* Compares schema info instances by namespace.
*
* @author Ryan Heaton
*/
public class SchemaInfoComparator implements Comparator {
public int compare(SchemaInfo info1, SchemaInfo info2) {
String namespace1 = info1.getNamespace();
if (namespace1 == null) {
namespace1 = "";
}
String namespace2 = info2.getNamespace();
if (namespace2 == null) {
namespace2 = "";
}
return namespace1.compareTo(namespace2);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy