mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-03 17:59:33 +02:00
formatting
Conflicts: src/org/geometerplus/fbreader/network/opds/OPDSFeedHandler.java
This commit is contained in:
parent
cf76b17a70
commit
30f1d65b89
7 changed files with 24 additions and 24 deletions
|
@ -135,7 +135,7 @@ public class OPDSCustomNetworkLink extends OPDSNetworkLink implements ICustomNet
|
||||||
|
|
||||||
if (!opensearchDescriptionURLs.isEmpty()) {
|
if (!opensearchDescriptionURLs.isEmpty()) {
|
||||||
LinkedList<ZLNetworkRequest> requests = new LinkedList<ZLNetworkRequest>();
|
LinkedList<ZLNetworkRequest> requests = new LinkedList<ZLNetworkRequest>();
|
||||||
for (String url: opensearchDescriptionURLs) {
|
for (String url : opensearchDescriptionURLs) {
|
||||||
requests.add(new ZLNetworkRequest(url, quietly) {
|
requests.add(new ZLNetworkRequest(url, quietly) {
|
||||||
@Override
|
@Override
|
||||||
public void handleStream(InputStream inputStream, int length) throws IOException, ZLNetworkException {
|
public void handleStream(InputStream inputStream, int length) throws IOException, ZLNetworkException {
|
||||||
|
|
|
@ -167,7 +167,7 @@ class OPDSFeedHandler extends AbstractOPDSFeedHandler implements OPDSConstants {
|
||||||
|
|
||||||
final OPDSNetworkLink opdsLink = (OPDSNetworkLink)myData.Link;
|
final OPDSNetworkLink opdsLink = (OPDSNetworkLink)myData.Link;
|
||||||
boolean hasBookLink = false;
|
boolean hasBookLink = false;
|
||||||
for (ATOMLink link: entry.Links) {
|
for (ATOMLink link : entry.Links) {
|
||||||
final MimeType mime = MimeType.get(link.getType());
|
final MimeType mime = MimeType.get(link.getType());
|
||||||
final String rel = opdsLink.relation(link.getRel(), mime);
|
final String rel = opdsLink.relation(link.getRel(), mime);
|
||||||
if (rel == null
|
if (rel == null
|
||||||
|
|
|
@ -160,7 +160,7 @@ public abstract class OPDSNetworkLink extends AbstractNetworkLink {
|
||||||
public String rewriteUrl(String url, boolean isUrlExternal) {
|
public String rewriteUrl(String url, boolean isUrlExternal) {
|
||||||
final int apply = isUrlExternal
|
final int apply = isUrlExternal
|
||||||
? URLRewritingRule.APPLY_EXTERNAL : URLRewritingRule.APPLY_INTERNAL;
|
? URLRewritingRule.APPLY_EXTERNAL : URLRewritingRule.APPLY_INTERNAL;
|
||||||
for (URLRewritingRule rule: myUrlRewritingRules) {
|
for (URLRewritingRule rule : myUrlRewritingRules) {
|
||||||
if ((rule.whereToApply() & apply) != 0) {
|
if ((rule.whereToApply() & apply) != 0) {
|
||||||
url = rule.apply(url);
|
url = rule.apply(url);
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,7 +90,7 @@ public class OPDSXMLReader extends ATOMXMLReader<OPDSFeedMetadata,OPDSEntry> {
|
||||||
myState = OPENSEARCH_STARTINDEX;
|
myState = OPENSEARCH_STARTINDEX;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
} else if (ns == XMLNamespaces.FBReaderCatalogMetadata){
|
} else if (ns == XMLNamespaces.FBReaderCatalogMetadata) {
|
||||||
if (tag == FBREADER_TAG_VIEW) {
|
if (tag == FBREADER_TAG_VIEW) {
|
||||||
myState = FBREADER_VIEW;
|
myState = FBREADER_VIEW;
|
||||||
}
|
}
|
||||||
|
@ -123,7 +123,7 @@ public class OPDSXMLReader extends ATOMXMLReader<OPDSFeedMetadata,OPDSEntry> {
|
||||||
myPriceCurrency = attributes.getValue("currencycode");
|
myPriceCurrency = attributes.getValue("currencycode");
|
||||||
myState = FEL_PRICE;
|
myState = FEL_PRICE;
|
||||||
return false;
|
return false;
|
||||||
} if (ns == XMLNamespaces.DublinCoreTerms && tag == DC_TAG_FORMAT) {
|
} else if (ns == XMLNamespaces.DublinCoreTerms && tag == DC_TAG_FORMAT) {
|
||||||
myState = FEL_FORMAT;
|
myState = FEL_FORMAT;
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -410,7 +410,7 @@ public class ZLNetworkManager {
|
||||||
}
|
}
|
||||||
HashSet<String> errors = new HashSet<String>();
|
HashSet<String> errors = new HashSet<String>();
|
||||||
// TODO: implement concurrent execution !!!
|
// TODO: implement concurrent execution !!!
|
||||||
for (ZLNetworkRequest r: requests) {
|
for (ZLNetworkRequest r : requests) {
|
||||||
try {
|
try {
|
||||||
perform(r);
|
perform(r);
|
||||||
} catch (ZLNetworkException e) {
|
} catch (ZLNetworkException e) {
|
||||||
|
|
|
@ -52,7 +52,7 @@ public abstract class MiscUtil {
|
||||||
|| !map1.keySet().containsAll(map2.keySet())) {
|
|| !map1.keySet().containsAll(map2.keySet())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
for (KeyT key: map1.keySet()) {
|
for (KeyT key : map1.keySet()) {
|
||||||
final ValueT value1 = map1.get(key);
|
final ValueT value1 = map1.get(key);
|
||||||
final ValueT value2 = map2.get(key);
|
final ValueT value2 = map2.get(key);
|
||||||
if (!equals(value1, value2)) {
|
if (!equals(value1, value2)) {
|
||||||
|
|
|
@ -453,10 +453,10 @@ mainSwitchLabel:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
currentNamespaceMap = null;
|
currentNamespaceMap = null;
|
||||||
}
|
|
||||||
state = TEXT;
|
state = TEXT;
|
||||||
startPosition = i + 1;
|
startPosition = i + 1;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case '/':
|
case '/':
|
||||||
state = SLASH;
|
state = SLASH;
|
||||||
if (processFullTag(xmlReader, convertToString(strings, tagName), attributes)) {
|
if (processFullTag(xmlReader, convertToString(strings, tagName), attributes)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue