import com.google.common.base.Preconditions;
import com.google.gson.stream.JsonReader;
-import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
-import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
public GnpyResult(String gnpyResponseString) throws Exception {
- // try {
- // Optional<DataObject> dataObject;
// Create the schema context
final ModuleInfoBackedContext moduleContext = ModuleInfoBackedContext.create();
Iterable<? extends YangModuleInfo> moduleInfos;
return schemaContext;
}
- private String readResultFromFile(String fileName) {
- BufferedReader br = null;
- FileReader fr = null;
- StringBuilder sb = new StringBuilder();
- String gnpyResponse;
-
- try {
- fr = new FileReader(fileName);
- br = new BufferedReader(fr);
- String currentLine;
- while ((currentLine = br.readLine()) != null) {
- LOG.info(currentLine);
- sb.append(currentLine);
- }
- fr.close();
- } catch (IOException e) {
- LOG.warn("GNPy: exception {} occured during the reading of results", e.getMessage());
- }
- gnpyResponse = sb.toString();
- return gnpyResponse;
- }
-
/**
* Transforms the given input {@link NormalizedNode} into the given
* {@link DataObject}.