[
https://issues.apache.org/jira/browse/PIRK-19?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15396724#comment-15396724
]
ASF GitHub Bot commented on PIRK-19:
------------------------------------
Github user smarthi commented on a diff in the pull request:
https://github.com/apache/incubator-pirk/pull/28#discussion_r72548798
--- Diff: src/main/java/org/apache/pirk/schema/data/DataSchemaLoader.java
---
@@ -181,19 +172,34 @@ public DataSchema loadSchema(InputStream stream)
throws IOException, PIRExceptio
Node nNode = nList.item(i);
if (nNode.getNodeType() == Node.ELEMENT_NODE)
{
- parseElementNode((Element) nNode, dataSchema);
+ extractElementNode((Element) nNode, dataSchema);
}
}
return dataSchema;
}
- private void parseElementNode(Element eElement, DataSchema schema)
throws PIRException
+ private Document parseXMLDocument(InputStream stream) throws
IOException, PIRException
+ {
+ Document doc;
+ try
+ {
+ DocumentBuilder dBuilder =
DocumentBuilderFactory.newInstance().newDocumentBuilder();
--- End diff --
can this be made try (DocumentBuilder .....) ?
> Make DataSchema/QuerySchema Agnostic of Persistent Representation
> -----------------------------------------------------------------
>
> Key: PIRK-19
> URL: https://issues.apache.org/jira/browse/PIRK-19
> Project: PIRK
> Issue Type: Bug
> Components: Data and Query Schemas
> Reporter: Ellison Anne Williams
> Assignee: Tim Ellison
>
> Make the DataSchema and QuerySchema classes agnostic of their potential
> persistent representations, then have 'providers' that applications can use
> to load/store in a variety of formats.
> For example, in LoadDataSchemas, the data schema XML file is parsed to create
> a DataSchema object (one for each data schema specified). The DataSchema
> object could be created from other sources.
> Perhaps JSON representation would be a good starting place.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)