+
+ public Entry<YangInstanceIdentifier, NormalizedNode<?, ?>> toNormalized(final YangInstanceIdentifier legacy,
+ final CompositeNode compositeNode) {
+ try {
+ return dataNormalizer.toNormalized(legacy, compositeNode);
+ } catch (final NullPointerException e) {
+ throw new RestconfDocumentedException("Data normalizer isn't set. Normalization isn't possible", e);
+ }
+ }
+
+ public YangInstanceIdentifier toNormalized(final YangInstanceIdentifier legacy) {
+ try {
+ return dataNormalizer.toNormalized(legacy);
+ } catch (final NullPointerException e) {
+ throw new RestconfDocumentedException("Data normalizer isn't set. Normalization isn't possible", e);
+ }
+ }
+
+ public CompositeNode toLegacy(final YangInstanceIdentifier instanceIdentifier,
+ final NormalizedNode<?,?> normalizedNode) {
+ try {
+ return dataNormalizer.toLegacy(instanceIdentifier, normalizedNode);
+ } catch (final NullPointerException e) {
+ throw new RestconfDocumentedException("Data normalizer isn't set. Normalization isn't possible", e);
+ }
+ }
+
+ public YangInstanceIdentifier toXpathRepresentation(final YangInstanceIdentifier instanceIdentifier) {
+ try {
+ return dataNormalizer.toLegacy(instanceIdentifier);
+ } catch (NullPointerException e) {
+ throw new RestconfDocumentedException("Data normalizer isn't set. Normalization isn't possible", e);
+ } catch (DataNormalizationException e) {
+ throw new RestconfDocumentedException("Data normalizer failed. Normalization isn't possible", e);
+ }
+ }
+
+ public boolean isNodeMixin(YangInstanceIdentifier path) {
+ final DataNormalizationOperation<?> operation;
+ try {
+ operation = dataNormalizer.getOperation(path);
+ } catch (DataNormalizationException e) {
+ throw new RestconfDocumentedException("Data normalizer failed. Normalization isn't possible", e);
+ }
+ return operation.isMixin();
+ }
+
+ public DataNormalizationOperation<?> getRootOperation() {
+ return dataNormalizer.getRootOperation();
+ }
+