DimensionalObjectUtils { public static String getFirstIdentifer( String compositeItem ) { Matcher matcher = COMPOSITE_DIM_OBJECT_PATTERN.matcher( compositeItem ); return matcher.matches() ? matcher.group( 1 ) : null; }  static List<DimensionalObject> getCopies( List<DimensionalObject> dimensions ); static List<String> getDimensions( Collection<DimensionalObject> dimensions ); static NameableObject[][] getItemArray( List<DimensionalObject> dimensions ); @SafeVarargs static Map<T, T> asMap( final T... elements ); static String getDimensionFromParam( String param ); static List<String> getDimensionItemsFromParam( String param ); static List<String> getItemsFromParam( String param ); static boolean anyDimensionHasItems( Collection<DimensionalObject> dimensions ); static String getValueFromKeywordParam( String param ); static String getUidFromGroupParam( String param ); static void setDimensionItemsForFilters( DimensionalObject dimension, Grid grid, boolean naForNull ); static String getPrettyFilter( String filter ); static boolean isCompositeDimensionalObject( String expression ); static String getFirstIdentifer( String compositeItem ); static String getSecondIdentifer( String compositeItem ); static boolean isWildCard( String identifier ); static List<DimensionalItemObject> getList( DimensionalItemObject... objects ); static List<DimensionalItemObject> asList( Collection<? extends DimensionalItemObject> collection ); static List<DimensionalObject> asDimensionalObjectList( Collection<? extends DimensionalObject> collection ); @SuppressWarnings("unchecked") static List<T> asTypedList( Collection<DimensionalItemObject> collection ); static List<DimensionalItemObject> getDimensionalItemObjects( Collection<?> values, boolean naForNull ); static List<String> getDimensionalItemIds( Collection<DimensionalItemObject> objects ); static Set<DimensionalItemObject> getDataElements( Collection<DataElementOperand> operands ); static Set<DimensionalItemObject> getCategoryOptionCombos( Collection<DataElementOperand> operands ); static Set<DimensionalItemObject> getAttributeOptionCombos( Collection<DataElementOperand> operands ); static Map<String, String> getDimensionItemIdSchemeMap( Collection<? extends DimensionalItemObject> objects, IdScheme idScheme ); static Map<String, String> getDataElementOperandIdSchemeMap( Collection<DataElementOperand> dataElementOperands, IdScheme idScheme ); static String getDimensionItem( String uid, ReportingRateMetric metric ); static List<DimensionalItemObject> replaceOperandTotalsWithDataElements( List<DimensionalItemObject> items ); static String getKey( List<DimensionalItemObject> column, List<DimensionalItemObject> row ); static Map<String, Object> getSortedKeysMap( Map<String, Object> valueMap ); static String sortKey( String key ); static String getKey( List<DimensionalItemObject> objects ); static String getName( List<DimensionalItemObject> objects ); static Map<DimensionalItemObject, Double> convertToDimItemValueMap(
        List<DimensionItemObjectValue> dimensionItemObjectValues ); static final String COMPOSITE_DIM_OBJECT_ESCAPED_SEP; static final String COMPOSITE_DIM_OBJECT_PLAIN_SEP; static final String TITLE_ITEM_SEP; static final String NULL_REPLACEMENT; static final String NAME_SEP; static final String COL_SEP; }
@Test public void testGetFirstSecondIdentifier() { assertEquals( "A123456789A", DimensionalObjectUtils.getFirstIdentifer( "A123456789A.P123456789A" ) ); assertNull( DimensionalObjectUtils.getFirstIdentifer( "A123456789A" ) ); }