public List<String> getPathsSplit() { String path = getPath(); if (path.indexOf('|') == -1) { return Collections.singletonList(path); } List<String> retVal = new ArrayList<String>(); StringTokenizer tok = new StringTokenizer(path, "|"); while (tok.hasMoreElements()) { String nextPath = tok.nextToken().trim(); retVal.add(nextPath.trim()); } return retVal; }
@Override public List<PathAndRef> extractResourceLinks(IBaseResource theResource, RuntimeSearchParam theNextSpDef) { ArrayList<PathAndRef> retVal = new ArrayList<PathAndRef>(); String[] nextPathsSplit = SPLIT.split(theNextSpDef.getPath()); for (String path : nextPathsSplit) { path = path.trim(); if (isNotBlank(path)) { for (Object next : extractValues(path, theResource)) { retVal.add(new PathAndRef(path, next)); } } } return retVal; }
@Override public int hashCode() { return new HashCodeBuilder(17, 37) .append(getId()) .append(getName()) .append(getPath()) .append(getUri()) .toHashCode(); }
@Override public List<PathAndRef> extractResourceLinks(IBaseResource theResource, RuntimeSearchParam theNextSpDef) { ArrayList<PathAndRef> retVal = new ArrayList<>(); String[] nextPathsSplit = SPLIT_R4.split(theNextSpDef.getPath()); for (String path : nextPathsSplit) { path = path.trim(); if (isNotBlank(path)) { for (Object next : extractValues(path, theResource)) { retVal.add(new PathAndRef(path, next)); } } } return retVal; }
@Override public List<PathAndRef> extractResourceLinks(IBaseResource theResource, RuntimeSearchParam theNextSpDef) { List<PathAndRef> refs = new ArrayList<PathAndRef>(); String[] nextPathsSplit = theNextSpDef.getPath().split("\\|"); for (String nextPath : nextPathsSplit) { nextPath = nextPath.trim(); for (Object nextObject : extractValues(nextPath, theResource)) { if (nextObject == null) { continue; } refs.add(new PathAndRef(nextPath, nextObject)); } } return refs; }
@Override public boolean equals(Object theO) { if (this == theO) return true; if (theO == null || getClass() != theO.getClass()) return false; RuntimeSearchParam that = (RuntimeSearchParam) theO; return new EqualsBuilder() .append(getId(), that.getId()) .append(getName(), that.getName()) .append(getPath(), that.getPath()) .append(getUri(), that.getUri()) .isEquals(); }
private void extractResourceLinks(ResourceIndexedSearchParams theParams, ResourceTable theEntity, IBaseResource theResource, Date theUpdateTime, IResourceLinkResolver theResourceLinkResolver, String theResourceType, RuntimeSearchParam nextSpDef, boolean theFailOnInvalidReference) { if (nextSpDef.getParamType() != RestSearchParameterTypeEnum.REFERENCE) { return; } String nextPathsUnsplit = nextSpDef.getPath(); if (isBlank(nextPathsUnsplit)) { return; } boolean multiType = false; if (nextPathsUnsplit.endsWith("[x]")) { multiType = true; } List<PathAndRef> refs = mySearchParamExtractor.extractResourceLinks(theResource, nextSpDef); for (PathAndRef nextPathAndRef : refs) { extractResourceLinks(theParams, theEntity, theUpdateTime, theResourceLinkResolver, theResourceType, nextSpDef, nextPathsUnsplit, multiType, nextPathAndRef, theFailOnInvalidReference); } }
String nextPath = massagePathForCompartmentSimilarity(next.getPath()); for (RuntimeSearchParam nextAlternate : searchParams) { String nextAlternatePath = massagePathForCompartmentSimilarity(nextAlternate.getPath()); if (nextAlternatePath.equals(nextPath)) { if (!nextAlternate.getName().equals(next.getName())) {
String nextPath = nextSpDef.getPath(); if (isBlank(nextPath)) { continue;
String nextPath = nextSpDef.getPath(); if (isBlank(nextPath)) { continue;
String nextPath = nextSpDef.getPath(); if (isBlank(nextPath)) { continue;
String nextPath = nextSpDef.getPath(); if (isBlank(nextPath)) { continue;
String nextPath = nextSpDef.getPath(); if (isBlank(nextPath)) { continue;
String nextPath = nextSpDef.getPath(); if (isBlank(nextPath)) { continue;
String nextPath = nextSpDef.getPath(); String nextSpName = nextSpDef.getName();
String nextPath = nextSpDef.getPath(); if (isBlank(nextPath)) { continue;
String nextPath = nextSpDef.getPath(); if (isBlank(nextPath)) { continue;
String nextPath = nextSpDef.getPath(); if (isBlank(nextPath)) { continue;
String nextPath = nextSpDef.getPath(); if (isBlank(nextPath)) { continue;
public void parse() { for (String nextResourceName : myResourceNames) { RuntimeResourceDefinition def = getCtx().getResourceDefinition(nextResourceName); Resource resource = new Resource(); resource.setName(def.getName()); resource.setElementName(def.getName()); addResource(resource); for (RuntimeSearchParam nextSearchParam : def.getSearchParams()) { SearchParameter param = new SearchParameter(getVersion(), def.getName()); param.setName(nextSearchParam.getName()); param.setDescription(nextSearchParam.getDescription()); param.setCompositeOf(toCompositeOfStrings(nextSearchParam.getCompositeOf())); param.setCompositeTypes(toCompositeOfTypes(nextSearchParam.getCompositeOf())); param.setPath(nextSearchParam.getPath()); param.setType(nextSearchParam.getParamType().getCode()); resource.addSearchParameter(param); } } }