Package org.xtce.toolkit
Class XTCETMStream
- java.lang.Object
-
- org.xtce.toolkit.XTCENamedObject
-
- org.xtce.toolkit.XTCETMStream
-
- All Implemented Interfaces:
Comparable
public class XTCETMStream extends XTCENamedObject
Class the represent a telemetry stream from the XTCE data model.- Author:
- dovereem
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<XTCETMContainer>getContainers()Function to retrieve all of the Telemetry Containers that are members of this stream in the XTCE document.PCMStreamTypegetReference()Retrieve a reference to the native JAXB object that is generated from the XTCE schema.XTCETMContainergetStreamRootContainer()Retrieve the XTCETMContainer that is the base container for this stream.StringgetStreamRootContainerPath()Retrieve the path to the XTCE SequenceContainer element that is the base container for this stream definition.XTCEContainerContentModelprocessStream(byte[] bytes)Function to decompose a binary data stream into a simple array of entries that an application can iterate over without the need to resolve XTCE data model references, included additional containers, base containers, and conditional processing.XTCEContainerContentModelprocessStream(InputStream stream)Function to decompose a binary data stream into a simple array of entries that an application can iterate over without the need to resolve XTCE data model references, included additional containers, base containers, and conditional processing.XTCEContainerContentModelprocessStream(BitSet binaryData)Function to decompose a binary data stream into a simple array of entries that an application can iterate over without the need to resolve XTCE data model references, included additional containers, base containers, and conditional processing.XTCEContainerContentModelprocessStreamIncludeOnly(byte[] bytes, List<XTCETMContainer> includeList)Function to decompose a binary data stream into a simple array of entries that an application can iterate over without the need to resolve XTCE data model references, included additional containers, base containers, and conditional processing.XTCEContainerContentModelprocessStreamIncludeOnly(InputStream stream, List<XTCETMContainer> includeList)Function to decompose a binary data stream into a simple array of entries that an application can iterate over without the need to resolve XTCE data model references, included additional containers, base containers, and conditional processing.XTCEContainerContentModelprocessStreamIncludeOnly(BitSet binaryData, List<XTCETMContainer> includeList)Function to decompose a binary data stream into a simple array of entries that an application can iterate over without the need to resolve XTCE data model references, included additional containers, base containers, and conditional processing.XTCEContainerContentModelprocessStreamWithExcludes(byte[] bytes, List<XTCETMContainer> excludeList)Function to decompose a binary data stream into a simple array of entries that an application can iterate over without the need to resolve XTCE data model references, included additional containers, base containers, and conditional processing.XTCEContainerContentModelprocessStreamWithExcludes(InputStream stream, List<XTCETMContainer> excludeList)Function to decompose a binary data stream into a simple array of entries that an application can iterate over without the need to resolve XTCE data model references, included additional containers, base containers, and conditional processing.XTCEContainerContentModelprocessStreamWithExcludes(BitSet binaryData, List<XTCETMContainer> excludeList)Function to decompose a binary data stream into a simple array of entries that an application can iterate over without the need to resolve XTCE data model references, included additional containers, base containers, and conditional processing.StringtoXml()Retrieve an XML string that represents this Stream element.-
Methods inherited from class org.xtce.toolkit.XTCENamedObject
compareTo, equals, getAlias, getAliasSet, getAncillaryData, getAncillaryData, getFullPath, getName, getPrimaryLongDescription, getPrimaryShortDescription, getSpaceSystemName, getSpaceSystemPath, hashCode, populateAliasListFromReference, setPrimaryLongDescription, setPrimaryShortDescription
-
-
-
-
Method Detail
-
getStreamRootContainerPath
public final String getStreamRootContainerPath()
Retrieve the path to the XTCE SequenceContainer element that is the base container for this stream definition.- Returns:
- String containing the full path in the XTCE data model for the container that is the base or root of this stream.
-
getStreamRootContainer
public final XTCETMContainer getStreamRootContainer()
Retrieve the XTCETMContainer that is the base container for this stream.- Returns:
- XTCETMContainer representing the container in the XTCE document.
-
getReference
public final PCMStreamType getReference()
Retrieve a reference to the native JAXB object that is generated from the XTCE schema.- Returns:
- PCMStreamType that underlies this stream object.
-
getContainers
public List<XTCETMContainer> getContainers()
Function to retrieve all of the Telemetry Containers that are members of this stream in the XTCE document.- Returns:
- List of XTCETMContainers in the stream.
-
processStream
public XTCEContainerContentModel processStream(BitSet binaryData) throws XTCEDatabaseException
Function to decompose a binary data stream into a simple array of entries that an application can iterate over without the need to resolve XTCE data model references, included additional containers, base containers, and conditional processing.- Parameters:
binaryData- BitSet containing the container binary encoded data so that the output object contains entries with actual values from a real binary image.- Returns:
- XTCEContainerContentModel representing this XTCETMContainer.
- Throws:
XTCEDatabaseException- thrown in the event that it is not possible to decompose the container completely due to bad references in the XTCE document.
-
processStream
public XTCEContainerContentModel processStream(byte[] bytes) throws XTCEDatabaseException
Function to decompose a binary data stream into a simple array of entries that an application can iterate over without the need to resolve XTCE data model references, included additional containers, base containers, and conditional processing. This function is intended to accept the byte array that is read from a ByteArrayOutputStream.toByteArray() that is easily obtained when reading a binary file using a Java FileInputStream.- Parameters:
bytes- byte[] containing the container binary encoded data so that the output object contains entries with actual values from a real binary image.- Returns:
- XTCEContainerContentModel representing this XTCETMContainer.
- Throws:
XTCEDatabaseException- thrown in the event that it is not possible to decompose the container completely due to bad references in the XTCE document.
-
processStream
public XTCEContainerContentModel processStream(InputStream stream) throws XTCEDatabaseException
Function to decompose a binary data stream into a simple array of entries that an application can iterate over without the need to resolve XTCE data model references, included additional containers, base containers, and conditional processing. This function is intended to accept a Java InputStream containing the bytes to use for the binary portion of the container.- Parameters:
stream- InputStream containing the container binary encoded data so that the output object contains entries with actual values from a real binary image.- Returns:
- XTCEContainerContentModel representing this XTCETMContainer.
- Throws:
XTCEDatabaseException- thrown in the event that it is not possible to decompose the container completely due to bad references in the XTCE document, or if the stream throws an IOException.
-
processStreamIncludeOnly
public XTCEContainerContentModel processStreamIncludeOnly(BitSet binaryData, List<XTCETMContainer> includeList) throws XTCEDatabaseException
Function to decompose a binary data stream into a simple array of entries that an application can iterate over without the need to resolve XTCE data model references, included additional containers, base containers, and conditional processing. This special case method permits the caller to use a subset of the containers that are a part of this stream. The function will silently ignore containers passed in the "includeList" which are not a part of this stream. If no matching container is found for the "binaryData", then the returned XTCEContainerContentModel will be null.- Parameters:
binaryData- BitSet containing the container binary encoded data so that the output object contains entries with actual values from a real binary image.includeList- List of XTCETMContainer objects to restrict the stream processing. Only the containers in the provided list will result in an output. This list should not include abstract containers from the inheritance tree or it may hide containers that are more specific.- Returns:
- XTCEContainerContentModel representing this XTCETMContainer or null in the event that the bits do not represent a container on the included list argument to this method call.
- Throws:
XTCEDatabaseException- thrown in the event that it is not possible to decompose the container completely due to bad references in the XTCE document.
-
processStreamIncludeOnly
public XTCEContainerContentModel processStreamIncludeOnly(byte[] bytes, List<XTCETMContainer> includeList) throws XTCEDatabaseException
Function to decompose a binary data stream into a simple array of entries that an application can iterate over without the need to resolve XTCE data model references, included additional containers, base containers, and conditional processing. This special case method permits the caller to use a subset of the containers that are a part of this stream. The function will silently ignore containers passed in the "includeList" which are not a part of this stream. If no matching container is found for the "binaryData", then the returned XTCEContainerContentModel will be null. This function is intended to accept the byte array that is read from a ByteArrayOutputStream.toByteArray() that is easily obtained when reading a binary file using a Java FileInputStream.- Parameters:
bytes- byte[] containing the container binary encoded data so that the output object contains entries with actual values from a real binary image.includeList- List of XTCETMContainer objects to restrict the stream processing. Only the containers in the provided list will result in an output. This list should not include abstract containers from the inheritance tree or it may hide containers that are more specific.- Returns:
- XTCEContainerContentModel representing this XTCETMContainer or null in the event that the bits do not represent a container on the included list argument to this method call.
- Throws:
XTCEDatabaseException- thrown in the event that it is not possible to decompose the container completely due to bad references in the XTCE document.
-
processStreamIncludeOnly
public XTCEContainerContentModel processStreamIncludeOnly(InputStream stream, List<XTCETMContainer> includeList) throws XTCEDatabaseException
Function to decompose a binary data stream into a simple array of entries that an application can iterate over without the need to resolve XTCE data model references, included additional containers, base containers, and conditional processing. This special case method permits the caller to use a subset of the containers that are a part of this stream. The function will silently ignore containers passed in the "includeList" which are not a part of this stream. If no matching container is found for the "binaryData", then the returned XTCEContainerContentModel will be null. This function is intended to accept a Java InputStream containing the bytes to use for the binary portion of the container.- Parameters:
stream- InputStream containing the container binary encoded data so that the output object contains entries with actual values from a real binary image.includeList- List of XTCETMContainer objects to restrict the stream processing. Only the containers in the provided list will result in an output. This list should not include abstract containers from the inheritance tree or it may hide containers that are more specific.- Returns:
- XTCEContainerContentModel representing this XTCETMContainer or null in the event that the bits do not represent a container on the included list argument to this method call.
- Throws:
XTCEDatabaseException- thrown in the event that it is not possible to decompose the container completely due to bad references in the XTCE document, or if the stream throws an IOException.
-
processStreamWithExcludes
public XTCEContainerContentModel processStreamWithExcludes(BitSet binaryData, List<XTCETMContainer> excludeList) throws XTCEDatabaseException
Function to decompose a binary data stream into a simple array of entries that an application can iterate over without the need to resolve XTCE data model references, included additional containers, base containers, and conditional processing. This special case method permits the caller to use a subset of the containers that are a part of this stream. The function will silently ignore containers passed in the "excludeList" which are not a part of this stream. If no matching container is found for the "binaryData", then the returned XTCEContainerContentModel will be null.- Parameters:
binaryData- BitSet containing the container binary encoded data so that the output object contains entries with actual values from a real binary image.excludeList- List of XTCETMContainer objects to restrict the stream processing. Containers in this list will be ignored. If there is no match for the binary data, then the model returned will be null.- Returns:
- XTCEContainerContentModel representing this XTCETMContainer or null in the event that the bits do not represent a container on the included list argument to this method call.
- Throws:
XTCEDatabaseException- thrown in the event that it is not possible to decompose the container completely due to bad references in the XTCE document.
-
processStreamWithExcludes
public XTCEContainerContentModel processStreamWithExcludes(byte[] bytes, List<XTCETMContainer> excludeList) throws XTCEDatabaseException
Function to decompose a binary data stream into a simple array of entries that an application can iterate over without the need to resolve XTCE data model references, included additional containers, base containers, and conditional processing. This special case method permits the caller to use a subset of the containers that are a part of this stream. The function will silently ignore containers passed in the "excludeList" which are not a part of this stream. If no matching container is found for the "binaryData", then the returned XTCEContainerContentModel will be null. This function is intended to accept the byte array that is read from a ByteArrayOutputStream.toByteArray() that is easily obtained when reading a binary file using a Java FileInputStream.- Parameters:
bytes- byte[] containing the container binary encoded data so that the output object contains entries with actual values from a real binary image.excludeList- List of XTCETMContainer objects to restrict the stream processing. Containers in this list will be ignored. If there is no match for the binary data, then the model returned will be null.- Returns:
- XTCEContainerContentModel representing this XTCETMContainer or null in the event that the bits do not represent a container on the included list argument to this method call.
- Throws:
XTCEDatabaseException- thrown in the event that it is not possible to decompose the container completely due to bad references in the XTCE document.
-
processStreamWithExcludes
public XTCEContainerContentModel processStreamWithExcludes(InputStream stream, List<XTCETMContainer> excludeList) throws XTCEDatabaseException
Function to decompose a binary data stream into a simple array of entries that an application can iterate over without the need to resolve XTCE data model references, included additional containers, base containers, and conditional processing. This special case method permits the caller to use a subset of the containers that are a part of this stream. The function will silently ignore containers passed in the "excludeList" which are not a part of this stream. If no matching container is found for the "binaryData", then the returned XTCEContainerContentModel will be null. This function is intended to accept a Java InputStream containing the bytes to use for the binary portion of the container.- Parameters:
stream- InputStream containing the container binary encoded data so that the output object contains entries with actual values from a real binary image.excludeList- List of XTCETMContainer objects to restrict the stream processing. Containers in this list will be ignored. If there is no match for the binary data, then the model returned will be null.- Returns:
- XTCEContainerContentModel representing this XTCETMContainer or null in the event that the bits do not represent a container on the included list argument to this method call.
- Throws:
XTCEDatabaseException- thrown in the event that it is not possible to decompose the container completely due to bad references in the XTCE document, or if the stream throws an IOException.
-
toXml
public String toXml() throws XTCEDatabaseException
Retrieve an XML string that represents this Stream element.- Returns:
- String containing the XML fragment.
- Throws:
XTCEDatabaseException- in the event that the elements being marshaled from the JAXB internal classes cannot make a valid document. Check the exception message for causality information.
-
-