public AtlasMapType(String keyTypeName, String valueTypeName) { super(AtlasBaseTypeDef.getMapTypeName(keyTypeName, valueTypeName), TypeCategory.MAP); this.keyTypeName = keyTypeName; this.valueTypeName = valueTypeName; }
public AtlasMapType(String keyTypeName, String valueTypeName) { super(AtlasBaseTypeDef.getMapTypeName(keyTypeName, valueTypeName), TypeCategory.MAP); this.keyTypeName = keyTypeName; this.valueTypeName = valueTypeName; }
public AtlasMapType(String keyTypeName, String valueTypeName, AtlasTypeRegistry typeRegistry) throws AtlasBaseException { super(AtlasBaseTypeDef.getMapTypeName(keyTypeName, valueTypeName), TypeCategory.MAP); this.keyTypeName = keyTypeName; this.valueTypeName = valueTypeName; resolveReferences(typeRegistry); }
public AtlasMapType(String keyTypeName, String valueTypeName, AtlasTypeRegistry typeRegistry) throws AtlasBaseException { super(AtlasBaseTypeDef.getMapTypeName(keyTypeName, valueTypeName), TypeCategory.MAP); this.keyTypeName = keyTypeName; this.valueTypeName = valueTypeName; resolveReferences(typeRegistry); }
public AtlasMapType(AtlasType keyType, AtlasType valueType) { super(AtlasBaseTypeDef.getMapTypeName(keyType.getTypeName(), valueType.getTypeName()), TypeCategory.MAP); this.keyTypeName = keyType.getTypeName(); this.valueTypeName = valueType.getTypeName(); this.keyType = keyType; this.valueType = valueType; }
public AtlasMapType(AtlasType keyType, AtlasType valueType) { super(AtlasBaseTypeDef.getMapTypeName(keyType.getTypeName(), valueType.getTypeName()), TypeCategory.MAP); this.keyTypeName = keyType.getTypeName(); this.valueTypeName = valueType.getTypeName(); this.keyType = keyType; this.valueType = valueType; }
AtlasBaseTypeDef.getMapTypeName(ENUM_DEF.getName(), attributeType))); AtlasBaseTypeDef.getMapTypeName(ENUM_DEF_WITH_NO_DEFAULT.getName(), attributeType))); AtlasBaseTypeDef.getMapTypeName(attributeType, ENUM_DEF_WITH_NO_DEFAULT.getName()))); AtlasBaseTypeDef.getMapTypeName(attributeType, ENUM_DEF.getName()))); AtlasBaseTypeDef.getMapTypeName(attributeType, attributeType2))); AtlasBaseTypeDef.getMapTypeName(attributeType, attributeType2)))); ret.add(getAttributeDef(attrNamePrefix, AtlasBaseTypeDef.getMapTypeName(attributeType, AtlasBaseTypeDef.getArrayTypeName(attributeType2)))); ret.add(getAttributeDef(attrNamePrefix, AtlasBaseTypeDef.getMapTypeName(attributeType, AtlasBaseTypeDef.getMapTypeName(attributeType, attributeType2))));
AtlasBaseTypeDef.getMapTypeName(ENUM_DEF.getName(), attributeType))); AtlasBaseTypeDef.getMapTypeName(ENUM_DEF_WITH_NO_DEFAULT.getName(), attributeType))); AtlasBaseTypeDef.getMapTypeName(attributeType, ENUM_DEF_WITH_NO_DEFAULT.getName()))); AtlasBaseTypeDef.getMapTypeName(attributeType, ENUM_DEF.getName()))); AtlasBaseTypeDef.getMapTypeName(attributeType, attributeType2))); AtlasBaseTypeDef.getMapTypeName(attributeType, attributeType2)))); ret.add(getAttributeDef(attrNamePrefix, AtlasBaseTypeDef.getMapTypeName(attributeType, AtlasBaseTypeDef.getArrayTypeName(attributeType2)))); ret.add(getAttributeDef(attrNamePrefix, AtlasBaseTypeDef.getMapTypeName(attributeType, AtlasBaseTypeDef.getMapTypeName(attributeType, attributeType2))));
public static AtlasTypesDef defineInverseReferenceTestTypes() { AtlasEntityDef aDef = AtlasTypeUtil.createClassTypeDef("A", ImmutableSet.<String>of(), AtlasTypeUtil.createUniqueRequiredAttrDef("name", "string"), new AtlasAttributeDef("b", "B", true, Cardinality.SINGLE, 0, 1, false, false, Collections.<AtlasConstraintDef>emptyList()), // 1-1 new AtlasAttributeDef("oneB", "B", true, Cardinality.SINGLE, 0, 1, false, false, Collections.<AtlasConstraintDef>emptyList()), // 1-* new AtlasAttributeDef("manyB", AtlasBaseTypeDef.getArrayTypeName("B"), true, Cardinality.SINGLE, 0, 1, false, false, Collections.<AtlasConstraintDef>emptyList()), new AtlasAttributeDef("mapToB", AtlasBaseTypeDef.getMapTypeName("string", "B"), true, Cardinality.SINGLE, 0, 1, false, false, Collections.<AtlasConstraintDef>singletonList(new AtlasConstraintDef( AtlasConstraintDef.CONSTRAINT_TYPE_INVERSE_REF, Collections.<String, Object>singletonMap(AtlasConstraintDef.CONSTRAINT_PARAM_ATTRIBUTE, "mappedFromA"))))); // *-* AtlasEntityDef bDef = AtlasTypeUtil.createClassTypeDef("B", ImmutableSet.<String>of(), AtlasTypeUtil.createUniqueRequiredAttrDef("name", "string"), new AtlasAttributeDef("a", "A", true, Cardinality.SINGLE, 0, 1, false, false, Collections.<AtlasConstraintDef>singletonList(new AtlasConstraintDef( AtlasConstraintDef.CONSTRAINT_TYPE_INVERSE_REF, Collections.<String, Object>singletonMap(AtlasConstraintDef.CONSTRAINT_PARAM_ATTRIBUTE, "b")))), new AtlasAttributeDef("manyA", AtlasBaseTypeDef.getArrayTypeName("A"), true, Cardinality.SINGLE, 0, 1, false, false, Collections.<AtlasConstraintDef>singletonList(new AtlasConstraintDef( AtlasConstraintDef.CONSTRAINT_TYPE_INVERSE_REF, Collections.<String, Object>singletonMap(AtlasConstraintDef.CONSTRAINT_PARAM_ATTRIBUTE, "oneB")))), new AtlasAttributeDef("manyToManyA", AtlasBaseTypeDef.getArrayTypeName("A"), true, Cardinality.SINGLE, 0, 1, false, false, Collections.<AtlasConstraintDef>singletonList(new AtlasConstraintDef( AtlasConstraintDef.CONSTRAINT_TYPE_INVERSE_REF, Collections.<String, Object>singletonMap(AtlasConstraintDef.CONSTRAINT_PARAM_ATTRIBUTE, "manyB")))), new AtlasAttributeDef("mappedFromA", "A", true, Cardinality.SINGLE, 0, 1, false, false, Collections.<AtlasConstraintDef>emptyList())); return new AtlasTypesDef(ImmutableList.<AtlasEnumDef>of(), ImmutableList.<AtlasStructDef>of(), ImmutableList.<AtlasClassificationDef>of(), ImmutableList.<AtlasEntityDef>of(aDef, bDef)); }
public static AtlasTypesDef defineInverseReferenceTestTypes() { AtlasEntityDef aDef = createClassTypeDef("A", Collections.<String>emptySet(), createUniqueRequiredAttrDef("name", "string"), new AtlasAttributeDef("b", "B", true, SINGLE, 0, 1, false, false, false, Collections.<AtlasConstraintDef>emptyList()), // 1-1 new AtlasAttributeDef("oneB", "B", true, SINGLE, 0, 1, false, false, false, Collections.<AtlasConstraintDef>emptyList()), // 1-* new AtlasAttributeDef("manyB", AtlasBaseTypeDef.getArrayTypeName("B"), true, SINGLE, 0, 1, false, false, false, Collections.<AtlasConstraintDef>emptyList()), new AtlasAttributeDef("mapToB", AtlasBaseTypeDef.getMapTypeName("string", "B"), true, SINGLE, 0, 1, false, false, false, Collections.<AtlasConstraintDef>singletonList(new AtlasConstraintDef( CONSTRAINT_TYPE_INVERSE_REF, Collections.<String, Object>singletonMap(CONSTRAINT_PARAM_ATTRIBUTE, "mappedFromA"))))); // *-* AtlasEntityDef bDef = createClassTypeDef("B", Collections.<String>emptySet(), createUniqueRequiredAttrDef("name", "string"), new AtlasAttributeDef("a", "A", true, SINGLE, 0, 1, false, false, false, Collections.<AtlasConstraintDef>singletonList(new AtlasConstraintDef( CONSTRAINT_TYPE_INVERSE_REF, Collections.<String, Object>singletonMap(CONSTRAINT_PARAM_ATTRIBUTE, "b")))), new AtlasAttributeDef("manyA", AtlasBaseTypeDef.getArrayTypeName("A"), true, SINGLE, 0, 1, false, false, false, Collections.<AtlasConstraintDef>singletonList(new AtlasConstraintDef( CONSTRAINT_TYPE_INVERSE_REF, Collections.<String, Object>singletonMap(CONSTRAINT_PARAM_ATTRIBUTE, "oneB")))), new AtlasAttributeDef("manyToManyA", AtlasBaseTypeDef.getArrayTypeName("A"), true, SINGLE, 0, 1, false, false, false, Collections.<AtlasConstraintDef>singletonList(new AtlasConstraintDef( CONSTRAINT_TYPE_INVERSE_REF, Collections.<String, Object>singletonMap(CONSTRAINT_PARAM_ATTRIBUTE, "manyB")))), new AtlasAttributeDef("mappedFromA", "A", true, SINGLE, 0, 1, false, false, false, Collections.<AtlasConstraintDef>emptyList())); AtlasTypesDef ret = new AtlasTypesDef(Collections.<AtlasEnumDef>emptyList(), Collections.<AtlasStructDef>emptyList(), Collections.<AtlasClassificationDef>emptyList(), Arrays.asList(aDef, bDef)); populateSystemAttributes(ret); return ret; }
AtlasBaseTypeDef.getMapTypeName(ATLAS_PRIMITIVE_TYPE3, getRandomBuiltInType()))); AtlasBaseTypeDef.getMapTypeName(ENUM_DEF.getName(), getRandomBuiltInType()))); ret.add(getAttributeDef(attrNamePrefix, AtlasBaseTypeDef.getMapTypeName(ENUM_DEF_WITH_NO_DEFAULT.getName(), getRandomBuiltInType()))); AtlasBaseTypeDef.getMapTypeName(getRandomPrimitiveType(), ENUM_DEF.getName()))); ret.add(getAttributeDef(attrNamePrefix, AtlasBaseTypeDef.getMapTypeName(getRandomPrimitiveType(), ENUM_DEF_WITH_NO_DEFAULT.getName()))); AtlasBaseTypeDef.getMapTypeName(ATLAS_PRIMITIVE_TYPE2, getRandomBuiltInType())))); AtlasBaseTypeDef.getMapTypeName(ENUM_DEF.getName(), getRandomBuiltInType())))); ret.add(getAttributeDef(attrNamePrefix, AtlasBaseTypeDef.getArrayTypeName( AtlasBaseTypeDef.getMapTypeName(ENUM_DEF_WITH_NO_DEFAULT.getName(), getRandomBuiltInType())))); ret.add(getAttributeDef(attrNamePrefix, AtlasBaseTypeDef.getArrayTypeName( AtlasBaseTypeDef.getMapTypeName(getRandomPrimitiveType(), ENUM_DEF.getName())))); ret.add(getAttributeDef(attrNamePrefix, AtlasBaseTypeDef.getArrayTypeName( AtlasBaseTypeDef.getMapTypeName(getRandomPrimitiveType(), ENUM_DEF_WITH_NO_DEFAULT.getName())))); ret.add(getAttributeDef(attrNamePrefix, AtlasBaseTypeDef.getMapTypeName(ATLAS_PRIMITIVE_TYPE1, AtlasBaseTypeDef.getArrayTypeName(getRandomBuiltInType())))); ret.add(getAttributeDef(attrNamePrefix, AtlasBaseTypeDef.getMapTypeName(ATLAS_PRIMITIVE_TYPE, AtlasBaseTypeDef.getMapTypeName(ATLAS_PRIMITIVE_TYPE, getRandomBuiltInType()))));
AtlasBaseTypeDef.getMapTypeName(ATLAS_PRIMITIVE_TYPE3, getRandomBuiltInType()))); AtlasBaseTypeDef.getMapTypeName(ENUM_DEF.getName(), getRandomBuiltInType()))); ret.add(getAttributeDef(attrNamePrefix, AtlasBaseTypeDef.getMapTypeName(ENUM_DEF_WITH_NO_DEFAULT.getName(), getRandomBuiltInType()))); AtlasBaseTypeDef.getMapTypeName(getRandomPrimitiveType(), ENUM_DEF.getName()))); ret.add(getAttributeDef(attrNamePrefix, AtlasBaseTypeDef.getMapTypeName(getRandomPrimitiveType(), ENUM_DEF_WITH_NO_DEFAULT.getName()))); AtlasBaseTypeDef.getMapTypeName(ATLAS_PRIMITIVE_TYPE2, getRandomBuiltInType())))); AtlasBaseTypeDef.getMapTypeName(ENUM_DEF.getName(), getRandomBuiltInType())))); ret.add(getAttributeDef(attrNamePrefix, AtlasBaseTypeDef.getArrayTypeName( AtlasBaseTypeDef.getMapTypeName(ENUM_DEF_WITH_NO_DEFAULT.getName(), getRandomBuiltInType())))); ret.add(getAttributeDef(attrNamePrefix, AtlasBaseTypeDef.getArrayTypeName( AtlasBaseTypeDef.getMapTypeName(getRandomPrimitiveType(), ENUM_DEF.getName())))); ret.add(getAttributeDef(attrNamePrefix, AtlasBaseTypeDef.getArrayTypeName( AtlasBaseTypeDef.getMapTypeName(getRandomPrimitiveType(), ENUM_DEF_WITH_NO_DEFAULT.getName())))); ret.add(getAttributeDef(attrNamePrefix, AtlasBaseTypeDef.getMapTypeName(ATLAS_PRIMITIVE_TYPE1, AtlasBaseTypeDef.getArrayTypeName(getRandomBuiltInType())))); ret.add(getAttributeDef(attrNamePrefix, AtlasBaseTypeDef.getMapTypeName(ATLAS_PRIMITIVE_TYPE, AtlasBaseTypeDef.getMapTypeName(ATLAS_PRIMITIVE_TYPE, getRandomBuiltInType()))));