Search in sources :

Example 11 with RDB$FIELDS

use of org.jooq.meta.firebird.rdb.Tables.RDB$FIELDS in project atlasmap by atlasmap.

the class AtlasUtilTest method testExcludeNotRequestedFieldsShouldIncludeTwoDifferentLevels.

@Test
public void testExcludeNotRequestedFieldsShouldIncludeTwoDifferentLevels() {
    Document document = new Document();
    Fields fields = new Fields();
    fields.getField().add(newField("/A", newField("/A/A", newField("/A/A/A"), newField("/A/A/B")), newField("/A/B", newField("/A/B/A", newField("/A/B/A/A")))));
    document.setFields(fields);
    AtlasUtil.excludeNotRequestedFields(document, Arrays.asList("/A/A", "/A/B"));
    assertEquals("/A{/A/A{/A/A/A{}, /A/A/B{}, }, /A/B{/A/B/A{}, }, }, ", fields.getField().get(0).toString());
}
Also used : Fields(io.atlasmap.v2.Fields) Document(io.atlasmap.v2.Document) Test(org.junit.jupiter.api.Test)

Example 12 with RDB$FIELDS

use of org.jooq.meta.firebird.rdb.Tables.RDB$FIELDS in project atlasmap by atlasmap.

the class AtlasUtilTest method testExcludeNotRequestedFieldsShouldIncludeAllIfIncludePathsEmpty.

@Test
public void testExcludeNotRequestedFieldsShouldIncludeAllIfIncludePathsEmpty() {
    Document document = new Document();
    Fields fields = new Fields();
    fields.getField().add(newField("/A", newField("/A/A", newField("/A/A/A"), newField("/A/A/B")), newField("/A/B", newField("/A/B/A", newField("/A/B/A/A")))));
    document.setFields(fields);
    AtlasUtil.excludeNotRequestedFields(document, Collections.emptyList());
    assertEquals("/A{/A/A{/A/A/A{}, /A/A/B{}, }, /A/B{/A/B/A{/A/B/A/A{}, }, }, }, ", fields.getField().get(0).toString());
}
Also used : Fields(io.atlasmap.v2.Fields) Document(io.atlasmap.v2.Document) Test(org.junit.jupiter.api.Test)

Example 13 with RDB$FIELDS

use of org.jooq.meta.firebird.rdb.Tables.RDB$FIELDS in project atlasmap by atlasmap.

the class AtlasUtilTest method testExcludeNotRequestedFieldsShouldIncludeTwoLevels.

@Test
public void testExcludeNotRequestedFieldsShouldIncludeTwoLevels() {
    Document document = new Document();
    Fields fields = new Fields();
    fields.getField().add(newField("/A", newField("/A/A", newField("/A/A/A"), newField("/A/A/B")), newField("/A/B", newField("/A/B/A", newField("/A/B/A/A")))));
    document.setFields(fields);
    AtlasUtil.excludeNotRequestedFields(document, Arrays.asList("/A/B"));
    assertEquals("/A{/A/A{}, /A/B{/A/B/A{}, }, }, ", fields.getField().get(0).toString());
}
Also used : Fields(io.atlasmap.v2.Fields) Document(io.atlasmap.v2.Document) Test(org.junit.jupiter.api.Test)

Example 14 with RDB$FIELDS

use of org.jooq.meta.firebird.rdb.Tables.RDB$FIELDS in project atlasmap by atlasmap.

the class AtlasJsonModelFactory method createJsonDocument.

/**
 * Creates a JSON Document.
 * @return JSON Document
 */
public static JsonDocument createJsonDocument() {
    JsonDocument jsonDocument = new JsonDocument();
    jsonDocument.setFields(new Fields());
    return jsonDocument;
}
Also used : Fields(io.atlasmap.v2.Fields)

Example 15 with RDB$FIELDS

use of org.jooq.meta.firebird.rdb.Tables.RDB$FIELDS in project atlasmap by atlasmap.

the class AtlasXmlModelFactory method createXmlDocument.

/**
 * Creates the XML Document.
 * @return XML Document
 */
public static XmlDocument createXmlDocument() {
    XmlDocument xmlDocument = new XmlDocument();
    xmlDocument.setFields(new Fields());
    return xmlDocument;
}
Also used : Fields(io.atlasmap.v2.Fields)

Aggregations

Fields (io.atlasmap.v2.Fields)15 Record (org.jooq.Record)11 Document (io.atlasmap.v2.Document)8 ArrayList (java.util.ArrayList)8 Test (org.junit.jupiter.api.Test)7 DefaultDataTypeDefinition (org.jooq.meta.DefaultDataTypeDefinition)5 Rdb$fields (org.jooq.meta.firebird.rdb.tables.Rdb$fields)5 XmlFields (io.atlasmap.xml.v2.XmlFields)4 TableDefinition (org.jooq.meta.TableDefinition)4 Rdb$relationConstraints (org.jooq.meta.firebird.rdb.tables.Rdb$relationConstraints)4 DataTypeDefinition (org.jooq.meta.DataTypeDefinition)3 SchemaDefinition (org.jooq.meta.SchemaDefinition)3 DefaultDataTypeDefinition (org.jooq.util.DefaultDataTypeDefinition)3 Rdb$fields (org.jooq.util.firebird.rdb.tables.Rdb$fields)3 XSSchemaSet (com.sun.xml.xsom.XSSchemaSet)2 Arrays.asList (java.util.Arrays.asList)2 List (java.util.List)2 Entry (java.util.Map.Entry)2 Result (org.jooq.Result)2 Rdb$functionArguments (org.jooq.meta.firebird.rdb.tables.Rdb$functionArguments)2