Class Pkg

java.lang.Object
org.basex.query.util.pkg.Pkg

public final class Pkg extends Object
EXPath or internal package. Internal packages have no version.
Author:
BaseX Team 2005-21, BSD License, Rositsa Shadura
  • Constructor Details

    • Pkg

      public Pkg(String name)
      Constructor.
      Parameters:
      name - name of package
  • Method Details

    • path

      public Pkg path(String pth)
      Sets the package path and updates the package type.
      Parameters:
      pth - path
      Returns:
      self reference
    • id

      public String id()
      Returns the package id, consisting of the package name/URI and, optionally, its version.
      Returns:
      id
    • name

      public String name()
      Returns the package name.
      Returns:
      name
    • abbrev

      public String abbrev()
      Returns the short name.
      Returns:
      short name
    • spec

      public String spec()
      Returns the package spec.
      Returns:
      spec
    • path

      public String path()
      Returns the path to the package.
      Returns:
      directory
    • version

      public String version()
      Returns the package version.
      Returns:
      version ("-" if this is no EXPath type)
    • type

      public PkgType type()
      Returns the package type.
      Returns:
      package type
    • merge

      public Pkg merge(Pkg pkg)
      Merges information of two packages.
      Parameters:
      pkg - package to merge
      Returns:
      reference to package with merged information
    • name

      public static String name(String pkg)
      Extracts the package name from a unique package name.
      Parameters:
      pkg - unique package name: name-version
      Returns:
      package name
    • version

      public static String version(String pkg)
      Extracts the package version from a unique package name.
      Parameters:
      pkg - unique package name: name-version
      Returns:
      package version