Interface GraphQL2RDFConfiguration
- All Known Implementing Classes:
DefaultGraphQL2RDFConfiguration
public interface GraphQL2RDFConfiguration
Used to represent a URI configuration.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
isValidClassURI
(String uri) Verifies that @param uri is valid (Has correct class prefix)boolean
Verifies that @param uri is valid (Has correct membership uri)boolean
isValidPropertyURI
(String uri) Verifies that @param uri is valid (Has correct property prefix, and connecting text)mapClassToType
(String uri) Maps an rdfs class uri to a GraphQL type Return null if URI is invalid (not a class URI)mapFieldToProperty
(String type, String field) Maps a GraphQL object type and field to an rdf property URImapPropertyToField
(String uri) Maps an rdf property URI to a GraphQL field Return null if URI is invalid (not a property URI)mapPropertyToType
(String uri) Maps an rdf property URI to a GraphQL type Return null if URI is invalid (not a property URI)mapTypeToClass
(String type) Maps a GraphQL type to an rdfs class uriFunction to remove the prefix from the property URI: @param uri Otherwise return null if unable (invalid property URI)Function to remove the suffix (connecting text and class name) from the property URI: @param uri.
-
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
-
removePropertySuffix
-
isValidClassURI
Verifies that @param uri is valid (Has correct class prefix) -
isValidPropertyURI
Verifies that @param uri is valid (Has correct property prefix, and connecting text) -
isValidMembershipURI
Verifies that @param uri is valid (Has correct membership uri) -
mapClassToType
-
mapTypeToClass
-
mapPropertyToField
-
mapPropertyToType
-
mapFieldToProperty
-
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
- 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.
-