X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fsal%2Fyang-prototype%2Fyang%2Fyang-model-util%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fyang%2Fmodel%2Futil%2FLeafref.java;h=bd42903184b68a472bf93caa670fe752f1d0c34e;hb=9ceed566491d172e02220b04ec6869867f2f2473;hp=a143f5a629a90c8440b0bd850e927963bb19dbf9;hpb=f9de1cd89c17888a2bd02486d5f7519f0b391bba;p=controller.git diff --git a/opendaylight/sal/yang-prototype/yang/yang-model-util/src/main/java/org/opendaylight/controller/yang/model/util/Leafref.java b/opendaylight/sal/yang-prototype/yang/yang-model-util/src/main/java/org/opendaylight/controller/yang/model/util/Leafref.java index a143f5a629..bd42903184 100644 --- a/opendaylight/sal/yang-prototype/yang/yang-model-util/src/main/java/org/opendaylight/controller/yang/model/util/Leafref.java +++ b/opendaylight/sal/yang-prototype/yang/yang-model-util/src/main/java/org/opendaylight/controller/yang/model/util/Leafref.java @@ -7,9 +7,7 @@ */ 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; @@ -25,7 +23,7 @@ import org.opendaylight.controller.yang.model.api.type.LeafrefTypeDefinition; * * @see LeafrefTypeDefinition */ -public class Leafref implements LeafrefTypeDefinition { +public final class Leafref implements LeafrefTypeDefinition { private static final QName name = BaseTypes.constructQName("leafref"); private static final String description = "The leafref type is used to reference a " + "particular leaf instance in the data tree."; @@ -35,27 +33,10 @@ public class Leafref implements LeafrefTypeDefinition { private final String units = ""; private final LeafrefTypeDefinition baseType; - private Leafref(final RevisionAwareXPath xpath) { + public Leafref(final SchemaPath path, final RevisionAwareXPath xpath) { + this.path = path; this.xpath = xpath; - this.path = BaseTypes.schemaPath(name); - this.baseType = this; - } - - public Leafref(final List actualPath, final URI namespace, - final Date revision, final RevisionAwareXPath xpath) { - super(); - this.path = BaseTypes.schemaPath(actualPath, namespace, revision); - this.xpath = xpath; - baseType = new Leafref(xpath); - } - - public Leafref(final List actualPath, final URI namespace, - final Date revision, final LeafrefTypeDefinition baseType, - final RevisionAwareXPath xpath) { - super(); - this.path = BaseTypes.schemaPath(actualPath, namespace, revision); - this.xpath = xpath; - this.baseType = baseType; + baseType = this; } /*