- private final class RpcDefinitionImpl implements RpcDefinition {
- private final QName qname;
- private SchemaPath path;
- private String description;
- private String reference;
- private Status status;
- private ContainerSchemaNode input;
- private ContainerSchemaNode output;
- private Set<TypeDefinition<?>> typeDefinitions;
- private Set<GroupingDefinition> groupings;
- private List<UnknownSchemaNode> unknownNodes = Collections.emptyList();
-
- private RpcDefinitionImpl(final QName qname) {
- this.qname = qname;
- }
-
- @Override
- public QName getQName() {
- return qname;
- }
-
- @Override
- public SchemaPath getPath() {
- return path;
- }
-
- private void setPath(SchemaPath path) {
- this.path = path;
- }
-
- @Override
- public String getDescription() {
- return description;
- }
-
- private void setDescription(String description) {
- this.description = description;
- }
-
- @Override
- public String getReference() {
- return reference;
- }
-
- private void setReference(String reference) {
- this.reference = reference;
- }
-
- @Override
- public Status getStatus() {
- return status;
- }
-
- private void setStatus(Status status) {
- this.status = status;
- }
-
- @Override
- public ContainerSchemaNode getInput() {
- return input;
- }
-
- private void setInput(ContainerSchemaNode input) {
- this.input = input;
- }
-
- @Override
- public ContainerSchemaNode getOutput() {
- return output;
- }
-
- private void setOutput(ContainerSchemaNode output) {
- this.output = output;
- }
-
- @Override
- public Set<TypeDefinition<?>> getTypeDefinitions() {
- return typeDefinitions;
- }
-
- private void setTypeDefinitions(Set<TypeDefinition<?>> typeDefinitions) {
- this.typeDefinitions = typeDefinitions;
- }
-
- @Override
- public Set<GroupingDefinition> getGroupings() {
- return groupings;
- }
-
- private void setGroupings(Set<GroupingDefinition> groupings) {
- this.groupings = groupings;
- }
-
- @Override
- public List<UnknownSchemaNode> getUnknownSchemaNodes() {
- return unknownNodes;
- }
-
- private void setUnknownSchemaNodes(List<UnknownSchemaNode> unknownNodes) {
- if (unknownNodes != null) {
- this.unknownNodes = unknownNodes;
- }
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((qname == null) ? 0 : qname.hashCode());
- result = prime * result + ((path == null) ? 0 : path.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj) {
- return true;
- }
- if (obj == null) {
- return false;
- }
- if (getClass() != obj.getClass()) {
- return false;
- }
- final RpcDefinitionImpl other = (RpcDefinitionImpl) obj;
- if (qname == null) {
- if (other.qname != null) {
- return false;
- }
- } else if (!qname.equals(other.qname)) {
- return false;
- }
- if (path == null) {
- if (other.path != null) {
- return false;
- }
- } else if (!path.equals(other.path)) {
- return false;
- }
- return true;
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder(RpcDefinitionImpl.class.getSimpleName());
- sb.append("[");
- sb.append("qname=");
- sb.append(qname);
- sb.append(", path=");
- sb.append(path);
- sb.append(", input=");
- sb.append(input);
- sb.append(", output=");
- sb.append(output);
- sb.append("]");
- return sb.toString();
- }
- }
-