/** * Define the list of DataObjects as Types. * The Types are available through TypeHelper and DataGraph getType() methods. * @param types a List of DataObjects representing the Types. * @return the defined Types. * @throws IllegalArgumentException if the Types could not be defined. */ public synchronized List define(List types) { if (types == null) { throw new IllegalArgumentException(SDOException.cannotPerformOperationWithNullInputParameter("define", "types")); } List definedTypes = new ArrayList(); for (int i = 0; i < types.size(); i++) { Type definedType = define((DataObject)types.get(i)); definedTypes.add(definedType); } return definedTypes; }
/** * Define the list of DataObjects as Types. * The Types are available through TypeHelper and DataGraph getType() methods. * @param types a List of DataObjects representing the Types. * @return the defined Types. * @throws IllegalArgumentException if the Types could not be defined. */ public synchronized List define(List types) { if (types == null) { throw new IllegalArgumentException(SDOException.cannotPerformOperationWithNullInputParameter("define", "types")); } List definedTypes = new ArrayList(); for (int i = 0; i < types.size(); i++) { Type definedType = define((DataObject)types.get(i)); definedTypes.add(definedType); } return definedTypes; }
public DataObject create(Class interfaceClass) { if (interfaceClass == null) { throw new IllegalArgumentException(SDOException.cannotPerformOperationWithNullInputParameter("create", "interfaceClass"));
public DataObject create(Class interfaceClass) { if (interfaceClass == null) { throw new IllegalArgumentException(SDOException.cannotPerformOperationWithNullInputParameter("create", "interfaceClass"));
/** * Serializes an XMLDocument as an XML document into the outputStream. * If the DataObject's Type was defined by an XSD, the serialization * will follow the XSD. * Otherwise the serialization will follow the format as if an XSD * were generated as defined by the SDO specification. * The OutputStream will be flushed after writing. * Does not perform validation to ensure compliance with an XSD. * @param xmlDocument specifies XMLDocument to be saved * @param outputStream specifies the OutputStream to write to. * @param options implementation-specific options. * @throws IOException for stream exceptions. * @throws IllegalArgumentException if the dataObject tree * is not closed or has no container. */ public void save(XMLDocument xmlDocument, OutputStream outputStream, Object options) throws IOException { if (xmlDocument == null) { throw new IllegalArgumentException(SDOException.cannotPerformOperationWithNullInputParameter("save", "xmlDocument")); } XMLMarshaller xmlMarshaller = getXmlMarshaller(options); String encoding = xmlMarshaller.getEncoding(); if(xmlDocument.getEncoding() != null) { encoding = xmlDocument.getEncoding(); } OutputStreamWriter writer = new OutputStreamWriter(outputStream, encoding); save(xmlDocument, writer, xmlMarshaller); }
/** * Serializes an XMLDocument as an XML document into the outputStream. * If the DataObject's Type was defined by an XSD, the serialization * will follow the XSD. * Otherwise the serialization will follow the format as if an XSD * were generated as defined by the SDO specification. * The OutputStream will be flushed after writing. * Does not perform validation to ensure compliance with an XSD. * @param xmlDocument specifies XMLDocument to be saved * @param outputStream specifies the OutputStream to write to. * @param options implementation-specific options. * @throws IOException for stream exceptions. * @throws IllegalArgumentException if the dataObject tree * is not closed or has no container. */ public void save(XMLDocument xmlDocument, OutputStream outputStream, Object options) throws IOException { if (xmlDocument == null) { throw new IllegalArgumentException(SDOException.cannotPerformOperationWithNullInputParameter("save", "xmlDocument")); } XMLMarshaller xmlMarshaller = getXmlMarshaller(options); String encoding = xmlMarshaller.getEncoding(); if(xmlDocument.getEncoding() != null) { encoding = xmlDocument.getEncoding(); } OutputStreamWriter writer = new OutputStreamWriter(outputStream, encoding); save(xmlDocument, writer, xmlMarshaller); }
throw new IllegalArgumentException(SDOException.cannotPerformOperationWithNullInputParameter("defineOpenContentProperty", "propertyDO"));
throw new IllegalArgumentException(SDOException.cannotPerformOperationWithNullInputParameter("defineOpenContentProperty", "propertyDO"));
public DataObject create(Type type) { if (type == null) { throw new IllegalArgumentException(SDOException.cannotPerformOperationWithNullInputParameter("create", "type"));
public DataObject create(Type type) { if (type == null) { throw new IllegalArgumentException(SDOException.cannotPerformOperationWithNullInputParameter("create", "type"));
public void save(XMLDocument xmlDocument, Result result, Object options) throws IOException { if (xmlDocument == null) { throw new IllegalArgumentException(SDOException.cannotPerformOperationWithNullInputParameter("save", "xmlDocument"));
public void save(XMLDocument xmlDocument, Result result, Object options) throws IOException { if (xmlDocument == null) { throw new IllegalArgumentException(SDOException.cannotPerformOperationWithNullInputParameter("save", "xmlDocument"));
private void save(XMLDocument xmlDocument, Writer outputWriter, XMLMarshaller anXMLMarshaller) throws IOException { if (xmlDocument == null) { throw new IllegalArgumentException(SDOException.cannotPerformOperationWithNullInputParameter("save", "xmlDocument"));
private void save(XMLDocument xmlDocument, Writer outputWriter, XMLMarshaller anXMLMarshaller) throws IOException { if (xmlDocument == null) { throw new IllegalArgumentException(SDOException.cannotPerformOperationWithNullInputParameter("save", "xmlDocument"));