Package org.apache.tools.ant.types

# Class ResourceLocation

java.lang.Object
org.apache.tools.ant.types.ResourceLocation

Direct Known Subclasses:
  `DTDLocation`

public class ResourceLocation extends Object

Helper class to handle the `<dtd>` and `<entity>` nested elements. These correspond to the `PUBLIC` and `URI` catalog entry types, respectively, as defined in the OASIS "Open Catalog" standard.

Possible Future Enhancements:

- Bring the Ant element names into conformance with the OASIS standard
- Add support for additional OASIS catalog entry types

Since:
  Ant 1.6
See Also:
  - `Catalog`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ResourceLocation()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `URL`
  `getBase()`
  `String`
  `getLocation()`
  `String`
  `getPublicId()`
  `void`
  `setBase(URL base)`
  `void`
  `setLocation(String location)`
  `void`
  `setPublicId(String publicId)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ResourceLocation

    public ResourceLocation()

- ## Method Details

  - ### setPublicId

    public void setPublicId(String publicId)
    Parameters:
      `publicId` - uniquely identifies the resource.

  - ### setLocation

    public void setLocation(String location)
    Parameters:
      `location` - the location of the resource associated with the publicId.

  - ### setBase

    public void setBase(URL base)
    Parameters:
      `base` - the base URL of the resource associated with the publicId. If the location specifies a relative URL/pathname, it is resolved using the base. The default base for an external catalog file is the directory in which it is located.

  - ### getPublicId

    public String getPublicId()
    Returns:
      the publicId of the resource.

  - ### getLocation

    public String getLocation()
    Returns:
      the location of the resource identified by the publicId.

  - ### getBase

    public URL getBase()
    Returns:
      the base of the resource identified by the publicId.