@Override
    protected void readAttributes(XMLStreamReader in)
        throws XMLStreamException {
        // @compat 0.9.x
        if (in.getAttributeValue(null, ID_ATTRIBUTE_TAG) == null
            && "model.colony.colonyGoodsParty".equals(in.getAttributeValue(null, "source"))) {
            setId("model.modifier.colonyGoodsParty");
            setSource(getSpecification().getType("model.source.colonyGoodsParty"));
        // end compatibility code
        } else {
            super.readAttributes(in);
            String sourceId = in.getAttributeValue(null, "source");
            if (sourceId == null) {
                setSource(null);
            } else if (sourceId.equals("model.monarch.colonyGoodsParty")) { // @compat 0.9.x
                setSource(getSpecification().getType("model.source.colonyGoodsParty"));
            // end compatibility code
            } else if (getSpecification() != null) {
                setSource(getSpecification().getType(sourceId));
            }
        }

        String firstTurn = in.getAttributeValue(null, "firstTurn");
        if (firstTurn != null) {
            setFirstTurn(new Turn(Integer.parseInt(firstTurn)));
        }

        String lastTurn = in.getAttributeValue(null, "lastTurn");
        if (lastTurn != null) {
            setLastTurn(new Turn(Integer.parseInt(lastTurn)));
        }

        duration = getAttribute(in, "duration", 0);
        temporary = getAttribute(in, "temporary", false);
    }