XMPPath.java
1.37 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
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.internal.xmp.impl.xpath;
import com.adobe.internal.xmp.impl.xpath.XMPPathSegment;
import java.util.ArrayList;
import java.util.List;
public class XMPPath {
public static final int STRUCT_FIELD_STEP = 1;
public static final int QUALIFIER_STEP = 2;
public static final int ARRAY_INDEX_STEP = 3;
public static final int ARRAY_LAST_STEP = 4;
public static final int QUAL_SELECTOR_STEP = 5;
public static final int FIELD_SELECTOR_STEP = 6;
public static final int SCHEMA_NODE = Integer.MIN_VALUE;
public static final int STEP_SCHEMA = 0;
public static final int STEP_ROOT_PROP = 1;
private List segments = new ArrayList(5);
public void add(XMPPathSegment segment) {
this.segments.add(segment);
}
public XMPPathSegment getSegment(int index) {
return (XMPPathSegment)this.segments.get(index);
}
public int size() {
return this.segments.size();
}
public String toString() {
StringBuffer result = new StringBuffer();
for (int index = 1; index < this.size(); ++index) {
int kind;
result.append(this.getSegment(index));
if (index >= this.size() - 1 || (kind = this.getSegment(index + 1).getKind()) != 1 && kind != 2) continue;
result.append('/');
}
return result.toString();
}
}