protected String translate(String context, String value) { return hasTranslator() ? translator.translate(context, value) : value; }
public void addFolder(String actualDir, String statedDir, boolean omitIfExists) throws IOException { File fd = new CSFile(actualDir); String files[] = fd.list(); for (String f : files) { if (new CSFile(Utilities.path(actualDir, f)).isDirectory()) addFolder(Utilities.path(actualDir, f), Utilities.pathURL(statedDir, f), omitIfExists); else addFileName(Utilities.pathURL(statedDir, f), Utilities.path(actualDir, f), omitIfExists); } }
public boolean isPrimitive(String code) { return Utilities.existsInList(code, "boolean", "integer", "string", "decimal", "uri", "base64Binary", "instant", "date", "dateTime", "time", "code", "oid", "id", "markdown", "unsignedInt", "positiveInt", "xhtml", "url", "canonical"); // StructureDefinition sd = context.fetchTypeDefinition(code); // return sd != null && sd.getKind() == StructureDefinitionKind.PRIMITIVETYPE; }
public static String sdNs(String type, String overrideVersionNs) { if (Utilities.isAbsoluteUrl(type)) return type; else if (overrideVersionNs != null) return Utilities.pathURL(overrideVersionNs, type); else return "http://hl7.org/fhir/StructureDefinition/"+type; }
private String getContent(String command) throws Exception { if (Utilities.noString(command) || command.startsWith("!")) return ""; String[] parts = command.split("\\ "); return processCommand(command, parts); }
public static void stringToFile(String content, String path) throws IOException { File file = new CSFile(path); stringToFile(content, file); }
public void process() throws IOException, FHIRException { String[] titles = parseLine(); while (ready()) { String[] values = parseLine(); processLine(titles, values); } close(); }
public void addFileSource(String path, String cnt, boolean omitIfExists) throws IOException { File tmp = Utilities.createTempFile("tmp", ".tmp"); TextFile.stringToFile(cnt, tmp.getAbsolutePath()); addFileName(path, tmp.getAbsolutePath(), omitIfExists); tmp.delete(); }
public void setData(InputStream data) { try { this.data = new DataReader(data); } catch (UnsupportedEncodingException e) { // DataReader is fixed to "UTF-8", so this exception cannot really occur } }
public static boolean convertsResource(String rt) { return Utilities.existsInList(rt, "Parameters", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "Bundle", "CarePlan", "Communication", "CommunicationRequest", "Composition", "ConceptMap", "Condition", "CapabilityStatement", "DetectedIssue", "DeviceMetric", "DeviceUseStatement", "DiagnosticReport", "DocumentReference", "Encounter", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "FamilyMemberHistory", "Flag", "Group", "HealthcareService", "ImplementationGuide", "ListResource", "Location", "MedicationDispense", "MedicationStatement", "MessageHeader", "NamingSystem", "Observation", "OperationDefinition", "OperationOutcome", "Organization", "Patient", "Person", "Practitioner", "Questionnaire", "QuestionnaireResponse", "RiskAssessment", "Schedule", "SearchParameter", "Slot", "StructureDefinition", "Subscription", "Substance", "SupplyDelivery", "SupplyRequest", "TestScript", "ValueSet"); }
public static void stringToFile(String content, String path, boolean bom) throws IOException { File file = new CSFile(path); stringToFile(content, file, bom); }
public static boolean isPrimitive(String code) { return Utilities.existsInList(code, "xhtml", "boolean", "integer", "string", "decimal", "uri", "base64Binary", "instant", "date", "dateTime", "time", "code", "oid", "id", "markdown", "unsignedInt", "positiveInt", "xhtml", "base64Binary"); }
private boolean isDataType(String value) { return Utilities.existsInList(value, "Identifier", "HumanName", "Address", "ContactPoint", "Timing", "SimpleQuantity", "Quantity", "Attachment", "Range", "Period", "Ratio", "CodeableConcept", "Coding", "SampledData", "Age", "Distance", "Duration", "Count", "Money"); }