com.ibm.streams.operator

Class Type.Factory

  • java.lang.Object
    • com.ibm.streams.operator.Type.Factory
  • Enclosing interface:
    Type


    public static final class Type.Factory
    extends java.lang.Object
    Factory for creating SPL type related objects.
    Since:
    InfoSphere® Streams Version 3.0
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String IBM_COPYRIGHT 
    • Constructor Summary

      Constructors 
      Constructor and Description
      Type.Factory() 
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      static StreamSchema getStreamSchema(java.lang.String schema)
      Get a StreamSchema for a schema described by a String.
      static TupleType getTupleType(org.w3c.dom.Node tupleTypeModel)
      Get a TupleType for a tuple type described by an XML representation of the schema using the tuple type model.
      static TupleType getTupleType(javax.xml.transform.Source tupleTypeModel)
      Get a TupleType for a tuple type described by an XML representation of the schema using the tuple type model.
      static TupleType getTupleType(java.lang.String tupleType)
      Get a TupleType for a tuple type described by a String.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Type.Factory

        public Type.Factory()
    • Method Detail

      • getTupleType

        public static TupleType getTupleType(java.lang.String tupleType)
        Get a TupleType for a tuple type described by a String. The format of tupleType matches the SPL syntax for a tuple type, for example:
        • tuple<int32 x, int32 y>
        • tuple<rstring id, tuple<int32 x, int32 y>>

        Attributes must be SPL types that are not user-defined.
        Parameters:
        tupleType - String containing an SPL tuple type specification.
        Returns:
        TupleType matching tupleType
        Throws:
        java.lang.IllegalArgumentException - tupleType does not start with tuple<.
      • getTupleType

        public static TupleType getTupleType(javax.xml.transform.Source tupleTypeModel)
                                      throws javax.xml.transform.TransformerFactoryConfigurationError,
                                             javax.xml.transform.TransformerException,
                                             org.xml.sax.SAXException,
                                             java.io.IOException,
                                             javax.xml.parsers.ParserConfigurationException
        Get a TupleType for a tuple type described by an XML representation of the schema using the tuple type model. The input tupleTypeModel is verified to conform with the tuple type mode schema. The tuple type model XML schema definition is in $STREAMS_INSTALL/etc/xsd/SPL/tupleTypeModel.xsd.
        Parameters:
        tupleTypeModel - XML tuple type model source document
        Returns:
        TupleType described by tupleTypeModel
        Throws:
        javax.xml.transform.TransformerFactoryConfigurationError
        javax.xml.transform.TransformerException
        org.xml.sax.SAXException
        java.io.IOException
        javax.xml.parsers.ParserConfigurationException
      • getTupleType

        public static TupleType getTupleType(org.w3c.dom.Node tupleTypeModel)
                                      throws org.xml.sax.SAXException,
                                             java.io.IOException,
                                             javax.xml.parsers.ParserConfigurationException
        Get a TupleType for a tuple type described by an XML representation of the schema using the tuple type model. The input tupleTypeModel is verified to conform with the tuple type mode schema. The tuple type model XML schema definition is in $STREAMS_INSTALL/etc/xsd/SPL/tupleTypeModel.xsd.
        Parameters:
        tupleTypeModel - XML tuple type model source document as a DOM org.w3c.dom.Node. tupleTypeModel is either a org.w3c.dom.Document node or a org.w3c.dom.Element with the tag tuple.
        Returns:
        TupleType described by tupleTypeModel
        Throws:
        org.xml.sax.SAXException
        java.io.IOException
        javax.xml.parsers.ParserConfigurationException
      • getStreamSchema

        public static StreamSchema getStreamSchema(java.lang.String schema)
        Get a StreamSchema for a schema described by a String. The format of tupleType matches the SPL syntax for a tuple type.
        This method is equivalent to getTupleType(schema).getTupleSchema().
        Parameters:
        schema - String containing an SPL tuple type specification.
        Returns:
        StreamSchema matching schema.
        Since:
        InfoSphere® Streams Version 3.2