Class XsdAttribute

    • Field Detail

      • defaultElement

        private java.lang.String defaultElement
        A default value for the current XsdAttribute instance. This value and fixed shouldn't be present at the same time.
      • fixed

        private java.lang.String fixed
        Specifies a fixed value for the current XsdAttribute instance. This value and defaultElement shouldn't be present at the same time.
      • type

        private java.lang.String type
        Specifies either a built-in data type for the current XsdAttribute instance or serves as a reference to a XsdSimpleType instance. In the case of being used as a reference to a XsdSimpleType instance its value is used to create an UnsolvedReference using its value as ref to be resolved later in the parsing process.
      • form

        private FormEnum form
        Specifies if the current XsdAttribute attribute is "qualified" or "unqualified".
      • use

        private UsageEnum use
        Specifies how this XsdAttribute should be used. The possible values are: required, prohibited, optional.
    • Method Detail

      • getFormDefaultValue

        private static java.lang.String getFormDefaultValue​(XsdAbstractElement parent)
      • validateSchemaRules

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

        private void rule3()
        Asserts if the current object has a ref attribute at the same time as either a simpleType as children, a form attribute or a type attribute. Throws an exception in that case.
      • rule2

        private void rule2()
        Asserts if the current object has the fixed and default attributes at the same time, which isn't allowed, throwing an exception in that case.
      • 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 XsdAttribute 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.
      • replaceUnsolvedElements

        public void replaceUnsolvedElements​(NamedConcreteElement elementWrapper)
        Receives a NamedConcreteElement that should be the one requested earlier. * In the XsdAttribute constructor: this.simpleType = new UnsolvedReference(type, placeHolder); XsdParser.getInstance().addUnsolvedReference((UnsolvedReference) this.simpleType); This implies that the object being received is the object that is being referred with the type String.
        Overrides:
        replaceUnsolvedElements in class XsdAbstractElement
        Parameters:
        elementWrapper - The object that should be wrapping the requested XsdSimpleType object.
      • setSimpleType

        public void setSimpleType​(ReferenceBase simpleType)
      • getType

        public java.lang.String getType()
      • getUse

        public java.lang.String getUse()
      • getForm

        public java.lang.String getForm()
      • getFixed

        public java.lang.String getFixed()
      • getAllRestrictions

        public java.util.List<XsdRestriction> getAllRestrictions()