if (enumeration == null) {
return null;
}
switch (enumeration) {
case BLOCK_PROGRESSION_DIMENSION: {
final Property property = getProperty(fobj,
FoProperty.BLOCK_PROGRESSION_DIMENSION);
if (property == null) {
return null;
}
((PdBlockProgressionDimension) property).addComponent(fobj,
propertyFullName, attributeValue);
return property;
}
case INLINE_PROGRESSION_DIMENSION: {
final Property property = getProperty(fobj,
FoProperty.INLINE_PROGRESSION_DIMENSION);
if (property == null) {
return null;
}
((PdInlineProgressionDimension) property).addComponent(fobj,
propertyFullName, attributeValue);
return property;
}
case SPACE_AFTER: {
final Property property = getProperty(fobj,
FoProperty.SPACE_AFTER);
if (property == null) {
return null;
}
if (property instanceof PdSpaceAfter) {
final PdSpaceAfter spaceAfter = (PdSpaceAfter) property;
spaceAfter.addComponent(fobj, propertyFullName,
attributeValue);
return property;
} else {
throw new IllegalStateException("space-after instance "
+ "is of an unexpected type.");
}
}
case SPACE_BEFORE: {
final Property property = getProperty(fobj,
FoProperty.SPACE_BEFORE);
if (property == null) {
return null;
}
if (property instanceof PdSpaceBefore) {
final PdSpaceBefore spaceBefore = (PdSpaceBefore) property;
spaceBefore.addComponent(fobj, propertyFullName,
attributeValue);
return property;
} else {
throw new IllegalStateException("space-before instance "
+ "is of an unexpected type.");
}
}
case SPACE_END: {
final Property property = getProperty(fobj,
FoProperty.SPACE_END);
if (property == null) {
return null;
}
if (property instanceof PdSpaceEnd) {
final PdSpaceEnd spaceEnd = (PdSpaceEnd) property;
spaceEnd.addComponent(fobj, propertyFullName,
attributeValue);
return property;
} else {
throw new IllegalStateException("space-end instance "
+ "is of an unexpected type.");
}
}
case SPACE_START: {
final Property property = getProperty(fobj,
FoProperty.SPACE_START);
if (property == null) {
return null;
}
if (property instanceof PdSpaceStart) {
final PdSpaceStart spaceStart = (PdSpaceStart) property;
spaceStart.addComponent(fobj, propertyFullName,
attributeValue);
return property;
} else {
throw new IllegalStateException("space-start instance "
+ "is of an unexpected type.");
}
}
case BORDER_SEPARATION: {
final Property property = getProperty(fobj,
FoProperty.BORDER_SEPARATION);
if (property == null) {
return null;
}
assert property instanceof PdBorderSeparation : "border-separation "
+ "must be a BorderSeparation";
((PdBorderSeparation) property).addComponent(fobj,
propertyFullName, attributeValue);
return property;
}
case LETTER_SPACING: {
final Property property = getProperty(fobj,
FoProperty.LETTER_SPACING);
if (property == null) {
return null;
}
assert property instanceof PdLetterSpacing : "letter-spacing "
+ "must be a LetterSpacing";
((PdLetterSpacing) property).addComponent(fobj,
propertyFullName, attributeValue);
return property;
}
case WORD_SPACING: {
final Property property = getProperty(fobj,
FoProperty.WORD_SPACING);
if (property == null) {
return null;
}
assert property instanceof PdWordSpacing : "word-spacing "
+ "must be a WordSpacing";
((PdWordSpacing) property).addComponent(fobj,
propertyFullName, attributeValue);
return property;
}
case KEEP_TOGETHER: {
final Property property = getProperty(fobj,
FoProperty.KEEP_TOGETHER);
if (property == null) {
return null;
}
assert property instanceof AbstractKeep : "keep-together "
+ "must be a Keep";
((AbstractKeep) property).addComponent(fobj,
propertyFullName, attributeValue);
return property;
}
case KEEP_WITH_NEXT: {
final Property property = getProperty(fobj,
FoProperty.KEEP_WITH_NEXT);
if (property == null) {
return null;
}
assert property instanceof AbstractKeep : "keep-with-next "
+ "must be a Keep";
((AbstractKeep) property).addComponent(fobj,
propertyFullName, attributeValue);
return property;
}
case KEEP_WITH_PREVIOUS: {
final Property property = getProperty(fobj,
FoProperty.KEEP_WITH_PREVIOUS);
if (property == null) {
return null;
}
assert property instanceof AbstractKeep : "keep-with-previous "
+ "must be a Keep";
((AbstractKeep) property).addComponent(fobj,
propertyFullName, attributeValue);
return property;
}
case LINE_HEIGHT: {
final Property property = getProperty(fobj,
FoProperty.LINE_HEIGHT);
if (property == null) {
return null;
}
assert property instanceof PdLineHeight : "line-height "
+ "must be a LineHeight";
((PdLineHeight) property).addComponent(fobj,
propertyFullName, attributeValue);
return property;
}
case LEADER_LENGTH: {
final Property property = getProperty(fobj,
FoProperty.LEADER_LENGTH);
if (property == null) {
return null;
}
assert property instanceof PdLeaderLength : "leader-length "