org.apache.xmlgraphics.ps

## Class PSResource

- java.lang.Object
- - org.apache.xmlgraphics.ps.PSResource

- All Implemented Interfaces:
    java.lang.Comparable
  Direct Known Subclasses:
    PSProcSet

      public class PSResource
      extends java.lang.Object
      implements java.lang.Comparable

  Represents a PostScript resource (file, font, procset etc.).

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `TYPE_CIDFONT` A CIDFont resource.
    `static java.lang.String` | `TYPE_CMAP` A CMap resource.
    `static java.lang.String` | `TYPE_ENCODING` a procset resource
    `static java.lang.String` | `TYPE_FILE` a file resource
    `static java.lang.String` | `TYPE_FONT` a font resource
    `static java.lang.String` | `TYPE_FORM` a procset resource
    `static java.lang.String` | `TYPE_PATTERN` a procset resource
    `static java.lang.String` | `TYPE_PROCSET` a procset resource

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PSResource(java.lang.String type, java.lang.String name)` Main constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compareTo(java.lang.Object o)`
    `boolean` | `equals(java.lang.Object obj)`
    `java.lang.String` | `getName()`
    `java.lang.String` | `getResourceSpecification()`
    `java.lang.String` | `getType()`
    `int` | `hashCode()`
    `java.lang.String` | `toString()`

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### TYPE_FILE

          public static final java.lang.String TYPE_FILE

      a file resource
      See Also:
        Constant Field Values

    - #### TYPE_FONT

          public static final java.lang.String TYPE_FONT

      a font resource
      See Also:
        Constant Field Values

    - #### TYPE_PROCSET

          public static final java.lang.String TYPE_PROCSET

      a procset resource
      See Also:
        Constant Field Values

    - #### TYPE_PATTERN

          public static final java.lang.String TYPE_PATTERN

      a procset resource
      See Also:
        Constant Field Values

    - #### TYPE_FORM

          public static final java.lang.String TYPE_FORM

      a procset resource
      See Also:
        Constant Field Values

    - #### TYPE_ENCODING

          public static final java.lang.String TYPE_ENCODING

      a procset resource
      See Also:
        Constant Field Values

    - #### TYPE_CMAP

          public static final java.lang.String TYPE_CMAP

      A CMap resource.
      See Also:
        Constant Field Values

    - #### TYPE_CIDFONT

          public static final java.lang.String TYPE_CIDFONT

      A CIDFont resource.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### PSResource

          public PSResource(java.lang.String type,
                            java.lang.String name)

      Main constructor
      Parameters:
        `type` - type of the resource
        `name` - name of the resource

  - ### Method Detail

    - #### getType

          public java.lang.String getType()

      Returns:
        the type of the resource

    - #### getName

          public java.lang.String getName()

      Returns:
        the name of the resource

    - #### getResourceSpecification

          public java.lang.String getResourceSpecification()

      Returns:
        the <resource> specification as defined in DSC v3.0 spec.

    - #### equals

          public boolean equals(java.lang.Object obj)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### compareTo

          public int compareTo(java.lang.Object o)

      Specified by:
        `compareTo` in interface `java.lang.Comparable`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

Copyright 1999-2025 The Apache Software Foundation. All Rights Reserved.