Package hec.data.rating
Class JDomRatingSpecification
java.lang.Object
hec.data.rating.JDomRatingSpecification
- All Implemented Interfaces:
ILocationRef,IRatingSpecification,Comparable<IRatingSpecification>
public class JDomRatingSpecification
extends Object
implements IRatingSpecification, Comparable<IRatingSpecification>
Describes a rating specification. Has a location, rating template, and a
specification version. TULA.Stage;Flow.USGS-shifted.Production
ARCA.Count-Conduit_Gates
,Opening-Conduit_Gates,Elev-Pool;Flow-Conduit_Gates.Normal.Production
Location.Template.SpecVersion
Eventually this object will be able to read and write itself using the XML
formats.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Patternpattern for parsing the specification.final Stringregexp for parsing the specification.final Patternpattern for validating the specification.final Stringregexp for validating the specification.Fields inherited from interface hec.data.rating.IRatingSpecification
PART_DELIM -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.JDomRatingSpecification(LocationTemplate locationRef, IRatingTemplate template, Version specVersion) Parameterized constructor that has the args required to be valid.JDomRatingSpecification(IRatingSpecification ratingSpecification) Copy constructor that creates a copy of the arg rating specification.JDomRatingSpecification(String officeId, String specificationId) String parsing constructor to create a populating rating specification. -
Method Summary
Modifier and TypeMethodDescriptionintPerforms a comparison of this spec to the arg spec and returns a number that can be used for ordering.booleanReturns if this spec is equal to the arg object.Returns the location of this spec.Returns the version of this spec.Returns the template for this spec.inthashCode()Returns a hashcode for this spec.booleanisSimple()Returns if this spec can be used in a reverse rating.voidsetLocationRef(LocationTemplate locRef) Sets the location of this spec.voidsetSpecVersion(Version specVersion) Sets the version of this spec.voidsetTemplate(IRatingTemplate template) Sets the template for this spec.toString()Returns the string representation of this spec.
-
Field Details
-
parsingRegexp
regexp for parsing the specification.- See Also:
-
validationRegexp
regexp for validating the specification.- See Also:
-
validationPattern
pattern for validating the specification. -
parsingPattern
pattern for parsing the specification.
-
-
Constructor Details
-
JDomRatingSpecification
public JDomRatingSpecification()Default constructor. Fill in the object with the setters to become valid. -
JDomRatingSpecification
String parsing constructor to create a populating rating specification.- Parameters:
officeId-specificationId-- Throws:
DataSetException
-
JDomRatingSpecification
public JDomRatingSpecification(LocationTemplate locationRef, IRatingTemplate template, Version specVersion) Parameterized constructor that has the args required to be valid.- Parameters:
locationRef-template-specVersion-
-
JDomRatingSpecification
Copy constructor that creates a copy of the arg rating specification.- Parameters:
ratingSpecification-
-
-
Method Details
-
compareTo
Performs a comparison of this spec to the arg spec and returns a number that can be used for ordering.- Specified by:
compareToin interfaceComparable<IRatingSpecification>
-
getLocationRef
Returns the location of this spec.- Specified by:
getLocationRefin interfaceILocationRef- Returns:
-
setLocationRef
Sets the location of this spec.- Specified by:
setLocationRefin interfaceILocationRef
-
getSpecVersion
Returns the version of this spec.- Specified by:
getSpecVersionin interfaceIRatingSpecification- Returns:
-
setSpecVersion
Sets the version of this spec.- Specified by:
setSpecVersionin interfaceIRatingSpecification
-
getTemplate
Returns the template for this spec.- Specified by:
getTemplatein interfaceIRatingSpecification- Returns:
-
setTemplate
Sets the template for this spec.- Specified by:
setTemplatein interfaceIRatingSpecification
-
hashCode
public int hashCode()Returns a hashcode for this spec. -
equals
Returns if this spec is equal to the arg object. -
toString
Returns the string representation of this spec. TULA.Stage;Flow.USGS-shifted.Production ARCA.Count-Conduit_Gates,Opening-Conduit_Gates ,Elev-Pool;Flow-Conduit_Gates.Normal.Production -
isSimple
public boolean isSimple()Returns if this spec can be used in a reverse rating.- Specified by:
isSimplein interfaceIRatingSpecification- Returns:
-