Class XsdSimpleType

    • Method Detail

      • validateSchemaRules

        public void validateSchemaRules()
        Runs verifications on each concrete element to ensure that the XSD schema rules are verified.
        Overrides:
        validateSchemaRules in class XsdNamedElements
      • rule2

        private void rule2()
        Asserts that the current object has the required name attribute when not being a direct child of the XsdSchema element. Throws an exception if the required attribute is not present.
      • rule3

        private void rule3()
        Asserts if the current has no value for its name attribute while being a direct child of the top level XsdSchema element, which is required. Throws an exception if no name is present.
      • accept

        public void accept​(XsdAbstractElementVisitor visitorParam)
        Description copied from class: XsdAbstractElement
        Base method for all accept methods. It serves as a way to guarantee that every accept call assigns the parent field.
        Overrides:
        accept in class XsdAbstractElement
        Parameters:
        visitorParam - The visitor that is visiting the current instance.
      • clone

        public XsdSimpleType clone​(@NotNull
                                   java.util.Map<java.lang.String,​java.lang.String> placeHolderAttributes)
        Performs a copy of the current object for replacing purposes. The cloned objects are used to replace UnsolvedReference objects in the reference solving process.
        Overrides:
        clone in class XsdAbstractElement
        Parameters:
        placeHolderAttributes - The additional attributes to add to the clone.
        Returns:
        A copy of the object from which is called upon.
      • getList

        public XsdList getList()
      • getAllRestrictions

        public java.util.List<XsdRestriction> getAllRestrictions()
        This method obtains all the restrictions for the current XsdSimpleType element. It also joins multiple restrictions with the same base attribute in the same XsdRestriction object, if a overlap doesn't occur. In case of restriction overlap an exception is thrown because the information on the xsd file is contradictory.
        Returns:
        A list of restrictions.
      • updateExistingRestriction

        private void updateExistingRestriction​(XsdRestriction existing,
                                               XsdRestriction newRestriction)
        Joins two distinct XsdRestriction instances. This method assumes that the information of both XsdRestriction objects don't have overlapping or contradictory information.
        Parameters:
        existing - The existing restriction.
        newRestriction - The new restriction.
      • existsRestrictionOverlap

        private boolean existsRestrictionOverlap​(XsdRestriction existing,
                                                 XsdRestriction newRestriction)
        Checks for any restriction overlap between two different XsdRestriction instances.
        Parameters:
        existing - The existing restriction.
        newRestriction - The second restriction found.
        Returns:
        True if an overlap between the restrictions occur, false if it doesn't occur.
      • setList

        public void setList​(XsdList list)
      • setUnion

        public void setUnion​(XsdUnion union)
      • setRestriction

        public void setRestriction​(XsdRestriction restriction)
      • getFinalObj

        public java.lang.String getFinalObj()