Esempio n. 1
0
        /**
         * Read a tag with a given tag name. The tag will be read out of the class
         * defined in getTagEnum().
         *
         * @param tagname
         *            A RPM tag name
         * @return The id of the RPM tag
         * @throws IllegalArgumentException
         *             if the tag name was not found
         */
        public long getTagIdForName(String tagname)
        {
            EnumIf e = RPMHeaderTag.getEnumByName(tagname);

            if (e == null)
            {
                throw new java.lang.IllegalArgumentException("unknown tag with name <"
                                                             + tagname + ">");
            }

            return(e.getId());
        }
Esempio n. 2
0
 /**
  * Test if the given tagname is associated with a valid tag
  *
  * @param tagname
  *            The name of a tag
  * @return TRUE if the tagname is valid
  */
 public bool isValidTag(String tagname)
 {
     return(RPMHeaderTag.getEnumByName(tagname) != null);
 }