141 | | |
142 | | return list; |
143 | | |
144 | | /* JSONObject object = new JSONObject(jpath); |
145 | | String startClass = object.getJSONObject("startClassURI").toString(); |
146 | | int width = Integer.parseInt(object.getJSONObject("width").toString()); |
147 | | JSONArray classLinks = object.getJSONArray("classLinks"); |
148 | | JSONObject jsonObject; |
149 | | List <ClassLink> list = null; |
150 | | |
151 | | for (int i=0;i<classLinks.length();i++) |
152 | | { |
153 | | jsonObject = classLinks.getJSONObject(i); |
154 | | String propertyURI = jsonObject.getJSONObject("propertyURI").toString(); |
155 | | String linkedClassURI = jsonObject.getJSONObject("linkedClassURI").toString(); |
156 | | String linkedLiteralDatatypeURI = jsonObject.getJSONObject("linkedLiteralDatatypeURI").toString(); |
157 | | int numOfLinks = Integer.parseInt(jsonObject.getJSONObject("numOfLinks").toString()); |
158 | | int numOfLinkedInstances = Integer.parseInt(jsonObject.getJSONObject("numOfLinkedInstances").toString()); |
159 | | int numOfOriginInstances = Integer.parseInt(jsonObject.getJSONObject("numOfOriginInstances").toString()); |
160 | | int numOfOriginClassInstances = Integer.parseInt(jsonObject.getJSONObject("numOfOriginInstances").toString()); |
161 | | int numOfLinkedClassInstances = Integer.parseInt(jsonObject.getJSONObject("numOfLinkedClassInstances").toString()); |
162 | | |
163 | | ClassLink classLink =new ClassLink(propertyURI, linkedClassURI, linkedLiteralDatatypeURI, null, |
164 | | numOfLinks, numOfOriginInstances, numOfLinkedInstances, |
165 | | numOfOriginClassInstances, numOfLinkedClassInstances, |
166 | | false, false); |
167 | | list.add(classLink); |
168 | | } |
169 | | Path path = new Path(startClass, list, width); |
170 | | return path; |
171 | | */ |
172 | | |
173 | | |
174 | | } |
175 | | |
176 | | private String convertPath2SPARQL(List<String> path) throws Exception{ |
| 144 | // return list; |
| 145 | } |
| 146 | |
| 147 | private static String convertPath2SPARQL(List<String> path) throws Exception{ |