semanticserviceitem.java

来自「实现对owl-s描述服务的检索」· Java 代码 · 共 55 行

JAVA
55
字号
/* 
 * OWL-S Matchmaker
 * 
 * COPYRIGHT NOTICE
 * 
 * Copyright (C) 2005 DFKI GmbH, Germany
 * Developed by Benedikt Fries, Matthias Klusch
 * 
 * The code is free for non-commercial use only.
 * You can redistribute it and/or modify it under the terms
 * of the Mozilla Public License version 1.1  as
 * published by the Mozilla Foundation at
 * http://www.mozilla.org/MPL/MPL-1.1.txt
 */
package owlsmx.gui.data;

import java.net.URI;

public class SemanticServiceItem extends HybridServiceItem {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public SemanticServiceItem(URI uri) {
		super(uri);
	}
	
	public SemanticServiceItem(ServiceItem item) {
		super(item);
	}
	
	public SemanticServiceItem(HybridServiceItem item){
		super(item);
	}

	public String toString() {
		String result = "(" + dom + " - " + name;
		result = result.replaceAll("[\\r\\f]","");
		return result;
	}


	public int compareTo(Object obj) {
		if (!this.getClass().equals(obj.getClass()))
			return 1;
		SemanticServiceItem item = (SemanticServiceItem) obj;
		if (dom<item.dom)
				return -1;
		if ( (dom == item.dom) && (this.uri.equals(item.uri)) && (this.fileURI.equals(item.fileURI)) )
			return 0;
		return -1;
	}	
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?