| 76 | | Xref insr = new Xref ("3643", BioDataSource.ENTREZ_GENE); |
| 77 | | Xref affy = new Xref ("33162_at", BioDataSource.AFFY); |
| 78 | | Set<Xref> result = mapper.mapID(insr); |
| 79 | | assertTrue (result.contains(affy)); |
| 80 | | |
| 81 | | assertTrue(mapper.xrefExists(insr)); |
| | 93 | if (configExists) |
| | 94 | { |
| | 95 | IDMapper mapper = getLocalService(); |
| | 96 | |
| | 97 | Xref insr = new Xref ("3643", BioDataSource.ENTREZ_GENE); |
| | 98 | Xref affy = new Xref ("33162_at", BioDataSource.AFFY); |
| | 99 | Set<Xref> result = mapper.mapID(insr); |
| | 100 | assertTrue (result.contains(affy)); |
| | 101 | |
| | 102 | assertTrue(mapper.xrefExists(insr)); |
| | 103 | } |
| 87 | | IDMapperCapabilities cap = mapper.getCapabilities(); |
| 88 | | |
| 89 | | Set<DataSource> supported = cap.getSupportedSrcDataSources(); |
| 90 | | assertTrue (supported.contains(DataSource.getBySystemCode("L"))); |
| 91 | | |
| 92 | | String val = cap.getProperty("SCHEMAVERSION"); |
| 93 | | assertNotNull(val); |
| 94 | | |
| 95 | | Set<DataSource> srcDs = cap.getSupportedSrcDataSources(); |
| 96 | | assertTrue(srcDs.size() > 0); |
| 97 | | |
| 98 | | assertTrue(cap.isFreeSearchSupported()); |
| 99 | | |
| 100 | | assertTrue(cap.isMappingSupported(BioDataSource.UNIPROT, BioDataSource.ENTREZ_GENE)); |
| 101 | | |
| 102 | | assertFalse(cap.isMappingSupported( |
| 103 | | DataSource.getBySystemCode("??"), DataSource.getBySystemCode("!!"))); |
| | 108 | if (configExists) |
| | 109 | { |
| | 110 | IDMapper mapper = getLocalService(); |
| | 111 | |
| | 112 | IDMapperCapabilities cap = mapper.getCapabilities(); |
| | 113 | |
| | 114 | Set<DataSource> supported = cap.getSupportedSrcDataSources(); |
| | 115 | assertTrue (supported.contains(DataSource.getBySystemCode("L"))); |
| | 116 | |
| | 117 | String val = cap.getProperty("SCHEMAVERSION"); |
| | 118 | assertNotNull(val); |
| | 119 | |
| | 120 | Set<DataSource> srcDs = cap.getSupportedSrcDataSources(); |
| | 121 | assertTrue(srcDs.size() > 0); |
| | 122 | |
| | 123 | assertTrue(cap.isFreeSearchSupported()); |
| | 124 | |
| | 125 | assertTrue(cap.isMappingSupported(BioDataSource.UNIPROT, BioDataSource.ENTREZ_GENE)); |
| | 126 | |
| | 127 | assertFalse(cap.isMappingSupported( |
| | 128 | DataSource.getBySystemCode("??"), DataSource.getBySystemCode("!!"))); |
| | 129 | } |
| 117 | | Xref insr = new Xref("3643", BioDataSource.ENTREZ_GENE); |
| 118 | | Map<String, Set<String>> attrMap = mapper.getAttributes(insr); |
| 119 | | assertNotNull(attrMap.get("Symbol")); |
| 120 | | assertTrue(attrMap.get("Symbol").size() == 2); |
| 121 | | |
| 122 | | Set<String> attrValues = mapper.getAttributes(insr, "Symbol"); |
| 123 | | assertTrue(attrValues.size() == 2); |
| 124 | | |
| 125 | | Map<Xref, String> xrefMap = mapper.freeAttributeSearch("INSR", "Symbol", 1); |
| 126 | | assertTrue(xrefMap.size() == 1); |
| | 146 | if (configExists) |
| | 147 | { |
| | 148 | AttributeMapper mapper = (AttributeMapper)getLocalService(); |
| | 149 | |
| | 150 | Xref insr = new Xref("3643", BioDataSource.ENTREZ_GENE); |
| | 151 | Map<String, Set<String>> attrMap = mapper.getAttributes(insr); |
| | 152 | assertNotNull(attrMap.get("Symbol")); |
| | 153 | assertTrue(attrMap.get("Symbol").size() == 2); |
| | 154 | |
| | 155 | Set<String> attrValues = mapper.getAttributes(insr, "Symbol"); |
| | 156 | assertTrue(attrValues.size() == 2); |
| | 157 | |
| | 158 | Map<Xref, String> xrefMap = mapper.freeAttributeSearch("INSR", "Symbol", 1); |
| | 159 | assertTrue(xrefMap.size() == 1); |
| | 160 | |
| | 161 | xrefMap = mapper.freeAttributeSearch("INSR", "Symbol", 100); |
| | 162 | assertTrue(xrefMap.containsKey(insr)); |
| | 163 | assertTrue(xrefMap.size() > 1); |
| | 164 | |
| | 165 | Set<String> attrs = mapper.getAttributeSet(); |
| | 166 | assertTrue(attrs.size() > 0); |
| | 167 | } |
| | 168 | } |