forked from miniHive/schemastore-analysis
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3a115d1
commit 1ecde4e
Showing
31 changed files
with
1,011 additions
and
810 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,34 @@ | ||
from Visitor import Visitor | ||
from KeyValueNode import KeyValueNode | ||
from Visitor import Visitor | ||
|
||
|
||
class AdditionalProperties_Visitor(Visitor): | ||
"""! @brief Visitor to count the additionalProperties keyword in the Schema | ||
This visitor counts all appearances of the additionalProperties keyword in the schema. | ||
This visitor counts all appearances of the additionalProperties keyword in the schema. | ||
""" | ||
|
||
def __init__(self): | ||
"""! @brief Constructor of AdditionalProperties_Visitor. | ||
It sets the additionalProperties count result value to zero. | ||
It sets the additionalProperties count result value to zero. | ||
""" | ||
self.cnt = 0 | ||
|
||
def visit(self, node): | ||
"""! @brief Basic visit method implementation. | ||
This function visits a node and increments the counter if the node is a representation | ||
of a additionalProperties keyword in the schema. | ||
This function visits a node and increments the counter if the node is a representation | ||
of a additionalProperties keyword in the schema. | ||
@param node Node to visit. This has to be a inherited type from SchemaNode. | ||
@param node Node to visit. This has to be a inherited type from SchemaNode. | ||
""" | ||
if (node.getName() == "additionalProperties"): | ||
if node.getName() == "additionalProperties": | ||
self.cnt = self.cnt + 1 | ||
|
||
def getCount(self): | ||
"""! @brief Basic getter for the result value implementation | ||
@return The amount of appearances of additionalProperties keyword in the Schema | ||
@return The amount of appearances of additionalProperties keyword in the Schema | ||
""" | ||
return self.cnt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,34 @@ | ||
from Visitor import Visitor | ||
from KeyValueNode import KeyValueNode | ||
from Visitor import Visitor | ||
|
||
|
||
class AllOf_Visitor(Visitor): | ||
"""! @brief Visitor to count the allOf keyword in the Schema | ||
This visitor counts all appearances of the allOf keyword in the schema. | ||
This visitor counts all appearances of the allOf keyword in the schema. | ||
""" | ||
|
||
def __init__(self): | ||
"""! @brief Constructor of AllOf_Visitor. | ||
It sets the allOf count result value to zero. | ||
It sets the allOf count result value to zero. | ||
""" | ||
self.cnt = 0 | ||
|
||
def visit(self, node): | ||
"""! @brief Basic visit method implementation. | ||
This function visits a node and increments the counter if the node is a representation | ||
of a allOf keyword in the schema. | ||
This function visits a node and increments the counter if the node is a representation | ||
of a allOf keyword in the schema. | ||
@param node Node to visit. This has to be a inherited type from SchemaNode. | ||
@param node Node to visit. This has to be a inherited type from SchemaNode. | ||
""" | ||
if (node.getName() == "allOf"): | ||
if node.getName() == "allOf": | ||
self.cnt = self.cnt + 1 | ||
|
||
def getCount(self): | ||
"""! @brief Basic getter for the result value implementation | ||
@return The amount of appearances of allOf keyword in the Schema | ||
@return The amount of appearances of allOf keyword in the Schema | ||
""" | ||
return self.cnt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,34 @@ | ||
from Visitor import Visitor | ||
from KeyValueNode import KeyValueNode | ||
from Visitor import Visitor | ||
|
||
|
||
class AnyOf_Visitor(Visitor): | ||
"""! @brief Visitor to count the anyOf keyword in the Schema | ||
This visitor counts all appearances of the anyOf keyword in the schema. | ||
This visitor counts all appearances of the anyOf keyword in the schema. | ||
""" | ||
|
||
def __init__(self): | ||
"""! @brief Constructor of AnyOf_Visitor. | ||
It sets the anyOf count result value to zero. | ||
It sets the anyOf count result value to zero. | ||
""" | ||
self.cnt = 0 | ||
|
||
def visit(self, node): | ||
"""! @brief Basic visit method implementation. | ||
This function visits a node and increments the counter if the node is a representation | ||
of a anyOf keyword in the schema. | ||
This function visits a node and increments the counter if the node is a representation | ||
of a anyOf keyword in the schema. | ||
@param node Node to visit. This has to be a inherited type from SchemaNode. | ||
@param node Node to visit. This has to be a inherited type from SchemaNode. | ||
""" | ||
if (node.getName() == "anyOf"): | ||
if node.getName() == "anyOf": | ||
self.cnt = self.cnt + 1 | ||
|
||
def getCount(self): | ||
"""! @brief Basic getter for the result value implementation | ||
@return The amount of appearances of anyOf keyword in the Schema | ||
@return The amount of appearances of anyOf keyword in the Schema | ||
""" | ||
return self.cnt |
Oops, something went wrong.