public interface TargetRegistrar
The registrar enables answering these questions:
Modifier and Type | Method and Description |
---|---|
void |
addIdentifierReference(String referenceLocation,
String identifier)
Adds a reference to a target identifier.
|
void |
addTarget(String parentLocation,
TargetType type,
String location)
Indicates that a target was discovered in the subtree
being validated.
|
void |
addTargetReference(String referenceLocation,
String targetLocation)
Adds a reference from a label to a target.
|
Collection<ValidationTarget> |
getChildTargets(ValidationTarget parent)
Gets the locations of children of a given target.
|
Collection<IdentifierReference> |
getDanglingReferences()
Gets a collection of identifiers that are referenced but not defined.
|
int |
getLabelCount()
Gets the number of labels encountered so far.
|
ValidationTarget |
getRoot()
Gets the root location.
|
int |
getTargetCount(TargetType type)
Gets the number of targets encountered so far for a target type.
|
String |
getTargetForIdentifier(String identifier)
Gets the location where an identifier was defined.
|
Collection<String> |
getUnreferencedIdentifiers()
Gets a collection of identifiers that are defined but never
referenced.
|
Collection<String> |
getUnreferencedTargets()
Gets a collection of target locations that are never referenced.
|
boolean |
hasTarget(String targetLocation)
Tests whether a target exists for a location.
|
boolean |
isIdentifierReferenced(String identifier)
Tests whether an identifier was referenced.
|
boolean |
isTargetReferenced(String location)
Tests whether a target was referenced.
|
void |
setTargetIdentifier(String location,
String identifier)
Sets an identifier for uniquely identifying the target.
|
void |
setTargetIsLabel(String location,
boolean isLabel)
Indicates whether a target is a label.
|
ValidationTarget getRoot()
void addTarget(String parentLocation, TargetType type, String location)
parentLocation
- the parent target location, or null, if this is the root targettype
- the target typelocation
- the target locationCollection<ValidationTarget> getChildTargets(ValidationTarget parent)
parent
- the parent targetboolean hasTarget(String targetLocation)
targetLocation
- the target locationint getTargetCount(TargetType type)
type
- the target typevoid setTargetIsLabel(String location, boolean isLabel)
location
- the target locationisLabel
- true, if the target is a labelint getLabelCount()
void setTargetIdentifier(String location, String identifier)
location
- the target locationidentifier
- the target identifiervoid addTargetReference(String referenceLocation, String targetLocation)
referenceLocation
- the label locationtargetLocation
- the target location referred to in the labelboolean isTargetReferenced(String location)
location
- the target locationvoid addIdentifierReference(String referenceLocation, String identifier)
referenceLocation
- the location of the referenceidentifier
- the target identifier being referencedboolean isIdentifierReferenced(String identifier)
identifier
- the identifierString getTargetForIdentifier(String identifier)
identifier
- the identifierCollection<String> getUnreferencedTargets()
Collection<String> getUnreferencedIdentifiers()
Collection<IdentifierReference> getDanglingReferences()
Copyright © 2010–2016 Planetary Data System. All rights reserved.