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

com.clarkparsia.pellet.owlapiv3.LimitedMapIRIMapper Maven / Gradle / Ivy

The newest version!
package com.clarkparsia.pellet.owlapiv3;

import java.util.HashMap;
import java.util.Map;

import org.semanticweb.owlapi.model.IRI;
import org.semanticweb.owlapi.model.OWLOntologyIRIMapper;

/**
 * 

* Title: Limited Map IRI Mapper *

*

* Description: Only allow IRIs that have been explicitly mapped. *

*

* Copyright: Copyright (c) 2009 *

*

* Company: Clark & Parsia, LLC. *

* * @author Ron Alford */ public class LimitedMapIRIMapper implements OWLOntologyIRIMapper { private Map allowed; public LimitedMapIRIMapper() { allowed = new HashMap(); } public void addAllowedIRI(IRI ontologyIRI) { addAllowedIRI( ontologyIRI, ontologyIRI ); } public void addAllowedIRI(IRI fromIRI, IRI toIRI) { allowed.put( fromIRI, toIRI ); } public void clear() { allowed.clear(); } public IRI getDocumentIRI(IRI ontologyIRI) { return allowed.get( ontologyIRI ); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy