Clean code.
This commit is contained in:
parent
71bbe4cd21
commit
6f764e7a29
2 changed files with 12 additions and 12 deletions
|
@ -39,7 +39,7 @@ public class DomPresenterCore
|
||||||
StringBuffer result;
|
StringBuffer result;
|
||||||
|
|
||||||
StringWriter htmlCode = new StringWriter();
|
StringWriter htmlCode = new StringWriter();
|
||||||
DomPresenterCore.dynamize(htmlCode, doc, data);
|
dynamize(htmlCode, doc, data);
|
||||||
result = htmlCode.getBuffer();
|
result = htmlCode.getBuffer();
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -274,7 +274,7 @@ public class DomPresenterCore
|
||||||
// Log.write(Log.TRACE,"systemId = " + systemId);
|
// Log.write(Log.TRACE,"systemId = " + systemId);
|
||||||
}
|
}
|
||||||
|
|
||||||
DomPresenterCore.process(result, ((Document) node).getDocumentElement(), datas, suffix);
|
process(result, ((Document) node).getDocumentElement(), datas, suffix);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -288,11 +288,11 @@ public class DomPresenterCore
|
||||||
|
|
||||||
if (idAttr != null)
|
if (idAttr != null)
|
||||||
{
|
{
|
||||||
DomPresenterCore.processElementWithId(result, node, attrs, idAttr, datas, suffix);
|
processElementWithId(result, node, attrs, idAttr, datas, suffix);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DomPresenterCore.processElementBasically(result, node, datas, suffix);
|
processElementBasically(result, node, datas, suffix);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -529,7 +529,7 @@ public class DomPresenterCore
|
||||||
process(result, children.item(childIndex), datas, suffix);
|
process(result, children.item(childIndex), datas, suffix);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ONLY_FIRST_TWO_ROWS:
|
case ONLY_FIRST_TWO_ROWS:
|
||||||
lineCounter = 0;
|
lineCounter = 0;
|
||||||
|
@ -549,7 +549,7 @@ public class DomPresenterCore
|
||||||
process(result, children.item(childIndex), datas, suffix);
|
process(result, children.item(childIndex), datas, suffix);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ONLY_ROWS_WITH_ID:
|
case ONLY_ROWS_WITH_ID:
|
||||||
for (int childIndex = 0; childIndex < childrenCount; childIndex++)
|
for (int childIndex = 0; childIndex < childrenCount; childIndex++)
|
||||||
|
@ -568,7 +568,7 @@ public class DomPresenterCore
|
||||||
process(result, children.item(childIndex), datas, suffix);
|
process(result, children.item(childIndex), datas, suffix);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ONLY_ROWS_WITHOUT_ID:
|
case ONLY_ROWS_WITHOUT_ID:
|
||||||
for (int childIndex = 0; childIndex < childrenCount; childIndex++)
|
for (int childIndex = 0; childIndex < childrenCount; childIndex++)
|
||||||
|
@ -586,14 +586,14 @@ public class DomPresenterCore
|
||||||
process(result, children.item(childIndex), datas, suffix);
|
process(result, children.item(childIndex), datas, suffix);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ALL_ROWS:
|
case ALL_ROWS:
|
||||||
for (int childIndex = 0; childIndex < childrenCount; childIndex++)
|
for (int childIndex = 0; childIndex < childrenCount; childIndex++)
|
||||||
{
|
{
|
||||||
process(result, children.item(childIndex), datas, suffix);
|
process(result, children.item(childIndex), datas, suffix);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -681,7 +681,7 @@ public class DomPresenterCore
|
||||||
|
|
||||||
if (dataCore == null)
|
if (dataCore == null)
|
||||||
{
|
{
|
||||||
DomPresenterCore.processElementBasically(result, node, datas, suffix);
|
processElementBasically(result, node, datas, suffix);
|
||||||
}
|
}
|
||||||
else if (dataCore instanceof SimpleTagData)
|
else if (dataCore instanceof SimpleTagData)
|
||||||
{
|
{
|
||||||
|
@ -775,7 +775,7 @@ public class DomPresenterCore
|
||||||
// Manage a Hashmap.
|
// Manage a Hashmap.
|
||||||
TagDataListById data = (TagDataListById) tags.elementAt(nLine);
|
TagDataListById data = (TagDataListById) tags.elementAt(nLine);
|
||||||
|
|
||||||
DomPresenterCore.processElementWithId(result, node, attrs, idAttr, data, Integer.toString(nLine));
|
processElementWithId(result, node, attrs, idAttr, data, Integer.toString(nLine));
|
||||||
result.append('\n');
|
result.append('\n');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,7 +88,7 @@ public class URLPresenter implements Presenter
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
long lastModified = sourceURL.openConnection().getLastModified();
|
long lastModified = this.sourceURL.openConnection().getLastModified();
|
||||||
if ((this.doc == null) || (this.sourceFileTime != lastModified))
|
if ((this.doc == null) || (this.sourceFileTime != lastModified))
|
||||||
{
|
{
|
||||||
this.sourceFileTime = lastModified;
|
this.sourceFileTime = lastModified;
|
||||||
|
|
Loading…
Reference in a new issue