Code example for ParseException

0
	private LogicalPartitionRepresentation _logicalPartitionRepresentation;
	private Role _role;
	 
	public ResourceKey(String resourceKey)
	throws ParseException 
	{ 
		/** 
		 * For example: Resource "ela4-db1-espresso.prod.linkedin.com_1521,bizProfile,p1_1,MASTER"  
		 * PS : "ela4-db1-espresso.prod.linkedin.com_1521" 
         * PP : "bizProfile" 
		 * LP :  "p1_1" 
		 * state: "MASTER" 
		 */ 
		String[] parts = resourceKey.split(",");
		if (parts.length != NUM_SUBKEYS)
			throw new ParseException("Resource key " + resourceKey + " has " + parts.length + " parts instead of " + NUM_SUBKEYS, 0);
		_physicalSource = parts[0];
		_physicalPartition = parts[1];
		_logicalPartitionRepresentation = new LogicalPartitionRepresentation(parts[2]);		
		_role = new Role(parts[3]);		
	}