target stringlengths 20 113k | src_fm stringlengths 11 86.3k | src_fm_fc stringlengths 21 86.4k | src_fm_fc_co stringlengths 30 86.4k | src_fm_fc_ms stringlengths 42 86.8k | src_fm_fc_ms_ff stringlengths 43 86.8k |
|---|---|---|---|---|---|
@Test public void testValidateAtlasMappingFileLookupFieldMappingUnusedLookupTable() { AtlasMapping mapping = getAtlasMappingFullValid(); LookupTables lookupTables = new LookupTables(); mapping.setLookupTables(lookupTables); LookupTable lookupTable = new LookupTable(); lookupTable.setName("table1"); lookupTable.setDescr... | @Override public List<Validation> validateMapping(AtlasMapping mapping) { List<Validation> validations = new ArrayList<>(); Validators.MAPPING_NAME.get().validate(mapping.getName(), validations, null); List<DataSource> dataSources = mapping.getDataSource(); for (DataSource ds : dataSources) { switch (ds.getDataSourceTy... | DefaultAtlasValidationService implements AtlasValidationService { @Override public List<Validation> validateMapping(AtlasMapping mapping) { List<Validation> validations = new ArrayList<>(); Validators.MAPPING_NAME.get().validate(mapping.getName(), validations, null); List<DataSource> dataSources = mapping.getDataSource... | DefaultAtlasValidationService implements AtlasValidationService { @Override public List<Validation> validateMapping(AtlasMapping mapping) { List<Validation> validations = new ArrayList<>(); Validators.MAPPING_NAME.get().validate(mapping.getName(), validations, null); List<DataSource> dataSources = mapping.getDataSource... | DefaultAtlasValidationService implements AtlasValidationService { @Override public List<Validation> validateMapping(AtlasMapping mapping) { List<Validation> validations = new ArrayList<>(); Validators.MAPPING_NAME.get().validate(mapping.getName(), validations, null); List<DataSource> dataSources = mapping.getDataSource... | DefaultAtlasValidationService implements AtlasValidationService { @Override public List<Validation> validateMapping(AtlasMapping mapping) { List<Validation> validations = new ArrayList<>(); Validators.MAPPING_NAME.get().validate(mapping.getName(), validations, null); List<DataSource> dataSources = mapping.getDataSource... |
@Test public void testValidateAtlasMappingFileNoLookupFieldMappingsWithTablesDefined() { AtlasMapping mapping = getAtlasMappingFullValid(); LookupTables lookupTables = new LookupTables(); mapping.setLookupTables(lookupTables); LookupTable lookupTable = new LookupTable(); lookupTable.setName("table1"); lookupTable.setDe... | @Override public List<Validation> validateMapping(AtlasMapping mapping) { List<Validation> validations = new ArrayList<>(); Validators.MAPPING_NAME.get().validate(mapping.getName(), validations, null); List<DataSource> dataSources = mapping.getDataSource(); for (DataSource ds : dataSources) { switch (ds.getDataSourceTy... | DefaultAtlasValidationService implements AtlasValidationService { @Override public List<Validation> validateMapping(AtlasMapping mapping) { List<Validation> validations = new ArrayList<>(); Validators.MAPPING_NAME.get().validate(mapping.getName(), validations, null); List<DataSource> dataSources = mapping.getDataSource... | DefaultAtlasValidationService implements AtlasValidationService { @Override public List<Validation> validateMapping(AtlasMapping mapping) { List<Validation> validations = new ArrayList<>(); Validators.MAPPING_NAME.get().validate(mapping.getName(), validations, null); List<DataSource> dataSources = mapping.getDataSource... | DefaultAtlasValidationService implements AtlasValidationService { @Override public List<Validation> validateMapping(AtlasMapping mapping) { List<Validation> validations = new ArrayList<>(); Validators.MAPPING_NAME.get().validate(mapping.getName(), validations, null); List<DataSource> dataSources = mapping.getDataSource... | DefaultAtlasValidationService implements AtlasValidationService { @Override public List<Validation> validateMapping(AtlasMapping mapping) { List<Validation> validations = new ArrayList<>(); Validators.MAPPING_NAME.get().validate(mapping.getName(), validations, null); List<DataSource> dataSources = mapping.getDataSource... |
@Test public void testDefaultAtlasModuleInfoRegistry() { assertNotNull(atlasModuleInfoRegistry); } | public DefaultAtlasModuleInfoRegistry(DefaultAtlasContextFactory factory) { jmxObjectNamePrefix = factory.getJmxObjectName() + ",modules=AvailableModules,moduleName="; } | DefaultAtlasModuleInfoRegistry implements AtlasModuleInfoRegistry { public DefaultAtlasModuleInfoRegistry(DefaultAtlasContextFactory factory) { jmxObjectNamePrefix = factory.getJmxObjectName() + ",modules=AvailableModules,moduleName="; } } | DefaultAtlasModuleInfoRegistry implements AtlasModuleInfoRegistry { public DefaultAtlasModuleInfoRegistry(DefaultAtlasContextFactory factory) { jmxObjectNamePrefix = factory.getJmxObjectName() + ",modules=AvailableModules,moduleName="; } DefaultAtlasModuleInfoRegistry(DefaultAtlasContextFactory factory); } | DefaultAtlasModuleInfoRegistry implements AtlasModuleInfoRegistry { public DefaultAtlasModuleInfoRegistry(DefaultAtlasContextFactory factory) { jmxObjectNamePrefix = factory.getJmxObjectName() + ",modules=AvailableModules,moduleName="; } DefaultAtlasModuleInfoRegistry(DefaultAtlasContextFactory factory); @Override Atla... | DefaultAtlasModuleInfoRegistry implements AtlasModuleInfoRegistry { public DefaultAtlasModuleInfoRegistry(DefaultAtlasContextFactory factory) { jmxObjectNamePrefix = factory.getJmxObjectName() + ",modules=AvailableModules,moduleName="; } DefaultAtlasModuleInfoRegistry(DefaultAtlasContextFactory factory); @Override Atla... |
@Test public void testBuildSimpleExampleDocument() throws Exception { writeValue("/orders/@totalCost", "12525.00"); writeValue("/orders/order/id/@custId", "a"); writeValue("/orders/order/id", "12312"); writeValue("/orders/order/id[1]/@custId", "b"); writeValue("/orders/order/id[1]", "4423423"); checkResultFromFile("sim... | private void writeValue(Element parentNode, XmlSegmentContext segment, Field field) throws AtlasException { if (LOG.isDebugEnabled()) { LOG.debug("Writing field value in parent node '{}', parentNode: {}", segment, xmlHelper.writeDocumentToString(true, parentNode)); } String value = convertValue(field); if (segment.isAt... | XmlFieldWriter extends XmlFieldTransformer implements AtlasFieldWriter { private void writeValue(Element parentNode, XmlSegmentContext segment, Field field) throws AtlasException { if (LOG.isDebugEnabled()) { LOG.debug("Writing field value in parent node '{}', parentNode: {}", segment, xmlHelper.writeDocumentToString(t... | XmlFieldWriter extends XmlFieldTransformer implements AtlasFieldWriter { private void writeValue(Element parentNode, XmlSegmentContext segment, Field field) throws AtlasException { if (LOG.isDebugEnabled()) { LOG.debug("Writing field value in parent node '{}', parentNode: {}", segment, xmlHelper.writeDocumentToString(t... | XmlFieldWriter extends XmlFieldTransformer implements AtlasFieldWriter { private void writeValue(Element parentNode, XmlSegmentContext segment, Field field) throws AtlasException { if (LOG.isDebugEnabled()) { LOG.debug("Writing field value in parent node '{}', parentNode: {}", segment, xmlHelper.writeDocumentToString(t... | XmlFieldWriter extends XmlFieldTransformer implements AtlasFieldWriter { private void writeValue(Element parentNode, XmlSegmentContext segment, Field field) throws AtlasException { if (LOG.isDebugEnabled()) { LOG.debug("Writing field value in parent node '{}', parentNode: {}", segment, xmlHelper.writeDocumentToString(t... |
@Test public void testLookupByUri() { assertNull(atlasModuleInfoRegistry.lookupByUri(null)); List<String> formats = new ArrayList<>(); formats.add("java"); List<String> packageNames = new ArrayList<>(); packageNames.add("io.atlasmap.core"); DefaultAtlasModuleInfo atlasModuleInfo = new DefaultAtlasModuleInfo("name", "at... | @Override public AtlasModuleInfo lookupByUri(String uri) { if (uri == null) { return null; } for (AtlasModuleInfo module : moduleInfos) { if (uri.startsWith(module.getUri())) { return module; } } return null; } | DefaultAtlasModuleInfoRegistry implements AtlasModuleInfoRegistry { @Override public AtlasModuleInfo lookupByUri(String uri) { if (uri == null) { return null; } for (AtlasModuleInfo module : moduleInfos) { if (uri.startsWith(module.getUri())) { return module; } } return null; } } | DefaultAtlasModuleInfoRegistry implements AtlasModuleInfoRegistry { @Override public AtlasModuleInfo lookupByUri(String uri) { if (uri == null) { return null; } for (AtlasModuleInfo module : moduleInfos) { if (uri.startsWith(module.getUri())) { return module; } } return null; } DefaultAtlasModuleInfoRegistry(DefaultAtl... | DefaultAtlasModuleInfoRegistry implements AtlasModuleInfoRegistry { @Override public AtlasModuleInfo lookupByUri(String uri) { if (uri == null) { return null; } for (AtlasModuleInfo module : moduleInfos) { if (uri.startsWith(module.getUri())) { return module; } } return null; } DefaultAtlasModuleInfoRegistry(DefaultAtl... | DefaultAtlasModuleInfoRegistry implements AtlasModuleInfoRegistry { @Override public AtlasModuleInfo lookupByUri(String uri) { if (uri == null) { return null; } for (AtlasModuleInfo module : moduleInfos) { if (uri.startsWith(module.getUri())) { return module; } } return null; } DefaultAtlasModuleInfoRegistry(DefaultAtl... |
@Test public void testGetAll() { assertNotNull(atlasModuleInfoRegistry.getAll()); } | @Override public Set<AtlasModuleInfo> getAll() { return Collections.unmodifiableSet(moduleInfos); } | DefaultAtlasModuleInfoRegistry implements AtlasModuleInfoRegistry { @Override public Set<AtlasModuleInfo> getAll() { return Collections.unmodifiableSet(moduleInfos); } } | DefaultAtlasModuleInfoRegistry implements AtlasModuleInfoRegistry { @Override public Set<AtlasModuleInfo> getAll() { return Collections.unmodifiableSet(moduleInfos); } DefaultAtlasModuleInfoRegistry(DefaultAtlasContextFactory factory); } | DefaultAtlasModuleInfoRegistry implements AtlasModuleInfoRegistry { @Override public Set<AtlasModuleInfo> getAll() { return Collections.unmodifiableSet(moduleInfos); } DefaultAtlasModuleInfoRegistry(DefaultAtlasContextFactory factory); @Override AtlasModuleInfo lookupByUri(String uri); @Override Set<AtlasModuleInfo> ge... | DefaultAtlasModuleInfoRegistry implements AtlasModuleInfoRegistry { @Override public Set<AtlasModuleInfo> getAll() { return Collections.unmodifiableSet(moduleInfos); } DefaultAtlasModuleInfoRegistry(DefaultAtlasContextFactory factory); @Override AtlasModuleInfo lookupByUri(String uri); @Override Set<AtlasModuleInfo> ge... |
@Test public void testRegister() { List<String> formats = new ArrayList<>(); formats.add("java"); List<String> packageNames = new ArrayList<>(); packageNames.add("io.atlasmap.core"); DefaultAtlasModuleInfo atlasModuleInfo = new DefaultAtlasModuleInfo("name", "atlas:java", AtlasModule.class, null, formats, packageNames)... | @Override public void register(AtlasModuleInfo module) { moduleInfos.add(module); registerModuleJmx(module); } | DefaultAtlasModuleInfoRegistry implements AtlasModuleInfoRegistry { @Override public void register(AtlasModuleInfo module) { moduleInfos.add(module); registerModuleJmx(module); } } | DefaultAtlasModuleInfoRegistry implements AtlasModuleInfoRegistry { @Override public void register(AtlasModuleInfo module) { moduleInfos.add(module); registerModuleJmx(module); } DefaultAtlasModuleInfoRegistry(DefaultAtlasContextFactory factory); } | DefaultAtlasModuleInfoRegistry implements AtlasModuleInfoRegistry { @Override public void register(AtlasModuleInfo module) { moduleInfos.add(module); registerModuleJmx(module); } DefaultAtlasModuleInfoRegistry(DefaultAtlasContextFactory factory); @Override AtlasModuleInfo lookupByUri(String uri); @Override Set<AtlasMod... | DefaultAtlasModuleInfoRegistry implements AtlasModuleInfoRegistry { @Override public void register(AtlasModuleInfo module) { moduleInfos.add(module); registerModuleJmx(module); } DefaultAtlasModuleInfoRegistry(DefaultAtlasContextFactory factory); @Override AtlasModuleInfo lookupByUri(String uri); @Override Set<AtlasMod... |
@Test public void testSize() { assertEquals(0, atlasModuleInfoRegistry.size()); } | @Override public int size() { return moduleInfos.size(); } | DefaultAtlasModuleInfoRegistry implements AtlasModuleInfoRegistry { @Override public int size() { return moduleInfos.size(); } } | DefaultAtlasModuleInfoRegistry implements AtlasModuleInfoRegistry { @Override public int size() { return moduleInfos.size(); } DefaultAtlasModuleInfoRegistry(DefaultAtlasContextFactory factory); } | DefaultAtlasModuleInfoRegistry implements AtlasModuleInfoRegistry { @Override public int size() { return moduleInfos.size(); } DefaultAtlasModuleInfoRegistry(DefaultAtlasContextFactory factory); @Override AtlasModuleInfo lookupByUri(String uri); @Override Set<AtlasModuleInfo> getAll(); @Override void register(AtlasModu... | DefaultAtlasModuleInfoRegistry implements AtlasModuleInfoRegistry { @Override public int size() { return moduleInfos.size(); } DefaultAtlasModuleInfoRegistry(DefaultAtlasContextFactory factory); @Override AtlasModuleInfo lookupByUri(String uri); @Override Set<AtlasModuleInfo> getAll(); @Override void register(AtlasModu... |
@Test public void testUnregisterAll() { atlasModuleInfoRegistry.unregisterAll(); assertEquals(0, atlasModuleInfoRegistry.size()); } | @Override public synchronized void unregisterAll() { for (AtlasModuleInfo info : moduleInfos) { unregisterModuleJmx(info); } moduleInfos.clear(); } | DefaultAtlasModuleInfoRegistry implements AtlasModuleInfoRegistry { @Override public synchronized void unregisterAll() { for (AtlasModuleInfo info : moduleInfos) { unregisterModuleJmx(info); } moduleInfos.clear(); } } | DefaultAtlasModuleInfoRegistry implements AtlasModuleInfoRegistry { @Override public synchronized void unregisterAll() { for (AtlasModuleInfo info : moduleInfos) { unregisterModuleJmx(info); } moduleInfos.clear(); } DefaultAtlasModuleInfoRegistry(DefaultAtlasContextFactory factory); } | DefaultAtlasModuleInfoRegistry implements AtlasModuleInfoRegistry { @Override public synchronized void unregisterAll() { for (AtlasModuleInfo info : moduleInfos) { unregisterModuleJmx(info); } moduleInfos.clear(); } DefaultAtlasModuleInfoRegistry(DefaultAtlasContextFactory factory); @Override AtlasModuleInfo lookupByUr... | DefaultAtlasModuleInfoRegistry implements AtlasModuleInfoRegistry { @Override public synchronized void unregisterAll() { for (AtlasModuleInfo info : moduleInfos) { unregisterModuleJmx(info); } moduleInfos.clear(); } DefaultAtlasModuleInfoRegistry(DefaultAtlasContextFactory factory); @Override AtlasModuleInfo lookupByUr... |
@Test public void testCombineSingleValue() { assertNotNull(combine); String value = combine.combineValues(generateCombineMap(1)); assertNotNull(value); assertEquals("a", value); } | @Override public String combineValues(Map<Integer, String> values) { return combineValues(values, getDelimiter(), getLimit()); } | DefaultAtlasCombineStrategy implements AtlasCombineStrategy { @Override public String combineValues(Map<Integer, String> values) { return combineValues(values, getDelimiter(), getLimit()); } } | DefaultAtlasCombineStrategy implements AtlasCombineStrategy { @Override public String combineValues(Map<Integer, String> values) { return combineValues(values, getDelimiter(), getLimit()); } } | DefaultAtlasCombineStrategy implements AtlasCombineStrategy { @Override public String combineValues(Map<Integer, String> values) { return combineValues(values, getDelimiter(), getLimit()); } @Override StringDelimiter getDelimiter(); @Override void setDelimiter(StringDelimiter delimiter); @Override Integer getLimit(); ... | DefaultAtlasCombineStrategy implements AtlasCombineStrategy { @Override public String combineValues(Map<Integer, String> values) { return combineValues(values, getDelimiter(), getLimit()); } @Override StringDelimiter getDelimiter(); @Override void setDelimiter(StringDelimiter delimiter); @Override Integer getLimit(); ... |
@Test public void testCombineValues() { assertNotNull(combine); String value = combine.combineValues(generateCombineMap(6)); assertNotNull(value); assertEquals("a b c d e f", value); } | @Override public String combineValues(Map<Integer, String> values) { return combineValues(values, getDelimiter(), getLimit()); } | DefaultAtlasCombineStrategy implements AtlasCombineStrategy { @Override public String combineValues(Map<Integer, String> values) { return combineValues(values, getDelimiter(), getLimit()); } } | DefaultAtlasCombineStrategy implements AtlasCombineStrategy { @Override public String combineValues(Map<Integer, String> values) { return combineValues(values, getDelimiter(), getLimit()); } } | DefaultAtlasCombineStrategy implements AtlasCombineStrategy { @Override public String combineValues(Map<Integer, String> values) { return combineValues(values, getDelimiter(), getLimit()); } @Override StringDelimiter getDelimiter(); @Override void setDelimiter(StringDelimiter delimiter); @Override Integer getLimit(); ... | DefaultAtlasCombineStrategy implements AtlasCombineStrategy { @Override public String combineValues(Map<Integer, String> values) { return combineValues(values, getDelimiter(), getLimit()); } @Override StringDelimiter getDelimiter(); @Override void setDelimiter(StringDelimiter delimiter); @Override Integer getLimit(); ... |
@Test public void testSeparateValuesNullValue() { assertNotNull(combine); String value = combine.combineValues(null); assertNull(value); } | @Override public String combineValues(Map<Integer, String> values) { return combineValues(values, getDelimiter(), getLimit()); } | DefaultAtlasCombineStrategy implements AtlasCombineStrategy { @Override public String combineValues(Map<Integer, String> values) { return combineValues(values, getDelimiter(), getLimit()); } } | DefaultAtlasCombineStrategy implements AtlasCombineStrategy { @Override public String combineValues(Map<Integer, String> values) { return combineValues(values, getDelimiter(), getLimit()); } } | DefaultAtlasCombineStrategy implements AtlasCombineStrategy { @Override public String combineValues(Map<Integer, String> values) { return combineValues(values, getDelimiter(), getLimit()); } @Override StringDelimiter getDelimiter(); @Override void setDelimiter(StringDelimiter delimiter); @Override Integer getLimit(); ... | DefaultAtlasCombineStrategy implements AtlasCombineStrategy { @Override public String combineValues(Map<Integer, String> values) { return combineValues(values, getDelimiter(), getLimit()); } @Override StringDelimiter getDelimiter(); @Override void setDelimiter(StringDelimiter delimiter); @Override Integer getLimit(); ... |
@Test public void testCombineValuesEmptyValue() { assertNotNull(combine); String value = combine.combineValues(new HashMap<Integer, String>()); assertNull(value); } | @Override public String combineValues(Map<Integer, String> values) { return combineValues(values, getDelimiter(), getLimit()); } | DefaultAtlasCombineStrategy implements AtlasCombineStrategy { @Override public String combineValues(Map<Integer, String> values) { return combineValues(values, getDelimiter(), getLimit()); } } | DefaultAtlasCombineStrategy implements AtlasCombineStrategy { @Override public String combineValues(Map<Integer, String> values) { return combineValues(values, getDelimiter(), getLimit()); } } | DefaultAtlasCombineStrategy implements AtlasCombineStrategy { @Override public String combineValues(Map<Integer, String> values) { return combineValues(values, getDelimiter(), getLimit()); } @Override StringDelimiter getDelimiter(); @Override void setDelimiter(StringDelimiter delimiter); @Override Integer getLimit(); ... | DefaultAtlasCombineStrategy implements AtlasCombineStrategy { @Override public String combineValues(Map<Integer, String> values) { return combineValues(values, getDelimiter(), getLimit()); } @Override StringDelimiter getDelimiter(); @Override void setDelimiter(StringDelimiter delimiter); @Override Integer getLimit(); ... |
@Test public void testSortByKey() { Map<Integer, String> cMap = DefaultAtlasCombineStrategy.sortByKey(generateCombineMap(4)); assertEquals("a", cMap.get(0)); assertEquals("b", cMap.get(1)); assertEquals("c", cMap.get(2)); assertEquals("d", cMap.get(3)); } | protected static Map<Integer, String> sortByKey(Map<Integer, String> map) { TreeMap<Integer, String> treeMap = new TreeMap<>((key1, key2) -> { if (key1 == null && key2 == null) { return 0; } else if (key1 == null) { return -1; } else if (key2 == null) { return 1; } else { return key1.compareTo(key2); } }); treeMap.putA... | DefaultAtlasCombineStrategy implements AtlasCombineStrategy { protected static Map<Integer, String> sortByKey(Map<Integer, String> map) { TreeMap<Integer, String> treeMap = new TreeMap<>((key1, key2) -> { if (key1 == null && key2 == null) { return 0; } else if (key1 == null) { return -1; } else if (key2 == null) { retu... | DefaultAtlasCombineStrategy implements AtlasCombineStrategy { protected static Map<Integer, String> sortByKey(Map<Integer, String> map) { TreeMap<Integer, String> treeMap = new TreeMap<>((key1, key2) -> { if (key1 == null && key2 == null) { return 0; } else if (key1 == null) { return -1; } else if (key2 == null) { retu... | DefaultAtlasCombineStrategy implements AtlasCombineStrategy { protected static Map<Integer, String> sortByKey(Map<Integer, String> map) { TreeMap<Integer, String> treeMap = new TreeMap<>((key1, key2) -> { if (key1 == null && key2 == null) { return 0; } else if (key1 == null) { return -1; } else if (key2 == null) { retu... | DefaultAtlasCombineStrategy implements AtlasCombineStrategy { protected static Map<Integer, String> sortByKey(Map<Integer, String> map) { TreeMap<Integer, String> treeMap = new TreeMap<>((key1, key2) -> { if (key1 == null && key2 == null) { return 0; } else if (key1 == null) { return -1; } else if (key2 == null) { retu... |
@Test public void testBuildSimpleExampleDocumentFromSeedWithNamespace() throws Exception { namespaces.put("x", "http: writeValue("/x:orders/@totalCost", "12525.00"); writeValue("/x:orders/order/id/@custId", "a"); writeValue("/x:orders/order/id", "12312"); writeValue("/x:orders/order/id[1]/@custId", "b"); writeValue("/x... | private void writeValue(Element parentNode, XmlSegmentContext segment, Field field) throws AtlasException { if (LOG.isDebugEnabled()) { LOG.debug("Writing field value in parent node '{}', parentNode: {}", segment, xmlHelper.writeDocumentToString(true, parentNode)); } String value = convertValue(field); if (segment.isAt... | XmlFieldWriter extends XmlFieldTransformer implements AtlasFieldWriter { private void writeValue(Element parentNode, XmlSegmentContext segment, Field field) throws AtlasException { if (LOG.isDebugEnabled()) { LOG.debug("Writing field value in parent node '{}', parentNode: {}", segment, xmlHelper.writeDocumentToString(t... | XmlFieldWriter extends XmlFieldTransformer implements AtlasFieldWriter { private void writeValue(Element parentNode, XmlSegmentContext segment, Field field) throws AtlasException { if (LOG.isDebugEnabled()) { LOG.debug("Writing field value in parent node '{}', parentNode: {}", segment, xmlHelper.writeDocumentToString(t... | XmlFieldWriter extends XmlFieldTransformer implements AtlasFieldWriter { private void writeValue(Element parentNode, XmlSegmentContext segment, Field field) throws AtlasException { if (LOG.isDebugEnabled()) { LOG.debug("Writing field value in parent node '{}', parentNode: {}", segment, xmlHelper.writeDocumentToString(t... | XmlFieldWriter extends XmlFieldTransformer implements AtlasFieldWriter { private void writeValue(Element parentNode, XmlSegmentContext segment, Field field) throws AtlasException { if (LOG.isDebugEnabled()) { LOG.debug("Writing field value in parent node '{}', parentNode: {}", segment, xmlHelper.writeDocumentToString(t... |
@Test public void testSortByKeyOutOfOrder() { Map<Integer, String> outOfOrder = new HashMap<>(); outOfOrder.put(2, "c"); outOfOrder.put(0, "a"); outOfOrder.put(3, "d"); outOfOrder.put(1, "b"); Map<Integer, String> cMap = DefaultAtlasCombineStrategy.sortByKey(outOfOrder); int count = 0; for (String str : cMap.values()) ... | protected static Map<Integer, String> sortByKey(Map<Integer, String> map) { TreeMap<Integer, String> treeMap = new TreeMap<>((key1, key2) -> { if (key1 == null && key2 == null) { return 0; } else if (key1 == null) { return -1; } else if (key2 == null) { return 1; } else { return key1.compareTo(key2); } }); treeMap.putA... | DefaultAtlasCombineStrategy implements AtlasCombineStrategy { protected static Map<Integer, String> sortByKey(Map<Integer, String> map) { TreeMap<Integer, String> treeMap = new TreeMap<>((key1, key2) -> { if (key1 == null && key2 == null) { return 0; } else if (key1 == null) { return -1; } else if (key2 == null) { retu... | DefaultAtlasCombineStrategy implements AtlasCombineStrategy { protected static Map<Integer, String> sortByKey(Map<Integer, String> map) { TreeMap<Integer, String> treeMap = new TreeMap<>((key1, key2) -> { if (key1 == null && key2 == null) { return 0; } else if (key1 == null) { return -1; } else if (key2 == null) { retu... | DefaultAtlasCombineStrategy implements AtlasCombineStrategy { protected static Map<Integer, String> sortByKey(Map<Integer, String> map) { TreeMap<Integer, String> treeMap = new TreeMap<>((key1, key2) -> { if (key1 == null && key2 == null) { return 0; } else if (key1 == null) { return -1; } else if (key2 == null) { retu... | DefaultAtlasCombineStrategy implements AtlasCombineStrategy { protected static Map<Integer, String> sortByKey(Map<Integer, String> map) { TreeMap<Integer, String> treeMap = new TreeMap<>((key1, key2) -> { if (key1 == null && key2 == null) { return 0; } else if (key1 == null) { return -1; } else if (key2 == null) { retu... |
@Test public void testSortByKeyOutOfOrderGaps() { Map<Integer, String> outOfOrder = new HashMap<>(); outOfOrder.put(7, "c"); outOfOrder.put(3, "a"); outOfOrder.put(99, "d"); outOfOrder.put(5, "b"); Map<Integer, String> cMap = DefaultAtlasCombineStrategy.sortByKey(outOfOrder); int count = 0; for (String str : cMap.value... | protected static Map<Integer, String> sortByKey(Map<Integer, String> map) { TreeMap<Integer, String> treeMap = new TreeMap<>((key1, key2) -> { if (key1 == null && key2 == null) { return 0; } else if (key1 == null) { return -1; } else if (key2 == null) { return 1; } else { return key1.compareTo(key2); } }); treeMap.putA... | DefaultAtlasCombineStrategy implements AtlasCombineStrategy { protected static Map<Integer, String> sortByKey(Map<Integer, String> map) { TreeMap<Integer, String> treeMap = new TreeMap<>((key1, key2) -> { if (key1 == null && key2 == null) { return 0; } else if (key1 == null) { return -1; } else if (key2 == null) { retu... | DefaultAtlasCombineStrategy implements AtlasCombineStrategy { protected static Map<Integer, String> sortByKey(Map<Integer, String> map) { TreeMap<Integer, String> treeMap = new TreeMap<>((key1, key2) -> { if (key1 == null && key2 == null) { return 0; } else if (key1 == null) { return -1; } else if (key2 == null) { retu... | DefaultAtlasCombineStrategy implements AtlasCombineStrategy { protected static Map<Integer, String> sortByKey(Map<Integer, String> map) { TreeMap<Integer, String> treeMap = new TreeMap<>((key1, key2) -> { if (key1 == null && key2 == null) { return 0; } else if (key1 == null) { return -1; } else if (key2 == null) { retu... | DefaultAtlasCombineStrategy implements AtlasCombineStrategy { protected static Map<Integer, String> sortByKey(Map<Integer, String> map) { TreeMap<Integer, String> treeMap = new TreeMap<>((key1, key2) -> { if (key1 == null && key2 == null) { return 0; } else if (key1 == null) { return -1; } else if (key2 == null) { retu... |
@Test public void testSortByKeyWithNullKey() { Map<Integer, String> generatedCombineMap = generateCombineMap(4); generatedCombineMap.put(null, "valueWithNullKey"); Map<Integer, String> cMap = DefaultAtlasCombineStrategy.sortByKey(generatedCombineMap); assertEquals("a", cMap.get(0)); assertEquals("b", cMap.get(1)); asse... | protected static Map<Integer, String> sortByKey(Map<Integer, String> map) { TreeMap<Integer, String> treeMap = new TreeMap<>((key1, key2) -> { if (key1 == null && key2 == null) { return 0; } else if (key1 == null) { return -1; } else if (key2 == null) { return 1; } else { return key1.compareTo(key2); } }); treeMap.putA... | DefaultAtlasCombineStrategy implements AtlasCombineStrategy { protected static Map<Integer, String> sortByKey(Map<Integer, String> map) { TreeMap<Integer, String> treeMap = new TreeMap<>((key1, key2) -> { if (key1 == null && key2 == null) { return 0; } else if (key1 == null) { return -1; } else if (key2 == null) { retu... | DefaultAtlasCombineStrategy implements AtlasCombineStrategy { protected static Map<Integer, String> sortByKey(Map<Integer, String> map) { TreeMap<Integer, String> treeMap = new TreeMap<>((key1, key2) -> { if (key1 == null && key2 == null) { return 0; } else if (key1 == null) { return -1; } else if (key2 == null) { retu... | DefaultAtlasCombineStrategy implements AtlasCombineStrategy { protected static Map<Integer, String> sortByKey(Map<Integer, String> map) { TreeMap<Integer, String> treeMap = new TreeMap<>((key1, key2) -> { if (key1 == null && key2 == null) { return 0; } else if (key1 == null) { return -1; } else if (key2 == null) { retu... | DefaultAtlasCombineStrategy implements AtlasCombineStrategy { protected static Map<Integer, String> sortByKey(Map<Integer, String> map) { TreeMap<Integer, String> treeMap = new TreeMap<>((key1, key2) -> { if (key1 == null && key2 == null) { return 0; } else if (key1 == null) { return -1; } else if (key2 == null) { retu... |
@Test public void testSortByKeyWithNullValue() { Map<Integer, String> generatedCombineMap = generateCombineMap(4); generatedCombineMap.put(Integer.valueOf(4), null); generatedCombineMap.put(Integer.valueOf(5), "f"); Map<Integer, String> cMap = DefaultAtlasCombineStrategy.sortByKey(generatedCombineMap); assertEquals("a"... | protected static Map<Integer, String> sortByKey(Map<Integer, String> map) { TreeMap<Integer, String> treeMap = new TreeMap<>((key1, key2) -> { if (key1 == null && key2 == null) { return 0; } else if (key1 == null) { return -1; } else if (key2 == null) { return 1; } else { return key1.compareTo(key2); } }); treeMap.putA... | DefaultAtlasCombineStrategy implements AtlasCombineStrategy { protected static Map<Integer, String> sortByKey(Map<Integer, String> map) { TreeMap<Integer, String> treeMap = new TreeMap<>((key1, key2) -> { if (key1 == null && key2 == null) { return 0; } else if (key1 == null) { return -1; } else if (key2 == null) { retu... | DefaultAtlasCombineStrategy implements AtlasCombineStrategy { protected static Map<Integer, String> sortByKey(Map<Integer, String> map) { TreeMap<Integer, String> treeMap = new TreeMap<>((key1, key2) -> { if (key1 == null && key2 == null) { return 0; } else if (key1 == null) { return -1; } else if (key2 == null) { retu... | DefaultAtlasCombineStrategy implements AtlasCombineStrategy { protected static Map<Integer, String> sortByKey(Map<Integer, String> map) { TreeMap<Integer, String> treeMap = new TreeMap<>((key1, key2) -> { if (key1 == null && key2 == null) { return 0; } else if (key1 == null) { return -1; } else if (key2 == null) { retu... | DefaultAtlasCombineStrategy implements AtlasCombineStrategy { protected static Map<Integer, String> sortByKey(Map<Integer, String> map) { TreeMap<Integer, String> treeMap = new TreeMap<>((key1, key2) -> { if (key1 == null && key2 == null) { return 0; } else if (key1 == null) { return -1; } else if (key2 == null) { retu... |
@Test public void testIsClassAtlasModule() { factory = DefaultAtlasContextFactory.getInstance(); assertFalse(factory.isClassAtlasModule(null, null)); assertFalse(factory.isClassAtlasModule(AtlasModuleDetail.class, AtlasModule.class)); assertFalse(factory.isAtlasModuleInterface(null, null)); } | protected boolean isClassAtlasModule(Class<?> clazz, Class<?> moduleInterface) { if (clazz == null) { return false; } if (isAtlasModuleInterface(clazz, moduleInterface) && clazz.isAnnotationPresent(AtlasModuleDetail.class)) { if (LOG.isDebugEnabled()) { LOG.debug("{} is a '{}' implementation", clazz.getCanonicalName(),... | DefaultAtlasContextFactory implements AtlasContextFactory, AtlasContextFactoryMXBean { protected boolean isClassAtlasModule(Class<?> clazz, Class<?> moduleInterface) { if (clazz == null) { return false; } if (isAtlasModuleInterface(clazz, moduleInterface) && clazz.isAnnotationPresent(AtlasModuleDetail.class)) { if (LOG... | DefaultAtlasContextFactory implements AtlasContextFactory, AtlasContextFactoryMXBean { protected boolean isClassAtlasModule(Class<?> clazz, Class<?> moduleInterface) { if (clazz == null) { return false; } if (isAtlasModuleInterface(clazz, moduleInterface) && clazz.isAnnotationPresent(AtlasModuleDetail.class)) { if (LOG... | DefaultAtlasContextFactory implements AtlasContextFactory, AtlasContextFactoryMXBean { protected boolean isClassAtlasModule(Class<?> clazz, Class<?> moduleInterface) { if (clazz == null) { return false; } if (isAtlasModuleInterface(clazz, moduleInterface) && clazz.isAnnotationPresent(AtlasModuleDetail.class)) { if (LOG... | DefaultAtlasContextFactory implements AtlasContextFactory, AtlasContextFactoryMXBean { protected boolean isClassAtlasModule(Class<?> clazz, Class<?> moduleInterface) { if (clazz == null) { return false; } if (isAtlasModuleInterface(clazz, moduleInterface) && clazz.isAnnotationPresent(AtlasModuleDetail.class)) { if (LOG... |
@Test public void testGetModuleName() { factory = DefaultAtlasContextFactory.getInstance(); assertNotNull(factory.getModuleName(Object.class)); } | protected String getModuleName(Class<?> clazz) { AtlasModuleDetail detail = clazz.getAnnotation(AtlasModuleDetail.class); if (detail != null) { return detail.name(); } return "UNDEFINED-" + UUID.randomUUID().toString(); } | DefaultAtlasContextFactory implements AtlasContextFactory, AtlasContextFactoryMXBean { protected String getModuleName(Class<?> clazz) { AtlasModuleDetail detail = clazz.getAnnotation(AtlasModuleDetail.class); if (detail != null) { return detail.name(); } return "UNDEFINED-" + UUID.randomUUID().toString(); } } | DefaultAtlasContextFactory implements AtlasContextFactory, AtlasContextFactoryMXBean { protected String getModuleName(Class<?> clazz) { AtlasModuleDetail detail = clazz.getAnnotation(AtlasModuleDetail.class); if (detail != null) { return detail.name(); } return "UNDEFINED-" + UUID.randomUUID().toString(); } private De... | DefaultAtlasContextFactory implements AtlasContextFactory, AtlasContextFactoryMXBean { protected String getModuleName(Class<?> clazz) { AtlasModuleDetail detail = clazz.getAnnotation(AtlasModuleDetail.class); if (detail != null) { return detail.name(); } return "UNDEFINED-" + UUID.randomUUID().toString(); } private De... | DefaultAtlasContextFactory implements AtlasContextFactory, AtlasContextFactoryMXBean { protected String getModuleName(Class<?> clazz) { AtlasModuleDetail detail = clazz.getAnnotation(AtlasModuleDetail.class); if (detail != null) { return detail.name(); } return "UNDEFINED-" + UUID.randomUUID().toString(); } private De... |
@Test public void testRegisterFactoryJmx() { factory = DefaultAtlasContextFactory.getInstance(); factory.registerFactoryJmx(null); } | protected void registerFactoryJmx(DefaultAtlasContextFactory factory) { if (factory == null) { return; } try { factory.setObjectName(); if (!ManagementFactory.getPlatformMBeanServer().isRegistered(factory.getJmxObjectName())) { ManagementFactory.getPlatformMBeanServer().registerMBean(factory, factory.getJmxObjectName()... | DefaultAtlasContextFactory implements AtlasContextFactory, AtlasContextFactoryMXBean { protected void registerFactoryJmx(DefaultAtlasContextFactory factory) { if (factory == null) { return; } try { factory.setObjectName(); if (!ManagementFactory.getPlatformMBeanServer().isRegistered(factory.getJmxObjectName())) { Manag... | DefaultAtlasContextFactory implements AtlasContextFactory, AtlasContextFactoryMXBean { protected void registerFactoryJmx(DefaultAtlasContextFactory factory) { if (factory == null) { return; } try { factory.setObjectName(); if (!ManagementFactory.getPlatformMBeanServer().isRegistered(factory.getJmxObjectName())) { Manag... | DefaultAtlasContextFactory implements AtlasContextFactory, AtlasContextFactoryMXBean { protected void registerFactoryJmx(DefaultAtlasContextFactory factory) { if (factory == null) { return; } try { factory.setObjectName(); if (!ManagementFactory.getPlatformMBeanServer().isRegistered(factory.getJmxObjectName())) { Manag... | DefaultAtlasContextFactory implements AtlasContextFactory, AtlasContextFactoryMXBean { protected void registerFactoryJmx(DefaultAtlasContextFactory factory) { if (factory == null) { return; } try { factory.setObjectName(); if (!ManagementFactory.getPlatformMBeanServer().isRegistered(factory.getJmxObjectName())) { Manag... |
@Test public void testGetModuleUri() { factory = DefaultAtlasContextFactory.getInstance(); assertEquals("UNDEFINED", factory.getModuleUri(Object.class)); } | protected String getModuleUri(Class<?> clazz) { AtlasModuleDetail detail = clazz.getAnnotation(AtlasModuleDetail.class); if (detail != null) { return detail.uri(); } return "UNDEFINED"; } | DefaultAtlasContextFactory implements AtlasContextFactory, AtlasContextFactoryMXBean { protected String getModuleUri(Class<?> clazz) { AtlasModuleDetail detail = clazz.getAnnotation(AtlasModuleDetail.class); if (detail != null) { return detail.uri(); } return "UNDEFINED"; } } | DefaultAtlasContextFactory implements AtlasContextFactory, AtlasContextFactoryMXBean { protected String getModuleUri(Class<?> clazz) { AtlasModuleDetail detail = clazz.getAnnotation(AtlasModuleDetail.class); if (detail != null) { return detail.uri(); } return "UNDEFINED"; } private DefaultAtlasContextFactory(); } | DefaultAtlasContextFactory implements AtlasContextFactory, AtlasContextFactoryMXBean { protected String getModuleUri(Class<?> clazz) { AtlasModuleDetail detail = clazz.getAnnotation(AtlasModuleDetail.class); if (detail != null) { return detail.uri(); } return "UNDEFINED"; } private DefaultAtlasContextFactory(); static... | DefaultAtlasContextFactory implements AtlasContextFactory, AtlasContextFactoryMXBean { protected String getModuleUri(Class<?> clazz) { AtlasModuleDetail detail = clazz.getAnnotation(AtlasModuleDetail.class); if (detail != null) { return detail.uri(); } return "UNDEFINED"; } private DefaultAtlasContextFactory(); static... |
@Test public void testGetConfigPackages() { factory = DefaultAtlasContextFactory.getInstance(); assertNotNull(factory.getConfigPackages(MockModule.class)); } | protected List<String> getConfigPackages(Class<?> clazz) { List<String> configPackages = null; AtlasModuleDetail detail = clazz.getAnnotation(AtlasModuleDetail.class); if (detail != null) { configPackages = new ArrayList<>(); String[] packages = detail.configPackages(); for (String pkg : packages) { configPackages.add(... | DefaultAtlasContextFactory implements AtlasContextFactory, AtlasContextFactoryMXBean { protected List<String> getConfigPackages(Class<?> clazz) { List<String> configPackages = null; AtlasModuleDetail detail = clazz.getAnnotation(AtlasModuleDetail.class); if (detail != null) { configPackages = new ArrayList<>(); String[... | DefaultAtlasContextFactory implements AtlasContextFactory, AtlasContextFactoryMXBean { protected List<String> getConfigPackages(Class<?> clazz) { List<String> configPackages = null; AtlasModuleDetail detail = clazz.getAnnotation(AtlasModuleDetail.class); if (detail != null) { configPackages = new ArrayList<>(); String[... | DefaultAtlasContextFactory implements AtlasContextFactory, AtlasContextFactoryMXBean { protected List<String> getConfigPackages(Class<?> clazz) { List<String> configPackages = null; AtlasModuleDetail detail = clazz.getAnnotation(AtlasModuleDetail.class); if (detail != null) { configPackages = new ArrayList<>(); String[... | DefaultAtlasContextFactory implements AtlasContextFactory, AtlasContextFactoryMXBean { protected List<String> getConfigPackages(Class<?> clazz) { List<String> configPackages = null; AtlasModuleDetail detail = clazz.getAnnotation(AtlasModuleDetail.class); if (detail != null) { configPackages = new ArrayList<>(); String[... |
@Test public void testGetSupportedDataFormats() { factory = DefaultAtlasContextFactory.getInstance(); assertNotNull(factory.getSupportedDataFormats(MockModule.class)); } | protected List<String> getSupportedDataFormats(Class<?> clazz) { List<String> dataFormats = null; AtlasModuleDetail detail = clazz.getAnnotation(AtlasModuleDetail.class); if (detail != null) { dataFormats = new ArrayList<>(); String[] formats = detail.dataFormats(); for (String format : formats) { dataFormats.add(forma... | DefaultAtlasContextFactory implements AtlasContextFactory, AtlasContextFactoryMXBean { protected List<String> getSupportedDataFormats(Class<?> clazz) { List<String> dataFormats = null; AtlasModuleDetail detail = clazz.getAnnotation(AtlasModuleDetail.class); if (detail != null) { dataFormats = new ArrayList<>(); String[... | DefaultAtlasContextFactory implements AtlasContextFactory, AtlasContextFactoryMXBean { protected List<String> getSupportedDataFormats(Class<?> clazz) { List<String> dataFormats = null; AtlasModuleDetail detail = clazz.getAnnotation(AtlasModuleDetail.class); if (detail != null) { dataFormats = new ArrayList<>(); String[... | DefaultAtlasContextFactory implements AtlasContextFactory, AtlasContextFactoryMXBean { protected List<String> getSupportedDataFormats(Class<?> clazz) { List<String> dataFormats = null; AtlasModuleDetail detail = clazz.getAnnotation(AtlasModuleDetail.class); if (detail != null) { dataFormats = new ArrayList<>(); String[... | DefaultAtlasContextFactory implements AtlasContextFactory, AtlasContextFactoryMXBean { protected List<String> getSupportedDataFormats(Class<?> clazz) { List<String> dataFormats = null; AtlasModuleDetail detail = clazz.getAnnotation(AtlasModuleDetail.class); if (detail != null) { dataFormats = new ArrayList<>(); String[... |
@Test public void testBuildSimpleExampleDocumentWithMultipleNamespaces() throws Exception { namespaces.put("x", "http: namespaces.put("y", "http: writeValue("/x:orders/@totalCost", "12525.00"); writeValue("/x:orders/order/y:id/@custId", "a"); writeValue("/x:orders/order/y:id", "12312"); writeValue("/x:orders/order/y:id... | private void writeValue(Element parentNode, XmlSegmentContext segment, Field field) throws AtlasException { if (LOG.isDebugEnabled()) { LOG.debug("Writing field value in parent node '{}', parentNode: {}", segment, xmlHelper.writeDocumentToString(true, parentNode)); } String value = convertValue(field); if (segment.isAt... | XmlFieldWriter extends XmlFieldTransformer implements AtlasFieldWriter { private void writeValue(Element parentNode, XmlSegmentContext segment, Field field) throws AtlasException { if (LOG.isDebugEnabled()) { LOG.debug("Writing field value in parent node '{}', parentNode: {}", segment, xmlHelper.writeDocumentToString(t... | XmlFieldWriter extends XmlFieldTransformer implements AtlasFieldWriter { private void writeValue(Element parentNode, XmlSegmentContext segment, Field field) throws AtlasException { if (LOG.isDebugEnabled()) { LOG.debug("Writing field value in parent node '{}', parentNode: {}", segment, xmlHelper.writeDocumentToString(t... | XmlFieldWriter extends XmlFieldTransformer implements AtlasFieldWriter { private void writeValue(Element parentNode, XmlSegmentContext segment, Field field) throws AtlasException { if (LOG.isDebugEnabled()) { LOG.debug("Writing field value in parent node '{}', parentNode: {}", segment, xmlHelper.writeDocumentToString(t... | XmlFieldWriter extends XmlFieldTransformer implements AtlasFieldWriter { private void writeValue(Element parentNode, XmlSegmentContext segment, Field field) throws AtlasException { if (LOG.isDebugEnabled()) { LOG.debug("Writing field value in parent node '{}', parentNode: {}", segment, xmlHelper.writeDocumentToString(t... |
@Test public void testSingle() throws AtlasException { Field source = populateSourceField(null, AtlasConstants.DEFAULT_SOURCE_DOCUMENT_ID, FieldType.STRING, "foo"); String expression = String.format("${%s:/testPathfoo}", AtlasConstants.DEFAULT_SOURCE_DOCUMENT_ID); recreateSession(); session.head().setSourceField(source... | public static void processExpression(DefaultAtlasSession session, String expression) { if (expression == null || expression.trim().isEmpty()) { return; } try { Map<String, Field> sourceFieldMap = new HashMap<>(); Field parent = session.head().getSourceField(); if (parent != null && !AtlasUtil.isEmpty(parent.getDocId())... | DefaultAtlasExpressionProcessor { public static void processExpression(DefaultAtlasSession session, String expression) { if (expression == null || expression.trim().isEmpty()) { return; } try { Map<String, Field> sourceFieldMap = new HashMap<>(); Field parent = session.head().getSourceField(); if (parent != null && !At... | DefaultAtlasExpressionProcessor { public static void processExpression(DefaultAtlasSession session, String expression) { if (expression == null || expression.trim().isEmpty()) { return; } try { Map<String, Field> sourceFieldMap = new HashMap<>(); Field parent = session.head().getSourceField(); if (parent != null && !At... | DefaultAtlasExpressionProcessor { public static void processExpression(DefaultAtlasSession session, String expression) { if (expression == null || expression.trim().isEmpty()) { return; } try { Map<String, Field> sourceFieldMap = new HashMap<>(); Field parent = session.head().getSourceField(); if (parent != null && !At... | DefaultAtlasExpressionProcessor { public static void processExpression(DefaultAtlasSession session, String expression) { if (expression == null || expression.trim().isEmpty()) { return; } try { Map<String, Field> sourceFieldMap = new HashMap<>(); Field parent = session.head().getSourceField(); if (parent != null && !At... |
@Test public void testCollection() throws Exception { FieldGroup source = populateCollectionSourceField(null, AtlasConstants.DEFAULT_SOURCE_DOCUMENT_ID, "foo"); String expression = String.format( "IF(ISEMPTY(${%s:/testPathfoo<0>}), null, ${%s:/testPathfoo<>})", AtlasConstants.DEFAULT_SOURCE_DOCUMENT_ID, AtlasConstants.... | public static void processExpression(DefaultAtlasSession session, String expression) { if (expression == null || expression.trim().isEmpty()) { return; } try { Map<String, Field> sourceFieldMap = new HashMap<>(); Field parent = session.head().getSourceField(); if (parent != null && !AtlasUtil.isEmpty(parent.getDocId())... | DefaultAtlasExpressionProcessor { public static void processExpression(DefaultAtlasSession session, String expression) { if (expression == null || expression.trim().isEmpty()) { return; } try { Map<String, Field> sourceFieldMap = new HashMap<>(); Field parent = session.head().getSourceField(); if (parent != null && !At... | DefaultAtlasExpressionProcessor { public static void processExpression(DefaultAtlasSession session, String expression) { if (expression == null || expression.trim().isEmpty()) { return; } try { Map<String, Field> sourceFieldMap = new HashMap<>(); Field parent = session.head().getSourceField(); if (parent != null && !At... | DefaultAtlasExpressionProcessor { public static void processExpression(DefaultAtlasSession session, String expression) { if (expression == null || expression.trim().isEmpty()) { return; } try { Map<String, Field> sourceFieldMap = new HashMap<>(); Field parent = session.head().getSourceField(); if (parent != null && !At... | DefaultAtlasExpressionProcessor { public static void processExpression(DefaultAtlasSession session, String expression) { if (expression == null || expression.trim().isEmpty()) { return; } try { Map<String, Field> sourceFieldMap = new HashMap<>(); Field parent = session.head().getSourceField(); if (parent != null && !At... |
@Test public void testComplexCollection() throws Exception { populateComplexCollectionSourceField(null, AtlasConstants.DEFAULT_SOURCE_DOCUMENT_ID, "foo"); String expression = String.format( "IF(ISEMPTY(${%s:/testPathfoo<0>/value}), null, ${%s:/testPathfoo<>/value})", AtlasConstants.DEFAULT_SOURCE_DOCUMENT_ID, AtlasCons... | public static void processExpression(DefaultAtlasSession session, String expression) { if (expression == null || expression.trim().isEmpty()) { return; } try { Map<String, Field> sourceFieldMap = new HashMap<>(); Field parent = session.head().getSourceField(); if (parent != null && !AtlasUtil.isEmpty(parent.getDocId())... | DefaultAtlasExpressionProcessor { public static void processExpression(DefaultAtlasSession session, String expression) { if (expression == null || expression.trim().isEmpty()) { return; } try { Map<String, Field> sourceFieldMap = new HashMap<>(); Field parent = session.head().getSourceField(); if (parent != null && !At... | DefaultAtlasExpressionProcessor { public static void processExpression(DefaultAtlasSession session, String expression) { if (expression == null || expression.trim().isEmpty()) { return; } try { Map<String, Field> sourceFieldMap = new HashMap<>(); Field parent = session.head().getSourceField(); if (parent != null && !At... | DefaultAtlasExpressionProcessor { public static void processExpression(DefaultAtlasSession session, String expression) { if (expression == null || expression.trim().isEmpty()) { return; } try { Map<String, Field> sourceFieldMap = new HashMap<>(); Field parent = session.head().getSourceField(); if (parent != null && !At... | DefaultAtlasExpressionProcessor { public static void processExpression(DefaultAtlasSession session, String expression) { if (expression == null || expression.trim().isEmpty()) { return; } try { Map<String, Field> sourceFieldMap = new HashMap<>(); Field parent = session.head().getSourceField(); if (parent != null && !At... |
@Test public void testFilter() throws Exception { FieldGroup source = populateComplexCollectionSourceField(null, AtlasConstants.DEFAULT_SOURCE_DOCUMENT_ID, "foo"); String expression = String.format( "FILTER(${%s:/testPathfoo<>}, ${/value} != 'foo1')", AtlasConstants.DEFAULT_SOURCE_DOCUMENT_ID, AtlasConstants.DEFAULT_SO... | public static void processExpression(DefaultAtlasSession session, String expression) { if (expression == null || expression.trim().isEmpty()) { return; } try { Map<String, Field> sourceFieldMap = new HashMap<>(); Field parent = session.head().getSourceField(); if (parent != null && !AtlasUtil.isEmpty(parent.getDocId())... | DefaultAtlasExpressionProcessor { public static void processExpression(DefaultAtlasSession session, String expression) { if (expression == null || expression.trim().isEmpty()) { return; } try { Map<String, Field> sourceFieldMap = new HashMap<>(); Field parent = session.head().getSourceField(); if (parent != null && !At... | DefaultAtlasExpressionProcessor { public static void processExpression(DefaultAtlasSession session, String expression) { if (expression == null || expression.trim().isEmpty()) { return; } try { Map<String, Field> sourceFieldMap = new HashMap<>(); Field parent = session.head().getSourceField(); if (parent != null && !At... | DefaultAtlasExpressionProcessor { public static void processExpression(DefaultAtlasSession session, String expression) { if (expression == null || expression.trim().isEmpty()) { return; } try { Map<String, Field> sourceFieldMap = new HashMap<>(); Field parent = session.head().getSourceField(); if (parent != null && !At... | DefaultAtlasExpressionProcessor { public static void processExpression(DefaultAtlasSession session, String expression) { if (expression == null || expression.trim().isEmpty()) { return; } try { Map<String, Field> sourceFieldMap = new HashMap<>(); Field parent = session.head().getSourceField(); if (parent != null && !At... |
@Test public void testSelect() throws Exception { FieldGroup source = populateComplexCollectionSourceField(null, AtlasConstants.DEFAULT_SOURCE_DOCUMENT_ID, "foo"); String expression = String.format( "SELECT(${%s:/testPathfoo<>}, ${/value})", AtlasConstants.DEFAULT_SOURCE_DOCUMENT_ID, AtlasConstants.DEFAULT_SOURCE_DOCUM... | public static void processExpression(DefaultAtlasSession session, String expression) { if (expression == null || expression.trim().isEmpty()) { return; } try { Map<String, Field> sourceFieldMap = new HashMap<>(); Field parent = session.head().getSourceField(); if (parent != null && !AtlasUtil.isEmpty(parent.getDocId())... | DefaultAtlasExpressionProcessor { public static void processExpression(DefaultAtlasSession session, String expression) { if (expression == null || expression.trim().isEmpty()) { return; } try { Map<String, Field> sourceFieldMap = new HashMap<>(); Field parent = session.head().getSourceField(); if (parent != null && !At... | DefaultAtlasExpressionProcessor { public static void processExpression(DefaultAtlasSession session, String expression) { if (expression == null || expression.trim().isEmpty()) { return; } try { Map<String, Field> sourceFieldMap = new HashMap<>(); Field parent = session.head().getSourceField(); if (parent != null && !At... | DefaultAtlasExpressionProcessor { public static void processExpression(DefaultAtlasSession session, String expression) { if (expression == null || expression.trim().isEmpty()) { return; } try { Map<String, Field> sourceFieldMap = new HashMap<>(); Field parent = session.head().getSourceField(); if (parent != null && !At... | DefaultAtlasExpressionProcessor { public static void processExpression(DefaultAtlasSession session, String expression) { if (expression == null || expression.trim().isEmpty()) { return; } try { Map<String, Field> sourceFieldMap = new HashMap<>(); Field parent = session.head().getSourceField(); if (parent != null && !At... |
@Test public void testFilterSelect() throws Exception { FieldGroup source = populateComplexCollectionSourceField(null, AtlasConstants.DEFAULT_SOURCE_DOCUMENT_ID, "foo"); String expression = String.format( "SELECT(FILTER(${%s:/testPathfoo<>}, ${/value} != 'foo1'), ${/value})", AtlasConstants.DEFAULT_SOURCE_DOCUMENT_ID, ... | public static void processExpression(DefaultAtlasSession session, String expression) { if (expression == null || expression.trim().isEmpty()) { return; } try { Map<String, Field> sourceFieldMap = new HashMap<>(); Field parent = session.head().getSourceField(); if (parent != null && !AtlasUtil.isEmpty(parent.getDocId())... | DefaultAtlasExpressionProcessor { public static void processExpression(DefaultAtlasSession session, String expression) { if (expression == null || expression.trim().isEmpty()) { return; } try { Map<String, Field> sourceFieldMap = new HashMap<>(); Field parent = session.head().getSourceField(); if (parent != null && !At... | DefaultAtlasExpressionProcessor { public static void processExpression(DefaultAtlasSession session, String expression) { if (expression == null || expression.trim().isEmpty()) { return; } try { Map<String, Field> sourceFieldMap = new HashMap<>(); Field parent = session.head().getSourceField(); if (parent != null && !At... | DefaultAtlasExpressionProcessor { public static void processExpression(DefaultAtlasSession session, String expression) { if (expression == null || expression.trim().isEmpty()) { return; } try { Map<String, Field> sourceFieldMap = new HashMap<>(); Field parent = session.head().getSourceField(); if (parent != null && !At... | DefaultAtlasExpressionProcessor { public static void processExpression(DefaultAtlasSession session, String expression) { if (expression == null || expression.trim().isEmpty()) { return; } try { Map<String, Field> sourceFieldMap = new HashMap<>(); Field parent = session.head().getSourceField(); if (parent != null && !At... |
@Test public void testGetMapping() { assertNotNull(session.getMapping()); assertNotNull(session.getMapping().getProperties()); assertNotNull(session.getMapping().getProperties().getProperty()); assertTrue(session.getMapping().getProperties().getProperty().size() > 0); } | @Override public AtlasMapping getMapping() { return mapping; } | DefaultAtlasSession implements AtlasInternalSession { @Override public AtlasMapping getMapping() { return mapping; } } | DefaultAtlasSession implements AtlasInternalSession { @Override public AtlasMapping getMapping() { return mapping; } DefaultAtlasSession(DefaultAtlasContext context); } | DefaultAtlasSession implements AtlasInternalSession { @Override public AtlasMapping getMapping() { return mapping; } DefaultAtlasSession(DefaultAtlasContext context); @Override AtlasContext getAtlasContext(); @Override void setAtlasContext(AtlasContext atlasContext); @Override AtlasMapping getMapping(); @Override Valid... | DefaultAtlasSession implements AtlasInternalSession { @Override public AtlasMapping getMapping() { return mapping; } DefaultAtlasSession(DefaultAtlasContext context); @Override AtlasContext getAtlasContext(); @Override void setAtlasContext(AtlasContext atlasContext); @Override AtlasMapping getMapping(); @Override Valid... |
@Test public void testGetProperties() { assertNotNull(session); assertNotNull(session.getProperties()); assertTrue(session.getProperties().size() == 0); session.getProperties().put("foo", "bar"); assertTrue(session.getProperties().size() == 1); assertEquals("bar", session.getProperties().get("foo")); } | @Override @Deprecated public Map<String, Object> getProperties() { return getSourceProperties(); } | DefaultAtlasSession implements AtlasInternalSession { @Override @Deprecated public Map<String, Object> getProperties() { return getSourceProperties(); } } | DefaultAtlasSession implements AtlasInternalSession { @Override @Deprecated public Map<String, Object> getProperties() { return getSourceProperties(); } DefaultAtlasSession(DefaultAtlasContext context); } | DefaultAtlasSession implements AtlasInternalSession { @Override @Deprecated public Map<String, Object> getProperties() { return getSourceProperties(); } DefaultAtlasSession(DefaultAtlasContext context); @Override AtlasContext getAtlasContext(); @Override void setAtlasContext(AtlasContext atlasContext); @Override AtlasM... | DefaultAtlasSession implements AtlasInternalSession { @Override @Deprecated public Map<String, Object> getProperties() { return getSourceProperties(); } DefaultAtlasSession(DefaultAtlasContext context); @Override AtlasContext getAtlasContext(); @Override void setAtlasContext(AtlasContext atlasContext); @Override AtlasM... |
@Test public void testSetTargetDocument() { session.setTargetDocument("target", "defaultOutput"); session.setTargetDocument(null, "defaultOutput"); session.setTargetDocument("", "defaultOutput"); session.hasTargetDocument(null); session.hasTargetDocument(""); } | @Override public void setTargetDocument(String docId, Object targetDoc) { if (docId == null || docId.isEmpty()) { setDefaultTargetDocument(targetDoc); } else { if (this.targetMap.isEmpty()) { setDefaultTargetDocument(targetDoc); } this.targetMap.put(docId, targetDoc); } } | DefaultAtlasSession implements AtlasInternalSession { @Override public void setTargetDocument(String docId, Object targetDoc) { if (docId == null || docId.isEmpty()) { setDefaultTargetDocument(targetDoc); } else { if (this.targetMap.isEmpty()) { setDefaultTargetDocument(targetDoc); } this.targetMap.put(docId, targetDoc... | DefaultAtlasSession implements AtlasInternalSession { @Override public void setTargetDocument(String docId, Object targetDoc) { if (docId == null || docId.isEmpty()) { setDefaultTargetDocument(targetDoc); } else { if (this.targetMap.isEmpty()) { setDefaultTargetDocument(targetDoc); } this.targetMap.put(docId, targetDoc... | DefaultAtlasSession implements AtlasInternalSession { @Override public void setTargetDocument(String docId, Object targetDoc) { if (docId == null || docId.isEmpty()) { setDefaultTargetDocument(targetDoc); } else { if (this.targetMap.isEmpty()) { setDefaultTargetDocument(targetDoc); } this.targetMap.put(docId, targetDoc... | DefaultAtlasSession implements AtlasInternalSession { @Override public void setTargetDocument(String docId, Object targetDoc) { if (docId == null || docId.isEmpty()) { setDefaultTargetDocument(targetDoc); } else { if (this.targetMap.isEmpty()) { setDefaultTargetDocument(targetDoc); } this.targetMap.put(docId, targetDoc... |
@Test public void testSetSourceDocument() { session.setSourceDocument("source", "defaultInput"); session.setSourceDocument(null, "defaultInput"); session.setSourceDocument("", "defaultInput"); } | @Override public void setSourceDocument(String docId, Object sourceDoc) { if (docId == null || docId.isEmpty()) { setDefaultSourceDocument(sourceDoc); } else { if (this.sourceMap.isEmpty()) { setDefaultSourceDocument(sourceDoc); } this.sourceMap.put(docId, sourceDoc); } } | DefaultAtlasSession implements AtlasInternalSession { @Override public void setSourceDocument(String docId, Object sourceDoc) { if (docId == null || docId.isEmpty()) { setDefaultSourceDocument(sourceDoc); } else { if (this.sourceMap.isEmpty()) { setDefaultSourceDocument(sourceDoc); } this.sourceMap.put(docId, sourceDoc... | DefaultAtlasSession implements AtlasInternalSession { @Override public void setSourceDocument(String docId, Object sourceDoc) { if (docId == null || docId.isEmpty()) { setDefaultSourceDocument(sourceDoc); } else { if (this.sourceMap.isEmpty()) { setDefaultSourceDocument(sourceDoc); } this.sourceMap.put(docId, sourceDoc... | DefaultAtlasSession implements AtlasInternalSession { @Override public void setSourceDocument(String docId, Object sourceDoc) { if (docId == null || docId.isEmpty()) { setDefaultSourceDocument(sourceDoc); } else { if (this.sourceMap.isEmpty()) { setDefaultSourceDocument(sourceDoc); } this.sourceMap.put(docId, sourceDoc... | DefaultAtlasSession implements AtlasInternalSession { @Override public void setSourceDocument(String docId, Object sourceDoc) { if (docId == null || docId.isEmpty()) { setDefaultSourceDocument(sourceDoc); } else { if (this.sourceMap.isEmpty()) { setDefaultSourceDocument(sourceDoc); } this.sourceMap.put(docId, sourceDoc... |
@Test public void testBuildSimpleExampleDocumentWithMultipleNamespacesConstructor() throws Exception { namespaces.put("x", "http: namespaces.put("y", "http: writeValue("/x:orders/@totalCost", "12525.00"); writeValue("/x:orders/order/y:id/@custId", "a"); writeValue("/x:orders/order/y:id", "12312"); writeValue("/x:orders... | private void writeValue(Element parentNode, XmlSegmentContext segment, Field field) throws AtlasException { if (LOG.isDebugEnabled()) { LOG.debug("Writing field value in parent node '{}', parentNode: {}", segment, xmlHelper.writeDocumentToString(true, parentNode)); } String value = convertValue(field); if (segment.isAt... | XmlFieldWriter extends XmlFieldTransformer implements AtlasFieldWriter { private void writeValue(Element parentNode, XmlSegmentContext segment, Field field) throws AtlasException { if (LOG.isDebugEnabled()) { LOG.debug("Writing field value in parent node '{}', parentNode: {}", segment, xmlHelper.writeDocumentToString(t... | XmlFieldWriter extends XmlFieldTransformer implements AtlasFieldWriter { private void writeValue(Element parentNode, XmlSegmentContext segment, Field field) throws AtlasException { if (LOG.isDebugEnabled()) { LOG.debug("Writing field value in parent node '{}', parentNode: {}", segment, xmlHelper.writeDocumentToString(t... | XmlFieldWriter extends XmlFieldTransformer implements AtlasFieldWriter { private void writeValue(Element parentNode, XmlSegmentContext segment, Field field) throws AtlasException { if (LOG.isDebugEnabled()) { LOG.debug("Writing field value in parent node '{}', parentNode: {}", segment, xmlHelper.writeDocumentToString(t... | XmlFieldWriter extends XmlFieldTransformer implements AtlasFieldWriter { private void writeValue(Element parentNode, XmlSegmentContext segment, Field field) throws AtlasException { if (LOG.isDebugEnabled()) { LOG.debug("Writing field value in parent node '{}', parentNode: {}", segment, xmlHelper.writeDocumentToString(t... |
@Test public void testDetectArrayDimensions() { assertNull(null, classInspectionService.inspectClass(String.class, CollectionType.NONE, null).getArrayDimensions()); assertEquals(new Integer(1), classInspectionService.inspectClass(int[].class, CollectionType.ARRAY, null).getArrayDimensions()); assertEquals(new Integer(2... | private Integer detectArrayDimensions(Class<?> clazz) { Integer arrayDim = Integer.valueOf(0); if (clazz == null) { return null; } if (!clazz.isArray()) { return arrayDim; } arrayDim++; Class<?> tmpClazz = clazz.getComponentType(); while (tmpClazz != null && tmpClazz.isArray() && arrayDim < MAX_ARRAY_DIM_LIMIT) { array... | ClassInspectionService { private Integer detectArrayDimensions(Class<?> clazz) { Integer arrayDim = Integer.valueOf(0); if (clazz == null) { return null; } if (!clazz.isArray()) { return arrayDim; } arrayDim++; Class<?> tmpClazz = clazz.getComponentType(); while (tmpClazz != null && tmpClazz.isArray() && arrayDim < MAX... | ClassInspectionService { private Integer detectArrayDimensions(Class<?> clazz) { Integer arrayDim = Integer.valueOf(0); if (clazz == null) { return null; } if (!clazz.isArray()) { return arrayDim; } arrayDim++; Class<?> tmpClazz = clazz.getComponentType(); while (tmpClazz != null && tmpClazz.isArray() && arrayDim < MAX... | ClassInspectionService { private Integer detectArrayDimensions(Class<?> clazz) { Integer arrayDim = Integer.valueOf(0); if (clazz == null) { return null; } if (!clazz.isArray()) { return arrayDim; } arrayDim++; Class<?> tmpClazz = clazz.getComponentType(); while (tmpClazz != null && tmpClazz.isArray() && arrayDim < MAX... | ClassInspectionService { private Integer detectArrayDimensions(Class<?> clazz) { Integer arrayDim = Integer.valueOf(0); if (clazz == null) { return null; } if (!clazz.isArray()) { return arrayDim; } arrayDim++; Class<?> tmpClazz = clazz.getComponentType(); while (tmpClazz != null && tmpClazz.isArray() && arrayDim < MAX... |
@Test public void testGetFieldReader() { AtlasFieldReader reader = new AtlasFieldReader() { @Override public Field read(AtlasInternalSession session) throws AtlasException { LOG.debug("read method"); return session.head().getSourceField(); } }; session.setFieldReader(AtlasConstants.DEFAULT_SOURCE_DOCUMENT_ID, reader); ... | @Override public AtlasFieldReader getFieldReader(String docId) { if (docId == null || docId.isEmpty()) { return this.fieldReaderMap.get(AtlasConstants.DEFAULT_SOURCE_DOCUMENT_ID); } return this.fieldReaderMap.get(docId); } | DefaultAtlasSession implements AtlasInternalSession { @Override public AtlasFieldReader getFieldReader(String docId) { if (docId == null || docId.isEmpty()) { return this.fieldReaderMap.get(AtlasConstants.DEFAULT_SOURCE_DOCUMENT_ID); } return this.fieldReaderMap.get(docId); } } | DefaultAtlasSession implements AtlasInternalSession { @Override public AtlasFieldReader getFieldReader(String docId) { if (docId == null || docId.isEmpty()) { return this.fieldReaderMap.get(AtlasConstants.DEFAULT_SOURCE_DOCUMENT_ID); } return this.fieldReaderMap.get(docId); } DefaultAtlasSession(DefaultAtlasContext con... | DefaultAtlasSession implements AtlasInternalSession { @Override public AtlasFieldReader getFieldReader(String docId) { if (docId == null || docId.isEmpty()) { return this.fieldReaderMap.get(AtlasConstants.DEFAULT_SOURCE_DOCUMENT_ID); } return this.fieldReaderMap.get(docId); } DefaultAtlasSession(DefaultAtlasContext con... | DefaultAtlasSession implements AtlasInternalSession { @Override public AtlasFieldReader getFieldReader(String docId) { if (docId == null || docId.isEmpty()) { return this.fieldReaderMap.get(AtlasConstants.DEFAULT_SOURCE_DOCUMENT_ID); } return this.fieldReaderMap.get(docId); } DefaultAtlasSession(DefaultAtlasContext con... |
@Test public void testSetFieldReader() { AtlasFieldReader reader = new AtlasFieldReader() { @Override public Field read(AtlasInternalSession session) throws AtlasException { LOG.debug("read method"); return session.head().getSourceField(); } }; session.setFieldReader(null, reader); session.setFieldReader("", reader); } | @Override public void setFieldReader(String docId, AtlasFieldReader reader) { if (docId == null || docId.isEmpty()) { this.fieldReaderMap.put(AtlasConstants.DEFAULT_SOURCE_DOCUMENT_ID, reader); } else { this.fieldReaderMap.put(docId, reader); } } | DefaultAtlasSession implements AtlasInternalSession { @Override public void setFieldReader(String docId, AtlasFieldReader reader) { if (docId == null || docId.isEmpty()) { this.fieldReaderMap.put(AtlasConstants.DEFAULT_SOURCE_DOCUMENT_ID, reader); } else { this.fieldReaderMap.put(docId, reader); } } } | DefaultAtlasSession implements AtlasInternalSession { @Override public void setFieldReader(String docId, AtlasFieldReader reader) { if (docId == null || docId.isEmpty()) { this.fieldReaderMap.put(AtlasConstants.DEFAULT_SOURCE_DOCUMENT_ID, reader); } else { this.fieldReaderMap.put(docId, reader); } } DefaultAtlasSession... | DefaultAtlasSession implements AtlasInternalSession { @Override public void setFieldReader(String docId, AtlasFieldReader reader) { if (docId == null || docId.isEmpty()) { this.fieldReaderMap.put(AtlasConstants.DEFAULT_SOURCE_DOCUMENT_ID, reader); } else { this.fieldReaderMap.put(docId, reader); } } DefaultAtlasSession... | DefaultAtlasSession implements AtlasInternalSession { @Override public void setFieldReader(String docId, AtlasFieldReader reader) { if (docId == null || docId.isEmpty()) { this.fieldReaderMap.put(AtlasConstants.DEFAULT_SOURCE_DOCUMENT_ID, reader); } else { this.fieldReaderMap.put(docId, reader); } } DefaultAtlasSession... |
@Test public void testRemoveFieldReader() { session.removeFieldReader(null); session.removeFieldReader(""); session.removeFieldReader(AtlasConstants.DEFAULT_SOURCE_DOCUMENT_ID); } | @Override public AtlasFieldReader removeFieldReader(String docId) { if (docId == null || docId.isEmpty()) { return this.fieldReaderMap.remove(AtlasConstants.DEFAULT_SOURCE_DOCUMENT_ID); } return fieldReaderMap.remove(docId); } | DefaultAtlasSession implements AtlasInternalSession { @Override public AtlasFieldReader removeFieldReader(String docId) { if (docId == null || docId.isEmpty()) { return this.fieldReaderMap.remove(AtlasConstants.DEFAULT_SOURCE_DOCUMENT_ID); } return fieldReaderMap.remove(docId); } } | DefaultAtlasSession implements AtlasInternalSession { @Override public AtlasFieldReader removeFieldReader(String docId) { if (docId == null || docId.isEmpty()) { return this.fieldReaderMap.remove(AtlasConstants.DEFAULT_SOURCE_DOCUMENT_ID); } return fieldReaderMap.remove(docId); } DefaultAtlasSession(DefaultAtlasContext... | DefaultAtlasSession implements AtlasInternalSession { @Override public AtlasFieldReader removeFieldReader(String docId) { if (docId == null || docId.isEmpty()) { return this.fieldReaderMap.remove(AtlasConstants.DEFAULT_SOURCE_DOCUMENT_ID); } return fieldReaderMap.remove(docId); } DefaultAtlasSession(DefaultAtlasContext... | DefaultAtlasSession implements AtlasInternalSession { @Override public AtlasFieldReader removeFieldReader(String docId) { if (docId == null || docId.isEmpty()) { return this.fieldReaderMap.remove(AtlasConstants.DEFAULT_SOURCE_DOCUMENT_ID); } return fieldReaderMap.remove(docId); } DefaultAtlasSession(DefaultAtlasContext... |
@Test public void testGetFieldWriter() { AtlasFieldWriter writer = new AtlasFieldWriter() { @Override public void write(AtlasInternalSession session) throws AtlasException { LOG.debug("write method"); } }; session.setFieldWriter(AtlasConstants.DEFAULT_TARGET_DOCUMENT_ID, writer); assertNotNull(session.getFieldWriter(nu... | @Override public AtlasFieldWriter getFieldWriter(String docId) { if (docId == null || docId.isEmpty()) { return this.fieldWriterMap.get(AtlasConstants.DEFAULT_TARGET_DOCUMENT_ID); } return this.fieldWriterMap.get(docId); } | DefaultAtlasSession implements AtlasInternalSession { @Override public AtlasFieldWriter getFieldWriter(String docId) { if (docId == null || docId.isEmpty()) { return this.fieldWriterMap.get(AtlasConstants.DEFAULT_TARGET_DOCUMENT_ID); } return this.fieldWriterMap.get(docId); } } | DefaultAtlasSession implements AtlasInternalSession { @Override public AtlasFieldWriter getFieldWriter(String docId) { if (docId == null || docId.isEmpty()) { return this.fieldWriterMap.get(AtlasConstants.DEFAULT_TARGET_DOCUMENT_ID); } return this.fieldWriterMap.get(docId); } DefaultAtlasSession(DefaultAtlasContext con... | DefaultAtlasSession implements AtlasInternalSession { @Override public AtlasFieldWriter getFieldWriter(String docId) { if (docId == null || docId.isEmpty()) { return this.fieldWriterMap.get(AtlasConstants.DEFAULT_TARGET_DOCUMENT_ID); } return this.fieldWriterMap.get(docId); } DefaultAtlasSession(DefaultAtlasContext con... | DefaultAtlasSession implements AtlasInternalSession { @Override public AtlasFieldWriter getFieldWriter(String docId) { if (docId == null || docId.isEmpty()) { return this.fieldWriterMap.get(AtlasConstants.DEFAULT_TARGET_DOCUMENT_ID); } return this.fieldWriterMap.get(docId); } DefaultAtlasSession(DefaultAtlasContext con... |
@Test public void testSetFieldWriter() { AtlasFieldWriter writer = new AtlasFieldWriter() { @Override public void write(AtlasInternalSession session) throws AtlasException { LOG.debug("write method"); } }; session.setFieldWriter(null, writer); session.setFieldWriter("", writer); } | @Override public void setFieldWriter(String docId, AtlasFieldWriter writer) { if (docId == null || docId.isEmpty()) { this.fieldWriterMap.put(AtlasConstants.DEFAULT_TARGET_DOCUMENT_ID, writer); } this.fieldWriterMap.put(docId, writer); } | DefaultAtlasSession implements AtlasInternalSession { @Override public void setFieldWriter(String docId, AtlasFieldWriter writer) { if (docId == null || docId.isEmpty()) { this.fieldWriterMap.put(AtlasConstants.DEFAULT_TARGET_DOCUMENT_ID, writer); } this.fieldWriterMap.put(docId, writer); } } | DefaultAtlasSession implements AtlasInternalSession { @Override public void setFieldWriter(String docId, AtlasFieldWriter writer) { if (docId == null || docId.isEmpty()) { this.fieldWriterMap.put(AtlasConstants.DEFAULT_TARGET_DOCUMENT_ID, writer); } this.fieldWriterMap.put(docId, writer); } DefaultAtlasSession(DefaultA... | DefaultAtlasSession implements AtlasInternalSession { @Override public void setFieldWriter(String docId, AtlasFieldWriter writer) { if (docId == null || docId.isEmpty()) { this.fieldWriterMap.put(AtlasConstants.DEFAULT_TARGET_DOCUMENT_ID, writer); } this.fieldWriterMap.put(docId, writer); } DefaultAtlasSession(DefaultA... | DefaultAtlasSession implements AtlasInternalSession { @Override public void setFieldWriter(String docId, AtlasFieldWriter writer) { if (docId == null || docId.isEmpty()) { this.fieldWriterMap.put(AtlasConstants.DEFAULT_TARGET_DOCUMENT_ID, writer); } this.fieldWriterMap.put(docId, writer); } DefaultAtlasSession(DefaultA... |
@Test public void testRemoveFieldWriter() { session.removeFieldWriter(null); session.removeFieldWriter(""); session.removeFieldWriter(AtlasConstants.DEFAULT_TARGET_DOCUMENT_ID); } | @Override public AtlasFieldWriter removeFieldWriter(String docId) { if (docId == null || docId.isEmpty()) { return this.fieldWriterMap.remove(AtlasConstants.DEFAULT_TARGET_DOCUMENT_ID); } return this.fieldWriterMap.remove(docId); } | DefaultAtlasSession implements AtlasInternalSession { @Override public AtlasFieldWriter removeFieldWriter(String docId) { if (docId == null || docId.isEmpty()) { return this.fieldWriterMap.remove(AtlasConstants.DEFAULT_TARGET_DOCUMENT_ID); } return this.fieldWriterMap.remove(docId); } } | DefaultAtlasSession implements AtlasInternalSession { @Override public AtlasFieldWriter removeFieldWriter(String docId) { if (docId == null || docId.isEmpty()) { return this.fieldWriterMap.remove(AtlasConstants.DEFAULT_TARGET_DOCUMENT_ID); } return this.fieldWriterMap.remove(docId); } DefaultAtlasSession(DefaultAtlasCo... | DefaultAtlasSession implements AtlasInternalSession { @Override public AtlasFieldWriter removeFieldWriter(String docId) { if (docId == null || docId.isEmpty()) { return this.fieldWriterMap.remove(AtlasConstants.DEFAULT_TARGET_DOCUMENT_ID); } return this.fieldWriterMap.remove(docId); } DefaultAtlasSession(DefaultAtlasCo... | DefaultAtlasSession implements AtlasInternalSession { @Override public AtlasFieldWriter removeFieldWriter(String docId) { if (docId == null || docId.isEmpty()) { return this.fieldWriterMap.remove(AtlasConstants.DEFAULT_TARGET_DOCUMENT_ID); } return this.fieldWriterMap.remove(docId); } DefaultAtlasSession(DefaultAtlasCo... |
@Test public void testHead() { Head head = session.head(); assertNotNull(head); assertNull(head.getLookupTable()); assertNull(head.getMapping()); assertNull(head.getSourceField()); assertNull(head.getTargetField()); head.setLookupTable(null); head.setMapping(null); head.setSourceField(null); head.setTargetField(null); ... | @Override public Head head() { return this.head; } | DefaultAtlasSession implements AtlasInternalSession { @Override public Head head() { return this.head; } } | DefaultAtlasSession implements AtlasInternalSession { @Override public Head head() { return this.head; } DefaultAtlasSession(DefaultAtlasContext context); } | DefaultAtlasSession implements AtlasInternalSession { @Override public Head head() { return this.head; } DefaultAtlasSession(DefaultAtlasContext context); @Override AtlasContext getAtlasContext(); @Override void setAtlasContext(AtlasContext atlasContext); @Override AtlasMapping getMapping(); @Override Validations getVa... | DefaultAtlasSession implements AtlasInternalSession { @Override public Head head() { return this.head; } DefaultAtlasSession(DefaultAtlasContext context); @Override AtlasContext getAtlasContext(); @Override void setAtlasContext(AtlasContext atlasContext); @Override AtlasMapping getMapping(); @Override Validations getVa... |
@Test public void testDestroy() { module.destroy(); } | @Override public void destroy() { } | ConstantModule implements AtlasModule { @Override public void destroy() { } } | ConstantModule implements AtlasModule { @Override public void destroy() { } } | ConstantModule implements AtlasModule { @Override public void destroy() { } @Override void init(); @Override void destroy(); @Override void setClassLoader(ClassLoader classLoader); @Override ClassLoader getClassLoader(); @Override void processPreValidation(AtlasInternalSession session); @Override void processPreSource... | ConstantModule implements AtlasModule { @Override public void destroy() { } @Override void init(); @Override void destroy(); @Override void setClassLoader(ClassLoader classLoader); @Override ClassLoader getClassLoader(); @Override void processPreValidation(AtlasInternalSession session); @Override void processPreSource... |
@Test public void testProcessPreValidation() throws AtlasException { module.processPreValidation(null); } | @Override public void processPreValidation(AtlasInternalSession session) throws AtlasException { } | ConstantModule implements AtlasModule { @Override public void processPreValidation(AtlasInternalSession session) throws AtlasException { } } | ConstantModule implements AtlasModule { @Override public void processPreValidation(AtlasInternalSession session) throws AtlasException { } } | ConstantModule implements AtlasModule { @Override public void processPreValidation(AtlasInternalSession session) throws AtlasException { } @Override void init(); @Override void destroy(); @Override void setClassLoader(ClassLoader classLoader); @Override ClassLoader getClassLoader(); @Override void processPreValidation... | ConstantModule implements AtlasModule { @Override public void processPreValidation(AtlasInternalSession session) throws AtlasException { } @Override void init(); @Override void destroy(); @Override void setClassLoader(ClassLoader classLoader); @Override ClassLoader getClassLoader(); @Override void processPreValidation... |
@Test public void testProcessPreSourceExecution() throws AtlasException { module.processPreSourceExecution(null); } | @Override public void processPreSourceExecution(AtlasInternalSession session) throws AtlasException { } | ConstantModule implements AtlasModule { @Override public void processPreSourceExecution(AtlasInternalSession session) throws AtlasException { } } | ConstantModule implements AtlasModule { @Override public void processPreSourceExecution(AtlasInternalSession session) throws AtlasException { } } | ConstantModule implements AtlasModule { @Override public void processPreSourceExecution(AtlasInternalSession session) throws AtlasException { } @Override void init(); @Override void destroy(); @Override void setClassLoader(ClassLoader classLoader); @Override ClassLoader getClassLoader(); @Override void processPreValid... | ConstantModule implements AtlasModule { @Override public void processPreSourceExecution(AtlasInternalSession session) throws AtlasException { } @Override void init(); @Override void destroy(); @Override void setClassLoader(ClassLoader classLoader); @Override ClassLoader getClassLoader(); @Override void processPreValid... |
@Test public void testBuildSimpleExampleDocumentWithNamespaceSingleFieldAndNS() throws Exception { namespaces.put("x", "http: writeValue("/x:orders/@totalCost", "12525.00"); final String expected = "<x:orders xmlns:x=\"http: checkResult(expected); } | private void writeValue(Element parentNode, XmlSegmentContext segment, Field field) throws AtlasException { if (LOG.isDebugEnabled()) { LOG.debug("Writing field value in parent node '{}', parentNode: {}", segment, xmlHelper.writeDocumentToString(true, parentNode)); } String value = convertValue(field); if (segment.isAt... | XmlFieldWriter extends XmlFieldTransformer implements AtlasFieldWriter { private void writeValue(Element parentNode, XmlSegmentContext segment, Field field) throws AtlasException { if (LOG.isDebugEnabled()) { LOG.debug("Writing field value in parent node '{}', parentNode: {}", segment, xmlHelper.writeDocumentToString(t... | XmlFieldWriter extends XmlFieldTransformer implements AtlasFieldWriter { private void writeValue(Element parentNode, XmlSegmentContext segment, Field field) throws AtlasException { if (LOG.isDebugEnabled()) { LOG.debug("Writing field value in parent node '{}', parentNode: {}", segment, xmlHelper.writeDocumentToString(t... | XmlFieldWriter extends XmlFieldTransformer implements AtlasFieldWriter { private void writeValue(Element parentNode, XmlSegmentContext segment, Field field) throws AtlasException { if (LOG.isDebugEnabled()) { LOG.debug("Writing field value in parent node '{}', parentNode: {}", segment, xmlHelper.writeDocumentToString(t... | XmlFieldWriter extends XmlFieldTransformer implements AtlasFieldWriter { private void writeValue(Element parentNode, XmlSegmentContext segment, Field field) throws AtlasException { if (LOG.isDebugEnabled()) { LOG.debug("Writing field value in parent node '{}', parentNode: {}", segment, xmlHelper.writeDocumentToString(t... |
@Test public void testProcessPostSourceExecution() throws AtlasException { module.processPostSourceExecution(null); } | @Override public void processPostSourceExecution(AtlasInternalSession session) throws AtlasException { } | ConstantModule implements AtlasModule { @Override public void processPostSourceExecution(AtlasInternalSession session) throws AtlasException { } } | ConstantModule implements AtlasModule { @Override public void processPostSourceExecution(AtlasInternalSession session) throws AtlasException { } } | ConstantModule implements AtlasModule { @Override public void processPostSourceExecution(AtlasInternalSession session) throws AtlasException { } @Override void init(); @Override void destroy(); @Override void setClassLoader(ClassLoader classLoader); @Override ClassLoader getClassLoader(); @Override void processPreVali... | ConstantModule implements AtlasModule { @Override public void processPostSourceExecution(AtlasInternalSession session) throws AtlasException { } @Override void init(); @Override void destroy(); @Override void setClassLoader(ClassLoader classLoader); @Override ClassLoader getClassLoader(); @Override void processPreVali... |
@Test(expected = UnsupportedOperationException.class) public void testProcessPreTargetExecution() throws AtlasException { module.processPreTargetExecution(null); } | @Override public void processPreTargetExecution(AtlasInternalSession session) throws AtlasException { throw new UnsupportedOperationException("ConstantField cannot be placed as a target field"); } | ConstantModule implements AtlasModule { @Override public void processPreTargetExecution(AtlasInternalSession session) throws AtlasException { throw new UnsupportedOperationException("ConstantField cannot be placed as a target field"); } } | ConstantModule implements AtlasModule { @Override public void processPreTargetExecution(AtlasInternalSession session) throws AtlasException { throw new UnsupportedOperationException("ConstantField cannot be placed as a target field"); } } | ConstantModule implements AtlasModule { @Override public void processPreTargetExecution(AtlasInternalSession session) throws AtlasException { throw new UnsupportedOperationException("ConstantField cannot be placed as a target field"); } @Override void init(); @Override void destroy(); @Override void setClassLoader(Cla... | ConstantModule implements AtlasModule { @Override public void processPreTargetExecution(AtlasInternalSession session) throws AtlasException { throw new UnsupportedOperationException("ConstantField cannot be placed as a target field"); } @Override void init(); @Override void destroy(); @Override void setClassLoader(Cla... |
@Test(expected = UnsupportedOperationException.class) public void testProcessTargetFieldMapping() throws AtlasException { module.writeTargetValue(null); } | @Override public void writeTargetValue(AtlasInternalSession session) throws AtlasException { throw new UnsupportedOperationException("ConstantField cannot be placed as a target field"); } | ConstantModule implements AtlasModule { @Override public void writeTargetValue(AtlasInternalSession session) throws AtlasException { throw new UnsupportedOperationException("ConstantField cannot be placed as a target field"); } } | ConstantModule implements AtlasModule { @Override public void writeTargetValue(AtlasInternalSession session) throws AtlasException { throw new UnsupportedOperationException("ConstantField cannot be placed as a target field"); } } | ConstantModule implements AtlasModule { @Override public void writeTargetValue(AtlasInternalSession session) throws AtlasException { throw new UnsupportedOperationException("ConstantField cannot be placed as a target field"); } @Override void init(); @Override void destroy(); @Override void setClassLoader(ClassLoader ... | ConstantModule implements AtlasModule { @Override public void writeTargetValue(AtlasInternalSession session) throws AtlasException { throw new UnsupportedOperationException("ConstantField cannot be placed as a target field"); } @Override void init(); @Override void destroy(); @Override void setClassLoader(ClassLoader ... |
@Test(expected = UnsupportedOperationException.class) public void testProcessPostTargetExecution() throws AtlasException { module.processPostTargetExecution(null); } | @Override public void processPostTargetExecution(AtlasInternalSession session) throws AtlasException { throw new UnsupportedOperationException("ConstantField cannot be placed as a target field"); } | ConstantModule implements AtlasModule { @Override public void processPostTargetExecution(AtlasInternalSession session) throws AtlasException { throw new UnsupportedOperationException("ConstantField cannot be placed as a target field"); } } | ConstantModule implements AtlasModule { @Override public void processPostTargetExecution(AtlasInternalSession session) throws AtlasException { throw new UnsupportedOperationException("ConstantField cannot be placed as a target field"); } } | ConstantModule implements AtlasModule { @Override public void processPostTargetExecution(AtlasInternalSession session) throws AtlasException { throw new UnsupportedOperationException("ConstantField cannot be placed as a target field"); } @Override void init(); @Override void destroy(); @Override void setClassLoader(Cl... | ConstantModule implements AtlasModule { @Override public void processPostTargetExecution(AtlasInternalSession session) throws AtlasException { throw new UnsupportedOperationException("ConstantField cannot be placed as a target field"); } @Override void init(); @Override void destroy(); @Override void setClassLoader(Cl... |
@Test public void testProcessPostValidation() throws AtlasException { module.processPostValidation(null); } | @Override public void processPostValidation(AtlasInternalSession session) throws AtlasException { } | ConstantModule implements AtlasModule { @Override public void processPostValidation(AtlasInternalSession session) throws AtlasException { } } | ConstantModule implements AtlasModule { @Override public void processPostValidation(AtlasInternalSession session) throws AtlasException { } } | ConstantModule implements AtlasModule { @Override public void processPostValidation(AtlasInternalSession session) throws AtlasException { } @Override void init(); @Override void destroy(); @Override void setClassLoader(ClassLoader classLoader); @Override ClassLoader getClassLoader(); @Override void processPreValidatio... | ConstantModule implements AtlasModule { @Override public void processPostValidation(AtlasInternalSession session) throws AtlasException { } @Override void init(); @Override void destroy(); @Override void setClassLoader(ClassLoader classLoader); @Override ClassLoader getClassLoader(); @Override void processPreValidatio... |
@Test public void testGetMode() { assertNotNull(module.getMode()); } | @Override public AtlasModuleMode getMode() { return AtlasModuleMode.SOURCE; } | ConstantModule implements AtlasModule { @Override public AtlasModuleMode getMode() { return AtlasModuleMode.SOURCE; } } | ConstantModule implements AtlasModule { @Override public AtlasModuleMode getMode() { return AtlasModuleMode.SOURCE; } } | ConstantModule implements AtlasModule { @Override public AtlasModuleMode getMode() { return AtlasModuleMode.SOURCE; } @Override void init(); @Override void destroy(); @Override void setClassLoader(ClassLoader classLoader); @Override ClassLoader getClassLoader(); @Override void processPreValidation(AtlasInternalSession... | ConstantModule implements AtlasModule { @Override public AtlasModuleMode getMode() { return AtlasModuleMode.SOURCE; } @Override void init(); @Override void destroy(); @Override void setClassLoader(ClassLoader classLoader); @Override ClassLoader getClassLoader(); @Override void processPreValidation(AtlasInternalSession... |
@Test public void testGetConversionService() { assertNotNull(module.getConversionService()); } | @Override public AtlasConversionService getConversionService() { return this.conversionService; } | ConstantModule implements AtlasModule { @Override public AtlasConversionService getConversionService() { return this.conversionService; } } | ConstantModule implements AtlasModule { @Override public AtlasConversionService getConversionService() { return this.conversionService; } } | ConstantModule implements AtlasModule { @Override public AtlasConversionService getConversionService() { return this.conversionService; } @Override void init(); @Override void destroy(); @Override void setClassLoader(ClassLoader classLoader); @Override ClassLoader getClassLoader(); @Override void processPreValidation(... | ConstantModule implements AtlasModule { @Override public AtlasConversionService getConversionService() { return this.conversionService; } @Override void init(); @Override void destroy(); @Override void setClassLoader(ClassLoader classLoader); @Override ClassLoader getClassLoader(); @Override void processPreValidation(... |
@Test public void testListSupportedModes() { assertNotNull(module.listSupportedModes()); } | @Override public List<AtlasModuleMode> listSupportedModes() { return Arrays.asList(new AtlasModuleMode[] { AtlasModuleMode.SOURCE }); } | ConstantModule implements AtlasModule { @Override public List<AtlasModuleMode> listSupportedModes() { return Arrays.asList(new AtlasModuleMode[] { AtlasModuleMode.SOURCE }); } } | ConstantModule implements AtlasModule { @Override public List<AtlasModuleMode> listSupportedModes() { return Arrays.asList(new AtlasModuleMode[] { AtlasModuleMode.SOURCE }); } } | ConstantModule implements AtlasModule { @Override public List<AtlasModuleMode> listSupportedModes() { return Arrays.asList(new AtlasModuleMode[] { AtlasModuleMode.SOURCE }); } @Override void init(); @Override void destroy(); @Override void setClassLoader(ClassLoader classLoader); @Override ClassLoader getClassLoader()... | ConstantModule implements AtlasModule { @Override public List<AtlasModuleMode> listSupportedModes() { return Arrays.asList(new AtlasModuleMode[] { AtlasModuleMode.SOURCE }); } @Override void init(); @Override void destroy(); @Override void setClassLoader(ClassLoader classLoader); @Override ClassLoader getClassLoader()... |
@Test public void testGetDocId() { assertNull(module.getDocId()); } | @Override public String getDocId() { return null; } | ConstantModule implements AtlasModule { @Override public String getDocId() { return null; } } | ConstantModule implements AtlasModule { @Override public String getDocId() { return null; } } | ConstantModule implements AtlasModule { @Override public String getDocId() { return null; } @Override void init(); @Override void destroy(); @Override void setClassLoader(ClassLoader classLoader); @Override ClassLoader getClassLoader(); @Override void processPreValidation(AtlasInternalSession session); @Override void ... | ConstantModule implements AtlasModule { @Override public String getDocId() { return null; } @Override void init(); @Override void destroy(); @Override void setClassLoader(ClassLoader classLoader); @Override ClassLoader getClassLoader(); @Override void processPreValidation(AtlasInternalSession session); @Override void ... |
@Test public void testGetUri() { assertNull(module.getUri()); } | @Override public String getUri() { return null; } | ConstantModule implements AtlasModule { @Override public String getUri() { return null; } } | ConstantModule implements AtlasModule { @Override public String getUri() { return null; } } | ConstantModule implements AtlasModule { @Override public String getUri() { return null; } @Override void init(); @Override void destroy(); @Override void setClassLoader(ClassLoader classLoader); @Override ClassLoader getClassLoader(); @Override void processPreValidation(AtlasInternalSession session); @Override void pr... | ConstantModule implements AtlasModule { @Override public String getUri() { return null; } @Override void init(); @Override void destroy(); @Override void setClassLoader(ClassLoader classLoader); @Override ClassLoader getClassLoader(); @Override void processPreValidation(AtlasInternalSession session); @Override void pr... |
@Test public void testBuildDocumentWithMixedParentAttributeNamespaces() throws Exception { namespaces.put("", "http: namespaces.put("y", "http: writeValue("/orders/order/@y:totalCost", "12525.00"); checkResultFromFile("simple_example_mixed_ns.xml"); } | private void writeValue(Element parentNode, XmlSegmentContext segment, Field field) throws AtlasException { if (LOG.isDebugEnabled()) { LOG.debug("Writing field value in parent node '{}', parentNode: {}", segment, xmlHelper.writeDocumentToString(true, parentNode)); } String value = convertValue(field); if (segment.isAt... | XmlFieldWriter extends XmlFieldTransformer implements AtlasFieldWriter { private void writeValue(Element parentNode, XmlSegmentContext segment, Field field) throws AtlasException { if (LOG.isDebugEnabled()) { LOG.debug("Writing field value in parent node '{}', parentNode: {}", segment, xmlHelper.writeDocumentToString(t... | XmlFieldWriter extends XmlFieldTransformer implements AtlasFieldWriter { private void writeValue(Element parentNode, XmlSegmentContext segment, Field field) throws AtlasException { if (LOG.isDebugEnabled()) { LOG.debug("Writing field value in parent node '{}', parentNode: {}", segment, xmlHelper.writeDocumentToString(t... | XmlFieldWriter extends XmlFieldTransformer implements AtlasFieldWriter { private void writeValue(Element parentNode, XmlSegmentContext segment, Field field) throws AtlasException { if (LOG.isDebugEnabled()) { LOG.debug("Writing field value in parent node '{}', parentNode: {}", segment, xmlHelper.writeDocumentToString(t... | XmlFieldWriter extends XmlFieldTransformer implements AtlasFieldWriter { private void writeValue(Element parentNode, XmlSegmentContext segment, Field field) throws AtlasException { if (LOG.isDebugEnabled()) { LOG.debug("Writing field value in parent node '{}', parentNode: {}", segment, xmlHelper.writeDocumentToString(t... |
@Test public void testIsStatisticsSupported() { assertFalse(module.isStatisticsSupported()); } | @Override public Boolean isStatisticsSupported() { return false; } | ConstantModule implements AtlasModule { @Override public Boolean isStatisticsSupported() { return false; } } | ConstantModule implements AtlasModule { @Override public Boolean isStatisticsSupported() { return false; } } | ConstantModule implements AtlasModule { @Override public Boolean isStatisticsSupported() { return false; } @Override void init(); @Override void destroy(); @Override void setClassLoader(ClassLoader classLoader); @Override ClassLoader getClassLoader(); @Override void processPreValidation(AtlasInternalSession session); ... | ConstantModule implements AtlasModule { @Override public Boolean isStatisticsSupported() { return false; } @Override void init(); @Override void destroy(); @Override void setClassLoader(ClassLoader classLoader); @Override ClassLoader getClassLoader(); @Override void processPreValidation(AtlasInternalSession session); ... |
@Test public void testIsStatisticsEnabled() { assertFalse(module.isStatisticsEnabled()); } | @Override public Boolean isStatisticsEnabled() { return false; } | ConstantModule implements AtlasModule { @Override public Boolean isStatisticsEnabled() { return false; } } | ConstantModule implements AtlasModule { @Override public Boolean isStatisticsEnabled() { return false; } } | ConstantModule implements AtlasModule { @Override public Boolean isStatisticsEnabled() { return false; } @Override void init(); @Override void destroy(); @Override void setClassLoader(ClassLoader classLoader); @Override ClassLoader getClassLoader(); @Override void processPreValidation(AtlasInternalSession session); @O... | ConstantModule implements AtlasModule { @Override public Boolean isStatisticsEnabled() { return false; } @Override void init(); @Override void destroy(); @Override void setClassLoader(ClassLoader classLoader); @Override ClassLoader getClassLoader(); @Override void processPreValidation(AtlasInternalSession session); @O... |
@Test public void testIsSupportedField() { assertFalse(module.isSupportedField(new MockField())); } | @Override public Boolean isSupportedField(Field field) { return field instanceof ConstantField; } | ConstantModule implements AtlasModule { @Override public Boolean isSupportedField(Field field) { return field instanceof ConstantField; } } | ConstantModule implements AtlasModule { @Override public Boolean isSupportedField(Field field) { return field instanceof ConstantField; } } | ConstantModule implements AtlasModule { @Override public Boolean isSupportedField(Field field) { return field instanceof ConstantField; } @Override void init(); @Override void destroy(); @Override void setClassLoader(ClassLoader classLoader); @Override ClassLoader getClassLoader(); @Override void processPreValidation(... | ConstantModule implements AtlasModule { @Override public Boolean isSupportedField(Field field) { return field instanceof ConstantField; } @Override void init(); @Override void destroy(); @Override void setClassLoader(ClassLoader classLoader); @Override ClassLoader getClassLoader(); @Override void processPreValidation(... |
@Test public void testCloneField() throws AtlasException { assertNull(module.cloneField(new MockField())); } | @Override public Field cloneField(Field field) throws AtlasException { return null; } | ConstantModule implements AtlasModule { @Override public Field cloneField(Field field) throws AtlasException { return null; } } | ConstantModule implements AtlasModule { @Override public Field cloneField(Field field) throws AtlasException { return null; } } | ConstantModule implements AtlasModule { @Override public Field cloneField(Field field) throws AtlasException { return null; } @Override void init(); @Override void destroy(); @Override void setClassLoader(ClassLoader classLoader); @Override ClassLoader getClassLoader(); @Override void processPreValidation(AtlasInterna... | ConstantModule implements AtlasModule { @Override public Field cloneField(Field field) throws AtlasException { return null; } @Override void init(); @Override void destroy(); @Override void setClassLoader(ClassLoader classLoader); @Override ClassLoader getClassLoader(); @Override void processPreValidation(AtlasInterna... |
@Test public void testGetFieldActionService() { assertNull(module.getFieldActionService()); } | @Override public AtlasFieldActionService getFieldActionService() { return this.fieldActionService; } | ConstantModule implements AtlasModule { @Override public AtlasFieldActionService getFieldActionService() { return this.fieldActionService; } } | ConstantModule implements AtlasModule { @Override public AtlasFieldActionService getFieldActionService() { return this.fieldActionService; } } | ConstantModule implements AtlasModule { @Override public AtlasFieldActionService getFieldActionService() { return this.fieldActionService; } @Override void init(); @Override void destroy(); @Override void setClassLoader(ClassLoader classLoader); @Override ClassLoader getClassLoader(); @Override void processPreValidati... | ConstantModule implements AtlasModule { @Override public AtlasFieldActionService getFieldActionService() { return this.fieldActionService; } @Override void init(); @Override void destroy(); @Override void setClassLoader(ClassLoader classLoader); @Override ClassLoader getClassLoader(); @Override void processPreValidati... |
@Test public void getservice() { assertNotNull(service); DefaultAtlasConversionService service2 = DefaultAtlasConversionService.getInstance(); assertNotNull(service2); assertSame(service, service2); } | public static DefaultAtlasConversionService getInstance() { DefaultAtlasConversionService result = instance; if (result == null) { synchronized (SINGLETON_LOCK) { result = instance; if (result == null) { result = new DefaultAtlasConversionService(); result.init(); instance = result; } } } return result; } | DefaultAtlasConversionService implements AtlasConversionService { public static DefaultAtlasConversionService getInstance() { DefaultAtlasConversionService result = instance; if (result == null) { synchronized (SINGLETON_LOCK) { result = instance; if (result == null) { result = new DefaultAtlasConversionService(); resu... | DefaultAtlasConversionService implements AtlasConversionService { public static DefaultAtlasConversionService getInstance() { DefaultAtlasConversionService result = instance; if (result == null) { synchronized (SINGLETON_LOCK) { result = instance; if (result == null) { result = new DefaultAtlasConversionService(); resu... | DefaultAtlasConversionService implements AtlasConversionService { public static DefaultAtlasConversionService getInstance() { DefaultAtlasConversionService result = instance; if (result == null) { synchronized (SINGLETON_LOCK) { result = instance; if (result == null) { result = new DefaultAtlasConversionService(); resu... | DefaultAtlasConversionService implements AtlasConversionService { public static DefaultAtlasConversionService getInstance() { DefaultAtlasConversionService result = instance; if (result == null) { synchronized (SINGLETON_LOCK) { result = instance; if (result == null) { result = new DefaultAtlasConversionService(); resu... |
@Test public void findMatchingConverterByFieldTypes() { assertNotNull(service); Optional<AtlasConverter<?>> atlasConverter = service.findMatchingConverter(FieldType.STRING, FieldType.BOOLEAN); assertTrue(atlasConverter.isPresent()); assertNotNull(atlasConverter); assertEquals(StringConverter.class, atlasConverter.get()... | @Override public Optional<AtlasConverter<?>> findMatchingConverter(FieldType source, FieldType target) { Class<?> sourceClass = classFromFieldType(source); Class<?> targetClass = classFromFieldType(target); if (sourceClass != null && targetClass != null) { return findMatchingConverter(sourceClass.getCanonicalName(), ta... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Optional<AtlasConverter<?>> findMatchingConverter(FieldType source, FieldType target) { Class<?> sourceClass = classFromFieldType(source); Class<?> targetClass = classFromFieldType(target); if (sourceClass != null && targetClass != null)... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Optional<AtlasConverter<?>> findMatchingConverter(FieldType source, FieldType target) { Class<?> sourceClass = classFromFieldType(source); Class<?> targetClass = classFromFieldType(target); if (sourceClass != null && targetClass != null)... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Optional<AtlasConverter<?>> findMatchingConverter(FieldType source, FieldType target) { Class<?> sourceClass = classFromFieldType(source); Class<?> targetClass = classFromFieldType(target); if (sourceClass != null && targetClass != null)... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Optional<AtlasConverter<?>> findMatchingConverter(FieldType source, FieldType target) { Class<?> sourceClass = classFromFieldType(source); Class<?> targetClass = classFromFieldType(target); if (sourceClass != null && targetClass != null)... |
@Test public void findMatchingConverterByFieldTypesCustomConverter() { assertNotNull(service); Optional<AtlasConverter<?>> atlasConverter = service.findMatchingConverter(FieldType.STRING, FieldType.STRING); assertNotNull(atlasConverter); assertTrue(atlasConverter.isPresent()); assertTrue(AtlasConverter.class.isAssignab... | @Override public Optional<AtlasConverter<?>> findMatchingConverter(FieldType source, FieldType target) { Class<?> sourceClass = classFromFieldType(source); Class<?> targetClass = classFromFieldType(target); if (sourceClass != null && targetClass != null) { return findMatchingConverter(sourceClass.getCanonicalName(), ta... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Optional<AtlasConverter<?>> findMatchingConverter(FieldType source, FieldType target) { Class<?> sourceClass = classFromFieldType(source); Class<?> targetClass = classFromFieldType(target); if (sourceClass != null && targetClass != null)... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Optional<AtlasConverter<?>> findMatchingConverter(FieldType source, FieldType target) { Class<?> sourceClass = classFromFieldType(source); Class<?> targetClass = classFromFieldType(target); if (sourceClass != null && targetClass != null)... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Optional<AtlasConverter<?>> findMatchingConverter(FieldType source, FieldType target) { Class<?> sourceClass = classFromFieldType(source); Class<?> targetClass = classFromFieldType(target); if (sourceClass != null && targetClass != null)... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Optional<AtlasConverter<?>> findMatchingConverter(FieldType source, FieldType target) { Class<?> sourceClass = classFromFieldType(source); Class<?> targetClass = classFromFieldType(target); if (sourceClass != null && targetClass != null)... |
@Test public void findMatchingConverterByFieldTypesNoMatching() { assertNotNull(service); Optional<AtlasConverter<?>> atlasConverter = service.findMatchingConverter(FieldType.STRING, FieldType.COMPLEX); assertFalse(atlasConverter.isPresent()); } | @Override public Optional<AtlasConverter<?>> findMatchingConverter(FieldType source, FieldType target) { Class<?> sourceClass = classFromFieldType(source); Class<?> targetClass = classFromFieldType(target); if (sourceClass != null && targetClass != null) { return findMatchingConverter(sourceClass.getCanonicalName(), ta... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Optional<AtlasConverter<?>> findMatchingConverter(FieldType source, FieldType target) { Class<?> sourceClass = classFromFieldType(source); Class<?> targetClass = classFromFieldType(target); if (sourceClass != null && targetClass != null)... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Optional<AtlasConverter<?>> findMatchingConverter(FieldType source, FieldType target) { Class<?> sourceClass = classFromFieldType(source); Class<?> targetClass = classFromFieldType(target); if (sourceClass != null && targetClass != null)... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Optional<AtlasConverter<?>> findMatchingConverter(FieldType source, FieldType target) { Class<?> sourceClass = classFromFieldType(source); Class<?> targetClass = classFromFieldType(target); if (sourceClass != null && targetClass != null)... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Optional<AtlasConverter<?>> findMatchingConverter(FieldType source, FieldType target) { Class<?> sourceClass = classFromFieldType(source); Class<?> targetClass = classFromFieldType(target); if (sourceClass != null && targetClass != null)... |
@Test public void findMatchingConverterBySourceClass() { assertNotNull(service); Optional<AtlasConverter<?>> atlasConverter = service.findMatchingConverter("java.util.Date", "java.time.ZonedDateTime"); assertNotNull(atlasConverter); assertTrue(atlasConverter.isPresent()); assertTrue(AtlasConverter.class.isAssignableFro... | @Override public Optional<AtlasConverter<?>> findMatchingConverter(FieldType source, FieldType target) { Class<?> sourceClass = classFromFieldType(source); Class<?> targetClass = classFromFieldType(target); if (sourceClass != null && targetClass != null) { return findMatchingConverter(sourceClass.getCanonicalName(), ta... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Optional<AtlasConverter<?>> findMatchingConverter(FieldType source, FieldType target) { Class<?> sourceClass = classFromFieldType(source); Class<?> targetClass = classFromFieldType(target); if (sourceClass != null && targetClass != null)... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Optional<AtlasConverter<?>> findMatchingConverter(FieldType source, FieldType target) { Class<?> sourceClass = classFromFieldType(source); Class<?> targetClass = classFromFieldType(target); if (sourceClass != null && targetClass != null)... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Optional<AtlasConverter<?>> findMatchingConverter(FieldType source, FieldType target) { Class<?> sourceClass = classFromFieldType(source); Class<?> targetClass = classFromFieldType(target); if (sourceClass != null && targetClass != null)... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Optional<AtlasConverter<?>> findMatchingConverter(FieldType source, FieldType target) { Class<?> sourceClass = classFromFieldType(source); Class<?> targetClass = classFromFieldType(target); if (sourceClass != null && targetClass != null)... |
@Test public void testBuildComplexNamespaceDuplicateElements() throws Exception { namespaces.put("", "http: namespaces.put("y", "http: namespaces.put("q", "http: writeValue("/orders/@totalCost", "12525.00"); writeValue("/orders/order/id", "a12312"); writeValue("/orders/order/id/@y:custId", "aa"); writeValue("/orders/or... | private void writeValue(Element parentNode, XmlSegmentContext segment, Field field) throws AtlasException { if (LOG.isDebugEnabled()) { LOG.debug("Writing field value in parent node '{}', parentNode: {}", segment, xmlHelper.writeDocumentToString(true, parentNode)); } String value = convertValue(field); if (segment.isAt... | XmlFieldWriter extends XmlFieldTransformer implements AtlasFieldWriter { private void writeValue(Element parentNode, XmlSegmentContext segment, Field field) throws AtlasException { if (LOG.isDebugEnabled()) { LOG.debug("Writing field value in parent node '{}', parentNode: {}", segment, xmlHelper.writeDocumentToString(t... | XmlFieldWriter extends XmlFieldTransformer implements AtlasFieldWriter { private void writeValue(Element parentNode, XmlSegmentContext segment, Field field) throws AtlasException { if (LOG.isDebugEnabled()) { LOG.debug("Writing field value in parent node '{}', parentNode: {}", segment, xmlHelper.writeDocumentToString(t... | XmlFieldWriter extends XmlFieldTransformer implements AtlasFieldWriter { private void writeValue(Element parentNode, XmlSegmentContext segment, Field field) throws AtlasException { if (LOG.isDebugEnabled()) { LOG.debug("Writing field value in parent node '{}', parentNode: {}", segment, xmlHelper.writeDocumentToString(t... | XmlFieldWriter extends XmlFieldTransformer implements AtlasFieldWriter { private void writeValue(Element parentNode, XmlSegmentContext segment, Field field) throws AtlasException { if (LOG.isDebugEnabled()) { LOG.debug("Writing field value in parent node '{}', parentNode: {}", segment, xmlHelper.writeDocumentToString(t... |
@Test public void findMatchingConverterBySourceClassNoMatching() { assertNotNull(service); Optional<AtlasConverter<?>> atlasConverter = service.findMatchingConverter("java.util.Date", "java.time.CustomClass"); assertFalse(atlasConverter.isPresent()); } | @Override public Optional<AtlasConverter<?>> findMatchingConverter(FieldType source, FieldType target) { Class<?> sourceClass = classFromFieldType(source); Class<?> targetClass = classFromFieldType(target); if (sourceClass != null && targetClass != null) { return findMatchingConverter(sourceClass.getCanonicalName(), ta... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Optional<AtlasConverter<?>> findMatchingConverter(FieldType source, FieldType target) { Class<?> sourceClass = classFromFieldType(source); Class<?> targetClass = classFromFieldType(target); if (sourceClass != null && targetClass != null)... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Optional<AtlasConverter<?>> findMatchingConverter(FieldType source, FieldType target) { Class<?> sourceClass = classFromFieldType(source); Class<?> targetClass = classFromFieldType(target); if (sourceClass != null && targetClass != null)... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Optional<AtlasConverter<?>> findMatchingConverter(FieldType source, FieldType target) { Class<?> sourceClass = classFromFieldType(source); Class<?> targetClass = classFromFieldType(target); if (sourceClass != null && targetClass != null)... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Optional<AtlasConverter<?>> findMatchingConverter(FieldType source, FieldType target) { Class<?> sourceClass = classFromFieldType(source); Class<?> targetClass = classFromFieldType(target); if (sourceClass != null && targetClass != null)... |
@Test public void testIsPrimitiveClass() { assertTrue(service.isPrimitive(boolean.class)); assertTrue(service.isPrimitive(byte.class)); assertTrue(service.isPrimitive(char.class)); assertTrue(service.isPrimitive(double.class)); assertTrue(service.isPrimitive(float.class)); assertTrue(service.isPrimitive(int.class)); as... | @Override public Boolean isPrimitive(String className) { if (className == null) { return false; } if (PRIMITIVE_CLASSNAMES.contains(className)) { return true; } return false; } | DefaultAtlasConversionService implements AtlasConversionService { @Override public Boolean isPrimitive(String className) { if (className == null) { return false; } if (PRIMITIVE_CLASSNAMES.contains(className)) { return true; } return false; } } | DefaultAtlasConversionService implements AtlasConversionService { @Override public Boolean isPrimitive(String className) { if (className == null) { return false; } if (PRIMITIVE_CLASSNAMES.contains(className)) { return true; } return false; } private DefaultAtlasConversionService(); } | DefaultAtlasConversionService implements AtlasConversionService { @Override public Boolean isPrimitive(String className) { if (className == null) { return false; } if (PRIMITIVE_CLASSNAMES.contains(className)) { return true; } return false; } private DefaultAtlasConversionService(); static DefaultAtlasConversionServic... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Boolean isPrimitive(String className) { if (className == null) { return false; } if (PRIMITIVE_CLASSNAMES.contains(className)) { return true; } return false; } private DefaultAtlasConversionService(); static DefaultAtlasConversionServic... |
@Test public void testIsPrimitiveFieldType() { assertTrue(service.isPrimitive(FieldType.BOOLEAN)); assertTrue(service.isPrimitive(FieldType.BYTE)); assertTrue(service.isPrimitive(FieldType.CHAR)); assertTrue(service.isPrimitive(FieldType.DECIMAL)); assertTrue(service.isPrimitive(FieldType.DOUBLE)); assertTrue(service.i... | @Override public Boolean isPrimitive(String className) { if (className == null) { return false; } if (PRIMITIVE_CLASSNAMES.contains(className)) { return true; } return false; } | DefaultAtlasConversionService implements AtlasConversionService { @Override public Boolean isPrimitive(String className) { if (className == null) { return false; } if (PRIMITIVE_CLASSNAMES.contains(className)) { return true; } return false; } } | DefaultAtlasConversionService implements AtlasConversionService { @Override public Boolean isPrimitive(String className) { if (className == null) { return false; } if (PRIMITIVE_CLASSNAMES.contains(className)) { return true; } return false; } private DefaultAtlasConversionService(); } | DefaultAtlasConversionService implements AtlasConversionService { @Override public Boolean isPrimitive(String className) { if (className == null) { return false; } if (PRIMITIVE_CLASSNAMES.contains(className)) { return true; } return false; } private DefaultAtlasConversionService(); static DefaultAtlasConversionServic... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Boolean isPrimitive(String className) { if (className == null) { return false; } if (PRIMITIVE_CLASSNAMES.contains(className)) { return true; } return false; } private DefaultAtlasConversionService(); static DefaultAtlasConversionServic... |
@Test public void testIsBoxedPrimitive() { assertTrue(service.isBoxedPrimitive(Boolean.class)); assertTrue(service.isBoxedPrimitive(Byte.class)); assertTrue(service.isBoxedPrimitive(Character.class)); assertTrue(service.isBoxedPrimitive(Double.class)); assertTrue(service.isBoxedPrimitive(Float.class)); assertTrue(servi... | @Override public Boolean isBoxedPrimitive(Class<?> clazz) { if (clazz == null) { return false; } return BOXED_PRIMITIVE_CLASSNAMES.contains(clazz.getCanonicalName()); } | DefaultAtlasConversionService implements AtlasConversionService { @Override public Boolean isBoxedPrimitive(Class<?> clazz) { if (clazz == null) { return false; } return BOXED_PRIMITIVE_CLASSNAMES.contains(clazz.getCanonicalName()); } } | DefaultAtlasConversionService implements AtlasConversionService { @Override public Boolean isBoxedPrimitive(Class<?> clazz) { if (clazz == null) { return false; } return BOXED_PRIMITIVE_CLASSNAMES.contains(clazz.getCanonicalName()); } private DefaultAtlasConversionService(); } | DefaultAtlasConversionService implements AtlasConversionService { @Override public Boolean isBoxedPrimitive(Class<?> clazz) { if (clazz == null) { return false; } return BOXED_PRIMITIVE_CLASSNAMES.contains(clazz.getCanonicalName()); } private DefaultAtlasConversionService(); static DefaultAtlasConversionService getIns... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Boolean isBoxedPrimitive(Class<?> clazz) { if (clazz == null) { return false; } return BOXED_PRIMITIVE_CLASSNAMES.contains(clazz.getCanonicalName()); } private DefaultAtlasConversionService(); static DefaultAtlasConversionService getIns... |
@Test public void testBoxOrUnboxPrimitive() { assertEquals(Boolean.class, service.boxOrUnboxPrimitive(boolean.class)); assertEquals(boolean.class, service.boxOrUnboxPrimitive(Boolean.class)); assertEquals(Byte.class, service.boxOrUnboxPrimitive(byte.class)); assertEquals(byte.class, service.boxOrUnboxPrimitive(Byte.cla... | @Override public Class<?> boxOrUnboxPrimitive(String clazzName) { return classFromFieldType(fieldTypeFromClass(clazzName)); } | DefaultAtlasConversionService implements AtlasConversionService { @Override public Class<?> boxOrUnboxPrimitive(String clazzName) { return classFromFieldType(fieldTypeFromClass(clazzName)); } } | DefaultAtlasConversionService implements AtlasConversionService { @Override public Class<?> boxOrUnboxPrimitive(String clazzName) { return classFromFieldType(fieldTypeFromClass(clazzName)); } private DefaultAtlasConversionService(); } | DefaultAtlasConversionService implements AtlasConversionService { @Override public Class<?> boxOrUnboxPrimitive(String clazzName) { return classFromFieldType(fieldTypeFromClass(clazzName)); } private DefaultAtlasConversionService(); static DefaultAtlasConversionService getInstance(); static Set<String> listPrimitiveCl... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Class<?> boxOrUnboxPrimitive(String clazzName) { return classFromFieldType(fieldTypeFromClass(clazzName)); } private DefaultAtlasConversionService(); static DefaultAtlasConversionService getInstance(); static Set<String> listPrimitiveCl... |
@Test public void testCopyPrimitive() { Object sourceValue = null; Object targetValue = service.copyPrimitive(sourceValue); assertNull(targetValue); sourceValue = (boolean) true; targetValue = service.copyPrimitive(sourceValue); assertNotNull(targetValue); assertTrue(Boolean.class.getCanonicalName().equals(targetValue.... | @Override public Object copyPrimitive(Object sourceValue) { if (sourceValue == null) { return null; } Class<?> clazz = sourceValue.getClass(); if (clazz == null) { return clazz; } else if (boolean.class.getName().equals(clazz.getName())) { return Boolean.valueOf((boolean) sourceValue); } else if (Boolean.class.getName(... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object copyPrimitive(Object sourceValue) { if (sourceValue == null) { return null; } Class<?> clazz = sourceValue.getClass(); if (clazz == null) { return clazz; } else if (boolean.class.getName().equals(clazz.getName())) { return Boolean... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object copyPrimitive(Object sourceValue) { if (sourceValue == null) { return null; } Class<?> clazz = sourceValue.getClass(); if (clazz == null) { return clazz; } else if (boolean.class.getName().equals(clazz.getName())) { return Boolean... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object copyPrimitive(Object sourceValue) { if (sourceValue == null) { return null; } Class<?> clazz = sourceValue.getClass(); if (clazz == null) { return clazz; } else if (boolean.class.getName().equals(clazz.getName())) { return Boolean... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object copyPrimitive(Object sourceValue) { if (sourceValue == null) { return null; } Class<?> clazz = sourceValue.getClass(); if (clazz == null) { return clazz; } else if (boolean.class.getName().equals(clazz.getName())) { return Boolean... |
@Test public void testListPrimitiveClassNames() { assertNotNull(DefaultAtlasConversionService.listPrimitiveClassNames()); } | public static Set<String> listPrimitiveClassNames() { return PRIMITIVE_CLASSNAMES; } | DefaultAtlasConversionService implements AtlasConversionService { public static Set<String> listPrimitiveClassNames() { return PRIMITIVE_CLASSNAMES; } } | DefaultAtlasConversionService implements AtlasConversionService { public static Set<String> listPrimitiveClassNames() { return PRIMITIVE_CLASSNAMES; } private DefaultAtlasConversionService(); } | DefaultAtlasConversionService implements AtlasConversionService { public static Set<String> listPrimitiveClassNames() { return PRIMITIVE_CLASSNAMES; } private DefaultAtlasConversionService(); static DefaultAtlasConversionService getInstance(); static Set<String> listPrimitiveClassNames(); @Override Optional<AtlasConve... | DefaultAtlasConversionService implements AtlasConversionService { public static Set<String> listPrimitiveClassNames() { return PRIMITIVE_CLASSNAMES; } private DefaultAtlasConversionService(); static DefaultAtlasConversionService getInstance(); static Set<String> listPrimitiveClassNames(); @Override Optional<AtlasConve... |
@Test public void testIsPrimitive() { assertTrue(service.isPrimitive("short")); String s = null; assertFalse(service.isPrimitive(s)); assertFalse(service.isPrimitive("String")); } | @Override public Boolean isPrimitive(String className) { if (className == null) { return false; } if (PRIMITIVE_CLASSNAMES.contains(className)) { return true; } return false; } | DefaultAtlasConversionService implements AtlasConversionService { @Override public Boolean isPrimitive(String className) { if (className == null) { return false; } if (PRIMITIVE_CLASSNAMES.contains(className)) { return true; } return false; } } | DefaultAtlasConversionService implements AtlasConversionService { @Override public Boolean isPrimitive(String className) { if (className == null) { return false; } if (PRIMITIVE_CLASSNAMES.contains(className)) { return true; } return false; } private DefaultAtlasConversionService(); } | DefaultAtlasConversionService implements AtlasConversionService { @Override public Boolean isPrimitive(String className) { if (className == null) { return false; } if (PRIMITIVE_CLASSNAMES.contains(className)) { return true; } return false; } private DefaultAtlasConversionService(); static DefaultAtlasConversionServic... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Boolean isPrimitive(String className) { if (className == null) { return false; } if (PRIMITIVE_CLASSNAMES.contains(className)) { return true; } return false; } private DefaultAtlasConversionService(); static DefaultAtlasConversionServic... |
@Test public void testFieldTypeFromClass() { String className = null; assertEquals(FieldType.NONE, service.fieldTypeFromClass(className)); className = ""; assertEquals(FieldType.NONE, service.fieldTypeFromClass(className)); Class<String> klass = null; assertNull(service.fieldTypeFromClass(klass)); assertNotNull(service... | @Override public FieldType fieldTypeFromClass(Class<?> clazz) { if (clazz == null) { return null; } return fieldTypeFromClass(clazz.getName()); } | DefaultAtlasConversionService implements AtlasConversionService { @Override public FieldType fieldTypeFromClass(Class<?> clazz) { if (clazz == null) { return null; } return fieldTypeFromClass(clazz.getName()); } } | DefaultAtlasConversionService implements AtlasConversionService { @Override public FieldType fieldTypeFromClass(Class<?> clazz) { if (clazz == null) { return null; } return fieldTypeFromClass(clazz.getName()); } private DefaultAtlasConversionService(); } | DefaultAtlasConversionService implements AtlasConversionService { @Override public FieldType fieldTypeFromClass(Class<?> clazz) { if (clazz == null) { return null; } return fieldTypeFromClass(clazz.getName()); } private DefaultAtlasConversionService(); static DefaultAtlasConversionService getInstance(); static Set<Str... | DefaultAtlasConversionService implements AtlasConversionService { @Override public FieldType fieldTypeFromClass(Class<?> clazz) { if (clazz == null) { return null; } return fieldTypeFromClass(clazz.getName()); } private DefaultAtlasConversionService(); static DefaultAtlasConversionService getInstance(); static Set<Str... |
@Test public void testClassFromFieldType() { assertNull(service.classFromFieldType(null)); assertEquals(java.lang.Object.class, service.classFromFieldType(FieldType.ANY)); assertNotNull(service.classFromFieldType(FieldType.BOOLEAN)); assertNotNull(service.classFromFieldType(FieldType.BYTE)); assertNotNull(service.class... | @Override public Class<?> classFromFieldType(FieldType fieldType) { if (fieldType == null) { return null; } switch (fieldType) { case ANY: return Object.class; case BIG_INTEGER: return BigInteger.class; case BOOLEAN: return Boolean.class; case BYTE: return Byte.class; case BYTE_ARRAY: return Byte[].class; case CHAR: re... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Class<?> classFromFieldType(FieldType fieldType) { if (fieldType == null) { return null; } switch (fieldType) { case ANY: return Object.class; case BIG_INTEGER: return BigInteger.class; case BOOLEAN: return Boolean.class; case BYTE: retu... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Class<?> classFromFieldType(FieldType fieldType) { if (fieldType == null) { return null; } switch (fieldType) { case ANY: return Object.class; case BIG_INTEGER: return BigInteger.class; case BOOLEAN: return Boolean.class; case BYTE: retu... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Class<?> classFromFieldType(FieldType fieldType) { if (fieldType == null) { return null; } switch (fieldType) { case ANY: return Object.class; case BIG_INTEGER: return BigInteger.class; case BOOLEAN: return Boolean.class; case BYTE: retu... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Class<?> classFromFieldType(FieldType fieldType) { if (fieldType == null) { return null; } switch (fieldType) { case ANY: return Object.class; case BIG_INTEGER: return BigInteger.class; case BOOLEAN: return Boolean.class; case BYTE: retu... |
@Test(expected = AtlasException.class) public void testThrowExceptionOnNullXmlField() throws Exception { createWriter(); XmlField field = null; AtlasInternalSession session = mock(AtlasInternalSession.class); when(session.head()).thenReturn(mock(Head.class)); when(session.head().getSourceField()).thenReturn(mock(Field.... | @Override public void write(AtlasInternalSession session) throws AtlasException { Field targetField = session.head().getTargetField(); if (targetField == null) { throw new AtlasException(new IllegalArgumentException("Argument 'field' cannot be null")); } if (LOG.isDebugEnabled()) { LOG.debug("Now processing field path=... | XmlFieldWriter extends XmlFieldTransformer implements AtlasFieldWriter { @Override public void write(AtlasInternalSession session) throws AtlasException { Field targetField = session.head().getTargetField(); if (targetField == null) { throw new AtlasException(new IllegalArgumentException("Argument 'field' cannot be nul... | XmlFieldWriter extends XmlFieldTransformer implements AtlasFieldWriter { @Override public void write(AtlasInternalSession session) throws AtlasException { Field targetField = session.head().getTargetField(); if (targetField == null) { throw new AtlasException(new IllegalArgumentException("Argument 'field' cannot be nul... | XmlFieldWriter extends XmlFieldTransformer implements AtlasFieldWriter { @Override public void write(AtlasInternalSession session) throws AtlasException { Field targetField = session.head().getTargetField(); if (targetField == null) { throw new AtlasException(new IllegalArgumentException("Argument 'field' cannot be nul... | XmlFieldWriter extends XmlFieldTransformer implements AtlasFieldWriter { @Override public void write(AtlasInternalSession session) throws AtlasException { Field targetField = session.head().getTargetField(); if (targetField == null) { throw new AtlasException(new IllegalArgumentException("Argument 'field' cannot be nul... |
@Test public void testConvertTypeFromBigDecimal() throws AtlasConversionException { assertEquals(BigInteger.valueOf(1), service.convertType(BigDecimal.valueOf(1), FieldType.DECIMAL, FieldType.BIG_INTEGER)); assertEquals(true, service.convertType(BigDecimal.valueOf(1), FieldType.DECIMAL, FieldType.BOOLEAN)); assertEqual... | @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified on convertType method."); } if (isAssignableFieldType(origSourceT... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... |
@Test public void testConvertTypeFromBigInteger() throws AtlasConversionException { assertEquals(BigInteger.valueOf(1), service.convertType(BigInteger.valueOf(1), FieldType.BIG_INTEGER, FieldType.BIG_INTEGER)); assertEquals(true, service.convertType(BigInteger.valueOf(1), FieldType.BIG_INTEGER, FieldType.BOOLEAN)); ass... | @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified on convertType method."); } if (isAssignableFieldType(origSourceT... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... |
@Test public void testConvertTypeFromBoolean() throws AtlasConversionException { assertEquals(BigInteger.valueOf(1), service.convertType(true, FieldType.BOOLEAN, FieldType.BIG_INTEGER)); assertEquals(true, service.convertType(true, FieldType.BOOLEAN, FieldType.BOOLEAN)); assertEquals((byte)1, service.convertType(true, ... | @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified on convertType method."); } if (isAssignableFieldType(origSourceT... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... |
@Test public void testConvertTypeFromByte() throws AtlasConversionException { assertEquals(BigInteger.valueOf(1), service.convertType(0x01, FieldType.BYTE, FieldType.BIG_INTEGER)); assertEquals(true, service.convertType(0x01, FieldType.BYTE, FieldType.BOOLEAN)); assertEquals(0x01, service.convertType(0x01, FieldType.BY... | @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified on convertType method."); } if (isAssignableFieldType(origSourceT... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... |
@Test public void testConvertTypeFromCharacter() throws AtlasConversionException { assertEquals(BigInteger.valueOf(97), service.convertType('a', FieldType.CHAR, FieldType.BIG_INTEGER)); assertEquals(false, service.convertType('a', FieldType.CHAR, FieldType.BOOLEAN)); assertEquals((byte)97, service.convertType('a', Fiel... | @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified on convertType method."); } if (isAssignableFieldType(origSourceT... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... |
@Test public void testConvertTypeFromDate() throws AtlasConversionException { assertEquals(BigInteger.valueOf(new Date(1).getTime()), service.convertType(new Date(1), FieldType.DATE_TIME, FieldType.BIG_INTEGER)); assertEquals((byte)1, service.convertType(new Date(1), FieldType.DATE_TIME, FieldType.BYTE)); assertEquals(... | @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified on convertType method."); } if (isAssignableFieldType(origSourceT... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... |
@Test public void testConvertTypeFromDouble() throws AtlasConversionException { assertEquals(BigInteger.valueOf(1), service.convertType(new Double(1), FieldType.DOUBLE, FieldType.BIG_INTEGER)); assertEquals(true, service.convertType(new Double(1), FieldType.DOUBLE, FieldType.BOOLEAN)); assertEquals((byte)0x01, service.... | @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified on convertType method."); } if (isAssignableFieldType(origSourceT... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... |
@Test public void testConvertTypeFromFloat() throws AtlasConversionException { assertEquals(BigInteger.valueOf(1), service.convertType(new Float(1), FieldType.FLOAT, FieldType.BIG_INTEGER)); assertEquals(true, service.convertType(new Float(1), FieldType.FLOAT, FieldType.BOOLEAN)); assertEquals((byte)0x01, service.conve... | @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified on convertType method."); } if (isAssignableFieldType(origSourceT... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... |
@Test public void testConvertTypeFromInteger() throws AtlasConversionException { assertEquals(BigInteger.valueOf(1), service.convertType(new Integer(1), FieldType.INTEGER, FieldType.BIG_INTEGER)); assertEquals(true, service.convertType(new Integer(1), FieldType.INTEGER, FieldType.BOOLEAN)); assertEquals((byte)0x01, ser... | @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified on convertType method."); } if (isAssignableFieldType(origSourceT... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... |
@Test public void testConvertTypeFromLocalDate() throws AtlasConversionException { assertEquals(BigInteger.class, service.convertType(LocalDate.ofEpochDay(0), FieldType.DATE, FieldType.BIG_INTEGER).getClass()); assertEquals(LocalDate.class, service.convertType(LocalDate.ofEpochDay(0), FieldType.DATE, FieldType.DATE).ge... | @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified on convertType method."); } if (isAssignableFieldType(origSourceT... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... |
@Test public void testSchema() throws Exception { final String source = "header1,header2,header3\n" + "l1r1,l1r2,l1r3\n" + "l2r1,l2r2,l2r3\n" + "l3r1,l3r2,l3r3\n"; InputStream inputStream = new ByteArrayInputStream(source.getBytes()); Response res = csvService.inspect(inputStream, null, ",", true, null, null, null, nul... | @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @Path("/inspect") @Operation(summary = "Inspect CSV", description = "Inspect a CSV instance and return a Document object") @RequestBody(description = "Csv", content = @Content(mediaType = "text/csv", schema = @Schema(implementatio... | CsvService { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @Path("/inspect") @Operation(summary = "Inspect CSV", description = "Inspect a CSV instance and return a Document object") @RequestBody(description = "Csv", content = @Content(mediaType = "text/csv", schema = @Schema(... | CsvService { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @Path("/inspect") @Operation(summary = "Inspect CSV", description = "Inspect a CSV instance and return a Document object") @RequestBody(description = "Csv", content = @Content(mediaType = "text/csv", schema = @Schema(... | CsvService { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @Path("/inspect") @Operation(summary = "Inspect CSV", description = "Inspect a CSV instance and return a Document object") @RequestBody(description = "Csv", content = @Content(mediaType = "text/csv", schema = @Schema(... | CsvService { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @Path("/inspect") @Operation(summary = "Inspect CSV", description = "Inspect a CSV instance and return a Document object") @RequestBody(description = "Csv", content = @Content(mediaType = "text/csv", schema = @Schema(... |
@Test public void testConvertTypeFromLocalTime() throws AtlasConversionException { assertEquals(BigInteger.class, service.convertType(LocalTime.ofSecondOfDay(0), FieldType.TIME, FieldType.BIG_INTEGER).getClass()); assertEquals(Date.class, service.convertType(LocalTime.ofSecondOfDay(0), FieldType.TIME, FieldType.DATE_TI... | @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified on convertType method."); } if (isAssignableFieldType(origSourceT... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... |
@Test public void testConvertTypeFromLong() throws AtlasConversionException { assertEquals(BigInteger.valueOf(1), service.convertType(new Long(1), FieldType.LONG, FieldType.BIG_INTEGER)); assertEquals(true, service.convertType(new Long(1), FieldType.LONG, FieldType.BOOLEAN)); assertEquals((byte)0x01, service.convertTyp... | @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified on convertType method."); } if (isAssignableFieldType(origSourceT... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... |
@Test public void testConvertTypeFromNumber() throws AtlasConversionException { Number number = 1; assertEquals(BigInteger.valueOf(1), service.convertType(number, FieldType.NUMBER, FieldType.BIG_INTEGER)); assertEquals(true, service.convertType(number, FieldType.NUMBER, FieldType.BOOLEAN)); assertEquals((byte)0x01, ser... | @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified on convertType method."); } if (isAssignableFieldType(origSourceT... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... |
@Test public void testConvertTypeFromShort() throws AtlasConversionException { assertEquals(BigInteger.valueOf(1), service.convertType((short)1, FieldType.SHORT, FieldType.BIG_INTEGER)); assertEquals(true, service.convertType((short)1, FieldType.SHORT, FieldType.BOOLEAN)); assertEquals((byte)0x01, service.convertType((... | @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified on convertType method."); } if (isAssignableFieldType(origSourceT... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... |
@Test public void testConvertTypeFromString() throws AtlasConversionException { assertEquals(BigInteger.valueOf(1), service.convertType("1", FieldType.STRING, FieldType.BIG_INTEGER)); assertEquals(true, service.convertType("1", FieldType.STRING, FieldType.BOOLEAN)); assertEquals((byte)0x01, service.convertType("1", Fie... | @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified on convertType method."); } if (isAssignableFieldType(origSourceT... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... |
@Test public void testConvertTypeFromZonedDateTime() throws AtlasConversionException { assertEquals(BigInteger.class, service.convertType(ZonedDateTime.now(), FieldType.DATE_TIME_TZ, FieldType.BIG_INTEGER).getClass()); assertEquals(LocalDate.class, service.convertType(ZonedDateTime.now(), FieldType.DATE_TIME_TZ, FieldT... | @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified on convertType method."); } if (isAssignableFieldType(origSourceT... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... |
@Test public void testConvertTypeToAny() throws AtlasConversionException { assertEquals("passthrough", service.convertType("passthrough", FieldType.ANY, FieldType.ANY)); assertEquals("passthrough", service.convertType("passthrough", FieldType.BIG_INTEGER, FieldType.ANY)); assertEquals("passthrough", service.convertType... | @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified on convertType method."); } if (isAssignableFieldType(origSourceT... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... | DefaultAtlasConversionService implements AtlasConversionService { @Override public Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType) throws AtlasConversionException { if (origSourceType == null || targetType == null) { throw new AtlasConversionException("FieldTypes must be specified... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.