swoopclassidentifiervisitor.java

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

JAVA
156
字号
/*GNU Lesser General Public LicenseCopyright (C) 2005 MINDSWAP Research Group, University of Maryland College ParkThis library is free software; you can redistribute it and/ormodify it under the terms of the GNU Lesser General PublicLicense as published by the Free Software Foundation; eitherversion 2.1 of the License, or (at your option) any later version.This library is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNULesser General Public License for more details.You should have received a copy of the GNU Lesser General PublicLicense along with this library; if not, write to the Free SoftwareFoundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA*/package org.mindswap.swoop.renderer.ontology;/** * @author Dave * * Basically a copy of  uk.ac.man.cs.img.owl.validation.ClassIdentifierVisitor. * This is needed because 1) uk.ac.man.cs.img.owl.validation.ClassIdentifierVisitor is not  *    extendable outside of its package *                        2) SwoopExpressionVisitor requires a ClassIdentifierVisitor * This class is fitted for SwoopExpressionVisitor. *  */import org.semanticweb.owl.model.helper.OWLObjectVisitorAdapter;import org.semanticweb.owl.model.OWLClass;import org.semanticweb.owl.model.OWLDataPropertyInstance;import org.semanticweb.owl.model.OWLDataPropertyRangeAxiom;import org.semanticweb.owl.model.OWLException;import org.semanticweb.owl.model.OWLFunctionalPropertyAxiom;import org.semanticweb.owl.model.OWLIndividualTypeAssertion;import org.semanticweb.owl.model.OWLInverseFunctionalPropertyAxiom;import org.semanticweb.owl.model.OWLInversePropertyAxiom;import org.semanticweb.owl.model.OWLObjectPropertyInstance;import org.semanticweb.owl.model.OWLObjectPropertyRangeAxiom;import org.semanticweb.owl.model.OWLPropertyDomainAxiom;import org.semanticweb.owl.model.OWLSymmetricPropertyAxiom;import org.semanticweb.owl.model.OWLTransitivePropertyAxiom;class SwoopClassIdentifierVisitor extends OWLObjectVisitorAdapter {        private boolean isClass;    public SwoopClassIdentifierVisitor()    {	this.isClass = false;    }    public boolean isClass() {	return isClass;    }    public void visit( OWLClass node ) {	isClass = true;    }	/* (non-Javadoc)	 * @see org.semanticweb.owl.model.OWLObjectVisitor#visit(org.semanticweb.owl.model.OWLFunctionalPropertyAxiom)	 */	public void visit(OWLFunctionalPropertyAxiom node) throws OWLException {		// TODO Auto-generated method stub			}	/* (non-Javadoc)	 * @see org.semanticweb.owl.model.OWLObjectVisitor#visit(org.semanticweb.owl.model.OWLInverseFunctionalPropertyAxiom)	 */	public void visit(OWLInverseFunctionalPropertyAxiom node) throws OWLException {		// TODO Auto-generated method stub			}	/* (non-Javadoc)	 * @see org.semanticweb.owl.model.OWLObjectVisitor#visit(org.semanticweb.owl.model.OWLTransitivePropertyAxiom)	 */	public void visit(OWLTransitivePropertyAxiom node) throws OWLException {		// TODO Auto-generated method stub			}	/* (non-Javadoc)	 * @see org.semanticweb.owl.model.OWLObjectVisitor#visit(org.semanticweb.owl.model.OWLSymmetricPropertyAxiom)	 */	public void visit(OWLSymmetricPropertyAxiom node) throws OWLException {		// TODO Auto-generated method stub			}	/* (non-Javadoc)	 * @see org.semanticweb.owl.model.OWLObjectVisitor#visit(org.semanticweb.owl.model.OWLInversePropertyAxiom)	 */	public void visit(OWLInversePropertyAxiom node) throws OWLException {		// TODO Auto-generated method stub			}	/* (non-Javadoc)	 * @see org.semanticweb.owl.model.OWLObjectVisitor#visit(org.semanticweb.owl.model.OWLPropertyDomainAxiom)	 */	public void visit(OWLPropertyDomainAxiom node) throws OWLException {		// TODO Auto-generated method stub			}	/* (non-Javadoc)	 * @see org.semanticweb.owl.model.OWLObjectVisitor#visit(org.semanticweb.owl.model.OWLObjectPropertyRangeAxiom)	 */	public void visit(OWLObjectPropertyRangeAxiom node) throws OWLException {		// TODO Auto-generated method stub			}	/* (non-Javadoc)	 * @see org.semanticweb.owl.model.OWLObjectVisitor#visit(org.semanticweb.owl.model.OWLDataPropertyRangeAxiom)	 */	public void visit(OWLDataPropertyRangeAxiom node) throws OWLException {		// TODO Auto-generated method stub			}	/* (non-Javadoc)	 * @see org.semanticweb.owl.model.OWLObjectVisitor#visit(org.semanticweb.owl.model.OWLObjectPropertyInstance)	 */	public void visit(OWLObjectPropertyInstance node) throws OWLException {		// TODO Auto-generated method stub			}	/* (non-Javadoc)	 * @see org.semanticweb.owl.model.OWLObjectVisitor#visit(org.semanticweb.owl.model.OWLDataPropertyInstance)	 */	public void visit(OWLDataPropertyInstance node) throws OWLException {		// TODO Auto-generated method stub			}	/* (non-Javadoc)	 * @see org.semanticweb.owl.model.OWLObjectVisitor#visit(org.semanticweb.owl.model.OWLIndividualTypeAssertion)	 */	public void visit(OWLIndividualTypeAssertion node) throws OWLException {		// TODO Auto-generated method stub			}    } // ClassIdentifierVisitor

⌨️ 快捷键说明

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