/** * Returns the string strong or weak.<p> * * @return the string strong or weak * * @see #isStrong() */ public String getType() { return isStrong() ? VALUE_STRONG : VALUE_WEAK; }
/** * Returns the string strong or weak.<p> * * @return the string strong or weak * * @see #isStrong() */ public String getType() { return isStrong() ? VALUE_STRONG : VALUE_WEAK; }
/** * Returns all weak relation types in the given list.<p> * * @param relationTypes the collection of relation types to filter * * @return a list of {@link CmsRelationType} objects */ public static List<CmsRelationType> filterWeak(Collection<CmsRelationType> relationTypes) { List<CmsRelationType> result = new ArrayList<CmsRelationType>(relationTypes); Iterator<CmsRelationType> it = result.iterator(); while (it.hasNext()) { CmsRelationType type = it.next(); if (type.isStrong()) { it.remove(); } } return result; }
/** * Returns all strong relation types in the given list.<p> * * @param relationTypes the collection of relation types to filter * * @return a list of {@link CmsRelationType} objects */ public static List<CmsRelationType> filterStrong(Collection<CmsRelationType> relationTypes) { List<CmsRelationType> result = new ArrayList<CmsRelationType>(relationTypes); Iterator<CmsRelationType> it = result.iterator(); while (it.hasNext()) { CmsRelationType type = it.next(); if (!type.isStrong()) { it.remove(); } } return result; }
/** * Returns all strong relation types in the given list.<p> * * @param relationTypes the collection of relation types to filter * * @return a list of {@link CmsRelationType} objects */ public static List filterStrong(Collection relationTypes) { List list = new ArrayList(relationTypes); Iterator it = list.iterator(); while (it.hasNext()) { CmsRelationType type = (CmsRelationType)it.next(); if (!type.isStrong()) { it.remove(); } } return list; }
/** * Returns all weak relation types in the given list.<p> * * @param relationTypes the collection of relation types to filter * * @return a list of {@link CmsRelationType} objects */ public static List filterWeak(Collection relationTypes) { List list = new ArrayList(relationTypes); Iterator it = list.iterator(); while (it.hasNext()) { CmsRelationType type = (CmsRelationType)it.next(); if (type.isStrong()) { it.remove(); } } return list; }
CmsResource target = getResource(relation.getTargetId()); if (target != null) { if (relation.getType().isStrong() || shouldAddWeakRelationTarget(target)) { directlyRelatedResources.add(target);