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.
-
-
Field Summary
Fields Modifier and Type Field Description static HashMap<String,ValidationTarget>
cachedTargets
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ValidationTarget
build(String targetLocation, TargetType type)
static ValidationTarget
build(URL target)
static ValidationTarget
build(URL target, URL label)
int
compareTo(ValidationTarget other)
boolean
equals(Object obj)
Identifier
getIdentifier()
Gets the identification string for this target.String
getLocation()
Gets the target location.String
getName()
Gets the name of the target.TargetType
getType()
Gets the target type.URL
getUrl()
int
hashCode()
boolean
isLabel()
Tests whether the target is a label.void
setIdentifier(Identifier identifier)
Sets the identification string for this target.void
setLabel(boolean flag)
Sets whether the target is a label.protected void
setLocation(String location)
Sets the target location.void
setName(String newName)
Sets the target name.void
setType(TargetType type)
Sets the target type.String
toString()
-
-
-
Field Detail
-
cachedTargets
public static HashMap<String,ValidationTarget> cachedTargets
-
-
Method Detail
-
build
public static ValidationTarget build(URL target)
-
build
public static ValidationTarget build(URL target, URL label)
-
build
public static ValidationTarget build(String targetLocation, TargetType type) throws MalformedURLException
- Throws:
MalformedURLException
-
getType
public TargetType getType()
Gets the target type.- Returns:
- the target type
-
setType
public void setType(TargetType type)
Sets the target type.- Parameters:
type
- the new target type
-
getLocation
public String getLocation()
Gets the target location.- Returns:
- the location
-
setLocation
protected void setLocation(String location)
Sets the target location.- Parameters:
location
- the new location
-
getName
public String getName()
Gets the name of the target.- Returns:
- the target name
-
setName
public void setName(String newName)
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
public Identifier getIdentifier()
Gets the identification string for this target.- Returns:
- the identifier
-
setIdentifier
public void setIdentifier(Identifier identifier)
Sets the identification string for this target.- Parameters:
identifier
- the identifier
-
compareTo
public int compareTo(ValidationTarget other)
- Specified by:
compareTo
in interfaceComparable<ValidationTarget>
-
getUrl
public URL getUrl()
-
-