pdm-object

A java library to read powerDesigner pdm format.

Лицензия

Лицензия

Группа

Группа

top.xskr
Идентификатор

Идентификатор

pdm-object
Последняя версия

Последняя версия

1.0.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

pdm-object
A java library to read powerDesigner pdm format.
Ссылка на сайт

Ссылка на сайт

https://github.com/xskr/pdm-object
Организация-разработчик

Организация-разработчик

xskr
Система контроля версий

Система контроля версий

https://github.com/tlw-ray/pdm-object

Скачать pdm-object

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/top.xskr/pdm-object/ -->
<dependency>
    <groupId>top.xskr</groupId>
    <artifactId>pdm-object</artifactId>
    <version>1.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/top.xskr/pdm-object/
implementation 'top.xskr:pdm-object:1.0.1'
// https://jarcasting.com/artifacts/top.xskr/pdm-object/
implementation ("top.xskr:pdm-object:1.0.1")
'top.xskr:pdm-object:jar:1.0.1'
<dependency org="top.xskr" name="pdm-object" rev="1.0.1">
  <artifact name="pdm-object" type="jar" />
</dependency>
@Grapes(
@Grab(group='top.xskr', module='pdm-object', version='1.0.1')
)
libraryDependencies += "top.xskr" % "pdm-object" % "1.0.1"
[top.xskr/pdm-object "1.0.1"]

Зависимости

compile (3)

Идентификатор библиотеки Тип Версия
org.eclipse.persistence : org.eclipse.persistence.moxy jar 2.7.4
com.sun.xml.bind : jaxb-core jar 2.2.11
com.sun.xml.bind : jaxb-impl jar 2.2.11

test (1)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12

Модули Проекта

Данный проект не имеет модулей.

PDM-Object

usage

  • Read *.pdm file to object
  • Write pdm object to *.pdm file.

contribute

  • jdk8
  • gradle 4.10.3

import

Detail: https://search.maven.org/artifact/top.xskr/pdm-object/1.0.1/jar

  • Apache Maven
<dependency>
  <groupId>top.xskr</groupId>
  <artifactId>pdm-object</artifactId>
  <version>1.0.1</version>
</dependency>
  • Gradle Groovy DSL
implementation 'top.xskr:pdm-object:1.0.1'

example

public static void main(String[] args) throws JAXBException {
    File pdmFile = new File("data/model.xml");
    Pdm pdm = new Pdm();

    //Read from *.pdm file to Object
    RootModel rootModel = pdm.read(pdmFile);

    //Show Tables and Columns
    System.out.println(rootModel.RootObject.Id);
    System.out.println(rootModel.RootObject.Children.size());
    Model model = rootModel.RootObject.Children.get(0);
    for(Table table:model.Tables){
        System.out.println("Table:" + table.Code + "(" + table.Name + ")");
        for(Column column:table.Columns){
            System.out.println("\tColumn:" + column.Code + "(" + column.Name + ")");
        }
    }

    //rewrite to XML
    //pdm.write(rootModel, System.out);
}

log

  • read PowerDesigner format
  • Introduce Eclipse's xml persistence library to solve the problem of xml tag customization
  • Introduce sun's annotation to solve the problem of escaping xml node namespace
  • Achieve reading all pdm file nodes and attributes
top.xskr

Версии библиотеки

Версия
1.0.1