Merge "Fixed for bug : 1171 - issue while creating subnet"
[controller.git] / opendaylight / md-sal / sal-rest-connector / src / main / java / org / opendaylight / controller / sal / restconf / impl / StructuredData.java
1 /*
2  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.controller.sal.restconf.impl;
9
10 import org.opendaylight.controller.sal.core.api.mount.MountInstance;
11 import org.opendaylight.yangtools.yang.data.api.CompositeNode;
12 import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
13
14 public class StructuredData {
15
16     private final CompositeNode data;
17     private final DataSchemaNode schema;
18     private final MountInstance mountPoint;
19     private final boolean prettyPrintMode;
20
21     public StructuredData(final CompositeNode data, final DataSchemaNode schema, final MountInstance mountPoint) {
22         this(data, schema, mountPoint, false);
23     }
24
25     public StructuredData(final CompositeNode data, final DataSchemaNode schema, final MountInstance mountPoint,
26             final boolean preattyPrintMode) {
27         this.data = data;
28         this.schema = schema;
29         this.mountPoint = mountPoint;
30         this.prettyPrintMode = preattyPrintMode;
31     }
32
33     public CompositeNode getData() {
34         return data;
35     }
36
37     public DataSchemaNode getSchema() {
38         return schema;
39     }
40
41     public MountInstance getMountPoint() {
42         return mountPoint;
43     }
44
45     public boolean isPrettyPrintMode() {
46         return prettyPrintMode;
47     }
48 }