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

com.clarkparsia.pellint.format.CompactClassLintFormat Maven / Gradle / Ivy

The newest version!
// Copyright (c) 2006 - 2008, Clark & Parsia, LLC. 
// This source code is available under the terms of the Affero General Public License v3.
//
// Please see LICENSE.txt for full license terms, including the availability of proprietary exceptions.
// Questions, comments, or requests for clarification: [email protected]

package com.clarkparsia.pellint.format;

import java.util.Set;

import org.semanticweb.owlapi.model.OWLClass;

import com.clarkparsia.pellint.model.Lint;

/**
 * 

* Title: Compact Class Lint Format *

*

* Description: A compact formatter which only prints one participating OWLClass for * a Lint without line breaks. If there are multiple participating OWLClasses, * it arbitrary chooses one. *

*

* Copyright: Copyright (c) 2008 *

*

* Company: Clark & Parsia, LLC. *

* * @author Harris Lin */ public class CompactClassLintFormat implements LintFormat { public String format(Lint lint) { Set participatingClasses = lint.getParticipatingClasses(); if (participatingClasses == null || participatingClasses.isEmpty()) return ""; StringBuilder strBuilder = new StringBuilder(); strBuilder.append(participatingClasses.iterator().next()); strBuilder.append(' '); return strBuilder.toString(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy