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 aStreamSchema
for a schema described by aString
.static TupleType
getTupleType(org.w3c.dom.Node tupleTypeModel)
Get aTupleType
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 aTupleType
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 aTupleType
for a tuple type described by aString
.
-
-
-
Field Detail
-
IBM_COPYRIGHT
public static final java.lang.String IBM_COPYRIGHT
- See Also:
- Constant Field Values
-
-
Method Detail
-
getTupleType
public static TupleType getTupleType(java.lang.String tupleType)
Get aTupleType
for a tuple type described by aString
. The format oftupleType
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 withtuple<
.
-
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 aTupleType
for a tuple type described by an XML representation of the schema using the tuple type model. The inputtupleTypeModel
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 aTupleType
for a tuple type described by an XML representation of the schema using the tuple type model. The inputtupleTypeModel
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 DOMorg.w3c.dom.Node
.tupleTypeModel
is either aorg.w3c.dom.Document
node or aorg.w3c.dom.Element
with the tagtuple
.- 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 aStreamSchema
for a schema described by aString
. The format oftupleType
matches the SPL syntax for a tuple type.
This method is equivalent togetTupleType(schema).getTupleSchema()
.- Parameters:
schema
- String containing an SPL tuple type specification.- Returns:
StreamSchema
matchingschema
.- Since:
- InfoSphere® Streams Version 3.2
-
-