public static DomainType getDomain(DomainType domain, DomainsType refDomains) { String currentDomainName = domain.getName(); if (currentDomainName == null) { String domainRef = domain.getRef(); if (domainRef != null && refDomains != null) { for (DomainType refDomain : refDomains.getDomain()) { if (refDomain.getName().equalsIgnoreCase(domainRef)) { currentDomainName = domainRef; return refDomain; } } } } return domain; }
/** * Get the attributes from the specified domain. The boolean specifies whether we need to add a * domain prefix before returning the attributes. * * @param domain * @param domainPrefix * @return */ private static String getAttributesAsString( final DomainType domain, final boolean domainPrefix) { final String currentDomainName = domain.getName(); final List<AttributeType> listAttributes = domain.getAttributes(); if (!listAttributes.isEmpty()) { String attribs = null; if (listAttributes.size() == 1) { attribs = listAttributes.get(0).getAttribute().trim(); } else { // Only support up to 2 attributes (start;end/low;high/...) String attr0 = listAttributes.get(0).getAttribute().trim(); String attr1 = listAttributes.get(1).getAttribute().trim(); attribs = attr0 + ";" + attr1; } if (domainPrefix) { return currentDomainName + "(" + attribs + ")"; } else { return attribs; } } return null; }
DomainType currentDomain = getDomain(domain, refDomains); String currentDomainName = currentDomain.getName(); if (currentDomainName != null && currentDomainName.equalsIgnoreCase( DomainType currentDomain = getDomain(domain, refDomains); String domName = currentDomain.getName(); if (!domName.equalsIgnoreCase(Utils.TIME_DOMAIN) && !domName.equalsIgnoreCase(