Removed unuseful polymorphic methods.

This commit is contained in:
Christian P. MOMON 2020-01-18 12:04:08 +01:00
parent 3ab9909181
commit 66b394cb32

View file

@ -171,59 +171,6 @@ public class DomPresenterCore
return result; return result;
} }
/**
* Merge attributes.
*
* @param target
* the target
* @param source
* the source
* @return the tag attributes
*/
private static TagAttributes mergeAttributes(final TagAttributes target, final TagAttributes source)
{
TagAttributes result;
//
if (target == null)
{
result = source;
}
else if (source == null)
{
result = target;
}
else
{
result = new TagAttributes(target);
Iterator<Map.Entry<String, String>> iterator = source.entrySet().iterator();
while (iterator.hasNext())
{
Map.Entry<String, String> attribute = iterator.next();
String currentValue = target.get(attribute.getKey());
if (currentValue == null)
{
result.put(attribute.getKey(), attribute.getValue());
}
else if (attribute.getKey().equals("style"))
{
result.put(attribute.getKey(), currentValue + attribute.getValue());
}
else
{
result.put(attribute.getKey(), attribute.getValue());
}
}
}
//
return result;
}
/** /**
* Process. * Process.
* *
@ -373,42 +320,6 @@ public class DomPresenterCore
logger.debug("process - ended"); logger.debug("process - ended");
} }
/**
* Process attributes.
*
* @param attrs
* the attrs
* @return the string buffer
*/
private static StringBuffer processAttributes(final NamedNodeMap attrs)
{
StringBuffer result;
result = processAttributes(attrs, null, null, "");
//
return result;
}
/**
* Process attributes.
*
* @param attrs
* the attrs
* @param dataAttributes
* the data attributes
* @return the string buffer
*/
private static StringBuffer processAttributes(final NamedNodeMap attrs, final TagAttributes dataAttributes)
{
StringBuffer result;
result = processAttributes(attrs, dataAttributes, "");
//
return result;
}
/** /**
* Process attributes. * Process attributes.
* *
@ -482,46 +393,6 @@ public class DomPresenterCore
return result; return result;
} }
/**
* Process attributes.
*
* @param attrs
* the attrs
* @param dataAttributes
* the data attributes
* @param namedDataAttributes
* the named data attributes
* @param suffix
* the suffix
* @return the string buffer
*/
private static StringBuffer processAttributes(final NamedNodeMap attrs, final TagAttributes dataAttributes, final TagAttributes namedDataAttributes, final String suffix)
{
StringBuffer result;
result = processAttributes(attrs, mergeAttributes(dataAttributes, namedDataAttributes), suffix);
//
return result;
}
/**
* Process children.
*
* @param result
* the result
* @param node
* the node
* @param datas
* the datas
* @throws IOException
* the exception
*/
private static void processChildren(final Appendable result, final Node node, final TagDataListById datas) throws IOException
{
processChildren(result, node, datas, "");
}
/** /**
* Process children. * Process children.
* *
@ -664,23 +535,6 @@ public class DomPresenterCore
} }
} }
/**
* TODO remove?.
*
* @param result
* the result
* @param node
* the node
* @param datas
* the datas
* @throws IOException
* the exception
*/
private static void processElementBasically(final Appendable result, final Node node, final TagDataListById datas) throws IOException
{
processElementBasically(result, node, datas, "");
}
/** /**
* Process element basically. * Process element basically.
* *
@ -727,28 +581,6 @@ public class DomPresenterCore
logger.debug("processElementBasically - ended"); logger.debug("processElementBasically - ended");
} }
/**
* Processes a node that has dynamic content. Calls the appropriate code
* generator method, depending on the tag.
*
* @param result
* the result
* @param node
* Current node.
* @param attrs
* The tag attributes.
* @param idAttr
* The ID.
* @param datas
* the datas
* @throws IOException
* the exception
*/
private static void processElementWithId(final Appendable result, final Node node, final NamedNodeMap attrs, final Node idAttr, final TagDataListById datas) throws IOException
{
processElementWithId(result, node, attrs, idAttr, datas, "");
}
/** /**
* Processes a node that has dynamic content. Calls the appropriate code * Processes a node that has dynamic content. Calls the appropriate code
* generator method, depending on the tag. * generator method, depending on the tag.