Package com.semedy.reasoner.api.parser
Class GraphQLParser
java.lang.Object
com.semedy.reasoner.api.parser.GraphQLParser
Parser for rules.
- Author:
- angele
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionget the operation: query or mutationget the JSON pattern for the queryget the JSON pattern for the querygetTypes()
return the current typeget the variablesvoid
parseQuery
(InputStream input, Map<String, Object> variables) parse GraphQL query and create (several) OO-logic queriesvoid
parseQuery
(Reader input, Map<String, Object> variables) parse GraphQL query and create an OO-logic queryvoid
parseQuery
(StringReader input, Map<String, Object> variables) parse GraphQL query and create an OO-logic queryvoid
parseQuery
(String input, Map<String, Object> variables) parse GraphQL query and create an OO-logic query
-
Constructor Details
-
GraphQLParser
public GraphQLParser()
-
-
Method Details
-
parseQuery
public void parseQuery(InputStream input, Map<String, Object> variables) throws IOException, SemReasonerExceptionparse GraphQL query and create (several) OO-logic queries- Parameters:
input
- , input streamvariables
- , variables to be substituted- Throws:
IOException
SemReasonerException
-
getOperation
get the operation: query or mutation- Returns:
-
getTopAliases
get the JSON pattern for the query- Returns:
-
getTypes
return the current type- Returns:
-
getPattern
get the JSON pattern for the query- Returns:
-
getVariables
get the variables- Returns:
-
parseQuery
public void parseQuery(StringReader input, Map<String, Object> variables) throws IOException, SemReasonerExceptionparse GraphQL query and create an OO-logic query- Parameters:
input
- , input streamvariables
- , variables to be substituted- Throws:
IOException
SemReasonerException
-
parseQuery
public void parseQuery(Reader input, Map<String, Object> variables) throws IOException, SemReasonerExceptionparse GraphQL query and create an OO-logic query- Parameters:
input
- , input streamvariables
- , variables to be substituted- Throws:
IOException
SemReasonerException
-
parseQuery
public void parseQuery(String input, Map<String, Object> variables) throws SemReasonerException, IOExceptionparse GraphQL query and create an OO-logic query- Parameters:
input
- , input streamvariables
- , variables to be substitutedvariables
- , contains variables with their values- Throws:
IOException
SemReasonerException
-