import org.opendaylight.controller.model.api.type.IdentityTypeDefinition;\r
import org.opendaylight.controller.model.api.type.IdentityrefTypeDefinition;\r
import org.opendaylight.controller.yang.common.QName;\r
-import org.opendaylight.controller.yang.model.api.ExtensionDefinition;\r
+import org.opendaylight.controller.yang.model.api.RevisionAwareXPath;\r
import org.opendaylight.controller.yang.model.api.SchemaPath;\r
import org.opendaylight.controller.yang.model.api.Status;\r
+import org.opendaylight.controller.yang.model.api.UnknownSchemaNode;\r
\r
public class Identityref implements IdentityrefTypeDefinition {\r
\r
private final String reference = "";\r
\r
private final IdentityTypeDefinition identity;\r
+ private final RevisionAwareXPath xpath;\r
\r
private String units = "";\r
\r
- public Identityref(IdentityTypeDefinition identity) {\r
+ public Identityref(RevisionAwareXPath xpath, IdentityTypeDefinition identity) {\r
super();\r
this.identity = identity;\r
+ this.xpath = xpath;\r
+ }\r
+ \r
+ public Identityref(RevisionAwareXPath xpath) {\r
+ super();\r
+ this.xpath = xpath;\r
+ this.identity = null;\r
}\r
\r
/*\r
}\r
\r
@Override\r
- public List<ExtensionDefinition> getExtensionSchemaNodes() {\r
+ public List<UnknownSchemaNode> getUnknownSchemaNodes() {\r
return Collections.emptyList();\r
}\r
\r
public IdentityTypeDefinition getIdentity() {\r
return identity;\r
}\r
-\r
- @Override\r
- public int hashCode() {\r
- final int prime = 31;\r
- int result = 1;\r
- result = prime * result\r
- + ((description == null) ? 0 : description.hashCode());\r
- result = prime * result\r
- + ((identity == null) ? 0 : identity.hashCode());\r
- result = prime * result + ((name == null) ? 0 : name.hashCode());\r
- result = prime * result + ((path == null) ? 0 : path.hashCode());\r
- result = prime * result\r
- + ((reference == null) ? 0 : reference.hashCode());\r
- result = prime * result + ((units == null) ? 0 : units.hashCode());\r
- return result;\r
- }\r
-\r
- @Override\r
- public boolean equals(Object obj) {\r
- if (this == obj) {\r
- return true;\r
- }\r
- if (obj == null) {\r
- return false;\r
- }\r
- if (getClass() != obj.getClass()) {\r
- return false;\r
- }\r
- Identityref other = (Identityref) obj;\r
- if (description == null) {\r
- if (other.description != null) {\r
- return false;\r
- }\r
- } else if (!description.equals(other.description)) {\r
- return false;\r
- }\r
- if (identity == null) {\r
- if (other.identity != null) {\r
- return false;\r
- }\r
- } else if (!identity.equals(other.identity)) {\r
- return false;\r
- }\r
- if (name == null) {\r
- if (other.name != null) {\r
- return false;\r
- }\r
- } else if (!name.equals(other.name)) {\r
- return false;\r
- }\r
- if (path == null) {\r
- if (other.path != null) {\r
- return false;\r
- }\r
- } else if (!path.equals(other.path)) {\r
- return false;\r
- }\r
- if (reference == null) {\r
- if (other.reference != null) {\r
- return false;\r
- }\r
- } else if (!reference.equals(other.reference)) {\r
- return false;\r
- }\r
- if (units == null) {\r
- if (other.units != null) {\r
- return false;\r
- }\r
- } else if (!units.equals(other.units)) {\r
- return false;\r
- }\r
- return true;\r
- }\r
-\r
+ \r
@Override\r
- public String toString() {\r
- StringBuilder builder = new StringBuilder();\r
- builder.append("IdentityrefType [name=");\r
- builder.append(name);\r
- builder.append(", path=");\r
- builder.append(path);\r
- builder.append(", description=");\r
- builder.append(description);\r
- builder.append(", reference=");\r
- builder.append(reference);\r
- builder.append(", identity=");\r
- builder.append(identity);\r
- builder.append(", units=");\r
- builder.append(units);\r
- builder.append("]");\r
- return builder.toString();\r
+ public RevisionAwareXPath getPathStatement() {\r
+ return xpath;\r
}\r
+ \r
+ \r
}\r