Interface PuzzleComponent

  • All Known Subinterfaces:
    All Known Implementing Classes:
    PuzzlePiece, PuzzlePieceSet

    public interface PuzzleComponent
    The first purpose of this interface is to provide a kind of "piece of a puzzle" representing the key definitions of a schema and their relationship:
    • Element PuzzlePiece
    • Attribute PuzzlePiece
    • Attribute Value PuzzlePiece
    • Attribute Datatype PuzzlePiece

    The second purpose of this interface is to hide the differences between one definition and a Collection of definitions. By this you will be able to use single definitions and collections of definitions as method parameters. The method getCollection() is a helper method for this.

    • Method Detail

      • getChildElements

        PuzzlePieceSet getChildElements()
        ELEMENT PuzzlePiece only: Get all child element Definitions
        The child Definitions of this PuzzleComponent
      • getAttributes

        PuzzlePieceSet getAttributes()
        ELEMENT PuzzlePiece only: Get all attribute Definitions
        The attribute Definitions of this PuzzleComponent
      • getDatatypes

        PuzzlePieceSet getDatatypes()
        ATTRIBUTE PuzzlePiece only: Get all datatype Definitions
        The datatype Definitions of this PuzzleComponent
      • getValues

        PuzzlePieceSet getValues()
        ATTRIBUTE PuzzlePiece only: Get all value Definitions
        The constant value Definitions of this PuzzleComponent
      • getParents

        PuzzlePieceSet getParents()
        Get all parent Definitions
        The parent Definitions of this PuzzleComponent
      • getType

        MSVExpressionType getType()
        Get type of PuzzlePiece [ELEMENT, ATTRIBUTE, VALUE, DATA]
        The type of this PuzzleComponent
      • canHaveText

        boolean canHaveText()
        Determines whether this PuzzleComponent allows a text node as child.
        True if a text node is allowed, false otherwise
      • isSingleton

        boolean isSingleton​(PuzzleComponent child)
        Determines whether the child PuzzlePiece(s) is/are singleton(s)

        Convention: If child is a collection this method returns false if one child element is no singleton. If this is a collection this method returns false if child is no singleton for one element of this.

        child - PuzzleComponent child
        True if child is defined as Singleton, falso otherwise.
      • getCollection

        Collection<PuzzlePiece> getCollection()
        Method to treat NamedDefined as a Collection of PuzzlePiece
        Collection of PuzzlePiece objects