net.dpml.library.info
Class ImportDirective

java.lang.Object
  extended by net.dpml.library.info.AbstractDirective
      extended by net.dpml.library.info.ImportDirective
All Implemented Interfaces:
Serializable

public final class ImportDirective
extends AbstractDirective

The ImportDirective class describes a the import of resource via a file or uri reference.

Version:
1.2.0
Author:
Digital Product Meta Library
See Also:
Serialized Form

Nested Class Summary
static class ImportDirective.Mode
          Mode of inclusion.
 
Field Summary
static ImportDirective.Mode FILE
          File strategy constant.
static ImportDirective.Mode URI
          URI strategy constant.
 
Constructor Summary
ImportDirective(ImportDirective.Mode mode, String value)
          Creation of a new import directive.
ImportDirective(ImportDirective.Mode mode, String value, Properties properties)
          Creation of a new import directive.
 
Method Summary
 boolean equals(Object other)
          Compare this object with another for equality.
 ImportDirective.Mode getMode()
          Return the import mode.
 String getValue()
          Return the import value.
 int hashCode()
          Compute the hash value.
 
Methods inherited from class net.dpml.library.info.AbstractDirective
equals, getProperties, getProperty, hashArray, hashValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

URI

public static final ImportDirective.Mode URI
URI strategy constant.


FILE

public static final ImportDirective.Mode FILE
File strategy constant.

Constructor Detail

ImportDirective

public ImportDirective(ImportDirective.Mode mode,
                       String value)
Creation of a new import directive.

Parameters:
mode - the import mode
value - the value (file or uri depending on mode)

ImportDirective

public ImportDirective(ImportDirective.Mode mode,
                       String value,
                       Properties properties)
Creation of a new import directive.

Parameters:
mode - the import mode
value - the value (file or uri depending on mode)
properties - supplimentary properties
Method Detail

getMode

public ImportDirective.Mode getMode()
Return the import mode.

Returns:
the mode

getValue

public String getValue()
Return the import value.

Returns:
the value

equals

public boolean equals(Object other)
Compare this object with another for equality.

Overrides:
equals in class AbstractDirective
Parameters:
other - the other object
Returns:
true if equal

hashCode

public int hashCode()
Compute the hash value.

Overrides:
hashCode in class AbstractDirective
Returns:
the hashcode value