Revision: 12934
http://sourceforge.net/p/foray/code/12934
Author: victormote
Date: 2022-12-24 01:10:27 +0000 (Sat, 24 Dec 2022)
Log Message:
-----------
Remove no-longer-needed FoObj method parameters.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTreeParser4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/NamespaceNative.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/AbstractAxslProperty.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/NamespaceAxsl.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/prop/AxslEnumerated.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/prop/MetadataKey.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/NamespaceFo.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/foray/NamespaceForay.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/xml/NamespaceXml.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/xml/prop/Lang.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTreeParser4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTreeParser4a.java 2022-12-24 00:48:06 UTC (rev 12933)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoTreeParser4a.java 2022-12-24 01:10:27 UTC (rev 12934)
@@ -337,7 +337,7 @@
}
fobj.validateAncestry();
if (nativeNamespace != null) {
- nativeNamespace.parseAttributes(list, attlist, fobj, getLocator(), this, this);
+ nativeNamespace.parseAttributes(list, attlist, getLocator(), this, this);
}
fobj.validatePropertyTypes();
fobj.validatePropertyValues();
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/NamespaceNative.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/NamespaceNative.java 2022-12-24 00:48:06 UTC (rev 12933)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/NamespaceNative.java 2022-12-24 01:10:27 UTC (rev 12934)
@@ -129,14 +129,13 @@
* Parse the attributes for an element in this namespace.
* @param list The property list into which the parsed values should be placed.
* @param attlist The unparsed SAX attributes.
- * @param currentFObj The FoObj instance to whom the attributes belong.
* @param locator The SAX locator.
* @param builder The FOTree builder.
* @param creator The FO Tree creation context.
* @throws FoTreeException For errors during attribute/property parsing.
*/
- public abstract void parseAttributes(PropertyList list, Attributes attlist, FoObj currentFObj, Locator locator,
- FoTreeParser4a builder, FoTreeCreator creator) throws FoTreeException;
+ public abstract void parseAttributes(PropertyList list, Attributes attlist, Locator locator, FoTreeParser4a builder,
+ FoTreeCreator creator) throws FoTreeException;
/**
* Parses one attribute.
@@ -143,7 +142,6 @@
* @param attributes The unparsed SAX attributes.
* @param attributeName The name of the attribute to be parsed.
* @param attributeValue The value of the attribute to be parsed.
- * @param fobj The FoObj to which the properties belong.
* @param locator The SAX locator.
* @param builder The FOTree builder.
* @param creator The FO Tree creation context.
@@ -151,10 +149,9 @@
* @throws PropertyException For errors during parsing.
*/
public Property parseAttribute(final Attributes attributes, final String attributeName, final String attributeValue,
- final FoObj fobj, final Locator locator, final FoTreeParser4a builder, final FoTreeCreator creator)
+ final Locator locator, final FoTreeParser4a builder, final FoTreeCreator creator)
throws PropertyException {
- final Property property = parseAttributeForNS(attributes, attributeName, attributeValue, fobj, locator,
- creator);
+ final Property property = parseAttributeForNS(attributes, attributeName, attributeValue, locator, creator);
return property;
}
@@ -163,7 +160,6 @@
* @param attributes The unparsed SAX attributes.
* @param attributeName The name of the attribute to be parsed.
* @param attributeValue The value of the attribute to be parsed.
- * @param fobj The FoObj to which the properties belongs.
* @param locator The SAX locator.
* @param creator The FO Tree creation context.
* @return The parsed property.
@@ -170,13 +166,12 @@
* @throws PropertyException For errors during parsing.
*/
public abstract Property parseAttributeForNS(Attributes attributes, String attributeName, String attributeValue,
- FoObj fobj, Locator locator, FoTreeCreator creator) throws PropertyException;
+ Locator locator, FoTreeCreator creator) throws PropertyException;
/**
* Parses the attributes for an object in a pre-specified order, building the PropertyList from them.
* @param propertyList The property list into which the parsed values should be placed.
* @param attributes The unparsed SAX attributes.
- * @param parentFO The parent FO.
* @param attributeSort The order in which the various attributes should be parsed, so that compound values are
* handled properly.
* @param locator The SAX locator.
@@ -184,8 +179,8 @@
* @param creator The FO Tree creation context.
* @throws PropertyException For errors during parsing.
*/
- protected void makeList(final PropertyList propertyList, final Attributes attributes, final FoObj parentFO,
- final int[] attributeSort, final Locator locator, final FoTreeParser4a builder, final FoTreeCreator creator)
+ protected void makeList(final PropertyList propertyList, final Attributes attributes, final int[] attributeSort,
+ final Locator locator, final FoTreeParser4a builder, final FoTreeCreator creator)
throws PropertyException {
for (int j = 0; j < attributeSort.length; j++) {
/* We are reading through the attributes elements in attributeSort
@@ -221,7 +216,7 @@
if (namespace instanceof NamespaceNative) {
final NamespaceNative nativeNamespace = (NamespaceNative) namespace;
final Property property = nativeNamespace.parseAttribute(attributes, localName, attributeValue,
- parentFO, locator, builder, creator);
+ locator, builder, creator);
if (property != null) {
propertyList.addProperty(property);
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/AbstractAxslProperty.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/AbstractAxslProperty.java 2022-12-24 00:48:06 UTC (rev 12933)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/AbstractAxslProperty.java 2022-12-24 01:10:27 UTC (rev 12934)
@@ -28,7 +28,6 @@
package org.foray.fotree.axsl;
-import org.foray.fotree.FoObj;
import org.foray.fotree.Property;
import org.foray.fotree.PropertyException;
import org.foray.fotree.parse.PropertyParser;
@@ -47,13 +46,11 @@
/**
* Handles the standard parsing of a property value.
- * @param fobj The FoObj to which this property belongs.
* @param rawPropertyValue String containing the raw property value.l
* @return The PropertyValue instance created by the parser.
* @throws PropertyException If the input is inconsistent.
*/
- protected PropertyValue standardParse(final FoObj fobj,
- final String rawPropertyValue) throws PropertyException {
+ protected PropertyValue standardParse(final String rawPropertyValue) throws PropertyException {
PropertyValue pv = checkKeywords(getValidKeywords(), rawPropertyValue);
if (pv != null) {
return pv;
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/NamespaceAxsl.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/NamespaceAxsl.java 2022-12-24 00:48:06 UTC (rev 12933)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/NamespaceAxsl.java 2022-12-24 01:10:27 UTC (rev 12934)
@@ -71,21 +71,21 @@
}
@Override
- public void parseAttributes(final PropertyList propertyList, final Attributes attlist, final FoObj currentFObj,
- final Locator locator, final FoTreeParser4a builder, final FoTreeCreator creator) throws FoTreeException {
+ public void parseAttributes(final PropertyList propertyList, final Attributes attlist, final Locator locator,
+ final FoTreeParser4a builder, final FoTreeCreator creator) throws FoTreeException {
final int[] attributeSort = sortAttributes(attlist);
try {
- makeList(propertyList, attlist, currentFObj, attributeSort, locator, builder, creator);
+ makeList(propertyList, attlist, attributeSort, locator, builder, creator);
} catch (final PropertyException e) {
- currentFObj.throwException(e.getMessage());
+ throw new FoTreeException(e);
}
}
@Override
public Property parseAttributeForNS(final Attributes attributes, final String attributeName,
- final String attributeValue, final FoObj fobj, final Locator locator, final FoTreeCreator creator)
+ final String attributeValue, final Locator locator, final FoTreeCreator creator)
throws PropertyException {
- return makeProperty(attributeName, attributeValue, fobj);
+ return makeProperty(attributeName, attributeValue);
}
@Override
@@ -144,24 +144,19 @@
* Makes a property in this namespace.
* @param propertyFullName The unparsed property name.
* @param attributeValue The unparsed property value.
- * @param fobj The FoObj to which this property belongs.
* @return The parsed Property instance.
* @throws PropertyException For errors in the property or its value.
*/
- public Property makeProperty(final String propertyFullName, final String attributeValue, final FoObj fobj)
+ public Property makeProperty(final String propertyFullName, final String attributeValue)
throws PropertyException {
final String basePropertyName = Property.getBasePropertyName(propertyFullName);
final AxslPropertyId enumeration = enumeratePropertyName(basePropertyName);
- final Property property = checkCompoundProperty(fobj, enumeration, propertyFullName, attributeValue);
- if (property != null) {
- return property;
- }
if (enumeration == null) {
throw new PropertyException("Invalid property for axsl namespace: " + propertyFullName);
}
switch (enumeration) {
case METADATA_KEY: {
- return new MetadataKey(fobj, propertyFullName, attributeValue);
+ return new MetadataKey(propertyFullName, attributeValue);
}
default: {
return null;
@@ -169,25 +164,4 @@
}
}
- /**
- * Checks to see if the property has already been created.
- * If it has, and if it is a compound property, sets the value for this component.
- * @param fobj The FoObj to which this property belongs.
- * @param enumeration The parsed property type.
- * @param propertyFullName The full unparsed name of the property.
- * @param attributeValue The unparsed property value.
- * @return The parsed property.
- * @throws PropertyException For errors in the property or its value.
- */
- private Property checkCompoundProperty(final FoObj fobj, final AxslPropertyId enumeration,
- final String propertyFullName, final String attributeValue) throws PropertyException {
- if (enumeration == null) {
- return null;
- }
- switch (enumeration) {
- default:
- return null;
- }
- }
-
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/prop/AxslEnumerated.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/prop/AxslEnumerated.java 2022-12-24 00:48:06 UTC (rev 12933)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/prop/AxslEnumerated.java 2022-12-24 01:10:27 UTC (rev 12934)
@@ -48,27 +48,22 @@
/**
* Default Constructor.
- * @param fobj The FoObj to which this property belongs.
* @param propertyFullName The full name of the property.
* @param attributeValue The unparsed property value.
* @throws PropertyException For an invalid property value.
*/
- public AxslEnumerated(final FoObj fobj,
- final String propertyFullName, final String attributeValue)
- throws PropertyException {
- this.value = createPropertyValue(fobj, attributeValue);
+ public AxslEnumerated(final String propertyFullName, final String attributeValue) throws PropertyException {
+ this.value = createPropertyValue(attributeValue);
}
/**
* Converts the unparsed property value into its parsed, storable value.
- * @param fobj The FoObj to which this property belongs.
* @param value The unparsed property value.
* @return The parsed, storable property value.
* @throws PropertyException For an invalid property value.
*/
- private PropertyValue createPropertyValue(final FoObj fobj,
- final String value) throws PropertyException {
- final PropertyValue pv = standardParse(fobj, value);
+ private PropertyValue createPropertyValue(final String value) throws PropertyException {
+ final PropertyValue pv = standardParse(value);
if (pv instanceof AxslPropertyKeyword) {
return pv;
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/prop/MetadataKey.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/prop/MetadataKey.java 2022-12-24 00:48:06 UTC (rev 12933)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/axsl/prop/MetadataKey.java 2022-12-24 01:10:27 UTC (rev 12934)
@@ -28,7 +28,6 @@
package org.foray.fotree.axsl.prop;
-import org.foray.fotree.FoObj;
import org.foray.fotree.PropertyException;
import org.foray.fotree.axsl.AxslPropertyId;
import org.foray.fotree.axsl.AxslValue;
@@ -48,15 +47,12 @@
/**
* Default Constructor.
- * @param fobj The FoObj to which this property belongs.
* @param propertyFullName The full name of the property.
* @param attributeValue The unparsed property value.
* @throws PropertyException For an invalid property value.
*/
- public MetadataKey(final FoObj fobj,
- final String propertyFullName, final String attributeValue)
- throws PropertyException {
- super(fobj, propertyFullName, attributeValue);
+ public MetadataKey(final String propertyFullName, final String attributeValue) throws PropertyException {
+ super(propertyFullName, attributeValue);
}
@Override
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/NamespaceFo.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/NamespaceFo.java 2022-12-24 00:48:06 UTC (rev 12933)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/NamespaceFo.java 2022-12-24 01:10:27 UTC (rev 12934)
@@ -420,21 +420,21 @@
}
@Override
- public void parseAttributes(final PropertyList propertyList, final Attributes attlist, final FoObj currentFObj,
- final Locator locator, final FoTreeParser4a builder, final FoTreeCreator creator) throws FoTreeException {
+ public void parseAttributes(final PropertyList propertyList, final Attributes attlist, final Locator locator,
+ final FoTreeParser4a builder, final FoTreeCreator creator) throws FoTreeException {
final int[] attributeSort = sortAttributes(attlist);
try {
- makeList(propertyList, attlist, currentFObj, attributeSort, locator, builder, creator);
+ makeList(propertyList, attlist, attributeSort, locator, builder, creator);
} catch (final PropertyException e) {
- currentFObj.throwException(e.getMessage());
+ throw new FoTreeException(e);
}
}
@Override
public Property parseAttributeForNS(final Attributes attributes, final String attributeName,
- final String attributeValue, final FoObj fobj, final Locator locator, final FoTreeCreator creator)
+ final String attributeValue, final Locator locator, final FoTreeCreator creator)
throws PropertyException {
- final Property property = makeProperty(attributeName, attributeValue, fobj, creator);
+ final Property property = makeProperty(attributeName, attributeValue, creator);
checkNullProperty(property, attributeName, attributeValue);
return property;
}
@@ -994,12 +994,11 @@
* Makes a property in this namespace.
* @param propertyFullName The unparsed property name.
* @param attributeValue The unparsed property value.
- * @param fobj The FoObj to which this property belongs.
* @param creator The FO Tree creation context.
* @return The parsed Property instance.
* @throws PropertyException For errors in the property or its value.
*/
- public Property makeProperty(final String propertyFullName, final String attributeValue, final FoObj fobj,
+ public Property makeProperty(final String propertyFullName, final String attributeValue,
final FoTreeCreator creator) throws PropertyException {
final String basePropertyName = Property.getBasePropertyName(propertyFullName);
final FoPropertyId enumeration = enumeratePropertyName(basePropertyName);
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/foray/NamespaceForay.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/foray/NamespaceForay.java 2022-12-24 00:48:06 UTC (rev 12933)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/foray/NamespaceForay.java 2022-12-24 01:10:27 UTC (rev 12934)
@@ -68,26 +68,26 @@
}
@Override
- public void parseAttributes(final PropertyList propertyList, final Attributes attlist, final FoObj currentFObj,
- final Locator locator, final FoTreeParser4a builder, final FoTreeCreator creator)
+ public void parseAttributes(final PropertyList propertyList, final Attributes attlist, final Locator locator,
+ final FoTreeParser4a builder, final FoTreeCreator creator)
throws FoTreeException {
final int[] attributeSort = sortAttributes(attlist);
try {
- makeList(propertyList, attlist, currentFObj, attributeSort, locator, builder, creator);
+ makeList(propertyList, attlist, attributeSort, locator, builder, creator);
} catch (final PropertyException e) {
- currentFObj.throwException(e.getMessage());
+ throw new FoTreeException(e);
}
}
@Override
public Property parseAttributeForNS(final Attributes attributes, final String attributeName,
- final String attributeValue, final FoObj fobj, final Locator locator, final FoTreeCreator creator)
+ final String attributeValue, final Locator locator, final FoTreeCreator creator)
throws PropertyException {
/*
* Right now, all extension attributes are also attributes that are
* handled by the FO namespace, so we just use those.
*/
- return NamespaceFo.getInstance().makeProperty(attributeName, attributeValue, fobj, creator);
+ return NamespaceFo.getInstance().makeProperty(attributeName, attributeValue, creator);
}
@Override
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/xml/NamespaceXml.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/xml/NamespaceXml.java 2022-12-24 00:48:06 UTC (rev 12933)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/xml/NamespaceXml.java 2022-12-24 01:10:27 UTC (rev 12934)
@@ -72,8 +72,8 @@
}
@Override
- public void parseAttributes(final PropertyList propertyList, final Attributes attlist, final FoObj currentFObj,
- final Locator locator, final FoTreeParser4a builder, final FoTreeCreator creator) {
+ public void parseAttributes(final PropertyList propertyList, final Attributes attlist, final Locator locator,
+ final FoTreeParser4a builder, final FoTreeCreator creator) {
// This isn't needed for the xml: namespace.
return;
}
@@ -80,9 +80,9 @@
@Override
public Property parseAttributeForNS(final Attributes attributes, final String attributeName,
- final String attributeValue, final FoObj fobj, final Locator locator, final FoTreeCreator creator)
+ final String attributeValue, final Locator locator, final FoTreeCreator creator)
throws PropertyException {
- final Property property = makeProperty(attributeName, attributeValue, fobj);
+ final Property property = makeProperty(attributeName, attributeValue);
return property;
}
@@ -118,29 +118,19 @@
* Makes a property in this namespace.
* @param propertyFullName The unparsed property name.
* @param attributeValue The unparsed property value.
- * @param fobj The FoObj to which this property belongs.
* @return The parsed Property instance.
* @throws PropertyException For errors in the property or its value.
*/
- public Property makeProperty(final String propertyFullName,
- final String attributeValue, final FoObj fobj)
+ public Property makeProperty(final String propertyFullName, final String attributeValue)
throws PropertyException {
- final String basePropertyName = Property.getBasePropertyName(
- propertyFullName);
- final XmlPropertyId enumeration = enumeratePropertyName(
- basePropertyName);
- final Property property = checkCompoundProperty(fobj,
- enumeration, propertyFullName, attributeValue);
- if (property != null) {
- return property;
- }
+ final String basePropertyName = Property.getBasePropertyName(propertyFullName);
+ final XmlPropertyId enumeration = enumeratePropertyName(basePropertyName);
if (enumeration == null) {
- throw new PropertyException("Invalid property for xml namespace: "
- + propertyFullName);
+ throw new PropertyException("Invalid property for xml namespace: " + propertyFullName);
}
switch (enumeration) {
case LANG: {
- return new Lang(fobj, propertyFullName, attributeValue);
+ return new Lang(propertyFullName, attributeValue);
}
default: {
return null;
@@ -148,26 +138,4 @@
}
}
- /**
- * Checks to see if the property has already been created. If it has, and
- * if it is a compound property, sets the value for this component.
- * @param fobj The FoObj to which this property belongs.
- * @param enumeration The parsed property type.
- * @param propertyFullName The full unparsed name of the property.
- * @param attributeValue The unparsed property value.
- * @return The parsed property.
- * @throws PropertyException For errors in the property or its value.
- */
- private Property checkCompoundProperty(final FoObj fobj,
- final XmlPropertyId enumeration, final String propertyFullName,
- final String attributeValue) throws PropertyException {
- if (enumeration == null) {
- return null;
- }
- switch (enumeration) {
- default:
- return null;
- }
- }
-
}
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/xml/prop/Lang.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/xml/prop/Lang.java 2022-12-24 00:48:06 UTC (rev 12933)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/xml/prop/Lang.java 2022-12-24 01:10:27 UTC (rev 12934)
@@ -29,7 +29,6 @@
package org.foray.fotree.xml.prop;
import org.foray.common.i18n.WritingSystem4a;
-import org.foray.fotree.FoObj;
import org.foray.fotree.PropertyException;
import org.foray.fotree.fo.FoPropertyId;
import org.foray.fotree.fo.FoValue;
@@ -56,29 +55,23 @@
/**
* Constructor.
- * @param fobj The FoObj to which this property belongs.
* @param propertyFullName The full name of this property.
* @param attributeValue The parsed property value.
* @throws PropertyException For an invalid property value.
*/
- public Lang(final FoObj fobj,
- final String propertyFullName, final String attributeValue)
- throws PropertyException {
+ public Lang(final String propertyFullName, final String attributeValue) throws PropertyException {
super();
- this.value = createPropertyValue(fobj, propertyFullName,
- attributeValue);
+ this.value = createPropertyValue(propertyFullName, attributeValue);
}
/**
* Converts the string property value into a parsed value.
- * @param fobj The FoObj to which this property belongs.
* @param propertyFullName The full name of this property.
* @param value The parsed property value.
* @return The parsed property value.
* @throws PropertyException For an invalid property value.
*/
- private PropertyValue createPropertyValue(final FoObj fobj,
- final String propertyFullName, final String value)
+ private PropertyValue createPropertyValue(final String propertyFullName, final String value)
throws PropertyException {
final PropertyCollection collection = new PropertyCollection();
final PropertyValue pv = checkKeywords(this.getValidKeywords(), value);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|