Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ public interface IControlContainer {
boolean addControl(@NonNull Control item);

/**
* Remove the first matching {@link Control} item from the underlying collection.
* Remove the first matching {@link Control} item from the underlying
* collection.
*
* @param item
* the item to remove
Expand All @@ -68,7 +69,8 @@ public interface IControlContainer {
boolean addParam(@NonNull Parameter item);

/**
* Remove the first matching {@link Parameter} item from the underlying collection.
* Remove the first matching {@link Parameter} item from the underlying
* collection.
*
* @param item
* the item to remove
Expand All @@ -77,7 +79,8 @@ public interface IControlContainer {
boolean removeParam(@NonNull Parameter item);

/**
* Get the parameter identifiers referenced in the object's context, but not by their child objects.
* Get the parameter identifiers referenced in the object's context, but not by
* their child objects.
*
* @return a stream of identifiers
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ public interface IGroupContainer extends IControlContainer {
boolean addGroup(@NonNull CatalogGroup item);

/**
* Remove the first matching {@link CatalogGroup} item from the underlying collection.
* Remove the first matching {@link CatalogGroup} item from the underlying
* collection.
*
* @param item
* the item to remove
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ public ProfileResolutionException(String message) {
}

/**
* Create a new profile resolution exception with the provided {@code message} based on the provided
* {@code cause}.
* Create a new profile resolution exception with the provided {@code message}
* based on the provided {@code cause}.
*
* @param message
* a description of the error that occurred
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ public enum StructuringDirective {
private DynamicContext dynamicContext;

/**
* Gets the configured loader or creates a new default loader if no loader was configured.
* Gets the configured loader or creates a new default loader if no loader was
* configured.
*
* @return the bound loader
*/
Expand Down Expand Up @@ -340,7 +341,8 @@ protected IIndexer resolveImport(
IDocumentNodeItem document = getDynamicContext().getDocumentLoader().loadAsNodeItem(source);
IDocumentNodeItem importedCatalog = resolve(document, importHistory);

// Create a defensive deep copy of the document and associated values, since we will be making
// Create a defensive deep copy of the document and associated values, since we
// will be making
// changes to the data.
try {
importedCatalog = DefaultNodeItemFactory.instance().newDocumentNodeItem(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ public enum TargetType {
*
* @param clazz
* the class to identify the target type for
* @return the associated target type or {@code null} if the class is not associated with a target
* type
* @return the associated target type or {@code null} if the class is not
* associated with a target type
*/
@Nullable
public static TargetType forClass(@NonNull Class<?> clazz) {
Expand All @@ -114,8 +114,8 @@ public static TargetType forClass(@NonNull Class<?> clazz) {
*
* @param name
* the field name to identify the target type for
* @return the associated target type or {@code null} if the name is not associated with a target
* type
* @return the associated target type or {@code null} if the name is not
* associated with a target type
*/
@Nullable
public static TargetType forFieldName(@Nullable String name) {
Expand Down Expand Up @@ -168,7 +168,8 @@ public enum Position {
*
* @param name
* the name to identify the position for
* @return the associated position or {@code null} if the name is not associated with a position
* @return the associated position or {@code null} if the name is not associated
* with a position
*/
@Nullable
public static Position forName(@Nullable String name) {
Expand Down Expand Up @@ -257,8 +258,8 @@ public Boolean visitGroup(CatalogGroup group, Context context) {
* <li>the context matches if:
* <ul>
* <li>the target item's id matches the "by-id"; or</li>
* <li>the "by-id" is not defined and the target item is the control matching the target
* context</li>
* <li>the "by-id" is not defined and the target item is the control matching
* the target context</li>
* </ul>
* </li>
* </ol>
Expand All @@ -268,7 +269,8 @@ public Boolean visitGroup(CatalogGroup group, Context context) {
* @param targetItem
* the current target to process
* @param titleConsumer
* a consumer to apply a title to or {@code null} if the object has no title field
* a consumer to apply a title to or {@code null} if the object has no
* title field
* @param paramsSupplier
* a supplier for the child {@link Parameter} collection
* @param propsSupplier
Expand Down Expand Up @@ -332,7 +334,8 @@ private static <T> void handleCollection(
// boolean handleChildren = !Collections.disjoint(context.getTargetItemTypes(),
// getApplicableTypes(itemType));
// if (handleChildren && handler != null) {
// // if the child item type is applicable and there is a handler, iterate over children
// // if the child item type is applicable and there is a handler, iterate over
// children
// Iterator<T> iter = collectionSupplier.get().iterator();
// while (iter.hasNext()) {
// T item = iter.next();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ public enum TargetType {
*
* @param clazz
* the class to identify the target type for
* @return the associated target type or {@code null} if the class is not associated with a target
* type
* @return the associated target type or {@code null} if the class is not
* associated with a target type
*/
@Nullable
public static TargetType forClass(@NonNull Class<?> clazz) {
Expand All @@ -112,8 +112,8 @@ public static TargetType forClass(@NonNull Class<?> clazz) {
*
* @param name
* the field name to identify the target type for
* @return the associated target type or {@code null} if the name is not associated with a target
* type
* @return the associated target type or {@code null} if the name is not
* associated with a target type
*/
@Nullable
public static TargetType forFieldName(@Nullable String name) {
Expand Down Expand Up @@ -184,7 +184,8 @@ private static <T> boolean handle(
}
}
} else if (handleChildren && handler != null) {
// if the child item type is applicable and there is a handler, iterate over children
// if the child item type is applicable and there is a handler, iterate over
// children
Iterator<T> iter = supplier.get().iterator();
while (iter.hasNext()) {
T item = iter.next();
Expand Down Expand Up @@ -394,7 +395,8 @@ private Context(
@Nullable TargetType itemType) {

// determine the set of effective item types to search for
// this helps with short-circuit searching for parts of the graph that cannot match
// this helps with short-circuit searching for parts of the graph that cannot
// match
@NonNull Set<TargetType> targetItemTypes = ObjectUtils.notNull(EnumSet.allOf(TargetType.class));
filterTypes(targetItemTypes, "by-name", NAME_TYPES, objectName, itemType);
filterTypes(targetItemTypes, "by-class", CLASS_TYPES, objectClass, itemType);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,10 @@ public DefaultResult visitControl(IRequiredValueModelNodeItem item, DefaultResul
if (parent.getValue() instanceof Control && SelectionStatus.SELECTED.equals(index.getSelectionStatus(parent))) {
retval.removeControl(control);
}
// Cancel promotion of this control if control is already at the top level (control's parent is Catalog)
// If already at top level, then promotion is not needed because it was added by Import class
// Cancel promotion of this control if control is already at the top level
// (control's parent is Catalog)
// If already at top level, then promotion is not needed because it was added by
// Import class
if (parent.getValue() instanceof Catalog) {
retval.removeControl(control);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,11 @@ public IIdentifierParser getIdentifierParser() {
}

/**
* Get the possible item types that can be searched in the order in which the identifier will be
* looked up.
* Get the possible item types that can be searched in the order in which the
* identifier will be looked up.
* <p>
* The {@code reference} object is provided to allow for context sensitive item type tailoring.
* The {@code reference} object is provided to allow for context sensitive item
* type tailoring.
*
* @param reference
* the reference object
Expand All @@ -79,7 +80,8 @@ public IIdentifierParser getIdentifierParser() {
* @param item
* the referenced item
* @param visitorContext
* the reference visitor state, which can be used for further processing
* the reference visitor state, which can be used for further
* processing
* @return {@code true} if the hit was handled or {@code false} otherwise
* @throws ProfileResolutionEvaluationException
* if there was an error handing the index hit
Expand Down Expand Up @@ -149,7 +151,8 @@ protected void handleUnselected( // NOPMD noop default
* @param item
* the referenced item
* @param visitorContext
* the reference visitor state, which can be used for further processing
* the reference visitor state, which can be used for further
* processing
* @throws ProfileResolutionEvaluationException
* if there was an error handing the index hit
*/
Expand All @@ -162,8 +165,8 @@ protected void handleSelected( // NOPMD noop default
}

/**
* Handle an index miss for a reference. This occurs when the referenced item was not found in the
* index.
* Handle an index miss for a reference. This occurs when the referenced item
* was not found in the index.
* <p>
* Subclasses can override this method to perform extra processing.
*
Expand All @@ -176,8 +179,10 @@ protected void handleSelected( // NOPMD noop default
* @param identifier
* the parsed identifier
* @param visitorContext
* the reference visitor state, which can be used for further processing
* @return {@code true} if the reference is handled by this method or {@code false} otherwise
* the reference visitor state, which can be used for further
* processing
* @return {@code true} if the reference is handled by this method or
* {@code false} otherwise
* @throws ProfileResolutionEvaluationException
* if there was an error handing the index miss
*/
Expand All @@ -192,8 +197,9 @@ protected boolean handleIndexMiss(
}

/**
* Handle the case where the identifier was not a syntax match for an expected identifier. This can
* occur when the reference is malformed, using an unrecognized syntax.
* Handle the case where the identifier was not a syntax match for an expected
* identifier. This can occur when the reference is malformed, using an
* unrecognized syntax.
* <p>
* Subclasses can override this method to perform extra processing.
*
Expand All @@ -202,8 +208,10 @@ protected boolean handleIndexMiss(
* @param reference
* the identifier reference object generating the hit
* @param visitorContext
* the reference visitor state, which can be used for further processing
* @return {@code true} if the reference is handled by this method or {@code false} otherwise
* the reference visitor state, which can be used for further
* processing
* @return {@code true} if the reference is handled by this method or
* {@code false} otherwise
* @throws ProfileResolutionEvaluationException
* if there was an error handing the index miss due to a non match
*/
Expand All @@ -222,7 +230,8 @@ public boolean handleReference(
@NonNull ReferenceCountingVisitor.Context visitorContext) {
String referenceText = getReferenceText(type);

// if the reference text does not exist, ignore the reference; otherwise, handle it.
// if the reference text does not exist, ignore the reference; otherwise, handle
// it.
return referenceText == null
|| handleIdentifier(contextItem, type, getIdentifierParser().parse(referenceText), visitorContext);
}
Expand All @@ -237,8 +246,10 @@ public boolean handleReference(
* @param identifier
* the identifier
* @param visitorContext
* the reference visitor state, which can be used for further processing
* @return {@code true} if the reference is handled by this method or {@code false} otherwise
* the reference visitor state, which can be used for further
* processing
* @return {@code true} if the reference is handled by this method or
* {@code false} otherwise
* @throws ProfileResolutionEvaluationException
* if there was an error handing the reference
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,17 @@ public boolean handleIndexMiss(
};

/**
* A callback used to handle the case where an identifier could not be parsed from the reference
* text.
* A callback used to handle the case where an identifier could not be parsed
* from the reference text.
*
* @param policy
* the reference policy for this reference
* @param reference
* the reference object
* @param visitor
* the reference visitor used to resolve referenced objects
* @return {@code true} if the reference is considered handled, or {@code false} otherwise
* @return {@code true} if the reference is considered handled, or {@code false}
* otherwise
*/
default boolean handleIdentifierNonMatch(
@NonNull ICustomReferencePolicy<TYPE> policy,
Expand All @@ -67,8 +68,8 @@ default boolean handleIdentifierNonMatch(
}

/**
* A callback used to handle the case where an identifier could be parsed from the reference text,
* but the index didn't contain a matching entity.
* A callback used to handle the case where an identifier could be parsed from
* the reference text, but the index didn't contain a matching entity.
*
* @param policy
* the reference policy for this reference
Expand All @@ -80,7 +81,8 @@ default boolean handleIdentifierNonMatch(
* the parsed identifier
* @param visitor
* the reference visitor used to resolve referenced objects
* @return {@code true} if the reference is considered handled, or {@code false} otherwise
* @return {@code true} if the reference is considered handled, or {@code false}
* otherwise
*/
default boolean handleIndexMiss(
@NonNull ICustomReferencePolicy<TYPE> policy,
Expand All @@ -92,8 +94,8 @@ default boolean handleIndexMiss(
}

/**
* A callback used to handle the case where an identifier could be parsed and the index contains a
* matching entity.
* A callback used to handle the case where an identifier could be parsed and
* the index contains a matching entity.
*
* @param policy
* the reference policy for this reference
Expand All @@ -103,7 +105,8 @@ default boolean handleIndexMiss(
* the entity that is referenced
* @param visitor
* the reference visitor used to resolve referenced objects
* @return {@code true} if the reference is considered handled, or {@code false} otherwise
* @return {@code true} if the reference is considered handled, or {@code false}
* otherwise
*/
default boolean handleIndexHit(
@NonNull ICustomReferencePolicy<TYPE> policy,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ public String update(@NonNull String reference, @NonNull String newIdentifier) {
String parse(@NonNull String referenceText);

/**
* Substitute the provided {@code newIdentifier} with the identifier in the {@code referenceText}.
* Substitute the provided {@code newIdentifier} with the identifier in the
* {@code referenceText}.
*
* @param referenceText
* the reference text containing the original identifier
Expand Down
Loading
Loading