Class DefaultGraphQL2RDFConfiguration
java.lang.Object
se.liu.ida.hefquin.engine.wrappers.graphql.impl.DefaultGraphQL2RDFConfiguration
- All Implemented Interfaces:
GraphQL2RDFConfiguration
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisValidClassURI(String uri) Verifies that @param uri is valid (Has correct class prefix)booleanVerifies that @param uri is valid (Has correct membership uri)booleanisValidPropertyURI(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.
-
Field Details
-
classPrefix
-
propertyPrefix
-
connectingText
- See Also:
-
membershipURI
-
jsonIDKeyPrefix
- See Also:
-
jsonObjectKeyPrefix
- See Also:
-
jsonScalarKeyPrefix
- See Also:
-
-
Constructor Details
-
DefaultGraphQL2RDFConfiguration
public DefaultGraphQL2RDFConfiguration() -
DefaultGraphQL2RDFConfiguration
-
-
Method Details
-
getPropertyPrefix
- Specified by:
getPropertyPrefixin interfaceGraphQL2RDFConfiguration- 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
- Specified by:
getClassPrefixin interfaceGraphQL2RDFConfiguration- 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
- Specified by:
getConnectingTextin interfaceGraphQL2RDFConfiguration- Returns:
- the text that connects the property name and the class name in a property URI. Example: _of_
-
getClassMembershipURI
- Specified by:
getClassMembershipURIin interfaceGraphQL2RDFConfiguration- Returns:
- a URI that signify a membership relation. Example: https://www.w3.org/1999/02/22-rdf-syntax-ns#type
-
removePropertyPrefix
Description copied from interface:GraphQL2RDFConfigurationFunction to remove the prefix from the property URI: @param uri Otherwise return null if unable (invalid property URI)- Specified by:
removePropertyPrefixin interfaceGraphQL2RDFConfiguration
-
removePropertySuffix
Description copied from interface:GraphQL2RDFConfigurationFunction to remove the suffix (connecting text and class name) from the property URI: @param uri. Otherwise return null if unable (invalid property URI)- Specified by:
removePropertySuffixin interfaceGraphQL2RDFConfiguration
-
isValidClassURI
Description copied from interface:GraphQL2RDFConfigurationVerifies that @param uri is valid (Has correct class prefix)- Specified by:
isValidClassURIin interfaceGraphQL2RDFConfiguration
-
isValidPropertyURI
Description copied from interface:GraphQL2RDFConfigurationVerifies that @param uri is valid (Has correct property prefix, and connecting text)- Specified by:
isValidPropertyURIin interfaceGraphQL2RDFConfiguration
-
isValidMembershipURI
Description copied from interface:GraphQL2RDFConfigurationVerifies that @param uri is valid (Has correct membership uri)- Specified by:
isValidMembershipURIin interfaceGraphQL2RDFConfiguration
-
mapClassToType
Description copied from interface:GraphQL2RDFConfigurationMaps an rdfs class uri to a GraphQL type Return null if URI is invalid (not a class URI)- Specified by:
mapClassToTypein interfaceGraphQL2RDFConfiguration
-
mapTypeToClass
Description copied from interface:GraphQL2RDFConfigurationMaps a GraphQL type to an rdfs class uri- Specified by:
mapTypeToClassin interfaceGraphQL2RDFConfiguration
-
mapPropertyToField
Description copied from interface:GraphQL2RDFConfigurationMaps an rdf property URI to a GraphQL field Return null if URI is invalid (not a property URI)- Specified by:
mapPropertyToFieldin interfaceGraphQL2RDFConfiguration
-
mapPropertyToType
Description copied from interface:GraphQL2RDFConfigurationMaps an rdf property URI to a GraphQL type Return null if URI is invalid (not a property URI)- Specified by:
mapPropertyToTypein interfaceGraphQL2RDFConfiguration
-
mapFieldToProperty
Description copied from interface:GraphQL2RDFConfigurationMaps a GraphQL object type and field to an rdf property URI- Specified by:
mapFieldToPropertyin interfaceGraphQL2RDFConfiguration
-
getJsonIDKeyPrefix
- Specified by:
getJsonIDKeyPrefixin interfaceGraphQL2RDFConfiguration- Returns:
- the prefix used by the id key in the expected json.
-
getJsonObjectKeyPrefix
- Specified by:
getJsonObjectKeyPrefixin interfaceGraphQL2RDFConfiguration- Returns:
- the prefix used by object keys in the expected json.
-
getJsonScalarKeyPrefix
- Specified by:
getJsonScalarKeyPrefixin interfaceGraphQL2RDFConfiguration- Returns:
- the prefix used by scalar keys in the expected json.
-
removeJsonKeyPrefix
- Specified by:
removeJsonKeyPrefixin interfaceGraphQL2RDFConfiguration- Returns:
- the json key without its prefix. Works for keys with the defined prefixes from this current config (id,scalar,object)
-