| Package | Description |
|---|---|
| org.raml.yagi.framework.grammar | |
| org.raml.yagi.framework.grammar.rule | |
| org.raml.yagi.framework.phase |
| Modifier and Type | Interface and Description |
|---|---|
interface |
RuleFactory<T extends Rule> |
| Modifier and Type | Class and Description |
|---|---|
class |
ExclusiveSiblingRule |
| Modifier and Type | Method and Description |
|---|---|
<T extends Rule> |
BaseGrammar.inNewContext(Callable<T> callable)
Returns rule created by the callable that runs a new separate context.
|
<T extends Rule> |
BaseGrammar.named(String name,
RuleFactory<T> ruleFactory)
Registers a rule with the specified name.
|
<T extends Rule> |
GrammarContext.registerRule(String name,
T rule) |
<T extends Rule> |
RuleTraverser.traverse(T rule,
com.google.common.base.Function<Rule,Boolean> callable) |
| Modifier and Type | Method and Description |
|---|---|
Rule |
GrammarContext.getRuleByName(String name) |
Rule |
BaseGrammar.numberType()
Matches any type of number
|
Rule |
BaseGrammar.scalarType()
Matches any scalar value e.g Number String boolean etc
|
| Modifier and Type | Method and Description |
|---|---|
AllOfRule |
BaseGrammar.allOf(Rule... rules)
Matches if all the specified rules matches
|
AnyOfRule |
BaseGrammar.anyOf(Rule... rules)
Matches if any rule matches and suggests all the possibilities.
|
ArrayRule |
BaseGrammar.array(Rule of)
Matches an array value
|
KeyValueRule |
BaseGrammar.field(Rule keyRule,
Rule valueRule)
Matches a field that the key matches the key rule and the value the value rule
|
KeyValueRule |
BaseGrammar.field(String keyName,
Rule valueRule)
Matches a field that the key is of string type and matches the specified key name and the value matches the value rule or null value
|
KeyValueRule |
BaseGrammar.fieldWithRequiredValue(Rule keyRule,
Rule valueRule)
Matches a field that the key is of string type and matches the specified key name and the value matches the value rule.
|
AnyOfRule |
BaseGrammar.firstOf(Rule... rules)
Accepts if any rule matches and delegates the suggestion to the first one that matches.
|
ConditionalRule |
BaseGrammar.is(Rule rule)
Conditional rule that will accept if the rule matches
|
NegativeRule |
BaseGrammar.not(Rule rule)
Matches if the specified rule does not match
|
AnyOfRule |
BaseGrammar.optional(Rule rule)
Matches if the rule matches or the value is null
|
KeyValueRule |
BaseGrammar.requiredField(Rule keyRule,
Rule valueRule)
Matches a field that the key is of string type and matches the specified key name and the value matches the value rule.
|
ChildBasedConditionalRule |
BaseGrammar.whenChildIs(Rule condition,
Rule then)
Delegates to a rule if the specified condition matches the first child.
|
FieldPresentRule |
BaseGrammar.whenPresent(String selector,
Rule then)
Delegates to a rule if a selector expression returns a value
|
| Modifier and Type | Method and Description |
|---|---|
AnyOfRule |
BaseGrammar.anyOf(List<Rule> rules)
Matches if any rule matches and suggests all the possibilities.
|
<T extends Rule> |
RuleTraverser.traverse(T rule,
com.google.common.base.Function<Rule,Boolean> callable) |
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractTypeRule |
class |
AllOfRule |
class |
AnyOfRule
Accepts if any rule matches and suggests all the possibilities.
|
class |
AnyValueRule |
class |
ArrayRule |
class |
BooleanTypeRule |
class |
ChildBasedConditionalRule
Delegates to a rule if the specified condition matches the first child.
|
class |
DateValueRule |
class |
DivisorValueRule |
class |
FieldPresentRule
Delegates to a rule if a selector expression returns a value
|
class |
FirstOfRule
Accepts if any rule matches and delegates the suggestion to the first one that matches.
|
class |
IntegerTypeRule |
class |
IntegerValueRule |
class |
KeyValueRule |
class |
MaximumValueRule |
class |
MaxItemsRule |
class |
MaxLengthRule |
class |
MaxPropertiesRule |
class |
MinimumValueRule |
class |
MinItemsRule |
class |
MinLengthRule |
class |
MinPropertiesRule |
class |
NegativeRule |
class |
NullValueRule |
class |
NumberTypeRule |
class |
NumberValueRule |
class |
ObjectRule |
class |
RangeValueRule |
class |
RegexValueRule |
class |
ResourceRefRule |
class |
ScalarTypeRule |
class |
StringTypeRule |
class |
StringValueRule |
| Modifier and Type | Field and Description |
|---|---|
protected List<Rule> |
ExclusiveKeys.keys |
protected List<Rule> |
AnyOfRule.rules |
| Modifier and Type | Method and Description |
|---|---|
Rule |
Rule.cleanFactory() |
Rule |
KeyValueRule.getKeyRule() |
Rule |
AnyOfRule.getMatchingRule(Node node) |
Rule |
AllOfRule.getMatchingRule(Node node) |
Rule |
KeyValueRule.getValueRule() |
Rule |
Rule.named(String ruleName) |
Rule |
ArrayRule.of() |
Rule |
Rule.then(Class<? extends Node> clazz)
Sets the clazz of the node that is going to be created to replaced the matched node of this rule.
|
Rule |
Rule.then(NodeFactory factory)
Sets the factory of the node that is going to be created to replaced the matched node of this rule.
|
| Modifier and Type | Method and Description |
|---|---|
List<Rule> |
ExclusiveKeys.getAllRules() |
List<? extends Rule> |
KeyValueRule.getChildren() |
List<Rule> |
AnyOfRule.getChildren() |
List<? extends Rule> |
Rule.getChildren() |
List<? extends Rule> |
ChildBasedConditionalRule.getChildren() |
List<? extends Rule> |
ConditionalRules.getChildren() |
List<Rule> |
ArrayRule.getChildren() |
List<Rule> |
AllOfRule.getChildren() |
List<? extends Rule> |
ObjectRule.getChildren() |
List<Rule> |
AnyOfRule.getRules() |
| Modifier and Type | Method and Description |
|---|---|
AnyOfRule |
AnyOfRule.add(Rule rule) |
AllOfRule |
AllOfRule.and(Rule rule) |
static Node |
ErrorNodeFactory.createRequiredValueNotFound(Node node,
Rule keyRule) |
void |
ArrayRule.of(Rule of) |
void |
KeyValueRule.setKeyRule(Rule keyRule) |
void |
KeyValueRule.setValueRule(Rule valueRule) |
| Modifier and Type | Method and Description |
|---|---|
AnyOfRule |
AnyOfRule.addAll(List<Rule> rules) |
| Constructor and Description |
|---|
AllOfRule(Rule... rules) |
AnyOfRule(Rule... rules) |
ArrayRule(Rule of) |
ArrayRule(Rule of,
boolean strict) |
ChildBasedConditionalRule(Rule condition,
Rule delegate) |
ConditionalRule(Rule condition) |
ExclusiveKeys(Rule... fields) |
FieldPresentRule(String selector,
Rule then) |
KeyValueRule(Rule keyRule,
Rule valueRule) |
NegativeRule(Rule rule) |
| Constructor and Description |
|---|
AllOfRule(List<Rule> rules) |
AnyOfRule(List<Rule> rules) |
ExclusiveKeys(List<Rule> keys) |
FirstOfRule(List<Rule> rules) |
| Constructor and Description |
|---|
GrammarPhase(Rule rootRule) |
Copyright © 2017. All rights reserved.