public final class SRSAttributes extends AbstractAttributeGroup
Because the GML-Profile defines these attributes locally inside of attribute groups, they are not in any namespace. Some older examples on the DDMS website inaccurately display the attributes with the gml: prefix.
When validating this attribute group, the required/optional nature of the srsName attribute is not checked. Because that limitation depends on the parent element (for example, gml:Point and gml:Polygon require an srsName, but gml:pos does not), the parent element should be responsible for checking.
| Attributes |
|---|
|
srsName: A URI-based name (optional on gml:pos, required everywhere else) srsDimension: A positive integer dimension (optional) axisLabels: Ordered list of labels for the axes, as a space-delimited list of NCNames (valid XML names without colons) (optional, but if no srsName is set, this should be omitted too) uomLabels: Ordered list of unit of measure (uom) labels for all the axes, as a space-delimited list of NCNames (valid XML names without colons) (required when axisLabels is set) |
| Modifier and Type | Class and Description |
|---|---|
static class |
SRSAttributes.Builder
Builder for these attributes.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
NO_NAMESPACE
The namespace of the shared attributes
|
static String |
NO_PREFIX
The prefix of the shared attributes
|
| Constructor and Description |
|---|
SRSAttributes(nu.xom.Element element)
Base constructor
|
SRSAttributes(String srsName,
Integer srsDimension,
List<String> axisLabels,
List<String> uomLabels)
Constructor which builds from raw data.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addTo(nu.xom.Element element)
Convenience method to add these attributes onto an existing XOM Element
|
boolean |
equals(Object obj) |
List<String> |
getAxisLabels()
Accessor for the axisLabels.
|
String |
getAxisLabelsAsXsList()
Accessor for the String representation of the axisLabels
|
static SRSAttributes |
getNonNullInstance(SRSAttributes srsAttributes)
Returns a non-null instance of SRS attributes.
|
String |
getOutput(boolean isHTML,
String prefix)
Outputs to HTML or Text with a prefix at the beginning of each meta tag or line.
|
Integer |
getSrsDimension()
Accessor for the srsDimension.
|
String |
getSrsName()
Accessor for the srsName.
|
List<String> |
getUomLabels()
Accessor for the uomLabels.
|
String |
getUomLabelsAsXsList()
Accessor for the String representation of the uomLabels
|
int |
hashCode() |
protected void |
validate()
Validates the attribute group.
|
getDDMSVersion, getValidationWarnings, getWarnings, validateSameVersionpublic static final String NO_PREFIX
public static final String NO_NAMESPACE
public SRSAttributes(nu.xom.Element element)
throws InvalidDDMSException
element - the XOM element which is decorated with these attributes.InvalidDDMSExceptionpublic SRSAttributes(String srsName,
Integer srsDimension,
List<String> axisLabels,
List<String> uomLabels)
throws InvalidDDMSException
srsName - the srsName (required if the name is not "pos")srsDimension - the srsDimension (optional)axisLabels - the axis labels (optional, but should be omitted if no srsName is set)uomLabels - the labels for UOM (required when axisLabels is set)InvalidDDMSException - if any required information is missing or malformedpublic static SRSAttributes getNonNullInstance(SRSAttributes srsAttributes) throws InvalidDDMSException
srsAttributes - the attributes to return by defaultInvalidDDMSException - if there are problems creating the empty attributes instanceprotected void addTo(nu.xom.Element element)
throws InvalidDDMSException
element - the element to decorateInvalidDDMSException - if the DDMS version of the element is differentprotected void validate()
throws InvalidDDMSException
| Rules |
|---|
|
|
validate in class AbstractAttributeGroupInvalidDDMSException - if any required information is missing or malformedpublic String getOutput(boolean isHTML,
String prefix)
AbstractAttributeGroupgetOutput in class AbstractAttributeGroupisHTML - true for HTML, false for Textprefix - the prefix to addAbstractAttributeGroup.getOutput(boolean, String)public boolean equals(Object obj)
equals in class ObjectObject.equals(Object)public int hashCode()
hashCode in class ObjectObject.hashCode()public String getSrsName()
public Integer getSrsDimension()
public List<String> getAxisLabels()
public String getAxisLabelsAsXsList()
public List<String> getUomLabels()
public String getUomLabelsAsXsList()
Copyright 2010 - 2013 by Brian Uri!
Generated on 12/15/2013 10:22 AM
http://ddmsence.urizone.net/