Package gov.nasa.pds.tools.validate
Class ValidationTarget
java.lang.Object
gov.nasa.pds.tools.validate.ValidationTarget
- All Implemented Interfaces:
Comparable<ValidationTarget>
public class ValidationTarget extends Object implements Comparable<ValidationTarget>
Represents a location within a validation subtree that can
have errors reported against it.
-
Constructor Summary
Constructors Constructor Description ValidationTarget(String location, TargetType type)Creates an instance with a given location.ValidationTarget(URL target)Creates a new instance. -
Method Summary
Modifier and Type Method Description intcompareTo(ValidationTarget other)booleanequals(Object obj)IdentifiergetIdentifier()Gets the identification string for this target.StringgetLocation()Gets the target location.StringgetName()Gets the name of the target.TargetTypegetType()Gets the target type.inthashCode()booleanisLabel()Tests whether the target is a label.voidsetIdentifier(Identifier identifier)Sets the identification string for this target.voidsetLabel(boolean flag)Sets whether the target is a label.voidsetLocation(String location)Sets the target location.voidsetName(String newName)Sets the target name.voidsetType(TargetType type)Sets the target type.StringtoString()
-
Constructor Details
-
ValidationTarget
Creates a new instance.- Parameters:
target- the target file or directory
-
ValidationTarget
Creates an instance with a given location.- Parameters:
location- the location
-
-
Method Details
-
getType
Gets the target type.- Returns:
- the target type
-
setType
Sets the target type.- Parameters:
type- the new target type
-
getLocation
Gets the target location.- Returns:
- the location
-
setLocation
Sets the target location.- Parameters:
location- the new location
-
getName
Gets the name of the target.- Returns:
- the target name
-
setName
Sets the target name.- Parameters:
newName- the new target name
-
isLabel
public boolean isLabel()Tests whether the target is a label.- Returns:
- true, if the target is a label
-
setLabel
public void setLabel(boolean flag)Sets whether the target is a label.- Parameters:
flag- true, if the target is a label
-
getIdentifier
Gets the identification string for this target.- Returns:
- the identifier
-
setIdentifier
Sets the identification string for this target.- Parameters:
identifier- the identifier
-
compareTo
- Specified by:
compareToin interfaceComparable<ValidationTarget>
-
toString
-
hashCode
public int hashCode() -
equals
-