mirror of
https://github.com/hapifhir/org.hl7.fhir.core.git
synced 2025-02-09 06:14:45 +00:00
OID related fixes
This commit is contained in:
parent
4917dd7815
commit
04597eea27
@ -482,7 +482,10 @@ public class SimpleWorkerContext extends BaseWorkerContext implements IWorkerCon
|
|||||||
packageTracker.packageLoaded(pi.id(), pi.version());
|
packageTracker.packageLoaded(pi.id(), pi.version());
|
||||||
}
|
}
|
||||||
|
|
||||||
oidFiles.add(pi.getFolders().get("package").oidIndexFile());
|
String oi = pi.getFolders().get("package").oidIndexFile();
|
||||||
|
if (oi != null) {
|
||||||
|
oidFiles.add(oi);
|
||||||
|
}
|
||||||
|
|
||||||
if ((types == null || types.size() == 0) && loader != null) {
|
if ((types == null || types.size() == 0) && loader != null) {
|
||||||
types = loader.getTypes();
|
types = loader.getTypes();
|
||||||
|
@ -325,9 +325,13 @@ public class NpmPackage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String oidIndexFile() throws IOException {
|
public String oidIndexFile() throws IOException {
|
||||||
|
if (folder == null) {
|
||||||
|
return null;
|
||||||
|
} else {
|
||||||
return fn(".oids.json");
|
return fn(".oids.json");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private String path;
|
private String path;
|
||||||
private JsonObject npm;
|
private JsonObject npm;
|
||||||
|
@ -166,11 +166,16 @@ public class NpmPackageIndexBuilder {
|
|||||||
oids.add(v);
|
oids.add(v);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (url != null) {
|
||||||
JsonArray a = new JsonArray();
|
JsonArray a = new JsonArray();
|
||||||
("codesystem".equals(json.asString("kind")) ? oidIndexCS : oidIndexOther).add(url, a);
|
JsonObject cache = ("codesystem".equals(json.asString("kind")) ? oidIndexCS : oidIndexOther);
|
||||||
|
if (!cache.has(url)) {
|
||||||
|
json.add(url, a);
|
||||||
for (String s : oids) {
|
for (String s : oids) {
|
||||||
a.add(s);
|
a.add(s);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (json.hasPrimitive("url")) {
|
if (json.hasPrimitive("url")) {
|
||||||
if (json.has("oid")) {
|
if (json.has("oid")) {
|
||||||
@ -191,7 +196,9 @@ public class NpmPackageIndexBuilder {
|
|||||||
}
|
}
|
||||||
if (!oids.isEmpty()) {
|
if (!oids.isEmpty()) {
|
||||||
JsonArray a = new JsonArray();
|
JsonArray a = new JsonArray();
|
||||||
("CodeSystem".equals(rt) ? oidIndexCS : oidIndexOther).add(json.asString("url"), a);
|
JsonObject cache = ("CodeSystem".equals(rt) ? oidIndexCS : oidIndexOther);
|
||||||
|
if (!cache.has(json.asString("url"))) {
|
||||||
|
cache.add(json.asString("url"), a);
|
||||||
for (String s : oids) {
|
for (String s : oids) {
|
||||||
a.add(s);
|
a.add(s);
|
||||||
}
|
}
|
||||||
@ -199,8 +206,10 @@ public class NpmPackageIndexBuilder {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
System.out.println("Error parsing "+name+": "+e.getMessage());
|
System.out.println("Error parsing "+name+": "+e.getMessage());
|
||||||
|
e.printStackTrace();
|
||||||
if (name.contains("openapi")) {
|
if (name.contains("openapi")) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user