- private final class AugmentationSchemaImpl implements AugmentationSchema {
- private SchemaPath targetPath;
- private RevisionAwareXPath whenCondition;
- private Map<QName, DataSchemaNode> childNodes = Collections.emptyMap();
- private Set<UsesNode> uses = Collections.emptySet();
- private String description;
- private String reference;
- private Status status;
- private List<UnknownSchemaNode> unknownNodes = Collections.emptyList();
-
- private AugmentationSchemaImpl(SchemaPath targetPath) {
- this.targetPath = targetPath;
- }
-
- @Override
- public SchemaPath getTargetPath() {
- return targetPath;
- }
-
- private void setTargetPath(SchemaPath path) {
- this.targetPath = path;
- }
-
- @Override
- public RevisionAwareXPath getWhenCondition() {
- return whenCondition;
- }
-
- private void setWhenCondition(RevisionAwareXPath whenCondition) {
- this.whenCondition = whenCondition;
- }
-
- @Override
- public Set<DataSchemaNode> getChildNodes() {
- final Set<DataSchemaNode> result = new TreeSet<DataSchemaNode>(Comparators.SCHEMA_NODE_COMP);
- result.addAll(childNodes.values());
- return result;
- }
-
- private void setChildNodes(Map<QName, DataSchemaNode> childNodes) {
- if (childNodes != null) {
- this.childNodes = childNodes;
- }
- }