StructPropertyWalker.java
2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* org.kohsuke.rngom.rngparser.digested.DElementPattern
* org.kohsuke.rngom.rngparser.digested.DInterleavePattern
* org.kohsuke.rngom.rngparser.digested.DPattern
* org.kohsuke.rngom.rngparser.digested.DPatternVisitor
* org.kohsuke.rngom.rngparser.digested.DUnaryPattern
*/
package com.adobe.xmp.schema.rng.parser.traverser;
import com.adobe.xmp.schema.rng.model.Context;
import com.adobe.xmp.schema.rng.model.PropertyInfo;
import com.adobe.xmp.schema.rng.parser.traverser.BasePatternWalker;
import com.adobe.xmp.schema.rng.parser.traverser.PropertyWithQualifierWalker;
import org.kohsuke.rngom.rngparser.digested.DElementPattern;
import org.kohsuke.rngom.rngparser.digested.DInterleavePattern;
import org.kohsuke.rngom.rngparser.digested.DPattern;
import org.kohsuke.rngom.rngparser.digested.DPatternVisitor;
import org.kohsuke.rngom.rngparser.digested.DUnaryPattern;
class StructPropertyWalker
extends BasePatternWalker {
StructPropertyWalker(PropertyInfo propertyInfo, Context context) {
this.relativeDepth = -1;
this.propertyInfo = propertyInfo;
this.context = context;
}
public Void onElement(DElementPattern p) {
super.handleAnnotation((DPattern)p, this.context, this.propertyInfo);
Integer n = this.relativeDepth;
Integer n2 = this.relativeDepth = Integer.valueOf(this.relativeDepth + 1);
DPattern child = this.getChild((DUnaryPattern)p);
if (child instanceof DInterleavePattern) {
DInterleavePattern iChild = (DInterleavePattern)child;
for (DPattern c = iChild.firstChild(); c != null; c = c.getNext()) {
PropertyWithQualifierWalker structWalker = new PropertyWithQualifierWalker(this.context);
c.accept((DPatternVisitor)structWalker);
this.propertyInfo.addChild(structWalker.getPropInfo());
}
} else {
PropertyWithQualifierWalker structWalker = new PropertyWithQualifierWalker(this.context);
child.accept((DPatternVisitor)structWalker);
this.propertyInfo.addChild(structWalker.getPropInfo());
}
return null;
}
}