revertcheckpointchange.java

来自「Semantic Web Ontology Editor」· Java 代码 · 共 62 行

JAVA
62
字号
/* * Created on Mar 1, 2005 * */package org.mindswap.swoop.utils.change;import org.mindswap.swoop.change.ChangeLog;import org.semanticweb.owl.model.OWLException;import org.semanticweb.owl.model.OWLOntology;import org.semanticweb.owl.model.change.ChangeVisitor;import org.semanticweb.owl.model.change.OntologyChange;/** * @author Aditya * */public class RevertCheckpointChange extends OntologyChange {	private SaveCheckpointChange change;	private String description;	private String timeStamp;		public RevertCheckpointChange(OWLOntology ontology, SaveCheckpointChange change, String timeStamp, OntologyChange cause) {		super(ontology, cause);		this.change = change;		this.timeStamp = timeStamp;		parseChange();	}	public void accept(ChangeVisitor visitor) throws OWLException {		// not needed	}		public SaveCheckpointChange getCheckpointChange() {		return change;	}		public String getDescription() {		return description;	}	public String getTimeStamp() {		return timeStamp;	}		private void parseChange() {				// get scope of checkpoint		String scope = "Entity";		if (change.getScope()==ChangeLog.ONTOLOGY_SCOPE) scope = "Ontology";		if (change.getScope()==ChangeLog.WORKSPACE_SCOPE) scope = "Workspace";				// print description of checkpoint		description = "[[[ <b>Reverted to "+scope+" Checkpoint</b> ";		// create a description describing the checkpoint reverted back to		description += " <b>created</b> at: "+ change.getTimeStamp();		description += " with <b>description</b>: "+change.getDescription();		if (!change.getLocationURL().equals("")) description += " at <b>location</b>: "+change.getLocationURL();		description += " ]]]<br>";	}}

⌨️ 快捷键说明

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