Adds Citrus message schema to repository if available on classpath.
@param schemaName The name of the schema within the citrus schema package
195668
protected void addCitrusSchema(String schemaName) throws IOException, SAXException, ParserConfigurationException {
        Resource resource = new PathMatchingResourcePatternResolver().getResource("classpath:com/consol/citrus/schema/" + schemaName + ".xsd");
        if (resource.exists()) {
            addXsdSchema(resource);
        }
    }
30757
private function addSchema($collectionName, $schemaName, $schema)
    {
        if (!\is_string($schema) && !$schema instanceof SchemaDefinitionInterface) {
            throw new InvalidSchemaDefinitionException();
        }

        $this->schemaCollections[$collectionName][$schemaName] = $schema;
    }
1282373
protected function parseSchemaNameToArray($schemaName)
    {
        if (!isset($this->schemas[$this->schemaFolder][$schemaName])) {
            $file = $this->getSchemaFileName($this->schemaFolder, $schemaName);
            try {
                $this->schemas[$this->schemaFolder][$schemaName] = Yaml::parse(file_get_contents($file));
            } catch (ParseException $e) {
                throw new SchemaParserException(sprintf('Error in configuration file: %s', $e->getMessage()));
            }
            $this->mergeDefaultSchemaFile($schemaName);
            $this->mergeIncludedSchemas($schemaName);
            $this->validateSchemaDirectives($schemaName);
        }
    }
178200
public void setSchemaExtensionsInfo(java.util.Collection<SchemaExtensionInfo> schemaExtensionsInfo) {
        if (schemaExtensionsInfo == null) {
            this.schemaExtensionsInfo = null;
            return;
        }

        this.schemaExtensionsInfo = new com.amazonaws.internal.SdkInternalList<SchemaExtensionInfo>(schemaExtensionsInfo);
    }
310930
JMFSchema findSchema(long schemaId) throws MessageStoreException {
    Long storeId = schemaIndex.get(Long.valueOf(schemaId));
    if (storeId != null) {
      AbstractItem item = findById(storeId.longValue());
      return ((SchemaStoreItem)item).getSchema();
    } else
      throw new MessageStoreException("Schema not found in store: " + schemaId);
  }
1181033
public void setSchema(String schema) throws SQLException {
        Transaction suspendTx = null;

        if (mcf.beforeJDBCVersion(JDBCRuntimeVersion.VERSION_4_1))
            throw new SQLFeatureNotSupportedException();

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            Tr.debug(this, tc, "Set Schema to " + schema);
        // Global trans must be suspended for jdbc-4.1 getters and setters on zOS 
        if (AdapterUtil.isZOS() && isGlobalTransactionActive())
            suspendTx = suspendGlobalTran();

        try {
            mcf.jdbcRuntime.doSetSchema(sqlConn, schema);
            currentSchema = schema;
            connectionPropertyChanged = true;
        } catch (SQLException sqle) {
            throw sqle;
        } finally {
            if (suspendTx != null)
                resumeGlobalTran(suspendTx);
        }
    }
1224266
def create_schema(self, schema_name):
        
        try:
            self.cursor.execute('CREATE SCHEMA %s' % schema_name)
        except Exception as e:
            raise e
        finally:
            self.db.commit()
637336
private void createSchema() throws SQLException {
		logger.entering(CLASSNAME, "createSchema");
		Connection conn = getConnectionToDefaultSchema();

		logger.log(Level.INFO, schema + " schema does not exists. Trying to create it.");
		PreparedStatement ps = null;
		ps = conn.prepareStatement("CREATE SCHEMA " + schema);
		ps.execute();

		cleanupConnection(conn, null, ps);
		logger.exiting(CLASSNAME, "createSchema");
	}
957910
public void loadSchemaInformation(final String schemaName) {
        columnInfoMap.clear();

        // get schema information and map it to columnInfo
        final List<DefaultColumnInfo> columnInfoList = dao.getColumnInfoList(schemaName);
        for (final DefaultColumnInfo columnInfo : columnInfoList) {
            final String tableName = columnInfo.getTableName();

            if (!columnInfoMap.containsKey(tableName)) {
                columnInfoMap.put(tableName, new HashMap<String, DefaultColumnInfo>());
            }

            columnInfoMap.get(tableName).put(columnInfo.getColumnName(), columnInfo);
        }
    }
1270638
public function updateBundleSchema($bundleName)
    {
        if (null === $bundle = $this->_application->getBundle($bundleName)) {
            return;
        }

        try {
            $schemaTool = new SchemaTool($bundle->getEntityManager());
            $classes = $this->getBundleSchema($bundle);
            $schemaTool->updateSchema($classes, true);
            unset($schemaTool);
        } catch (\Exception $e) {}
    }
1119799
public void add(String name, TiffObject value, String path, String schema) {
    if (!metadata.containsKey(name)) {
      metadata.put(name, new MetadataObject());
    }
    metadata.get(name).getObjectList().add(value);
    metadata.get(name).setPath(path);
    metadata.get(name).setSchema(schema);
  }
949190
public static <T> void mergeFrom(XMLStreamReader parser, T message, Schema<T> schema)
            throws IOException, XMLStreamException, XmlInputException
    {
        // final String simpleName = schema.messageName();

        if (parser.nextTag() != START_ELEMENT ||
                !schema.messageName().equals(parser.getLocalName()))
        {
            throw new XmlInputException("Expected token START_ELEMENT: " + schema.messageName());
        }

        if (parser.nextTag() == END_ELEMENT)
        {
            // if(!simpleName.equals(parser.getLocalName()))
            // throw new XmlInputException("Expecting token END_ELEMENT: " + simpleName);

            // empty message;
            return;
        }

        schema.mergeFrom(new XmlInput(parser), message);

        // if(!simpleName.equals(parser.getLocalName()))
        // throw new XmlInputException("Expecting token END_ELEMENT: " + simpleName);
    }
1215767
public void validateWithXmlSchema(String filename, String xmlSchemaPath) throws IOException {
    try (InputStream xmlStream = this.getClass().getResourceAsStream(filename)) {
      if (xmlStream == null) {
        throw new IOException("File not found in classpath: " + filename);
      }
      URL schemaUrl = this.getClass().getResource(xmlSchemaPath);
      if (schemaUrl == null) {
        throw new IOException("XML schema not found in classpath: " + xmlSchemaPath);
      }
      validateInternal(new StreamSource(xmlStream), schemaUrl);
    } catch (Exception e) {
      throw new IOException("Cannot load or parse '" + filename + "'", e);
    }
  }
817109
public void addIntermediateSchema(Schema schema) throws TupleMRException {
    if (schemaAlreadyExists(schema.getName())) {
      throw new TupleMRException("There's a schema with that name '" + schema.getName()
          + "'");
    }
    schemas.add(schema);
  }
611500
public void checkSchemaUpdateOrGrantRights(String schemaName) {

        if (!hasSchemaUpdateOrGrantRights(schemaName)) {
            throw Error.error(ErrorCode.X_42501, schemaName);
        }
    }
1064804
public void add(String fldName, Schema sch) {
		Type type = sch.type(fldName);
		addField(fldName, type);
	}
1202035
public static void createSchema(DataSource dataSource, String name) {
        try (Connection connection = dataSource.getConnection();
             Statement statement = connection.createStatement()) {
            statement.executeUpdate(String.format(Constants.DDL_CREATE_SCHEMA, name));
        } catch (SQLException e) {
            throw new RuntimeException("Can not connect to database", e);
        }
    }