Class URI2GraphQLHelper

java.lang.Object
se.liu.ida.hefquin.engine.wrappers.graphql.utils.URI2GraphQLHelper

public class URI2GraphQLHelper extends Object
Provides helper functions that focuses on conversions from URIs to GraphQL data that is then used at a GraphQL endpoint.
  • Constructor Details

    • URI2GraphQLHelper

      public URI2GraphQLHelper()
  • Method Details

    • containsClassURI

      public static boolean containsClassURI(String uri, GraphQL2RDFConfiguration config, GraphQLSchema schema)
      Takes a class URI ( @param uri ) and checks that its valid before getting the GraphQL type name from it using @param config, then checks if the name matches a GraphQL object type in @param schema
    • containsPropertyURI

      public static boolean containsPropertyURI(String uri, GraphQL2RDFConfiguration config, GraphQLSchema schema)
      Takes a property URI ( @param uri ) and checks that its valid before getting the GraphQL type and field name using @param config, then checks whether they matches a field for a GraphQL object type in @param schema
    • getPropertyURIs

      public static Set<String> getPropertyURIs(String objectTypeName, GraphQLFieldType fieldType, GraphQL2RDFConfiguration config, GraphQLSchema schema)
      Takes @param objectTypeName and retrieves all fields for the GraphQL object type of that name in
      Parameters:
      schema - that matches the @param fieldType. Then, by using @param config creates a corresponding property URI for each field fetched. @return the set of all property URIs created this way.