*/
package org.opendaylight.controller.yang.model.util;
+import java.net.URI;
import java.util.Collections;
+import java.util.Date;
import java.util.List;
import org.opendaylight.controller.yang.common.QName;
"uniquely identify a particular instance node in the data tree.";
private static final String reference = "https://tools.ietf.org/html/rfc6020#section-9.13";
- private final transient SchemaPath path = BaseTypes.schemaPath(name);
+ private final transient SchemaPath path;
private final RevisionAwareXPath xpath;
private final String units = "";
-
+ private final InstanceIdentifierTypeDefinition baseType;
private final boolean requireInstance;
- public InstanceIdentifier(RevisionAwareXPath xpath, boolean requireInstance) {
+ private InstanceIdentifier(RevisionAwareXPath xpath, boolean requireInstance) {
+ super();
+ path = BaseTypes.schemaPath(name);
+ this.xpath = xpath;
+ this.requireInstance = requireInstance;
+ this.baseType = this;
+ }
+
+ public InstanceIdentifier(final List<String> actualPath, final URI namespace,
+ final Date revision, RevisionAwareXPath xpath, boolean requireInstance) {
super();
+ path = BaseTypes.schemaPath(actualPath, namespace, revision);
this.xpath = xpath;
this.requireInstance = requireInstance;
+ this.baseType = new InstanceIdentifier(xpath, requireInstance);
}
/*
* (non-Javadoc)
- *
+ *
* @see org.opendaylight.controller.yang.model.api.TypeDefinition#getBaseType()
*/
@Override
public InstanceIdentifierTypeDefinition getBaseType() {
- return this;
+ return baseType;
}
/*
* (non-Javadoc)
- *
+ *
* @see org.opendaylight.controller.yang.model.api.TypeDefinition#getUnits()
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see org.opendaylight.controller.yang.model.api.TypeDefinition#getDefaultValue()
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see org.opendaylight.controller.yang.model.api.SchemaNode#getQName()
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see org.opendaylight.controller.yang.model.api.SchemaNode#getPath()
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see org.opendaylight.controller.yang.model.api.SchemaNode#getDescription()
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see org.opendaylight.controller.yang.model.api.SchemaNode#getReference()
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see org.opendaylight.controller.yang.model.api.SchemaNode#getStatus()
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see org.opendaylight.controller.yang.model.api.SchemaNode#getExtensionSchemaNodes()
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see org.opendaylight.controller.yang.model.api.type.InstanceIdentifierTypeDefinition#
* getPathStatement()
*/
/*
* (non-Javadoc)
- *
+ *
* @see org.opendaylight.controller.yang.model.api.type.InstanceIdentifierTypeDefinition#
* requireInstance()
*/