* ============LICENSE_START=======================================================
* Copyright (C) 2020 Bell Canada. All rights reserved.
* Modifications Copyright (C) 2021 Pantheon.tech
+ * Modifications (C) 2021 Nordix Foundation
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
public ResponseEntity<Object> getNodeByDataspaceAndAnchor(final String dataspaceName, final String anchorName,
final String xpath, final Boolean includeDescendants) {
if ("/".equals(xpath)) {
- // TODO: extracting data by anchor only (root data node and below)
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
}
final FetchDescendantsOption fetchDescendantsOption = Boolean.TRUE.equals(includeDescendants)
/*
* ============LICENSE_START=======================================================
* Copyright (C) 2021 Pantheon.tech
+ * Modifications (C) 2021 Nordix Foundation
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import lombok.NoArgsConstructor;
import org.onap.cps.spi.model.DataNode;
-/*
- TODO: this utility class belongs to REST, however it expected to be used by both CPS Core and xNF Proxy;
- placed in cps-service until shared module is done for REST services, then to be moved there
- */
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class DataMapUtils {
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2020 Nordix Foundation
+ * Copyright (C) 2020-2021 Nordix Foundation
* Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
* Modifications Copyright (C) 2021 Pantheon.tech
* ================================================================================
* @param schemaContext schema context describing associated data model
* @return the NormalizedNode object
*/
+ @SuppressWarnings("squid:S1452") // Generic type <? ,?> is returned by external librray, opendaylight.yangtools
public static NormalizedNode<?, ?> parseJsonData(final String jsonData, final SchemaContext schemaContext) {
return parseJsonData(jsonData, schemaContext, Optional.empty());
}
* @param parentNodeXpath the xpath referencing the parent node current data fragment belong to
* @return the NormalizedNode object
*/
+ @SuppressWarnings("squid:S1452") // Generic type <? ,?> is returned by external librray, opendaylight.yangtools
public static NormalizedNode<?, ?> parseJsonData(final String jsonData, final SchemaContext schemaContext,
final String parentNodeXpath) {
final DataSchemaNode parentSchemaNode = getDataSchemaNodeByXpath(parentNodeXpath, schemaContext);