Class QuotedAnnotationValueShortFormProvider

  • All Implemented Interfaces:
    org.semanticweb.owlapi.util.ShortFormProvider

    public class QuotedAnnotationValueShortFormProvider
    extends org.semanticweb.owlapi.util.AnnotationValueShortFormProvider
    A custom AnnotationValueShortFormProvider that surrounds multi-word values with single quotes when returning the short form when quoting is true.
    • Constructor Summary

      Constructors 
      Constructor Description
      QuotedAnnotationValueShortFormProvider​(org.semanticweb.owlapi.model.OWLOntologySetProvider ontologySetProvider, org.semanticweb.owlapi.util.ShortFormProvider alternateShortFormProvider, org.semanticweb.owlapi.util.IRIShortFormProvider alternateIRIShortFormProvider, List<org.semanticweb.owlapi.model.OWLAnnotationProperty> annotationProperties, Map<org.semanticweb.owlapi.model.OWLAnnotationProperty,​List<String>> preferredLanguageMap)
      Constructs a quoted annotation value short form provider.
    • Constructor Detail

      • QuotedAnnotationValueShortFormProvider

        public QuotedAnnotationValueShortFormProvider​(@Nonnull
                                                      org.semanticweb.owlapi.model.OWLOntologySetProvider ontologySetProvider,
                                                      @Nonnull
                                                      org.semanticweb.owlapi.util.ShortFormProvider alternateShortFormProvider,
                                                      @Nonnull
                                                      org.semanticweb.owlapi.util.IRIShortFormProvider alternateIRIShortFormProvider,
                                                      @Nonnull
                                                      List<org.semanticweb.owlapi.model.OWLAnnotationProperty> annotationProperties,
                                                      @Nonnull
                                                      Map<org.semanticweb.owlapi.model.OWLAnnotationProperty,​List<String>> preferredLanguageMap)
        Constructs a quoted annotation value short form provider.
        Parameters:
        ontologySetProvider - set of ontologies to provide axioms
        alternateShortFormProvider - short form provider to generate short forms for entities that do not have the given annotation
        alternateIRIShortFormProvider - IRI short form provider
        annotationProperties - preferred annotation properties, with the properties at the start of the list taking priority over those at the end
        preferredLanguageMap - a map of annotation properties to preferred language
    • Method Detail

      • toggleQuoting

        public void toggleQuoting()
        Turn quoting on or off.
      • getShortForm

        @Nonnull
        public String getShortForm​(@Nonnull
                                   org.semanticweb.owlapi.model.OWLEntity entity)
        Given an OWLEntity, return the short form based on annotation properties. If the annotation does not exist, use the alternateShortFormProvider. Maybe surround the short form in single quotes if there is more than one word.
        Specified by:
        getShortForm in interface org.semanticweb.owlapi.util.ShortFormProvider
        Overrides:
        getShortForm in class org.semanticweb.owlapi.util.AnnotationValueShortFormProvider
        Parameters:
        entity - OWLEntity to get short form of
        Returns:
        short form, maybe quoted