Class TemplateHelper


  • public class TemplateHelper
    extends Object
    Convenience methods for working with templates.
    Author:
    Becky Tauber
    • Field Detail

      • manchesterParseError

        protected static final String manchesterParseError
        Error message when a given class expression is not able to be parsed.
        See Also:
        Constant Field Values
    • Constructor Detail

      • TemplateHelper

        public TemplateHelper()
    • Method Detail

      • getAnnotationProperties

        public static Set<org.semanticweb.owlapi.model.OWLAnnotationProperty> getAnnotationProperties​(QuotedEntityChecker checker,
                                                                                                      String value,
                                                                                                      String split,
                                                                                                      int column)
                                                                                               throws Exception
        Given a QuotedEntityChecker, a string value, and a character to split the value string on (or null), return the value or values as a set of OWLAnnotationProperties.
        Parameters:
        checker - QuotedEntityChecker to get properties
        value - value or values to parse to properties
        split - character to split value on or null
        column - the column number for logging
        Returns:
        set of OWLAnnotationProperties
        Throws:
        RowParseException - if property cannot be found or created
        Exception
      • getAnnotationProperty

        public static org.semanticweb.owlapi.model.OWLAnnotationProperty getAnnotationProperty​(QuotedEntityChecker checker,
                                                                                               String name,
                                                                                               int column)
                                                                                        throws Exception
        Find an annotation property with the given name or create one.
        Parameters:
        checker - used to search by rdfs:label (for example)
        name - the name to search for
        column - the column number for logging
        Returns:
        an annotation property
        Throws:
        RowParseException - if the name cannot be resolved
        Exception
      • getAnnotations

        public static Set<org.semanticweb.owlapi.model.OWLAnnotation> getAnnotations​(String tableName,
                                                                                     QuotedEntityChecker checker,
                                                                                     String template,
                                                                                     String value,
                                                                                     int rowNum,
                                                                                     int column)
                                                                              throws Exception
        Create an OWLAnnotation based on the template string and cell value. Replaced by getAnnotation(QuotedEntityChecker checker, String template, String value).
        Parameters:
        tableName - name of table
        checker - used to resolve the annotation property and IRIs
        template - the template string
        value - the value for the annotation
        rowNum - the row number for logging
        column - the column number for logging
        Returns:
        OWLAnnotation, or null if template string is not supported
        Throws:
        RowParseException - if a row value cannot be parsed
        ColumnException - if a header annotation template cannot be parsed
        Exception
      • getClassExpressions

        public static Set<org.semanticweb.owlapi.model.OWLClassExpression> getClassExpressions​(String tableName,
                                                                                               org.semanticweb.owlapi.manchestersyntax.parser.ManchesterOWLSyntaxClassExpressionParser parser,
                                                                                               String template,
                                                                                               String value,
                                                                                               int rowNum,
                                                                                               int col)
                                                                                        throws RowParseException
        Given a Manchester Syntax parser, a template string, and a template value, insert the value into the template string and parse to a set of class expressions. If the template string contains 'SPLIT=', the value will be split on the provided character. Otherwise, the set will only have one entry.
        Parameters:
        tableName - name of table
        parser - ManchesterOWLSyntaxClassExpressionParser to parse expression
        template - template string
        value - value to replace '%' in template string
        rowNum - the line number
        col - the column number
        Returns:
        set of OWLClassExpressions
        Throws:
        RowParseException - if row is malformed
      • getClassExpressions

        public static Set<org.semanticweb.owlapi.model.OWLClassExpression> getClassExpressions​(String tableName,
                                                                                               QuotedEntityChecker checker,
                                                                                               org.semanticweb.owlapi.manchestersyntax.parser.ManchesterOWLSyntaxClassExpressionParser parser,
                                                                                               String template,
                                                                                               String value,
                                                                                               int rowNum,
                                                                                               int col)
                                                                                        throws RowParseException
        Given a Quoted Entity checker, a Manchester Syntax parser, a template string, and a template value, insert the value into the template string and parse to a set of class expressions. If the template string contains 'SPLIT=', the value will be split on the provided character. Otherwise, the set will only have one entry.
        Parameters:
        tableName - name of table
        checker - QuotedEntityChecker to resolve labels
        parser - ManchesterOWLSyntaxClassExpressionParser to parse expression
        template - template string
        value - value to replace '%' in template string
        rowNum - the line number
        col - the column number
        Returns:
        set of OWLClassExpressions
        Throws:
        RowParseException - if row is malformed
      • getDataPropertyExpressions

        public static Set<org.semanticweb.owlapi.model.OWLDataPropertyExpression> getDataPropertyExpressions​(String tableName,
                                                                                                             QuotedEntityChecker checker,
                                                                                                             String template,
                                                                                                             String value,
                                                                                                             int rowNum,
                                                                                                             int column)
                                                                                                      throws RowParseException
        Given a QuotedEntityChecker, a template string, and a template value, return a set of data property expressions based on the value or values (if SPLIT is included in the template string). Note that a data property expression can ONLY be another data property, but this allows support for future data property expressions.
        Parameters:
        tableName - name of table
        checker - QuotedEntityChecker to resolve entities
        template - template string
        value - template value or values
        rowNum - the row number for logging
        column - the column number for logging
        Returns:
        set of OWLDataPropertyExpressions
        Throws:
        RowParseException - if row is malformed
      • getDatatype

        public static org.semanticweb.owlapi.model.OWLDatatype getDatatype​(String tableName,
                                                                           QuotedEntityChecker checker,
                                                                           String name,
                                                                           int rowNum,
                                                                           int column)
                                                                    throws RowParseException
        Find a datatype with the given name or create one.
        Parameters:
        tableName - name of table
        checker - used to search by rdfs:label (for example)
        name - the name to search for
        rowNum - the row number
        column - the column number
        Returns:
        a datatype
        Throws:
        RowParseException - if the name cannot be resolved
      • getDatatype

        public static org.semanticweb.owlapi.model.OWLDatatype getDatatype​(QuotedEntityChecker checker,
                                                                           String name)
        Find a datatype with the given name or create one.
        Parameters:
        checker - used to search by rdfs:label (for example)
        name - the name to search for
        Returns:
        a datatype or null
      • getDatatypes

        public static Set<org.semanticweb.owlapi.model.OWLDatatype> getDatatypes​(String tableName,
                                                                                 QuotedEntityChecker checker,
                                                                                 String value,
                                                                                 String split,
                                                                                 int rowNum,
                                                                                 int column)
                                                                          throws RowParseException
        Given a QuotedEntityChecker, a string value, and a character to split the value string on (or null), return the value or values as a set of OWLDatatypes.
        Parameters:
        tableName - name of table
        checker - QuotedEntityChecker to get OWLDatatypes
        value - value or values to parse to datatypes
        split - character to split value on or null
        rowNum - the row number
        column - the column number
        Returns:
        set of OWLDatatypes
        Throws:
        RowParseException - if datatype cannot be found or created
      • getIndividuals

        public static Set<org.semanticweb.owlapi.model.OWLIndividual> getIndividuals​(QuotedEntityChecker checker,
                                                                                     String value,
                                                                                     String split)
        Given a QuotedEntityChecker, a string value (maybe separated by a split character), and a split character (or null), return the value or values as a set of OWLIndividuals.
        Parameters:
        checker - QuotedEntityChecker to get individuals by label
        value - string of individual or individuals by label or ID
        split - character to split value string on
        Returns:
        set of OWLIndividuals
      • getIRIAnnotation

        public static org.semanticweb.owlapi.model.OWLAnnotation getIRIAnnotation​(QuotedEntityChecker checker,
                                                                                  String template,
                                                                                  String value,
                                                                                  int column)
                                                                           throws Exception
        Return an IRI annotation for the given template string and string value. The template string format is "AI [name]" and the value is the name of an entity or an IRI.
        Parameters:
        checker - used to resolve the annotation property
        template - the template string
        value - the value for the annotation
        column - the column number for logging
        Returns:
        a new annotation axiom with property and an IRI value
        Throws:
        RowParseException - if the annotation property cannot be found or the IRI cannot be created
        Exception
      • getIRIAnnotation

        public static org.semanticweb.owlapi.model.OWLAnnotation getIRIAnnotation​(QuotedEntityChecker checker,
                                                                                  String template,
                                                                                  org.semanticweb.owlapi.model.IRI value,
                                                                                  int column)
                                                                           throws Exception
        Return an IRI annotation for the given template string and IRI value. The template string format is "AI [name]" and the value is an IRI.
        Parameters:
        checker - used to resolve the annotation property
        template - the template string
        value - the IRI value for the annotation
        column - the column number for logging
        Returns:
        a new annotation axiom with property and an IRI value
        Throws:
        RowParseException - if the annotation property cannot be found
        Exception
      • getIRIs

        public static List<org.semanticweb.owlapi.model.IRI> getIRIs​(Map<String,​List<List<String>>> tables,
                                                                     IOHelper ioHelper)
                                                              throws Exception
        Get a list of the IRIs defined in a set of template tables.
        Parameters:
        tables - a map from table names to tables
        ioHelper - used to find entities by name
        Returns:
        a list of IRIs
        Throws:
        ColumnException - when an ID column does not exist
        Exception
      • getIRIs

        public static List<org.semanticweb.owlapi.model.IRI> getIRIs​(String tableName,
                                                                     List<List<String>> rows,
                                                                     IOHelper ioHelper)
                                                              throws Exception
        Get a list of the IRIs defined in a template table.
        Parameters:
        tableName - the name of the table
        rows - the table of data
        ioHelper - used to find entities by name
        Returns:
        a list of IRIs
        Throws:
        ColumnException - when an ID column does not exist
        Exception
      • getLanguageAnnotations

        public static Set<org.semanticweb.owlapi.model.OWLAnnotation> getLanguageAnnotations​(QuotedEntityChecker checker,
                                                                                             String template,
                                                                                             String split,
                                                                                             String value,
                                                                                             int column)
                                                                                      throws Exception
        Return a set of language tagged annotations for the given template and value(s). The template string format is "AL [name]@[lang]" and the value is any string.
        Parameters:
        checker - used to resolve the annotation property
        template - the template string
        split - the character to split values on
        value - the value for the annotation
        column - the column index for the value from the template
        Returns:
        a set of new annotation(s) with property and language tagged literal
        Throws:
        RowParseException - if the annotation property cannot be found
        Exception
      • getLiterals

        public static Set<org.semanticweb.owlapi.model.OWLLiteral> getLiterals​(String tableName,
                                                                               QuotedEntityChecker checker,
                                                                               String value,
                                                                               String split,
                                                                               int rowNum,
                                                                               int column)
                                                                        throws RowParseException
        Given a QuotedEntityChecker, a string value (maybe separated by a split character), and a split character (or null), return the value or values as a set of OWLLiterals.
        Parameters:
        tableName - name of table
        checker - QuotedEntityChecker to get datatypes
        value - string of literal or literals
        split - character to split value string on
        rowNum - the row number
        column - the column number
        Returns:
        set of OWLLiterals
        Throws:
        RowParseException - if row is malformed
      • getObjectPropertyExpressions

        public static Set<org.semanticweb.owlapi.model.OWLObjectPropertyExpression> getObjectPropertyExpressions​(String tableName,
                                                                                                                 QuotedEntityChecker checker,
                                                                                                                 String template,
                                                                                                                 String value,
                                                                                                                 int rowNum,
                                                                                                                 int column)
                                                                                                          throws RowParseException
        Given a QuotedEntityChecker, a template string, and a template value, return a set of object property expressions based on the value or values (if SPLIT is included in the template string). Note that an object property expression can ONLY be another object property or 'inverse', but this allows support for future data property expressions.
        Parameters:
        tableName - name of table
        checker - QuotedEntityChecker to resolve entities
        template - template string
        value - template value or values
        rowNum - the row number for logging
        column - the column number for logging
        Returns:
        set of OWLDataPropertyExpressions
        Throws:
        RowParseException - if row is malformed
      • getStringAnnotations

        public static Set<org.semanticweb.owlapi.model.OWLAnnotation> getStringAnnotations​(QuotedEntityChecker checker,
                                                                                           String template,
                                                                                           String split,
                                                                                           String value,
                                                                                           int column)
                                                                                    throws Exception
        Return a set of string annotations for the given template string and value(s).
        Parameters:
        checker - used to resolve the annotation property
        template - the template string
        split - the character to split values on
        value - the value for the annotation
        column - the index of the column
        Returns:
        a set of new annotation(s) with property and string literal value
        Throws:
        RowParseException - if the annotation property cannot be found
        Exception
      • getTypedAnnotations

        public static Set<org.semanticweb.owlapi.model.OWLAnnotation> getTypedAnnotations​(String tableName,
                                                                                          QuotedEntityChecker checker,
                                                                                          String template,
                                                                                          String split,
                                                                                          String value,
                                                                                          int rowNum,
                                                                                          int column)
                                                                                   throws Exception
        Return a set of typed annotations for the given template string and value(s). The template string format is "AT [name]^^[datatype]" and the value is any string.
        Parameters:
        tableName - name of table
        checker - used to resolve the annotation property and datatype
        template - the template string
        split - the character to split values on
        value - the value for the annotation
        rowNum - the row number
        column - the column number
        Returns:
        a set of new annotation(s) with property and typed literal value
        Throws:
        RowParseException - if the annotation property cannot be found
        Exception
      • getValueIRIs

        public static Set<org.semanticweb.owlapi.model.IRI> getValueIRIs​(QuotedEntityChecker checker,
                                                                         String value,
                                                                         String split)
        Given a QuotedEntityChecker, a value, and a split character (or null), return the value (or values) as a set of IRIs.
        Parameters:
        checker - QuotedEntityChecker to get IRIs
        value - value (or values) to parse to IRI
        split - character to split value on
        Returns:
        set of IRIs
      • readCSV

        public static List<List<String>> readCSV​(String path)
                                          throws IOException
        Read comma-separated values from a path to a list of lists of strings.
        Parameters:
        path - file path to the CSV file
        Returns:
        a list of lists of strings
        Throws:
        IOException - on file or reading problems
      • readCSV

        public static List<List<String>> readCSV​(InputStream stream)
                                          throws IOException
        Read comma-separated values from a stream to a list of lists of strings.
        Parameters:
        stream - the stream to read from
        Returns:
        a list of lists of strings
        Throws:
        IOException - on file or reading problems
      • readCSV

        public static List<List<String>> readCSV​(Reader reader)
                                          throws IOException
        Read comma-separated values from a reader to a list of lists of strings.
        Parameters:
        reader - a reader to read data from
        Returns:
        a list of lists of strings
        Throws:
        IOException - on file or reading problems
      • readTable

        public static List<List<String>> readTable​(String path)
                                            throws IOException
        Read a table from a path to a list of lists of strings.
        Parameters:
        path - file path to the CSV file
        Returns:
        a list of lists of strings
        Throws:
        IOException - on file or reading problems
      • readTSV

        public static List<List<String>> readTSV​(String path)
                                          throws IOException
        Read tab-separated values from a path to a list of lists of strings.
        Parameters:
        path - file path to the CSV file
        Returns:
        a list of lists of strings
        Throws:
        IOException - on file or reading problems
      • readTSV

        public static List<List<String>> readTSV​(InputStream stream)
                                          throws IOException
        Read tab-separated values from a stream to a list of lists of strings.
        Parameters:
        stream - the stream to read from
        Returns:
        a list of lists of strings
        Throws:
        IOException - on file or reading problems
      • readTSV

        public static List<List<String>> readTSV​(Reader reader)
                                          throws IOException
        Read tab-separated values from a reader to a list of lists of strings.
        Parameters:
        reader - a reader to read data from
        Returns:
        a list of lists of strings
        Throws:
        IOException - on file or reading problems
      • validateTemplateString

        public static boolean validateTemplateString​(String template)
        Return true if the template string is valid, false otherwise.
        Parameters:
        template - the template string to check
        Returns:
        true if valid, false otherwise
      • tryParse

        protected static org.semanticweb.owlapi.model.OWLClassExpression tryParse​(String tableName,
                                                                                  org.semanticweb.owlapi.manchestersyntax.parser.ManchesterOWLSyntaxClassExpressionParser parser,
                                                                                  String content,
                                                                                  int rowNum,
                                                                                  int column)
                                                                           throws RowParseException
        Given a Manchester class expression parser and a content string, try to parse the content string. Throw a detailed exception message if parsing fails.
        Parameters:
        tableName - name of table
        parser - ManchesterOWLSyntaxClassExpressionParser to parse string
        content - class expression string to parse
        rowNum - the row number for logging
        column - the column number for logging
        Returns:
        OWLClassExpression representation of the string
        Throws:
        RowParseException - if string cannot be parsed for any reason
      • tryParse

        protected static org.semanticweb.owlapi.model.OWLClassExpression tryParse​(String tableName,
                                                                                  QuotedEntityChecker checker,
                                                                                  org.semanticweb.owlapi.manchestersyntax.parser.ManchesterOWLSyntaxClassExpressionParser parser,
                                                                                  String content,
                                                                                  int rowNum,
                                                                                  int column)
                                                                           throws RowParseException
        Given a Quoted Entity Checker to resolve labels, a Manchester class expression parser, and a content string, try to parse the content string. If the checker is not null, first try to get a named class. If not found, try to parse using the parser. Throw a detailed exception message if parsing fails.
        Parameters:
        tableName - name of table
        checker - QuotedEntityChecker to resolve labels
        parser - ManchesterOWLSyntaxClassExpressionParser to parse string
        content - class expression string to parse
        rowNum - the row number for logging
        column - the column number for logging
        Returns:
        OWLClassExpression representation of the string
        Throws:
        RowParseException - if string cannot be parsed for any reason
      • getAnnotation

        @Deprecated
        public static org.semanticweb.owlapi.model.OWLAnnotation getAnnotation​(String tableName,
                                                                               QuotedEntityChecker checker,
                                                                               IOHelper ioHelper,
                                                                               String template,
                                                                               String value)
                                                                        throws Exception
        Deprecated.
        Create an OWLAnnotation based on the template string and cell value. Replaced by more-specific methods to get annotations by their type (e.g., getStringAnnotation).
        Parameters:
        tableName - name of table
        checker - used to resolve the annotation property
        ioHelper - IOHelper used to create IRIs from values
        template - the template string
        value - the value for the annotation
        Returns:
        OWLAnnotation, or null if template string is not supported
        Throws:
        Exception - if annotation property cannot be found
      • getAnnotation

        @Deprecated
        public static org.semanticweb.owlapi.model.OWLAnnotation getAnnotation​(QuotedEntityChecker checker,
                                                                               String template,
                                                                               String value)
                                                                        throws Exception
        Deprecated.
        Create an OWLAnnotation based on the template string and cell value. Replaced by more-specific methods to get annotations by their type (e.g., getStringAnnotation).
        Parameters:
        checker - used to resolve the annotation property
        template - the template string
        value - the value for the annotation
        Returns:
        OWLAnnotation, or null if template string is not supported
        Throws:
        Exception - if annotation cannot be created
      • getAnnotation

        @Deprecated
        public static org.semanticweb.owlapi.model.OWLAnnotation getAnnotation​(QuotedEntityChecker checker,
                                                                               IOHelper ioHelper,
                                                                               String template,
                                                                               String value)
                                                                        throws Exception
        Deprecated.
        Create an OWLAnnotation based on the template string and cell value. Replaced by more-specific methods to get annotations by their type (e.g., getStringAnnotation).
        Parameters:
        checker - used to resolve the annotation property
        ioHelper - IOHelper used to create IRIs from values
        template - the template string
        value - the value for the annotation
        Returns:
        OWLAnnotation, or null if template string is not supported
        Throws:
        Exception - if annotation property cannot be found
      • getAnnotationAxioms

        @Deprecated
        public static Set<org.semanticweb.owlapi.model.OWLAnnotationAssertionAxiom> getAnnotationAxioms​(org.semanticweb.owlapi.model.OWLEntity entity,
                                                                                                        Set<org.semanticweb.owlapi.model.OWLAnnotation> annotations,
                                                                                                        Map<org.semanticweb.owlapi.model.OWLAnnotation,​Map<org.semanticweb.owlapi.model.OWLAnnotation,​Set<org.semanticweb.owlapi.model.OWLAnnotation>>> nested)
        Deprecated.
        TemplateOperation replaced with Template class
        Get a set of annotation axioms for an OWLEntity. Supports axiom annotations and axiom annotation annotations.
        Parameters:
        entity - OWLEntity to annotation
        annotations - Set of OWLAnnotations
        nested - Map with top-level OWLAnnotation as key and another map (axiom OWLAnnotation, set of axiom annotation OWLAnnotations) as value
        Returns:
        Set of OWLAnnotationAssertionAxioms
      • getAnnotationProperties

        @Deprecated
        public static Set<org.semanticweb.owlapi.model.OWLAnnotationProperty> getAnnotationProperties​(QuotedEntityChecker checker,
                                                                                                      String value,
                                                                                                      String split)
                                                                                               throws Exception
        Deprecated.
        Given a QuotedEntityChecker, a string value, and a character to split the value string on (or null), return the value or values as a set of OWLAnnotationProperties.
        Parameters:
        checker - QuotedEntityChecker to get properties
        value - value or values to parse to properties
        split - character to split value on or null
        Returns:
        set of OWLAnnotationProperties
        Throws:
        RowParseException - if property cannot be found or created
        Exception
      • getAnnotationProperty

        @Deprecated
        public static org.semanticweb.owlapi.model.OWLAnnotationProperty getAnnotationProperty​(QuotedEntityChecker checker,
                                                                                               String name)
                                                                                        throws Exception
        Deprecated.
        Find an annotation property with the given name or create one.
        Parameters:
        checker - used to search by rdfs:label (for example)
        name - the name to search for
        Returns:
        an annotation property
        Throws:
        RowParseException - if the name cannot be resolved
        Exception
      • getCellContent

        @Deprecated
        public static String getCellContent​(List<List<String>> rows,
                                            int row,
                                            Integer column)
        Deprecated.
        TemplateOperation replaced with Template class
        Given a set of rows, the row number, and the column number, get the content in the column for the row. If there are any issues, return an empty string. If the cell is empty, return null.
        Parameters:
        rows - list of rows (lists of strings)
        row - row number to get ID of
        column - column number
        Returns:
        content, null, or empty string.
      • getEntity

        @Deprecated
        public static org.semanticweb.owlapi.model.OWLEntity getEntity​(QuotedEntityChecker checker,
                                                                       org.semanticweb.owlapi.model.IRI type,
                                                                       String id,
                                                                       String label)
        Deprecated.
        TemplateOperation replaced with Template class
        Use type, id, and label information to get an entity from the data in a row. Requires either: an id (default type is owl:Class); an id and type; or a label.
        Parameters:
        checker - for looking up labels
        type - the IRI of the type for this entity, or null
        id - the ID for this entity, or null
        label - the label for this entity, or null
        Returns:
        the entity or null
      • getIRIAnnotation

        @Deprecated
        public static org.semanticweb.owlapi.model.OWLAnnotation getIRIAnnotation​(QuotedEntityChecker checker,
                                                                                  String template,
                                                                                  String value)
                                                                           throws Exception
        Deprecated.
        Return an IRI annotation for the given template string and string value. The template string format is "AI [name]" and the value is the name of an entity or an IRI.
        Parameters:
        checker - used to resolve the annotation property
        template - the template string
        value - the value for the annotation
        Returns:
        a new annotation axiom with property and an IRI value
        Throws:
        RowParseException - if the annotation property cannot be found or the IRI cannot be created
        Exception
      • getIRIAnnotation

        @Deprecated
        public static org.semanticweb.owlapi.model.OWLAnnotation getIRIAnnotation​(QuotedEntityChecker checker,
                                                                                  String template,
                                                                                  org.semanticweb.owlapi.model.IRI value)
                                                                           throws Exception
        Deprecated.
        Return an IRI annotation for the given template string and IRI value. The template string format is "AI [name]" and the value is an IRI.
        Parameters:
        checker - used to resolve the annotation property
        template - the template string
        value - the IRI value for the annotation
        Returns:
        a new annotation axiom with property and an IRI value
        Throws:
        RowParseException - if the annotation property cannot be found
        Exception
      • getLanguageAnnotation

        @Deprecated
        public static org.semanticweb.owlapi.model.OWLAnnotation getLanguageAnnotation​(QuotedEntityChecker checker,
                                                                                       String template,
                                                                                       String value)
                                                                                throws Exception
        Deprecated.
        Return a set of language tagged annotations for the given template and value. The template string format is "AL [name]@[lang]" and the value is any string. Replaced by sets of annotations to support splits.
        Parameters:
        checker - used to resolve the annotation property
        template - the template string
        value - the value for the annotation
        Returns:
        a new annotation with property and language tagged literal
        Throws:
        Exception - if the annotation property cannot be found
      • getLanguageAnnotations

        @Deprecated
        public static Set<org.semanticweb.owlapi.model.OWLAnnotation> getLanguageAnnotations​(QuotedEntityChecker checker,
                                                                                             String template,
                                                                                             String split,
                                                                                             String value)
                                                                                      throws Exception
        Deprecated.
        Return a set of language tagged annotations for the given template and value(s). The template string format is "AL [name]@[lang]" and the value is any string.
        Parameters:
        checker - used to resolve the annotation property
        template - the template string
        split - the character to split values on
        value - the value for the annotation
        Returns:
        a set of new annotation(s) with property and language tagged literal
        Throws:
        RowParseException - if the annotation property cannot be found
        Exception
      • getLogicalAxioms

        @Deprecated
        public static Set<org.semanticweb.owlapi.model.OWLAxiom> getLogicalAxioms​(org.semanticweb.owlapi.model.OWLClass cls,
                                                                                  String classType,
                                                                                  Set<org.semanticweb.owlapi.model.OWLClassExpression> classExpressions,
                                                                                  Map<org.semanticweb.owlapi.model.OWLClassExpression,​Set<org.semanticweb.owlapi.model.OWLAnnotation>> annotatedExpressions)
                                                                           throws Exception
        Deprecated.
        TemplateOperation replaced with Template class
        Get a set of OWLAxioms (subclass or equivalent) for an OWLClass. Supports axiom annotations.
        Parameters:
        cls - OWLClass to add axioms to
        classType - subclass or equivalent
        classExpressions - Set of OWLClassExpressions
        annotatedExpressions - Map of annotated OWLClassExpressions and the Set of OWLAnnotations
        Returns:
        Set of OWLAxioms, or null if classType is not subclass or equivalent
        Throws:
        Exception - if classType is not subclass or equivalent
      • getStringAnnotation

        @Deprecated
        public static org.semanticweb.owlapi.model.OWLAnnotation getStringAnnotation​(QuotedEntityChecker checker,
                                                                                     String template,
                                                                                     String value)
                                                                              throws Exception
        Deprecated.
        Return a string annotation for the given template string and value. Replaced by sets of annotations to support splits.
        Parameters:
        checker - used to resolve the annotation property
        template - the template string
        value - the value for the annotation
        Returns:
        a new annotation with property and string literal value
        Throws:
        Exception - if the annotation property cannot be found
      • getStringAnnotations

        @Deprecated
        public static Set<org.semanticweb.owlapi.model.OWLAnnotation> getStringAnnotations​(QuotedEntityChecker checker,
                                                                                           String template,
                                                                                           String split,
                                                                                           String value)
                                                                                    throws Exception
        Deprecated.
        Return a set of string annotations for the given template string and value(s).
        Parameters:
        checker - used to resolve the annotation property
        template - the template string
        split - the character to split values on
        value - the value for the annotation
        Returns:
        a set of new annotation(s) with property and string literal value
        Throws:
        RowParseException - if the annotation property cannot be found
        Exception
      • getTypedAnnotation

        @Deprecated
        public static org.semanticweb.owlapi.model.OWLAnnotation getTypedAnnotation​(QuotedEntityChecker checker,
                                                                                    String template,
                                                                                    String value)
                                                                             throws Exception
        Deprecated.
        Return a set of typed annotations for the given template string and value. The template string format is "AT [name]^^[datatype]" and the value is any string. Replaced by sets of annotations to support splits.
        Parameters:
        checker - used to resolve the annotation property and datatype
        template - the template string
        value - the value for the annotation
        Returns:
        a new annotation with property and typed literal value
        Throws:
        Exception - if the annotation property cannot be found
      • processSplit

        @Deprecated
        public static String processSplit​(String template,
                                          String cell,
                                          List<String> values)
        Deprecated.
        TemplateOperation replaced with Template class
        Given a template string, a cell value, and an empty list, fill the list with any number of values based on a SPLIT character, then return the template string without SPLIT. If there are no SPLITs, only add the original cell to the values.
        Parameters:
        template - template string
        cell - cell contents
        values - empty list to fill
        Returns:
        template string without SPLIT