All Downloads are FREE. Search and download functionalities are using the official Maven repository.

se.skltp.mb.svc.ServiceContractView Maven / Gradle / Ivy

There is a newer version: 1.0.0-RC9
Show newest version
/**
 * Copyright (C) 2013 Inera AB (http://www.inera.se)
 *
 * This file is part of Inera MessageService (http://code.google.com/p/inera-message).
 *
 * Inera MessageService is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Inera MessageService is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */
package se.skltp.mb.svc;

/**
 * Human-readable view of a service contract namespace.
 * 

* Use fullName in tooltips. * * @author [email protected] */ public class ServiceContractView { String serviceContract; String shortName; public ServiceContractView(String serviceContract) { if (serviceContract == null) { serviceContract = ""; } this.serviceContract = shortName = serviceContract; String[] parts = serviceContract.split(":"); if ( parts.length > 2 ) { // the local name and the version shortName = parts[parts.length - 2] + ":" + parts[parts.length-1]; } } @Override public String toString() { return shortName; } public String getFullName() { return serviceContract; } public String getShortName() { return shortName; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy