[New] Added withoutStateVariables to StrolchElementToJsonVisitor
This commit is contained in:
parent
bd5dbc2e5e
commit
6d216b6f58
|
@ -48,6 +48,7 @@ public class StrolchElementToJsonVisitor implements StrolchElementVisitor<JsonEl
|
||||||
private boolean withLocator;
|
private boolean withLocator;
|
||||||
private boolean withoutVersion;
|
private boolean withoutVersion;
|
||||||
private boolean withoutPolicies;
|
private boolean withoutPolicies;
|
||||||
|
private boolean withoutStateVariables;
|
||||||
private int activityDepth = Integer.MAX_VALUE;
|
private int activityDepth = Integer.MAX_VALUE;
|
||||||
|
|
||||||
public StrolchElementToJsonVisitor() {
|
public StrolchElementToJsonVisitor() {
|
||||||
|
@ -85,6 +86,10 @@ public class StrolchElementToJsonVisitor implements StrolchElementVisitor<JsonEl
|
||||||
return this.withoutPolicies;
|
return this.withoutPolicies;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isWithoutStateVariables() {
|
||||||
|
return this.withoutStateVariables;
|
||||||
|
}
|
||||||
|
|
||||||
public StrolchElementToJsonVisitor withLocator() {
|
public StrolchElementToJsonVisitor withLocator() {
|
||||||
this.withLocator = true;
|
this.withLocator = true;
|
||||||
return this;
|
return this;
|
||||||
|
@ -120,6 +125,11 @@ public class StrolchElementToJsonVisitor implements StrolchElementVisitor<JsonEl
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public StrolchElementToJsonVisitor withoutStateVariables() {
|
||||||
|
this.withoutStateVariables = true;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public StrolchElementToJsonVisitor activityDepth(int depth) {
|
public StrolchElementToJsonVisitor activityDepth(int depth) {
|
||||||
this.activityDepth = depth;
|
this.activityDepth = depth;
|
||||||
return this;
|
return this;
|
||||||
|
@ -611,6 +621,9 @@ public class StrolchElementToJsonVisitor implements StrolchElementVisitor<JsonEl
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void addStates(Resource resource, JsonObject rootJ) {
|
protected void addStates(Resource resource, JsonObject rootJ) {
|
||||||
|
if (isWithoutStateVariables())
|
||||||
|
return;
|
||||||
|
|
||||||
if (isFlat())
|
if (isFlat())
|
||||||
addTimedStatesFlat(resource, rootJ);
|
addTimedStatesFlat(resource, rootJ);
|
||||||
else
|
else
|
||||||
|
|
|
@ -78,6 +78,11 @@ public class StrolchRootElementToJsonVisitor implements StrolchRootElementVisito
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public StrolchRootElementToJsonVisitor withoutStateVariables() {
|
||||||
|
this.visitor.withoutStateVariables();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public StrolchRootElementToJsonVisitor withPolicies() {
|
public StrolchRootElementToJsonVisitor withPolicies() {
|
||||||
this.visitor.withPolicies();
|
this.visitor.withPolicies();
|
||||||
return this;
|
return this;
|
||||||
|
|
Loading…
Reference in New Issue