protected AtlasClassificationDef getTagWithName(AtlasTypesDef typesDef, String tagName, String attributeType) { AtlasClassificationDef aTag = new AtlasClassificationDef(tagName); AtlasAttributeDef attributeDef = new AtlasAttributeDef("testAttribute", attributeType, true, AtlasAttributeDef.Cardinality.SINGLE, 0, 1, false, true, false, Collections.emptyList()); aTag.addAttribute(attributeDef); typesDef.setClassificationDefs(Arrays.asList(aTag)); return aTag; }
protected AtlasClassificationDef getTagWithName(AtlasTypesDef typesDef, String tagName, String attributeType) { AtlasClassificationDef aTag = new AtlasClassificationDef(tagName); AtlasAttributeDef attributeDef = new AtlasAttributeDef("testAttribute", attributeType, true, AtlasAttributeDef.Cardinality.SINGLE, 0, 1, false, true, false, Collections.emptyList()); aTag.addAttribute(attributeDef); typesDef.setClassificationDefs(Arrays.asList(aTag)); return aTag; }
private void loadSampleClassificationDefs() throws AtlasBaseException { AtlasClassificationDef tag1 = new AtlasClassificationDef("tag1"); AtlasClassificationDef tag2 = new AtlasClassificationDef("tag2"); AtlasClassificationDef tag3 = new AtlasClassificationDef("tag3"); AtlasClassificationDef tag4 = new AtlasClassificationDef("tag4"); AtlasClassificationDef PII = new AtlasClassificationDef("PII"); PII.addAttribute(new AtlasAttributeDef("type", "string")); PII.addAttribute(new AtlasAttributeDef("valid", "boolean")); typeDefStore.createTypesDef(new AtlasTypesDef(Collections.emptyList(), Collections.emptyList(), Arrays.asList(tag1, tag2, tag3, tag4, PII), Collections.emptyList(), Collections.emptyList())); }
private void loadSampleClassificationDefs() throws AtlasBaseException { AtlasClassificationDef tag1 = new AtlasClassificationDef("tag1"); AtlasClassificationDef tag2 = new AtlasClassificationDef("tag2"); AtlasClassificationDef tag3 = new AtlasClassificationDef("tag3"); AtlasClassificationDef tag4 = new AtlasClassificationDef("tag4"); AtlasClassificationDef PII = new AtlasClassificationDef("PII"); PII.addAttribute(new AtlasAttributeDef("type", "string")); PII.addAttribute(new AtlasAttributeDef("valid", "boolean")); typeDefStore.createTypesDef(new AtlasTypesDef(Collections.emptyList(), Collections.emptyList(), Arrays.asList(tag1, tag2, tag3, tag4, PII), Collections.emptyList(), Collections.emptyList())); }
false, true, false, Collections.<AtlasStructDef.AtlasConstraintDef>emptyList()); aTag.addAttribute(attributeDef); false, true, false, Collections.<AtlasStructDef.AtlasConstraintDef>emptyList()); aTag.addAttribute(attributeDef); typesDef.setClassificationDefs(Arrays.asList(aTag));
updatedDef.addAttribute(attributeDef);
classifiL2_4.addSuperType(classifiL1_2.getName()); classifiL0.addAttribute(new AtlasAttributeDef("L0_a1", AtlasBaseTypeDef.ATLAS_TYPE_INT)); classifiL1_1.addAttribute(new AtlasAttributeDef("L1-1_a1", AtlasBaseTypeDef.ATLAS_TYPE_INT)); classifiL1_2.addAttribute(new AtlasAttributeDef("L1-2_a1", AtlasBaseTypeDef.ATLAS_TYPE_INT)); classifiL2_1.addAttribute(new AtlasAttributeDef("L2-1_a1", AtlasBaseTypeDef.ATLAS_TYPE_INT)); classifiL2_2.addAttribute(new AtlasAttributeDef("L2-2_a1", AtlasBaseTypeDef.ATLAS_TYPE_INT)); classifiL2_3.addAttribute(new AtlasAttributeDef("L2-3_a1", AtlasBaseTypeDef.ATLAS_TYPE_INT)); classifiL2_4.addAttribute(new AtlasAttributeDef("L2-4_a1", AtlasBaseTypeDef.ATLAS_TYPE_INT));
classifiL2_4.addSuperType(classifiL1_2.getName()); classifiL0.addAttribute(new AtlasAttributeDef("L0_a1", AtlasBaseTypeDef.ATLAS_TYPE_INT)); classifiL1_1.addAttribute(new AtlasAttributeDef("L1-1_a1", AtlasBaseTypeDef.ATLAS_TYPE_INT)); classifiL1_2.addAttribute(new AtlasAttributeDef("L1-2_a1", AtlasBaseTypeDef.ATLAS_TYPE_INT)); classifiL2_1.addAttribute(new AtlasAttributeDef("L2-1_a1", AtlasBaseTypeDef.ATLAS_TYPE_INT)); classifiL2_2.addAttribute(new AtlasAttributeDef("L2-2_a1", AtlasBaseTypeDef.ATLAS_TYPE_INT)); classifiL2_3.addAttribute(new AtlasAttributeDef("L2-3_a1", AtlasBaseTypeDef.ATLAS_TYPE_INT)); classifiL2_4.addAttribute(new AtlasAttributeDef("L2-4_a1", AtlasBaseTypeDef.ATLAS_TYPE_INT));