public String findUrl(ExplanationNumberValue<?> value, String parentUrl) { IMetaInfo mi = value.getMetaInfo(); String url = mi != null ? mi.getSourceUrl() : null; if (url == null) { return parentUrl; } return url; }
public static CellMetaInfo createCellMetaInfo(IdentifierNode identifier, IMetaInfo metaInfo, NodeType nodeType) { SimpleNodeUsage nodeUsage = new SimpleNodeUsage(identifier, metaInfo.getDisplayName(INamedThing.SHORT), metaInfo.getSourceUrl(), nodeType); return new CellMetaInfo(JavaOpenClass.STRING, false, Collections.singletonList(nodeUsage)); }
private CellMetaInfo createMetaInfo(IdentifierNode identifier, IMetaInfo typeMeta) { if (typeMeta == null) { return null; } SimpleNodeUsage nodeUsage = new SimpleNodeUsage(identifier, typeMeta.getDisplayName(INamedThing.SHORT), typeMeta.getSourceUrl(), NodeType.DATATYPE); return new CellMetaInfo(JavaOpenClass.STRING, false, Collections.singletonList(nodeUsage)); }
@Override protected String getUrl(ITreeElement<?> element) { ExplanationNumberValue<?> explanationValue = (ExplanationNumberValue<?>) element; String url = explanationValue.getMetaInfo() == null ? null : explanationValue.getMetaInfo().getSourceUrl(); if (StringUtils.isNotBlank(url)) { return getUrlToElement(element, url); } return FacesUtils.getContextPath() + showTablePage; }
Module getModuleForMember(IOpenMember member) { String sourceUrl = member.getDeclaringClass().getMetaInfo().getSourceUrl(); Module module = getModuleForSourceUrl(sourceUrl, modules); if (module != null) { return module; } throw new OpenlNotCheckedException("Module is not found"); }
Module getModuleForMember(IOpenMember member) { String sourceUrl = member.getDeclaringClass().getMetaInfo().getSourceUrl(); Module module = getModuleForSourceUrl(sourceUrl, modules); if (module != null) { return module; } throw new OpenlNotCheckedException("Module is not found."); }
Module getModuleForMember(IOpenMember member) { String sourceUrl = member.getDeclaringClass().getMetaInfo().getSourceUrl(); Module module = getModuleForSourceUrl(sourceUrl, modules); if (module != null) { return module; } throw new OpenlNotCheckedException("Module is not found."); }
Module getModuleForMember(IOpenMember member) { String sourceUrl = member.getDeclaringClass().getMetaInfo().getSourceUrl(); Module module = getModuleForSourceUrl(sourceUrl, modules); if (module != null) { return module; } throw new OpenlNotCheckedException("Module is not found"); }
/** * Sets the metainfo for the value */ public void setMetaInfo(IMetaInfo metaInfo) { if (metaInfo instanceof ValueMetaInfo) { setMetaInfo((ValueMetaInfo) metaInfo); } else { try { ValueMetaInfo valueMetaInfo = new ValueMetaInfo(metaInfo.getDisplayName(IMetaInfo.SHORT), metaInfo.getDisplayName(IMetaInfo.LONG), new URLSourceCodeModule(new URL(metaInfo.getSourceUrl()))); setMetaInfo(valueMetaInfo); } catch (Exception e) { log.debug("Failed to set meta info for StringValue \"{}\"", value, e); setMetaInfo((ValueMetaInfo) null); } } }
/** * Sets the metainfo for the value */ public void setMetaInfo(IMetaInfo metaInfo) { if (metaInfo instanceof ValueMetaInfo) { setMetaInfo((ValueMetaInfo) metaInfo); } else { try { ValueMetaInfo valueMetaInfo = new ValueMetaInfo(metaInfo.getDisplayName(IMetaInfo.SHORT), metaInfo.getDisplayName(IMetaInfo.LONG), new URLSourceCodeModule(new URL(metaInfo.getSourceUrl()))); setMetaInfo(valueMetaInfo); } catch (Exception e) { log.debug("Failed to set meta info for StringValue \"{}\"", value, e); setMetaInfo((ValueMetaInfo) null); } } }
private String resultValue(ExplanationNumberValue<?> explanationValue) { String value = getFormattedValue(explanationValue); IMetaInfo mi = explanationValue.getMetaInfo(); String name = mi != null ? mi.getDisplayName(IMetaInfo.LONG) : null; String url = mi != null ? mi.getSourceUrl() : null; if (url != null && name != null) { String href = WebContext.getContextPath() + "/faces/pages/modules/explain/showExplainTable.xhtml?uri=" + StringTool.encodeURL(url) + "&text=" + name; value = "<a href='" + href + "' title='Show in table' target='mainFrame' class='open'>" + value + "</a>"; } return value; }
private String resultValue(ExplanationNumberValue<?> explanationValue) { String value = getFormattedValue(explanationValue); IMetaInfo mi = explanationValue.getMetaInfo(); String name = mi != null ? mi.getDisplayName(IMetaInfo.LONG) : null; String url = mi != null ? mi.getSourceUrl() : null; if (url != null && name != null) { String href = WebContext.getContextPath() + "/faces/pages/modules/explain/showExplainTable.xhtml?uri=" + StringTool.encodeURL(url) + "&text=" + name; value = "<a href='" + href + "' title='Show in table' target='mainFrame' class='open'>" + value + "</a>"; } return value; }
@Override String getUrl(ITreeElement<?> element) { ExplanationNumberValue<?> explanationValue = (ExplanationNumberValue<?>) element; String url = explanationValue == null || explanationValue.getMetaInfo() == null ? null : explanationValue.getMetaInfo().getSourceUrl(); if (StringUtils.isNotBlank(url)) { return getUrlToElement(element, url); } return FacesUtils.getContextPath() + showTablePage; }
@Override String getUrl(ITreeElement<?> element) { ExplanationNumberValue<?> explanationValue = (ExplanationNumberValue<?>) element; String url = explanationValue == null || explanationValue.getMetaInfo() == null ? null : explanationValue.getMetaInfo().getSourceUrl(); if (StringUtils.isNotBlank(url)) { return getUrlToElement(element, url); } return FacesUtils.getContextPath() + showTablePage; }
SimpleNodeUsage nodeUsage = new SimpleNodeUsage(paramNodes[0], metaInfo.getDisplayName(INamedThing.SHORT), metaInfo.getSourceUrl(), NodeType.DATATYPE);
end, metaInfo.getDisplayName(INamedThing.SHORT), metaInfo.getSourceUrl(), NodeType.DATATYPE)); end, metaInfo.getDisplayName(INamedThing.SHORT), metaInfo.getSourceUrl(), NodeType.DATATYPE));
description = MethodUtil.printType(boundField.getType()) + " " + boundField.getName(); if (metaInfo != null) { uri = metaInfo.getSourceUrl(); description = metaInfo.getDisplayName(IMetaInfo.REGULAR) + "\n" + description; } else if (type != NullOpenClass.the) { IMetaInfo mi = boundField.getType().getMetaInfo(); if (mi != null) { uri = mi.getSourceUrl();