Exemplo n.º 1
0
$logger = new Logger(LOGLEVEL);
#*****************************************************************************
#
#*****************************************************************************
# Initialize the umlSchema object
$umlSchema = new Schema(UML_SCHEMA, $logger);
$umlSchema->openConnection(PG_HOST, PG_DBNAME, PG_USER, PG_PASSWORD);
# Initialize the gmlSchema object
$ogrSchema = new OgrSchema(OGR_SCHEMA, $logger);
$ogrSchema->umlSchema = $umlSchema;
$sql = $ogrSchema->asSql();
#**************
# FeatureTypes
#**************
# Lade oberste Klassen vom Typ FeatureType, die von keinen anderen abgeleitet wurden
$topClasses = $umlSchema->getTopUmlClasses('FeatureType');
# Für alle oberen Klassen
foreach ($topClasses as $topClass) {
    $ogrSchema->listFeatureTypesAttributes('FeatureType', null, $topClass, false);
}
# Sortiere Ausgabeliste
ksort($ogrSchema->renameList);
header('Content-Type: application/json');
$json = '{';
$firstline = true;
foreach ($ogrSchema->renameList as $key => $value) {
    if ($firstline) {
        $firstline = false;
    } else {
        $json .= ',';
    }
Exemplo n.º 2
0
    $sql .= $umlSchema->createEnumerationTable($enumeration, $gmlSchema);
}
$logger->log('<br><hr><br>');
#***********
# CodeLists
#***********
# Lade CodeLists
foreach ($umlSchema->getCodeLists() as $code_list) {
    $sql .= $umlSchema->createCodeListTable($code_list);
}
$logger->log('<br><hr><br>');
#***********
# Unions
#***********
# Lade oberste Klassen vom Typ Union
$topDataTypes = $umlSchema->getTopUmlClasses('Union');
# Für alle oberen Unions
foreach ($topDataTypes as $topDataType) {
    $umlSchema->logger->log('<br><b>Top UnionType: ' . $topDataType['name'] . '</b> (' . $topDataType['xmi_id'] . ')');
    $sql .= $umlSchema->createComplexDataTypes('Union', $topDataType, $gmlSchema);
}
$logger->log('<br><hr><br>');
#********************************************
# Create DataTypes not definend in UML-Model
#********************************************
$sql .= $umlSchema->createExternalDataTypes($gmlSchema);
$logger->log('<br><hr><br>');
#***********
# DataTypes
#***********
$dataTypes = array();