X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fnetconf%2Fnetconf-monitoring%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Fmonitoring%2Fxml%2Fmodel%2FMonitoringSchema.java;fp=opendaylight%2Fnetconf%2Fnetconf-monitoring%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Fmonitoring%2Fxml%2Fmodel%2FMonitoringSchema.java;h=0000000000000000000000000000000000000000;hb=9ba2b4eca79bcc0e78099b133296801c8d45a6c4;hp=259fd73197b44d32b758720f775d7573e36df4a5;hpb=b2e81149739c87f0ecc2ce7f06448d7a5d3162b8;p=controller.git diff --git a/opendaylight/netconf/netconf-monitoring/src/main/java/org/opendaylight/controller/netconf/monitoring/xml/model/MonitoringSchema.java b/opendaylight/netconf/netconf-monitoring/src/main/java/org/opendaylight/controller/netconf/monitoring/xml/model/MonitoringSchema.java deleted file mode 100644 index 259fd73197..0000000000 --- a/opendaylight/netconf/netconf-monitoring/src/main/java/org/opendaylight/controller/netconf/monitoring/xml/model/MonitoringSchema.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ - -package org.opendaylight.controller.netconf.monitoring.xml.model; - -import com.google.common.base.Function; -import com.google.common.base.Preconditions; -import com.google.common.collect.Collections2; -import java.util.Collection; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; -import javax.xml.bind.annotation.XmlElement; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.monitoring.rev101004.Yang; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.monitoring.rev101004.netconf.state.schemas.Schema; - -final class MonitoringSchema { - - private final Schema schema; - - public MonitoringSchema(Schema schema) { - this.schema = schema; - } - - @XmlElement(name = "identifier") - public String getIdentifier() { - return schema.getIdentifier(); - } - - @XmlElement(name = "namespace") - public String getNamespace() { - return schema.getNamespace().getValue().toString(); - } - - @XmlElement(name = "location") - public Collection getLocation() { - return Collections2.transform(schema.getLocation(), new Function() { - @Nullable - @Override - public String apply(@Nonnull Schema.Location input) { - return input.getEnumeration().toString(); - } - }); - } - - @XmlElement(name = "version") - public String getVersion() { - return schema.getVersion(); - } - - @XmlElement(name = "format") - public String getFormat() { - Preconditions.checkState(schema.getFormat() == Yang.class, "Only yang format permitted, but was %s", schema.getFormat()); - return "yang"; - } -}