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,7 +325,11 @@ public class NpmPackage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String oidIndexFile() throws IOException {
|
public String oidIndexFile() throws IOException {
|
||||||
return fn(".oids.json");
|
if (folder == null) {
|
||||||
|
return null;
|
||||||
|
} else {
|
||||||
|
return fn(".oids.json");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -166,10 +166,15 @@ public class NpmPackageIndexBuilder {
|
|||||||
oids.add(v);
|
oids.add(v);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
JsonArray a = new JsonArray();
|
if (url != null) {
|
||||||
("codesystem".equals(json.asString("kind")) ? oidIndexCS : oidIndexOther).add(url, a);
|
JsonArray a = new JsonArray();
|
||||||
for (String s : oids) {
|
JsonObject cache = ("codesystem".equals(json.asString("kind")) ? oidIndexCS : oidIndexOther);
|
||||||
a.add(s);
|
if (!cache.has(url)) {
|
||||||
|
json.add(url, a);
|
||||||
|
for (String s : oids) {
|
||||||
|
a.add(s);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (json.hasPrimitive("url")) {
|
if (json.hasPrimitive("url")) {
|
||||||
@ -191,9 +196,12 @@ 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);
|
||||||
for (String s : oids) {
|
if (!cache.has(json.asString("url"))) {
|
||||||
a.add(s);
|
cache.add(json.asString("url"), a);
|
||||||
|
for (String s : oids) {
|
||||||
|
a.add(s);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -201,6 +209,7 @@ 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