public class SSRF extends SchemaRoot<SSRF>
SSRF is based on the NATO Spectrum Management Allied Data Exchange
Format-eXtensible Markup Language (SMADEF-XML) data standard. NTIA's Office
of Spectrum Management Data Dictionary (OSMDD) is expected to also be
compatible with SSRF and SMADEF-XML. (See SMADEF
)
SSRF is the ROOT element for any SSRF-formatted message. It contains all the message attributes and content. Example:
<SSRF> <List of Dataset A/> <List of Dataset B/> <List of Dataset C/> ... </SSRF>A SSRF message is essentially a flexible container and may contain any number of datasets. While each respective data element within a SSRF container may have a minimum required configuration actual SSRF message content and (extended) dataset configuration requirements are determined by the using business process and must be externally implemented by the developer.
Use the SSRFProperties
and SSRFUtility
classes to streamline
SSRF message configuration and processing.
administrative, allotment, antenna, assignment, channelPlan, contact, externalReference, feDeployment, forceElement, intfReport, jrfl, loadset, location, message, note, organisation, radiationPlan, receiver, rfSystem, role, satellite, ssReply, ssRequest, toa, transmitter
Constructor and Description |
---|
SSRF() |
Modifier and Type | Method and Description |
---|---|
Set<String> |
evaluate()
Evaluate a SSRF Object instance; record and report any configuration
errors.
|
static SSRF |
fromXml(String xml)
Parse an import an XMl document into a SSRF object hierarchy.
|
static SSRF |
getInstance(String xml)
Standard method to get a fully qualified class instance.
|
String |
getProperty(String propertyName)
Searches for the property with the specified key in this property list.
|
boolean |
isSetProperties()
Inspect this SSRF instance to determine if the SSRF Properties field is
configured.
|
boolean |
isValid()
Validate a SSRF Object instance.
|
void |
setProperties(SSRFProperties ssrfProperties)
Set the SSRF Properties for this SSRF instance.
|
void |
setProperty(String propertyName,
String propertyValue)
Set a SSRF property.
|
String |
toXML()
Export this SSRF source instance as an XML document.
|
void |
unsetProperty(String propertyName)
Unset (clear) a SSRF property.
|
SSRF |
withProperties(SSRFProperties ssrfProperties)
Set the SSRF Properties for this SSRF instance.
|
SSRF |
withProperty(String propertyName,
String propertyValue)
Set a SSRF property.
|
getAdministrative, getAllotment, getAntenna, getAssignment, getChannelPlan, getContact, getExternalReference, getFEDeployment, getForceElement, getIntfReport, getJRFL, getLoadset, getLocation, getMessage, getNote, getOrganisation, getRadiationPlan, getReceiver, getRFSystem, getRole, getSatellite, getSSReply, getSSRequest, getTOA, getTransmitter, isSet, isSetAdministrative, isSetAllotment, isSetAntenna, isSetAssignment, isSetChannelPlan, isSetContact, isSetExternalReference, isSetFEDeployment, isSetForceElement, isSetIntfReport, isSetJRFL, isSetLoadset, isSetLocation, isSetMessage, isSetNote, isSetOrganisation, isSetRadiationPlan, isSetReceiver, isSetRFSystem, isSetRole, isSetSatellite, isSetSSReply, isSetSSRequest, isSetTOA, isSetTransmitter, toString, unsetAdministrative, unsetAllotment, unsetAntenna, unsetAssignment, unsetChannelPlan, unsetContact, unsetExternalReference, unsetFEDeployment, unsetForceElement, unsetIntfReport, unsetJRFL, unsetLoadset, unsetLocation, unsetMessage, unsetNote, unsetOrganisation, unsetRadiationPlan, unsetReceiver, unsetRFSystem, unsetRole, unsetSatellite, unsetSSReply, unsetSSRequest, unsetTOA, unsetTransmitter, withAdministrative, withAdministrative, withAllotment, withAllotment, withAntenna, withAntenna, withAssignment, withAssignment, withChannelPlan, withChannelPlan, withContact, withContact, withExternalReference, withExternalReference, withFEDeployment, withFEDeployment, withForceElement, withForceElement, withIntfReport, withIntfReport, withJRFL, withJRFL, withLoadset, withLoadset, withLocation, withLocation, withMessage, withMessage, withNote, withNote, withOrganisation, withOrganisation, withRadiationPlan, withRadiationPlan, withReceiver, withReceiver, withRFSystem, withRFSystem, withRole, withRole, withSatellite, withSatellite, withSSReply, withSSReply, withSSRequest, withSSRequest, withTOA, withTOA, withTransmitter, withTransmitter
public void setProperties(SSRFProperties ssrfProperties)
This method creates a local copy of the input SSRFProperties values. To
edit this SSRF instance properties use
#setProperty(String, String, String)
Use #setProperty(String, String, String)
to set and update
additional properties.
ssrfProperties
- a SSRFProperties instancepublic void setProperty(String propertyName, String propertyValue)
propertyName
- A dot-delimited SSRF class and field name (e.g.
"ChannelPlan.name")propertyValue
- the value to set the SSRF field (e.g. "My Channel
Plan")public boolean isSetProperties()
public SSRF withProperties(SSRFProperties ssrfProperties)
This method creates a local copy of the input SSRFProperties values. To
edit this SSRF instance properties use
#setProperty(String, String, String)
Use #setProperty(String, String, String)
to set and update
additional properties.
ssrfProperties
- a SSRFProperties instancepublic SSRF withProperty(String propertyName, String propertyValue)
propertyName
- A dot-delimited SSRF class and field name (e.g.
"ChannelPlan.name")propertyValue
- the value to set the SSRF field (e.g. "My Channel
Plan")public void unsetProperty(String propertyName)
propertyName
- a SSRF property name (e.g. "ChannelPlan.name")public String getProperty(String propertyName)
propertyName
- the property key.public String toXML() throws Exception
This method prepares the SSRF object hierarchy, copying all required data objects into their proper location, preparing the SSRF destination instance for export, then marshals the data type into an XML document.
If the object instance is NOT valid then call #evaluate(Object)
to
re-inspect the SSRF object instance and retrieve a list of specific
validation errors.
Exception
- If this SSRF configuration fails to validatepublic boolean isValid()
This method recursively validates the provided object instance and all of its components. The validation procedure ensures that all required fields are set and that all configured fields contain valid data according to the SSRF data formatting rules.
It is expected that this method will only be called on the top-level SSRF class. However it will just as easily validate any SSRF data type.
If the object instance is NOT valid then call #evaluate(Object)
to
re-inspect the SSRF object instance and retrieve a list of specific
validation errors.
public Set<String> evaluate()
This method recursively validates the provided object instance and all of its components. The validation procedure ensures that all required fields are set and that all configured fields contain valid data according to the SSRF data formatting rules.
If the SSRF object instance does not validate OK then each specific validation error condition is recorded and returned.
It is expected that this method will only be called on the top-level SSRF class. However it will just as easily validate any SSRF data type.
public static SSRF getInstance(String xml) throws Exception
This is a shortcut to fromXml(String)
xml
- A SSRF XML documentException
- If this SSRF XML document fails to unmarshal; typically
because the document is invalid or incompletepublic static SSRF fromXml(String xml) throws Exception
This method reads and attempts to unmarshal a XML document into a SSRF software object tree. If successful the SSRF software instance is prepared for use, copying all required data objects into their proper location.
After reading the XML this method examines the class tree and copies all required data objects into their proper location and preparing the SSRF software class hierarchy for work.
xml
- A SSRF XML documentException
- If this SSRF XML document fails to unmarshal; typically
because the document is invalid or incompleteCopyright © 2016 OpenSSRF.org. All rights reserved.