Home | Trees | Indices | Help |
---|
|
object --+ | basestring --+ | str --+ | NameParser
Parser for names in Arch archive namespace. Implements name parsing natively for performance reasons. It should behave exactly as tla, any discrepancy is to be considered a bug, unless tla is obviously buggy. Bare names of archives, category, branch, versions ids, and unqualified patchlevel names are not part of the archive namespace. They can be validated using static methods. :group Specificity level: is_category, is_package, is_version :group Presence name components: has_archive, has_category, has_package, has_version, has_revision, has_patchlevel :group Getting name components: get_archive, get_nonarch, get_category, get_branch, get_package, get_version, get_package_version, get_patchlevel :group Validating name components: is_archive_name, is_category_name, is_branch_name, is_version_id, is_patchlevel
Instance Methods | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from |
Class Methods | |||
|
|||
|
|||
|
|||
|
|||
|
Properties | |
Inherited from |
Method Details |
Create a parser object for the given string. :param s: string to parse. :type s: str
|
Get the archive part of the name :return: archive part of the name, or the default archive name, or None if the name is invalid. :rtype: str, None |
Get the branch part of name :return: part of the name which identifies the branch within the category, or None if the name is invalid or the empty string if the name has no branch component. :rtype: str, None |
Get the Category name :return: part of the name which identifies the category within the archive, or None if the name is invalid or has no category component. :rtype: str, None |
Get Non-archive part of the name :return: the name without the archive component, or None if the name is invalid or has no archive component. :rtype: str, None |
Get the package name :return: part of the name including the category part and branch part (if present) of the name, or None if the name is not valid. :rtype: str, None |
Get the unqualified version name :return: part of the name identifying a version in an archive, or None if the name does not contain a version id or is invalid. :rtype: str, None |
Get the patch-level part of the name :return: part of the name identifying a patch in a version, or None if the name is not a revision or is invalid. :rtype: str, None |
Get the version id part of the name :return: part of the name identifying a version in a branch, or None if the name is invalid or does not contain a version id. :rtype: str, None |
Does this include an archive name? :rtype: bool |
Does this include an category name? All valid names include a category. :rtype: bool |
Does this include an package name? All valid names include a package. :rtype: bool |
Does this include a revision name? :rtype: bool |
Does this include a version name? :rtype: bool |
Is this string a valid archive name? :param s: string to validate. :type s: str :rtype: bool |
Is this string a valid category name? Currently does the same thing as is_category_name, but that might change in the future when the namespace evolves and it is more expressive to have different functions. :param s: string to validate. :type s: str :rtype: bool |
Is this a category name? :rtype: bool |
Is this string a valid category name? Currently does the same thing as is_branch_name, but that might change in the future when the namespace evolves and it is more expressive to have different functions. :param s: string to validate. :type s: str :rtype: bool |
Is this a package name (category or branch name)? :rtype: bool |
Is this string a valid unqualified patch-level name? :param s: string to validate. :type s: str :rtype: bool |
Is this a version name? :rtype: bool |
Is this string a valid version id? :param s: string to validate. :type s: str :rtype: bool |
Create the Category, Branch, Version or Revision object Create the namespace object corresponding to the name. This requires some guessing so, for example, nameless branches will not be recognized. This function is unsafe (categories and nameless branches are not distinguished) and is not really useful. Internally, only namespace objects should be used, and external output should be validated in a more specific way. |
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0beta1 on Wed Sep 5 09:53:13 2007 | http://epydoc.sourceforge.net |