Commit 1fc88ce3 by Madhan Neethiraj Committed by apoorvnaik

ATLAS-2648: Remove prefix '__' from AtlasGlossary type names

Change-Id: I3b5940c9936d718b5b6e3c5d08d3cbbd173f7a51 Signed-off-by: 's avatarapoorvnaik <apoorvnaik@apache.org>
parent 94d0c0ab
{ {
"enumDefs": [ "enumDefs": [
{ {
"name": "__AtlasGlossaryTermRelationshipStatus", "name": "AtlasGlossaryTermRelationshipStatus",
"description": "TermRelationshipStatus defines how reliable the relationship is between two glossary terms", "description": "TermRelationshipStatus defines how reliable the relationship is between two glossary terms",
"typeVersion": "1.0", "typeVersion": "1.0",
"elementDefs": [ "elementDefs": [
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
] ]
}, },
{ {
"name": "__AtlasGlossaryTermAssignmentStatus", "name": "AtlasGlossaryTermAssignmentStatus",
"description": "TermAssignmentStatus defines how much the semantic assignment should be trusted.", "description": "TermAssignmentStatus defines how much the semantic assignment should be trusted.",
"typeVersion": "1.0", "typeVersion": "1.0",
"elementDefs": [ "elementDefs": [
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
"classificationDefs": [], "classificationDefs": [],
"entityDefs": [ "entityDefs": [
{ {
"name": "__AtlasGlossary", "name": "AtlasGlossary",
"superTypes": [ "superTypes": [
"__internal" "__internal"
], ],
...@@ -136,7 +136,7 @@ ...@@ -136,7 +136,7 @@
] ]
}, },
{ {
"name": "__AtlasGlossaryTerm", "name": "AtlasGlossaryTerm",
"superTypes": [ "superTypes": [
"__internal" "__internal"
], ],
...@@ -201,7 +201,7 @@ ...@@ -201,7 +201,7 @@
] ]
}, },
{ {
"name": "__AtlasGlossaryCategory", "name": "AtlasGlossaryCategory",
"superTypes": [ "superTypes": [
"__internal" "__internal"
], ],
...@@ -244,7 +244,7 @@ ...@@ -244,7 +244,7 @@
], ],
"relationshipDefs": [ "relationshipDefs": [
{ {
"name": "__AtlasGlossarySemanticAssignment", "name": "AtlasGlossarySemanticAssignment",
"description": "SemanticAssignment is a relationship used to assign a term to a referenceable object. This means that the term describes the meaning of the referenceable object. The semantic assignment needs to be a controlled relationship when glossary definitions are used to provide classifications for the data assets and hence define how the data is to be governed.", "description": "SemanticAssignment is a relationship used to assign a term to a referenceable object. This means that the term describes the meaning of the referenceable object. The semantic assignment needs to be a controlled relationship when glossary definitions are used to provide classifications for the data assets and hence define how the data is to be governed.",
"typeVersion": "1.0", "typeVersion": "1.0",
"attributeDefs": [ "attributeDefs": [
...@@ -271,7 +271,7 @@ ...@@ -271,7 +271,7 @@
}, },
{ {
"name": "status", "name": "status",
"typeName": "__AtlasGlossaryTermRelationshipStatus", "typeName": "AtlasGlossaryTermRelationshipStatus",
"isOptional": true, "isOptional": true,
"cardinality": "SINGLE", "cardinality": "SINGLE",
"valuesMinCount": 0, "valuesMinCount": 0,
...@@ -326,7 +326,7 @@ ...@@ -326,7 +326,7 @@
"relationshipCategory": "ASSOCIATION", "relationshipCategory": "ASSOCIATION",
"propagateTags": "ONE_TO_TWO", "propagateTags": "ONE_TO_TWO",
"endDef1": { "endDef1": {
"type": "__AtlasGlossaryTerm", "type": "AtlasGlossaryTerm",
"name": "assignedEntities", "name": "assignedEntities",
"isContainer": false, "isContainer": false,
"cardinality": "SET" "cardinality": "SET"
...@@ -339,36 +339,36 @@ ...@@ -339,36 +339,36 @@
} }
}, },
{ {
"name": "__AtlasGlossaryTermAnchor", "name": "AtlasGlossaryTermAnchor",
"typeVersion": "1.0", "typeVersion": "1.0",
"description": "TermAnchor links each term to exactly one Glossary object. This means that this is its home glossary. If the Glossary object is deleted, then so are all of the terms linked to it.", "description": "TermAnchor links each term to exactly one Glossary object. This means that this is its home glossary. If the Glossary object is deleted, then so are all of the terms linked to it.",
"endDef1": { "endDef1": {
"name": "terms", "name": "terms",
"type": "__AtlasGlossary", "type": "AtlasGlossary",
"cardinality": "SET", "cardinality": "SET",
"isContainer": true "isContainer": true
}, },
"endDef2": { "endDef2": {
"name": "anchor", "name": "anchor",
"type": "__AtlasGlossaryTerm", "type": "AtlasGlossaryTerm",
"cardinality": "SINGLE" "cardinality": "SINGLE"
}, },
"relationshipCategory": "COMPOSITION", "relationshipCategory": "COMPOSITION",
"propagateTags": "NONE" "propagateTags": "NONE"
}, },
{ {
"name": "__AtlasGlossaryTermCategorization", "name": "AtlasGlossaryTermCategorization",
"typeVersion": "1.0", "typeVersion": "1.0",
"description": "TermCategorization is a relationship used to organize terms into categories. A term may be linked with many categories and a category may have many terms linked to it. This relationship may connect terms and categories both in the same glossary or in different glossaries.", "description": "TermCategorization is a relationship used to organize terms into categories. A term may be linked with many categories and a category may have many terms linked to it. This relationship may connect terms and categories both in the same glossary or in different glossaries.",
"endDef1": { "endDef1": {
"name": "terms", "name": "terms",
"type": "__AtlasGlossaryCategory", "type": "AtlasGlossaryCategory",
"cardinality": "SET", "cardinality": "SET",
"isContainer": true "isContainer": true
}, },
"endDef2": { "endDef2": {
"name": "categories", "name": "categories",
"type": "__AtlasGlossaryTerm", "type": "AtlasGlossaryTerm",
"cardinality": "SET" "cardinality": "SET"
}, },
"relationshipCategory": "AGGREGATION", "relationshipCategory": "AGGREGATION",
...@@ -384,7 +384,7 @@ ...@@ -384,7 +384,7 @@
}, },
{ {
"name": "status", "name": "status",
"typeName": "__AtlasGlossaryTermRelationshipStatus", "typeName": "AtlasGlossaryTermRelationshipStatus",
"cardinality": "SINGLE", "cardinality": "SINGLE",
"isIndexable": true, "isIndexable": true,
"isOptional": true, "isOptional": true,
...@@ -393,53 +393,53 @@ ...@@ -393,53 +393,53 @@
] ]
}, },
{ {
"name": "__AtlasGlossaryCategoryAnchor", "name": "AtlasGlossaryCategoryAnchor",
"typeVersion": "1.0", "typeVersion": "1.0",
"description": "CategoryAnchor links each category to exactly one Glossary object. This means that this is its home glossary. If the Glossary object is deleted then so are all of the categories linked to it.", "description": "CategoryAnchor links each category to exactly one Glossary object. This means that this is its home glossary. If the Glossary object is deleted then so are all of the categories linked to it.",
"endDef1": { "endDef1": {
"name": "categories", "name": "categories",
"type": "__AtlasGlossary", "type": "AtlasGlossary",
"cardinality": "SET", "cardinality": "SET",
"isContainer": true "isContainer": true
}, },
"endDef2": { "endDef2": {
"name": "anchor", "name": "anchor",
"type": "__AtlasGlossaryCategory", "type": "AtlasGlossaryCategory",
"cardinality": "SINGLE" "cardinality": "SINGLE"
}, },
"relationshipCategory": "COMPOSITION", "relationshipCategory": "COMPOSITION",
"propagateTags": "NONE" "propagateTags": "NONE"
}, },
{ {
"name": "__AtlasGlossaryCategoryHierarchyLink", "name": "AtlasGlossaryCategoryHierarchyLink",
"typeVersion": "1.0", "typeVersion": "1.0",
"description": "CategoryHierarchyLink is a relationship used to organize categories into a hierarchy to, for example, create a structure for a taxonomy. A category may have none or one super-categories. This super-category may be in a different glossary.", "description": "CategoryHierarchyLink is a relationship used to organize categories into a hierarchy to, for example, create a structure for a taxonomy. A category may have none or one super-categories. This super-category may be in a different glossary.",
"endDef1": { "endDef1": {
"name": "childrenCategories", "name": "childrenCategories",
"type": "__AtlasGlossaryCategory", "type": "AtlasGlossaryCategory",
"cardinality": "SET", "cardinality": "SET",
"isContainer": true "isContainer": true
}, },
"endDef2": { "endDef2": {
"name": "parentCategory", "name": "parentCategory",
"type": "__AtlasGlossaryCategory", "type": "AtlasGlossaryCategory",
"cardinality": "SINGLE" "cardinality": "SINGLE"
}, },
"relationshipCategory": "AGGREGATION", "relationshipCategory": "AGGREGATION",
"propagateTags": "NONE" "propagateTags": "NONE"
}, },
{ {
"name": "__AtlasGlossaryRelatedTerm", "name": "AtlasGlossaryRelatedTerm",
"typeVersion": "1.0", "typeVersion": "1.0",
"description": "RelatedTerm is a relationship used to say that the linked glossary term may also be of interest. It is like a 'see also' link in a dictionary.", "description": "RelatedTerm is a relationship used to say that the linked glossary term may also be of interest. It is like a 'see also' link in a dictionary.",
"endDef1": { "endDef1": {
"name": "seeAlso", "name": "seeAlso",
"type": "__AtlasGlossaryTerm", "type": "AtlasGlossaryTerm",
"cardinality": "SET" "cardinality": "SET"
}, },
"endDef2": { "endDef2": {
"name": "seeAlso", "name": "seeAlso",
"type": "__AtlasGlossaryTerm", "type": "AtlasGlossaryTerm",
"cardinality": "SET" "cardinality": "SET"
}, },
"relationshipCategory": "ASSOCIATION", "relationshipCategory": "ASSOCIATION",
...@@ -462,7 +462,7 @@ ...@@ -462,7 +462,7 @@
}, },
{ {
"name": "status", "name": "status",
"typeName": "__AtlasGlossaryTermRelationshipStatus", "typeName": "AtlasGlossaryTermRelationshipStatus",
"cardinality": "SINGLE", "cardinality": "SINGLE",
"isIndexable": true, "isIndexable": true,
"isOptional": true "isOptional": true
...@@ -485,17 +485,17 @@ ...@@ -485,17 +485,17 @@
] ]
}, },
{ {
"name": "__AtlasGlossarySynonym", "name": "AtlasGlossarySynonym",
"typeVersion": "1.0", "typeVersion": "1.0",
"description": "Synonym is a relationship between glossary terms that have the same, or a very similar meaning in the same language. Notice that both ends of this relationship have the same name and refer to the same type; this results in one Synonym attribute being added to GlossaryTerm.", "description": "Synonym is a relationship between glossary terms that have the same, or a very similar meaning in the same language. Notice that both ends of this relationship have the same name and refer to the same type; this results in one Synonym attribute being added to GlossaryTerm.",
"endDef1": { "endDef1": {
"name": "synonyms", "name": "synonyms",
"type": "__AtlasGlossaryTerm", "type": "AtlasGlossaryTerm",
"cardinality": "SET" "cardinality": "SET"
}, },
"endDef2": { "endDef2": {
"name": "synonyms", "name": "synonyms",
"type": "__AtlasGlossaryTerm", "type": "AtlasGlossaryTerm",
"cardinality": "SET" "cardinality": "SET"
}, },
"relationshipCategory": "ASSOCIATION", "relationshipCategory": "ASSOCIATION",
...@@ -518,7 +518,7 @@ ...@@ -518,7 +518,7 @@
}, },
{ {
"name": "status", "name": "status",
"typeName": "__AtlasGlossaryTermRelationshipStatus", "typeName": "AtlasGlossaryTermRelationshipStatus",
"cardinality": "SINGLE", "cardinality": "SINGLE",
"isIndexable": true, "isIndexable": true,
"isOptional": true "isOptional": true
...@@ -541,17 +541,17 @@ ...@@ -541,17 +541,17 @@
] ]
}, },
{ {
"name": "__AtlasGlossaryAntonym", "name": "AtlasGlossaryAntonym",
"typeVersion": "1.0", "typeVersion": "1.0",
"description": "Antonym is a relationship between glossary terms that have the opposite (or near opposite) meaning, in the same language. Notice that both ends of this relationship have the same name and refer to the same type; this results in one Antonym attribute being added to GlossaryTerm.", "description": "Antonym is a relationship between glossary terms that have the opposite (or near opposite) meaning, in the same language. Notice that both ends of this relationship have the same name and refer to the same type; this results in one Antonym attribute being added to GlossaryTerm.",
"endDef1": { "endDef1": {
"name": "antonyms", "name": "antonyms",
"type": "__AtlasGlossaryTerm", "type": "AtlasGlossaryTerm",
"cardinality": "SET" "cardinality": "SET"
}, },
"endDef2": { "endDef2": {
"name": "antonyms", "name": "antonyms",
"type": "__AtlasGlossaryTerm", "type": "AtlasGlossaryTerm",
"cardinality": "SET" "cardinality": "SET"
}, },
"relationshipCategory": "ASSOCIATION", "relationshipCategory": "ASSOCIATION",
...@@ -574,7 +574,7 @@ ...@@ -574,7 +574,7 @@
}, },
{ {
"name": "status", "name": "status",
"typeName": "__AtlasGlossaryTermRelationshipStatus", "typeName": "AtlasGlossaryTermRelationshipStatus",
"cardinality": "SINGLE", "cardinality": "SINGLE",
"isIndexable": true, "isIndexable": true,
"isOptional": true "isOptional": true
...@@ -597,17 +597,17 @@ ...@@ -597,17 +597,17 @@
] ]
}, },
{ {
"name": "__AtlasGlossaryPreferredTerm", "name": "AtlasGlossaryPreferredTerm",
"typeVersion": "1.0", "typeVersion": "1.0",
"description": "PreferredTerm is a relationship that indicates that the preferredTerm should be used in place of the preferredToTerm. This relationship can be used to encourage adoption of newer vocabularies. This is a weaker version of ReplacementTerm.", "description": "PreferredTerm is a relationship that indicates that the preferredTerm should be used in place of the preferredToTerm. This relationship can be used to encourage adoption of newer vocabularies. This is a weaker version of ReplacementTerm.",
"endDef1": { "endDef1": {
"name": "preferredTerms", "name": "preferredTerms",
"type": "__AtlasGlossaryTerm", "type": "AtlasGlossaryTerm",
"cardinality": "SET" "cardinality": "SET"
}, },
"endDef2": { "endDef2": {
"name": "preferredToTerms", "name": "preferredToTerms",
"type": "__AtlasGlossaryTerm", "type": "AtlasGlossaryTerm",
"cardinality": "SET" "cardinality": "SET"
}, },
"relationshipCategory": "ASSOCIATION", "relationshipCategory": "ASSOCIATION",
...@@ -630,7 +630,7 @@ ...@@ -630,7 +630,7 @@
}, },
{ {
"name": "status", "name": "status",
"typeName": "__AtlasGlossaryTermRelationshipStatus", "typeName": "AtlasGlossaryTermRelationshipStatus",
"cardinality": "SINGLE", "cardinality": "SINGLE",
"isIndexable": true, "isIndexable": true,
"isOptional": true "isOptional": true
...@@ -653,17 +653,17 @@ ...@@ -653,17 +653,17 @@
] ]
}, },
{ {
"name": "__AtlasGlossaryReplacementTerm", "name": "AtlasGlossaryReplacementTerm",
"typeVersion": "1.0", "typeVersion": "1.0",
"description": "ReplacementTerm is a relationship that indicates that the replacementTerm must be used instead of the replacedByTerm. This is stronger version of the PreferredTerm.", "description": "ReplacementTerm is a relationship that indicates that the replacementTerm must be used instead of the replacedByTerm. This is stronger version of the PreferredTerm.",
"endDef1": { "endDef1": {
"name": "replacedBy", "name": "replacedBy",
"type": "__AtlasGlossaryTerm", "type": "AtlasGlossaryTerm",
"cardinality": "SET" "cardinality": "SET"
}, },
"endDef2": { "endDef2": {
"name": "replacementTerms", "name": "replacementTerms",
"type": "__AtlasGlossaryTerm", "type": "AtlasGlossaryTerm",
"cardinality": "SET" "cardinality": "SET"
}, },
"relationshipCategory": "ASSOCIATION", "relationshipCategory": "ASSOCIATION",
...@@ -686,7 +686,7 @@ ...@@ -686,7 +686,7 @@
}, },
{ {
"name": "status", "name": "status",
"typeName": "__AtlasGlossaryTermRelationshipStatus", "typeName": "AtlasGlossaryTermRelationshipStatus",
"cardinality": "SINGLE", "cardinality": "SINGLE",
"isIndexable": true, "isIndexable": true,
"isOptional": true "isOptional": true
...@@ -709,17 +709,17 @@ ...@@ -709,17 +709,17 @@
] ]
}, },
{ {
"name": "__AtlasGlossaryTranslation", "name": "AtlasGlossaryTranslation",
"typeVersion": "1.0", "typeVersion": "1.0",
"description": "Translation is a relationship that defines that the related terms represent the same meaning, but each are written in a different language. Hence one is a translation of the other. The language of each term is defined in the Glossary object that anchors the term.", "description": "Translation is a relationship that defines that the related terms represent the same meaning, but each are written in a different language. Hence one is a translation of the other. The language of each term is defined in the Glossary object that anchors the term.",
"endDef1": { "endDef1": {
"name": "translatedTerms", "name": "translatedTerms",
"type": "__AtlasGlossaryTerm", "type": "AtlasGlossaryTerm",
"cardinality": "SET" "cardinality": "SET"
}, },
"endDef2": { "endDef2": {
"name": "translationTerms", "name": "translationTerms",
"type": "__AtlasGlossaryTerm", "type": "AtlasGlossaryTerm",
"cardinality": "SET" "cardinality": "SET"
}, },
"relationshipCategory": "ASSOCIATION", "relationshipCategory": "ASSOCIATION",
...@@ -742,7 +742,7 @@ ...@@ -742,7 +742,7 @@
}, },
{ {
"name": "status", "name": "status",
"typeName": "__AtlasGlossaryTermRelationshipStatus", "typeName": "AtlasGlossaryTermRelationshipStatus",
"cardinality": "SINGLE", "cardinality": "SINGLE",
"isIndexable": true, "isIndexable": true,
"isOptional": true "isOptional": true
...@@ -765,17 +765,17 @@ ...@@ -765,17 +765,17 @@
] ]
}, },
{ {
"name": "__AtlasGlossaryIsARelationship", "name": "AtlasGlossaryIsARelationship",
"typeVersion": "1.0", "typeVersion": "1.0",
"description": "IsA is a relationship that defines that the 'isA' term is a more generic term than the 'isOf' term. For example, this relationship would be use to say that 'Cat' ISA 'Animal'.", "description": "IsA is a relationship that defines that the 'isA' term is a more generic term than the 'isOf' term. For example, this relationship would be use to say that 'Cat' ISA 'Animal'.",
"endDef1": { "endDef1": {
"name": "classifies", "name": "classifies",
"type": "__AtlasGlossaryTerm", "type": "AtlasGlossaryTerm",
"cardinality": "SET" "cardinality": "SET"
}, },
"endDef2": { "endDef2": {
"name": "isA", "name": "isA",
"type": "__AtlasGlossaryTerm", "type": "AtlasGlossaryTerm",
"cardinality": "SET" "cardinality": "SET"
}, },
"relationshipCategory": "ASSOCIATION", "relationshipCategory": "ASSOCIATION",
...@@ -798,7 +798,7 @@ ...@@ -798,7 +798,7 @@
}, },
{ {
"name": "status", "name": "status",
"typeName": "__AtlasGlossaryTermRelationshipStatus", "typeName": "AtlasGlossaryTermRelationshipStatus",
"cardinality": "SINGLE", "cardinality": "SINGLE",
"isIndexable": true, "isIndexable": true,
"isOptional": true "isOptional": true
...@@ -821,17 +821,17 @@ ...@@ -821,17 +821,17 @@
] ]
}, },
{ {
"name": "__AtlasGlossaryValidValue", "name": "AtlasGlossaryValidValue",
"typeVersion": "1.0", "typeVersion": "1.0",
"description": "ValidValue is a relationship that shows the validValue term represents one of the valid values that could be assigned to a data item that has the meaning described in the validValueFor term.", "description": "ValidValue is a relationship that shows the validValue term represents one of the valid values that could be assigned to a data item that has the meaning described in the validValueFor term.",
"endDef1": { "endDef1": {
"name": "validValuesFor", "name": "validValuesFor",
"type": "__AtlasGlossaryTerm", "type": "AtlasGlossaryTerm",
"cardinality": "SET" "cardinality": "SET"
}, },
"endDef2": { "endDef2": {
"name": "validValues", "name": "validValues",
"type": "__AtlasGlossaryTerm", "type": "AtlasGlossaryTerm",
"cardinality": "SET" "cardinality": "SET"
}, },
"relationshipCategory": "ASSOCIATION", "relationshipCategory": "ASSOCIATION",
...@@ -854,7 +854,7 @@ ...@@ -854,7 +854,7 @@
}, },
{ {
"name": "status", "name": "status",
"typeName": "__AtlasGlossaryTermRelationshipStatus", "typeName": "AtlasGlossaryTermRelationshipStatus",
"cardinality": "SINGLE", "cardinality": "SINGLE",
"isIndexable": true, "isIndexable": true,
"isOptional": true "isOptional": true
......
...@@ -125,7 +125,7 @@ public final class Constants { ...@@ -125,7 +125,7 @@ public final class Constants {
public static final String CLASSIFICATION_EDGE_IS_PROPAGATED_PROPERTY_KEY = INTERNAL_PROPERTY_KEY_PREFIX + "isPropagated"; public static final String CLASSIFICATION_EDGE_IS_PROPAGATED_PROPERTY_KEY = INTERNAL_PROPERTY_KEY_PREFIX + "isPropagated";
public static final String CLASSIFICATION_EDGE_STATE_PROPERTY_KEY = STATE_PROPERTY_KEY; public static final String CLASSIFICATION_EDGE_STATE_PROPERTY_KEY = STATE_PROPERTY_KEY;
public static final String CLASSIFICATION_LABEL = "classifiedAs"; public static final String CLASSIFICATION_LABEL = "classifiedAs";
public static final String TERM_ASSIGNMENT_LABEL = "r:__AtlasGlossarySemanticAssignment"; public static final String TERM_ASSIGNMENT_LABEL = "r:AtlasGlossarySemanticAssignment";
public static final String VERTEX_ID_IN_IMPORT_KEY = "__vIdInImport"; public static final String VERTEX_ID_IN_IMPORT_KEY = "__vIdInImport";
public static final String EDGE_ID_IN_IMPORT_KEY = "__eIdInImport"; public static final String EDGE_ID_IN_IMPORT_KEY = "__eIdInImport";
......
...@@ -126,7 +126,7 @@ define(['require', ...@@ -126,7 +126,7 @@ define(['require',
this.entityObject = this.collection.first().toJSON(); this.entityObject = this.collection.first().toJSON();
var collectionJSON = this.entityObject.entity; var collectionJSON = this.entityObject.entity;
if (collectionJSON && collectionJSON.typeName.startsWith("__AtlasGlossary")) { if (collectionJSON && collectionJSON.typeName.startsWith("AtlasGlossary")) {
this.$(".termBox").hide(); this.$(".termBox").hide();
} }
// MergerRefEntity. // MergerRefEntity.
...@@ -502,4 +502,4 @@ define(['require', ...@@ -502,4 +502,4 @@ define(['require',
} }
}); });
return DetailPageLayoutView; return DetailPageLayoutView;
}); });
\ No newline at end of file
...@@ -485,7 +485,7 @@ define(['require', ...@@ -485,7 +485,7 @@ define(['require',
data: function(params) { data: function(params) {
return { return {
attrValuePrefix: params.term, // search term attrValuePrefix: params.term, // search term
typeName: "__AtlasGlossaryTerm", typeName: "AtlasGlossaryTerm",
limit: 10, limit: 10,
offset: 0 offset: 0
}; };
...@@ -680,4 +680,4 @@ define(['require', ...@@ -680,4 +680,4 @@ define(['require',
} }
}); });
return SearchLayoutView; return SearchLayoutView;
}); });
\ No newline at end of file
...@@ -851,7 +851,7 @@ define(['require', ...@@ -851,7 +851,7 @@ define(['require',
formatter: _.extend({}, Backgrid.CellFormatter.prototype, { formatter: _.extend({}, Backgrid.CellFormatter.prototype, {
fromRaw: function(rawValue, model) { fromRaw: function(rawValue, model) {
var obj = model.toJSON(); var obj = model.toJSON();
if (!(obj.typeName.startsWith("__AtlasGlossary"))) { if (!(obj.typeName.startsWith("AtlasGlossary"))) {
if (obj.status && Enums.entityStateReadOnly[obj.status]) { if (obj.status && Enums.entityStateReadOnly[obj.status]) {
return '<div class="readOnly">' + CommonViewFunction.termForTable(obj); + '</div>'; return '<div class="readOnly">' + CommonViewFunction.termForTable(obj); + '</div>';
} else { } else {
...@@ -1089,4 +1089,4 @@ define(['require', ...@@ -1089,4 +1089,4 @@ define(['require',
} }
}); });
return SearchResultLayoutView; return SearchResultLayoutView;
}); });
\ No newline at end of file
...@@ -437,19 +437,19 @@ public class AtlasGlossaryTerm extends AtlasGlossaryBaseObject { ...@@ -437,19 +437,19 @@ public class AtlasGlossaryTerm extends AtlasGlossaryBaseObject {
} }
public enum Relation { public enum Relation {
SEE_ALSO("__AtlasGlossaryRelatedTerm", "seeAlso"), SEE_ALSO("AtlasGlossaryRelatedTerm", "seeAlso"),
SYNONYMS("__AtlasGlossarySynonym", "synonyms"), SYNONYMS("AtlasGlossarySynonym", "synonyms"),
ANTONYMS("__AtlasGlossaryAntonym", "antonyms"), ANTONYMS("AtlasGlossaryAntonym", "antonyms"),
PREFERRED_TERMS("__AtlasGlossaryPreferredTerm", "preferredTerms"), PREFERRED_TERMS("AtlasGlossaryPreferredTerm", "preferredTerms"),
PREFERRED_TO_TERMS("__AtlasGlossaryPreferredTerm", "preferredToTerms"), PREFERRED_TO_TERMS("AtlasGlossaryPreferredTerm", "preferredToTerms"),
REPLACEMENT_TERMS("__AtlasGlossaryReplacementTerm", "replacementTerms"), REPLACEMENT_TERMS("AtlasGlossaryReplacementTerm", "replacementTerms"),
REPLACED_BY("__AtlasGlossaryReplacementTerm", "replacedBy"), REPLACED_BY("AtlasGlossaryReplacementTerm", "replacedBy"),
TRANSLATION_TERMS("__AtlasGlossaryTranslation", "translationTerms"), TRANSLATION_TERMS("AtlasGlossaryTranslation", "translationTerms"),
TRANSLATED_TERMS("__AtlasGlossaryTranslation", "translatedTerms"), TRANSLATED_TERMS("AtlasGlossaryTranslation", "translatedTerms"),
ISA("__AtlasGlossaryIsARelationship", "isA"), ISA("AtlasGlossaryIsARelationship", "isA"),
CLASSIFIES("__AtlasGlossaryIsARelationship", "classifies"), CLASSIFIES("AtlasGlossaryIsARelationship", "classifies"),
VALID_VALUES("__AtlasGlossaryValidValue", "validValues"), VALID_VALUES("AtlasGlossaryValidValue", "validValues"),
VALID_VALUES_FOR("__AtlasGlossaryValidValue", "validValuesFor"), VALID_VALUES_FOR("AtlasGlossaryValidValue", "validValuesFor"),
; ;
private String relationName; private String relationName;
......
...@@ -33,7 +33,7 @@ public class TermSearchProcessor extends SearchProcessor { ...@@ -33,7 +33,7 @@ public class TermSearchProcessor extends SearchProcessor {
private static final Logger LOG = LoggerFactory.getLogger(TermSearchProcessor.class); private static final Logger LOG = LoggerFactory.getLogger(TermSearchProcessor.class);
private static final Logger PERF_LOG = AtlasPerfTracer.getPerfLogger("TermSearchProcessor"); private static final Logger PERF_LOG = AtlasPerfTracer.getPerfLogger("TermSearchProcessor");
public static final String ATLAS_GLOSSARY_TERM_ENTITY_TYPE = "__AtlasGlossaryTerm"; public static final String ATLAS_GLOSSARY_TERM_ENTITY_TYPE = "AtlasGlossaryTerm";
public static final String ATLAS_GLOSSARY_TERM_ATTR_QNAME = "qualifiedName"; public static final String ATLAS_GLOSSARY_TERM_ATTR_QNAME = "qualifiedName";
public static final String ATLAS_GLOSSARY_TERM_ATTR_ASSIGNED_ENTITIES = "assignedEntities"; public static final String ATLAS_GLOSSARY_TERM_ATTR_ASSIGNED_ENTITIES = "assignedEntities";
......
...@@ -36,9 +36,9 @@ public abstract class GlossaryUtils { ...@@ -36,9 +36,9 @@ public abstract class GlossaryUtils {
public static final String TERM_ASSIGNMENT_ATTR_STEWARD = "steward"; public static final String TERM_ASSIGNMENT_ATTR_STEWARD = "steward";
public static final String TERM_ASSIGNMENT_ATTR_SOURCE = "source"; public static final String TERM_ASSIGNMENT_ATTR_SOURCE = "source";
static final String ATLAS_GLOSSARY_TYPENAME = "__AtlasGlossary"; static final String ATLAS_GLOSSARY_TYPENAME = "AtlasGlossary";
static final String ATLAS_GLOSSARY_TERM_TYPENAME = "__AtlasGlossaryTerm"; static final String ATLAS_GLOSSARY_TERM_TYPENAME = "AtlasGlossaryTerm";
static final String ATLAS_GLOSSARY_CATEGORY_TYPENAME = "__AtlasGlossaryCategory"; static final String ATLAS_GLOSSARY_CATEGORY_TYPENAME = "AtlasGlossaryCategory";
// Relation name constants // Relation name constants
protected static final String ATLAS_GLOSSARY_PREFIX = ATLAS_GLOSSARY_TYPENAME; protected static final String ATLAS_GLOSSARY_PREFIX = ATLAS_GLOSSARY_TYPENAME;
......
...@@ -27,24 +27,18 @@ import org.apache.commons.lang3.StringUtils; ...@@ -27,24 +27,18 @@ import org.apache.commons.lang3.StringUtils;
public abstract class AbstractDataTransferObject<T extends AtlasBaseModelObject> implements DataTransferObject<T> { public abstract class AbstractDataTransferObject<T extends AtlasBaseModelObject> implements DataTransferObject<T> {
private static final String DEFAULT_PREFIX = "Atlas";
private final AtlasTypeRegistry typeRegistry; private final AtlasTypeRegistry typeRegistry;
private final Class<T> objectType; private final Class<T> objectType;
private final String entityTypeName; private final String entityTypeName;
private final String alternateEntityTypeName;
protected AbstractDataTransferObject(AtlasTypeRegistry typeRegistry, Class<T> tClass, boolean isInternal) { protected AbstractDataTransferObject(AtlasTypeRegistry typeRegistry, Class<T> tClass) {
this(typeRegistry, tClass, tClass.getSimpleName());
}
protected AbstractDataTransferObject(AtlasTypeRegistry typeRegistry, Class<T> tClass, String entityTypeName) {
this.typeRegistry = typeRegistry; this.typeRegistry = typeRegistry;
this.objectType = tClass; this.objectType = tClass;
if (isInternal) { this.entityTypeName = entityTypeName;
this.entityTypeName = Constants.INTERNAL_PROPERTY_KEY_PREFIX + objectType.getSimpleName();
this.alternateEntityTypeName = null;
} else {
this.entityTypeName = objectType.getSimpleName();
this.alternateEntityTypeName = entityTypeName.startsWith(DEFAULT_PREFIX) ? entityTypeName.substring(DEFAULT_PREFIX.length()) : null;
}
} }
@Override @Override
...@@ -55,9 +49,7 @@ public abstract class AbstractDataTransferObject<T extends AtlasBaseModelObject> ...@@ -55,9 +49,7 @@ public abstract class AbstractDataTransferObject<T extends AtlasBaseModelObject>
@Override @Override
public AtlasEntityType getEntityType() { public AtlasEntityType getEntityType() {
AtlasEntityType ret = typeRegistry.getEntityTypeByName(entityTypeName); AtlasEntityType ret = typeRegistry.getEntityTypeByName(entityTypeName);
if (ret == null) {
ret = typeRegistry.getEntityTypeByName(alternateEntityTypeName);
}
return ret; return ret;
} }
......
...@@ -33,8 +33,12 @@ import java.util.HashSet; ...@@ -33,8 +33,12 @@ import java.util.HashSet;
import java.util.Set; import java.util.Set;
public abstract class AbstractGlossaryDTO<T extends AtlasBaseModelObject> extends AbstractDataTransferObject<T> { public abstract class AbstractGlossaryDTO<T extends AtlasBaseModelObject> extends AbstractDataTransferObject<T> {
protected AbstractGlossaryDTO(final AtlasTypeRegistry typeRegistry, final Class<T> tClass, final boolean isInternal) { protected AbstractGlossaryDTO(final AtlasTypeRegistry typeRegistry, final Class<T> tClass) {
super(typeRegistry, tClass, isInternal); super(typeRegistry, tClass);
}
protected AbstractGlossaryDTO(final AtlasTypeRegistry typeRegistry, final Class<T> tClass, final String entityTypeName) {
super(typeRegistry, tClass, entityTypeName);
} }
protected AtlasRelatedTermHeader constructRelatedTermId(AtlasRelatedObjectId relatedObjectId) { protected AtlasRelatedTermHeader constructRelatedTermId(AtlasRelatedObjectId relatedObjectId) {
......
...@@ -39,7 +39,7 @@ public class AtlasGlossaryCategoryDTO extends AbstractGlossaryDTO<AtlasGlossaryC ...@@ -39,7 +39,7 @@ public class AtlasGlossaryCategoryDTO extends AbstractGlossaryDTO<AtlasGlossaryC
@Inject @Inject
protected AtlasGlossaryCategoryDTO(final AtlasTypeRegistry typeRegistry) { protected AtlasGlossaryCategoryDTO(final AtlasTypeRegistry typeRegistry) {
super(typeRegistry, AtlasGlossaryCategory.class, true); super(typeRegistry, AtlasGlossaryCategory.class);
} }
@Override @Override
......
...@@ -38,7 +38,7 @@ public class AtlasGlossaryDTO extends AbstractGlossaryDTO<AtlasGlossary> { ...@@ -38,7 +38,7 @@ public class AtlasGlossaryDTO extends AbstractGlossaryDTO<AtlasGlossary> {
@Inject @Inject
public AtlasGlossaryDTO(AtlasTypeRegistry typeRegistry) { public AtlasGlossaryDTO(AtlasTypeRegistry typeRegistry) {
super(typeRegistry, AtlasGlossary.class, true); super(typeRegistry, AtlasGlossary.class);
} }
@Override @Override
......
...@@ -40,7 +40,7 @@ public class AtlasGlossaryTermDTO extends AbstractGlossaryDTO<AtlasGlossaryTerm> ...@@ -40,7 +40,7 @@ public class AtlasGlossaryTermDTO extends AbstractGlossaryDTO<AtlasGlossaryTerm>
@Inject @Inject
protected AtlasGlossaryTermDTO(final AtlasTypeRegistry typeRegistry) { protected AtlasGlossaryTermDTO(final AtlasTypeRegistry typeRegistry) {
super(typeRegistry, AtlasGlossaryTerm.class, true); super(typeRegistry, AtlasGlossaryTerm.class);
} }
@Override @Override
......
...@@ -44,7 +44,7 @@ public class AtlasSavedSearchDTO extends AbstractDataTransferObject<AtlasUserSav ...@@ -44,7 +44,7 @@ public class AtlasSavedSearchDTO extends AbstractDataTransferObject<AtlasUserSav
@Inject @Inject
public AtlasSavedSearchDTO(AtlasTypeRegistry typeRegistry) { public AtlasSavedSearchDTO(AtlasTypeRegistry typeRegistry) {
super(typeRegistry, AtlasUserSavedSearch.class, true); super(typeRegistry, AtlasUserSavedSearch.class, "__AtlasUserSavedSearch");
} }
@Override @Override
......
...@@ -40,7 +40,7 @@ public class AtlasUserProfileDTO extends AbstractDataTransferObject<AtlasUserPro ...@@ -40,7 +40,7 @@ public class AtlasUserProfileDTO extends AbstractDataTransferObject<AtlasUserPro
@Inject @Inject
public AtlasUserProfileDTO(AtlasTypeRegistry typeRegistry, AtlasSavedSearchDTO savedSearchDTO) { public AtlasUserProfileDTO(AtlasTypeRegistry typeRegistry, AtlasSavedSearchDTO savedSearchDTO) {
super(typeRegistry, AtlasUserProfile.class, true); super(typeRegistry, AtlasUserProfile.class, "__AtlasUserProfile");
this.savedSearchDTO = savedSearchDTO; this.savedSearchDTO = savedSearchDTO;
} }
......
...@@ -120,8 +120,8 @@ import static org.apache.atlas.type.AtlasStructType.AtlasAttribute.AtlasRelation ...@@ -120,8 +120,8 @@ import static org.apache.atlas.type.AtlasStructType.AtlasAttribute.AtlasRelation
public final class EntityGraphRetriever { public final class EntityGraphRetriever {
private static final Logger LOG = LoggerFactory.getLogger(EntityGraphRetriever.class); private static final Logger LOG = LoggerFactory.getLogger(EntityGraphRetriever.class);
private static final String TERM_RELATION_NAME = "__AtlasGlossarySemanticAssignment"; private static final String TERM_RELATION_NAME = "AtlasGlossarySemanticAssignment";
private static final String GLOSSARY_TERM_DISPLAY_NAME_ATTR = "__AtlasGlossaryTerm.displayName"; private static final String GLOSSARY_TERM_DISPLAY_NAME_ATTR = "AtlasGlossaryTerm.displayName";
private final String NAME = "name"; private final String NAME = "name";
private final String DISPLAY_NAME = "displayName"; private final String DISPLAY_NAME = "displayName";
...@@ -1101,4 +1101,4 @@ public final class EntityGraphRetriever { ...@@ -1101,4 +1101,4 @@ public final class EntityGraphRetriever {
relationship.setAttribute(attribute.getName(), attrValue); relationship.setAttribute(attribute.getName(), attrValue);
} }
} }
} }
\ No newline at end of file
...@@ -246,10 +246,10 @@ public class ImportServiceTest { ...@@ -246,10 +246,10 @@ public class ImportServiceTest {
loadGlossary(); loadGlossary();
runImportWithNoParameters(importService, zipSource); runImportWithNoParameters(importService, zipSource);
assertEntityCount("__AtlasGlossary", "40c80052-3129-4f7c-8f2f-391677935416", 1); assertEntityCount("AtlasGlossary", "40c80052-3129-4f7c-8f2f-391677935416", 1);
assertEntityCount("__AtlasGlossaryTerm", "e93ac426-de04-4d54-a7c9-d76c1e96369b", 1); assertEntityCount("AtlasGlossaryTerm", "e93ac426-de04-4d54-a7c9-d76c1e96369b", 1);
assertEntityCount("__AtlasGlossaryTerm", "93ad3bf6-23dc-4e3f-b70e-f8fad6438203", 1); assertEntityCount("AtlasGlossaryTerm", "93ad3bf6-23dc-4e3f-b70e-f8fad6438203", 1);
assertEntityCount("__AtlasGlossaryTerm", "105533b6-c125-4a87-bed5-cdf67fb68c39", 1); assertEntityCount("AtlasGlossaryTerm", "105533b6-c125-4a87-bed5-cdf67fb68c39", 1);
} }
private List<AtlasEntityHeader> getImportedEntities(String query, String guid) throws AtlasBaseException { private List<AtlasEntityHeader> getImportedEntities(String query, String guid) throws AtlasBaseException {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment