Class IdRefPlugin

  • All Implemented Interfaces:
    NodeValidatorPlugin

    public final class IdRefPlugin
    extends java.lang.Object
    Validates that the value contained in a string shape is a valid shape ID and that the shape ID targets a shape that is in the set of shapes matching the selector.

    Relative shape IDs may resolve to public prelude shapes if they don't resolve to shapes defined in the same namespace as the ID.

    • Constructor Summary

      Constructors 
      Constructor Description
      IdRefPlugin()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<java.lang.String> apply​(Shape shape, Node value, ShapeIndex index)
      Applies the plugin to the given shape, node value, and shape index.
      protected java.util.List<java.lang.String> check​(Shape shape, IdRefTrait trait, StringNode node, ShapeIndex index)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IdRefPlugin

        public IdRefPlugin()
    • Method Detail

      • apply

        public final java.util.List<java.lang.String> apply​(Shape shape,
                                                            Node value,
                                                            ShapeIndex index)
        Description copied from interface: NodeValidatorPlugin
        Applies the plugin to the given shape, node value, and shape index.
        Specified by:
        apply in interface NodeValidatorPlugin
        Parameters:
        shape - Shape being checked.
        value - Value being evaluated.
        index - Shape index used to traverse the model.
        Returns:
        Returns any validation messages that were encountered.