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 URIappendFragment(URI href, String fragment)StringgetRequirementFragment()URIgetRequirementURI()StringgetSection()The location within the specification for this reference.StringgetSectionFragment()URIgetSectionURI()SpecificationgetSpecification()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:SpecificationReferenceThe specification that this requirement is contained within.- Specified by:
getSpecificationin interfaceSpecificationReference- Returns:
- a Specification instance
-
getSection
public String getSection()
Description copied from interface:SpecificationReferenceThe location within the specification for this reference.- Specified by:
getSectionin interfaceSpecificationReference- Returns:
- the location text
-
getSectionFragment
public String getSectionFragment()
-
getRequirementFragment
public String getRequirementFragment()
-
getSectionURI
public URI getSectionURI() throws URISyntaxException
- Specified by:
getSectionURIin interfaceSpecificationReference- Throws:
URISyntaxException
-
getRequirementURI
public URI getRequirementURI() throws URISyntaxException
- Specified by:
getRequirementURIin interfaceSpecificationReference- Throws:
URISyntaxException
-
appendFragment
protected URI appendFragment(URI href, String fragment) throws URISyntaxException
- Throws:
URISyntaxException
-
-