Class ManchesterOWLSyntaxPrefixNameShortFormProvider

java.lang.Object
org.semanticweb.owlapi.manchestersyntax.renderer.ManchesterOWLSyntaxPrefixNameShortFormProvider
All Implemented Interfaces:
ShortFormProvider

public class ManchesterOWLSyntaxPrefixNameShortFormProvider extends Object implements ShortFormProvider
A special short form provider that delegates to a prefix manager to obtain short forms. The only difference between this short form provider and a prefix manager is that names with the default prefix do not have a colon with this short form provider.
Since:
3.0.0
Author:
Matthew Horridge, The University of Manchester, Information Management Group
  • Constructor Details

    • ManchesterOWLSyntaxPrefixNameShortFormProvider

      public ManchesterOWLSyntaxPrefixNameShortFormProvider(OWLOntology ont)
      Constructs a short form provider that reuses any prefix name mappings obtainable from the format of the specified ontology (the manager will be asked for the ontology format of the specified ontology).
      Parameters:
      ont - The ontology
    • ManchesterOWLSyntaxPrefixNameShortFormProvider

      public ManchesterOWLSyntaxPrefixNameShortFormProvider(@Nullable OWLDocumentFormat format)
      Constructs a short form provider that reuses any prefix name mappings from the specified ontology format.
      Parameters:
      format - The format from which prefix name mappings will be reused
    • ManchesterOWLSyntaxPrefixNameShortFormProvider

      public ManchesterOWLSyntaxPrefixNameShortFormProvider(DefaultPrefixManager prefixManager)
      Constructs a short form provider that uses the specified prefix mappings.
      Parameters:
      prefixManager - A prefix manager which will be used to obtain prefix mappings
  • Method Details

    • getShortForm

      public static String getShortForm(IRI iri)
      Gets the short form for an IRI.
      Parameters:
      iri - The IRI
      Returns:
      The short form for the specified IRI
    • getPrefixName2PrefixMap

      public Map<String,String> getPrefixName2PrefixMap()
      Returns:
      prefix manager map. The map is a copy.
    • getShortForm

      public String getShortForm(OWLEntity entity)
      Specified by:
      getShortForm in interface ShortFormProvider