Interface GraphQL2RDFConfiguration

All Known Implementing Classes:
DefaultGraphQL2RDFConfiguration

public interface GraphQL2RDFConfiguration
Used to represent a URI configuration.
  • Method Details

    • getPropertyPrefix

      String getPropertyPrefix()
      Returns:
      the prefix used for property URIs. A property URI is defined by its prefix followed by a property name, a connecting text and finally a class name of which that property belongs to. Example: "http://example.org/p/book_of_Author"
    • getClassPrefix

      String getClassPrefix()
      Returns:
      the prefix used for class URIs. A class URI is defined by its prefix followed by a class name. Example: "http://example.org/c/Author"
    • getConnectingText

      String getConnectingText()
      Returns:
      the text that connects the property name and the class name in a property URI. Example: _of_
    • getClassMembershipURI

      String getClassMembershipURI()
      Returns:
      a URI that signify a membership relation. Example: https://www.w3.org/1999/02/22-rdf-syntax-ns#type
    • removePropertyPrefix

      String removePropertyPrefix(String uri)
      Function to remove the prefix from the property URI: @param uri Otherwise return null if unable (invalid property URI)
    • removePropertySuffix

      String removePropertySuffix(String uri)
      Function to remove the suffix (connecting text and class name) from the property URI: @param uri. Otherwise return null if unable (invalid property URI)
    • isValidClassURI

      boolean isValidClassURI(String uri)
      Verifies that @param uri is valid (Has correct class prefix)
    • isValidPropertyURI

      boolean isValidPropertyURI(String uri)
      Verifies that @param uri is valid (Has correct property prefix, and connecting text)
    • isValidMembershipURI

      boolean isValidMembershipURI(String uri)
      Verifies that @param uri is valid (Has correct membership uri)
    • mapClassToType

      String mapClassToType(String uri)
      Maps an rdfs class uri to a GraphQL type Return null if URI is invalid (not a class URI)
    • mapTypeToClass

      String mapTypeToClass(String type)
      Maps a GraphQL type to an rdfs class uri
    • mapPropertyToField

      String mapPropertyToField(String uri)
      Maps an rdf property URI to a GraphQL field Return null if URI is invalid (not a property URI)
    • mapPropertyToType

      String mapPropertyToType(String uri)
      Maps an rdf property URI to a GraphQL type Return null if URI is invalid (not a property URI)
    • mapFieldToProperty

      String mapFieldToProperty(String type, String field)
      Maps a GraphQL object type and field to an rdf property URI
    • getJsonIDKeyPrefix

      String getJsonIDKeyPrefix()
      Returns:
      the prefix used by the id key in the expected json.
    • getJsonObjectKeyPrefix

      String getJsonObjectKeyPrefix()
      Returns:
      the prefix used by object keys in the expected json.
    • getJsonScalarKeyPrefix

      String getJsonScalarKeyPrefix()
      Returns:
      the prefix used by scalar keys in the expected json.
    • removeJsonKeyPrefix

      String removeJsonKeyPrefix(String key) throws org.apache.jena.atlas.json.JsonException
      Returns:
      the json key without its prefix. Works for keys with the defined prefixes from this current config (id,scalar,object)
      Throws:
      org.apache.jena.atlas.json.JsonException - if the provided @param key did not have one of the pre-defined prefixes.