- if (ctx.getOriginalCtx() != null) {
- original = (LeafListSchemaNode) ctx.getOriginalCtx().buildEffective();
- }
- }
- private void initSubstatementCollections() {
- Collection<? extends EffectiveStatement<?, ?>> effectiveSubstatements = effectiveSubstatements();
-
- List<UnknownSchemaNode> unknownNodesInit = new LinkedList<>();
-
- boolean configurationInit = false;
- boolean userOrderedInit = false;
- for (EffectiveStatement<?, ?> effectiveStatement : effectiveSubstatements) {
- if (effectiveStatement instanceof UnknownSchemaNode) {
- unknownNodesInit.add((UnknownSchemaNode) effectiveStatement);
- }
- if (effectiveStatement instanceof TypeDefinition) {
- type = TypeUtils.getTypeFromEffectiveStatement(effectiveStatement);
- }
- if (!configurationInit && effectiveStatement instanceof ConfigEffectiveStatementImpl) {
- ConfigEffectiveStatementImpl configStmt = (ConfigEffectiveStatementImpl) effectiveStatement;
- this.configuration = configStmt.argument();
- configurationInit = true;
- }
- if (!userOrderedInit && effectiveStatement instanceof OrderedByEffectiveStatementImpl) {
- OrderedByEffectiveStatementImpl orderedByStmt = (OrderedByEffectiveStatementImpl) effectiveStatement;
- this.userOrdered = orderedByStmt.argument().equals("user") ? true : false;
- userOrderedInit = true;
- }
- }
-
- this.unknownNodes = ImmutableList.copyOf(unknownNodesInit);
- }
-
- @Override
- public QName getQName() {
- return qname;
- }
-
- @Override
- public SchemaPath getPath() {
- return path;
- }
-
- @Override
- public boolean isAugmenting() {
- return augmenting;
- }
-
- @Override
- public boolean isAddedByUses() {
- return addedByUses;