Class DefaultSpecificationReference
- java.lang.Object
-
- gov.nist.secauto.decima.core.requirement.DefaultSpecificationReference
-
- All Implemented Interfaces:
SpecificationReference
public class DefaultSpecificationReference extends Object implements SpecificationReference
-
-
Constructor Summary
Constructors Constructor Description DefaultSpecificationReference(Specification specification, String section, String sectionFragment, String requirementFragment)
Represents a reference to a specification that supports a given requirement.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected URI
appendFragment(URI href, String fragment)
String
getRequirementFragment()
URI
getRequirementURI()
String
getSection()
The location within the specification for this reference.String
getSectionFragment()
URI
getSectionURI()
Specification
getSpecification()
The specification that this requirement is contained within.
-
-
-
Constructor Detail
-
DefaultSpecificationReference
public DefaultSpecificationReference(Specification specification, String section, String sectionFragment, String requirementFragment)
Represents a reference to a specification that supports a given requirement.- Parameters:
specification
- the referenced specificationsection
- the section in the specification containing the requirementsectionFragment
- a URL fragment that can be used to resolve the section location within a specificationrequirementFragment
- a URL fragment that can be used to resolve the requirement location within a specification
-
-
Method Detail
-
getSpecification
public Specification getSpecification()
Description copied from interface:SpecificationReference
The specification that this requirement is contained within.- Specified by:
getSpecification
in interfaceSpecificationReference
- Returns:
- a Specification instance
-
getSection
public String getSection()
Description copied from interface:SpecificationReference
The location within the specification for this reference.- Specified by:
getSection
in interfaceSpecificationReference
- Returns:
- the location text
-
getSectionFragment
public String getSectionFragment()
-
getRequirementFragment
public String getRequirementFragment()
-
getSectionURI
public URI getSectionURI() throws URISyntaxException
- Specified by:
getSectionURI
in interfaceSpecificationReference
- Throws:
URISyntaxException
-
getRequirementURI
public URI getRequirementURI() throws URISyntaxException
- Specified by:
getRequirementURI
in interfaceSpecificationReference
- Throws:
URISyntaxException
-
appendFragment
protected URI appendFragment(URI href, String fragment) throws URISyntaxException
- Throws:
URISyntaxException
-
-