Package org.dlese.dpc.repository
Class DirInfo
java.lang.Object
org.dlese.dpc.repository.DirInfo
- All Implemented Interfaces:
Serializable
Data structure that holds information about a directory of metadata files. Includes
the directory name and the metadata format for the files in that directory.
- Author:
- John Weatherley
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks equality of two DirInfo objects.getAttribute(String key) Gets an attribute Object from this DirInfo.Gets the dir attribute of the DirInfo objectGets the format attribute of the DirInfo objectbooleanhasDirectory(File directory) Determines whether this directory is the same as the given directory.voidsetAttribute(String key, Object attribute) Sets an attribute Object that will be available for access using the given key.voidsetDirectory(String val) Sets the dir attribute of the DirInfo objectvoidSets the format attribute of the DirInfo objecttoString()Provides a String representataion for this DirInfo.
-
Constructor Details
-
DirInfo
public DirInfo()Constructor for the DirInfo object -
DirInfo
Constructor for the DirInfo object- Parameters:
dir- The direcotory pathformat- The metadata format for the files in the directory
-
-
Method Details
-
getDirectory
Gets the dir attribute of the DirInfo object- Returns:
- The dir value
-
setDirectory
Sets the dir attribute of the DirInfo object- Parameters:
val- The new dir value
-
hasDirectory
Determines whether this directory is the same as the given directory.- Parameters:
directory- A directory- Returns:
- True if this directory is the same
-
getFormat
Gets the format attribute of the DirInfo object- Returns:
- The format value
-
setFormat
Sets the format attribute of the DirInfo object- Parameters:
val- The new format value
-
setAttribute
Sets an attribute Object that will be available for access using the given key. The object MUST be serializable.- Parameters:
key- The key used to reference the attribute.attribute- Any Java Object that is Serializable.
-
getAttribute
Gets an attribute Object from this DirInfo.- Parameters:
key- The key used to reference the attribute.- Returns:
- The Java Object that was stored under the given key or null if none exists.
-
toString
Provides a String representataion for this DirInfo. This method may be used for debugging to see what is in the DirInfo. This method is also used it theequals(Object)method. -
equals
Checks equality of two DirInfo objects.
-