Interface MetaDataObject

    • Method Detail

      • listAttributes

        @Deprecated
        List<NameClassPair> listAttributes()
        Deprecated.
        - use getAttributes() instead, don't override it, use getAdditionalAttributes to specify additional ones
        Retrieves all attributes on this MetaDataObject.
        Returns:
        a List containing NameClassPair objects, each of which contains the name of a parameter and the Class of its value. For primitive types, the wrapper classes will be returned (e.g. java.lang.Integer instead of int).
      • getAttributeValue

        Object getAttributeValue​(String aName)
        Retrieves the value of an attribute of this MetaDataObject.
        Parameters:
        aName - the name of the parameter to get
        Returns:
        the value of the parameter named aName. Returns null if there is no attribute with that name.
      • isModifiable

        boolean isModifiable()
        Returns whether this MetaDataObject allows the values of its attributes to be modified.
        Returns:
        true if and only if this object's attributes may be modified.
      • clone

        Object clone()
        Creates a clone of this MetaDataObject. This performs a "deep" copy by cloning all attribute values that are also MetaDataObjects.
        Returns:
        a clone of this MetaDataObject
      • equals

        boolean equals​(Object aObj)
        Determines if this object is equal to another. Two MetaDataObjects are equal if they share the same attributes and the same values for those attributes.
        Overrides:
        equals in class Object
        Parameters:
        aObj - an object with which to compare this object
        Returns:
        true if and only if this object equals aObj
      • getSourceUrl

        URL getSourceUrl()
        Gets the URL from which this object was parsed. When this object is parsed from an XML file, this is set by the parser to the URL of the source file XML file. If the object has been created by some other method, the source URL will not be known, and this method will return null.

        This setting is used to resolve imports and is also included in exception messages to indicate the source of the problem.

        Returns:
        the source URL from which this object was parsed
      • getSourceUrlString

        String getSourceUrlString()
        If the sourceURL of this object is non-null, returns its string representation. If it is null, returns "<unknown>". Useful for error messages.
        Returns:
        the source URL as a string, or "<unknown>"
      • setSourceUrl

        void setSourceUrl​(URL aUrl)
        Sets the URL from which this object was parsed. Typically only the XML parser sets this. This recursively sets the source URL of all descendants of this object.
        Parameters:
        aUrl - the location of the XML file from which this object was parsed