Class AbstractOwlRdfConverter

java.lang.Object
org.spdx.tools.schema.AbstractOwlRdfConverter
Direct Known Subclasses:
OwlToJsonContext, OwlToJsonSchema, OwlToXsd

public class AbstractOwlRdfConverter
extends Object
Abstract class for implementing classes which convert from RDF/XML OWL format to some other format
Author:
Gary O'Neall
  • Field Details

  • Constructor Details

  • Method Details

    • getPropertyRestrictions

      public org.spdx.tools.schema.AbstractOwlRdfConverter.PropertyRestrictions getPropertyRestrictions​(org.apache.jena.ontology.OntClass ontClass, org.apache.jena.ontology.OntProperty property)
    • checkConvertRenamedPropertyName

      public static String checkConvertRenamedPropertyName​(String owlPropertyName)
      Checks to see if an OWL property name has been renamed for the JSON/YAML formats
      Parameters:
      owlPropertyName -
      Returns:
      renamed property if it was renamed, owlPropertyName if not renamed
    • propertiesFromClassRestrictions

      protected Collection<org.apache.jena.ontology.OntProperty> propertiesFromClassRestrictions​(org.apache.jena.ontology.OntClass oClass, boolean excludeSuperClassProperties)
      Parameters:
      oClass -
      excludeSuperClassProperties - if true, only return properties for the class but not any superclasses
      Returns:
      collection of all properties which have a restriction on the class or superclasses if not direct
    • propertiesFromClassRestrictions

      protected Collection<org.apache.jena.ontology.OntProperty> propertiesFromClassRestrictions​(org.apache.jena.ontology.OntClass oClass)
      Parameters:
      oClass -
      Returns:
      collection of all properties which have a restriction on the class or superclasses
    • getPropertyType

      protected Optional<org.apache.jena.rdf.model.Resource> getPropertyType​(org.apache.jena.ontology.OntProperty property) throws SchemaException
      Parameters:
      property -
      Returns:
      The class or type for the property
      Throws:
      SchemaException