FileDocCategorySizeDatePackage
ResourceLocation.javaAPI DocApache Ant 1.703369Wed Dec 13 06:16:20 GMT 2006org.apache.tools.ant.types

ResourceLocation

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

see
org.apache.xml.resolver.Catalog
since
Ant 1.6

Fields Summary
private String
publicId
publicId of the dtd/entity.
private String
location
location of the dtd/entity - a file/resource/URL.
private URL
base
base URL of the dtd/entity, or null. If null, the Ant project basedir is assumed. 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.
Constructors Summary
Methods Summary
public java.net.URLgetBase()

return
the base of the resource identified by the publicId.

        return base;
    
public java.lang.StringgetLocation()

return
the location of the resource identified by the publicId.

        return location;
    
public java.lang.StringgetPublicId()

return
the publicId of the resource.

        return publicId;
    
public voidsetBase(java.net.URL base)

param
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.

        this.base = base;
    
public voidsetLocation(java.lang.String location)

param
location the location of the resource associated with the publicId.

        this.location = location;
    
public voidsetPublicId(java.lang.String publicId)

param
publicId uniquely identifies the resource.


    //-- Methods ---------------------------------------------------------------

               
        
        this.publicId = publicId;