public Object parseXMLObject(XMLObject xo) throws XMLParseException {
  SiteList patterns=(SiteList)xo.getChild(SiteList.class);
  int subSet=0;
  int subSetCount=0;
  if (xo.hasAttribute(SUB_SET)) {
    subSet=xo.getIntegerAttribute(SUB_SET) - 1;
    if (subSet < 0)     throw new XMLParseException("illegal 'subSet' attribute in patterns element");
  }
  if (xo.hasAttribute(SUB_SET_COUNT)) {
    subSetCount=xo.getIntegerAttribute(SUB_SET_COUNT);
    if (subSetCount < 0)     throw new XMLParseException("illegal 'subSetCount' attribute in patterns element");
  }
  Patterns subPatterns=new Patterns(patterns,0,0,1,subSet,subSetCount);
  if (xo.hasAttribute(XMLParser.ID)) {
    final Logger logger=Logger.getLogger("dr.evoxml");
    logger.info("Pattern subset '" + xo.getId() + "' created from '"+ patterns.getId()+ "' ("+ (subSet + 1)+ "/"+ subSetCount+ ")");
    logger.info("  pattern count = " + subPatterns.getPatternCount());
  }
  return subPatterns;
}

public Object parseXMLObject ( XMLObject xo ) throws XMLParseException { SiteList patterns = ( SiteList ) xo . getChild ( SiteList . class ) ; int subSet = 0 ; int subSetCount = 0 ; if ( xo . hasAttribute ( SUB_SET ) ) { subSet = xo . getIntegerAttribute ( SUB_SET ) - 1 ; if ( subSet < 0 ) throw new XMLParseException ( "illegal 'subSet' attribute in patterns element" ) ; } if ( xo . hasAttribute ( SUB_SET_COUNT ) ) { subSetCount = xo . getIntegerAttribute ( SUB_SET_COUNT ) ; if ( subSetCount < 0 ) throw new XMLParseException ( "illegal 'subSetCount' attribute in patterns element" ) ; } Patterns subPatterns = new Patterns ( patterns , 0 , 0 , 1 , subSet , subSetCount ) ; if ( xo . hasAttribute ( XMLParser . ID ) ) { final Logger logger = Logger . getLogger ( "dr.evoxml" ) ; logger . info ( "Pattern subset '" + xo . getId ( ) + "' created from '" + patterns . getId ( ) + "' (" + ( subSet + 1 ) + "/" + subSetCount + ")" ) ; logger . info ( "  pattern count = " + subPatterns . getPatternCount ( ) ) ; } return subPatterns ; }
parses a patterns element and returns a patterns object .
