SchemaGenerationHandlerImpl.java
1.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* com.adobe.xmp.schema.rng.parser.SchemaGenerationHandler
* com.adobe.xmp.schema.rng.parser.exceptions.RNGParseException
*/
package com.adobe.xmp.schema.service.impl;
import com.adobe.xmp.schema.rng.parser.SchemaGenerationHandler;
import com.adobe.xmp.schema.rng.parser.exceptions.RNGParseException;
import com.adobe.xmp.schema.service.SchemaService;
import java.util.logging.Level;
import java.util.logging.Logger;
public class SchemaGenerationHandlerImpl
implements SchemaGenerationHandler {
private boolean ignoreErrors;
private final Logger LOG = Logger.getLogger("XMPSchemaService");
private SchemaService.INamespaceCallback namespaceCallback = null;
public SchemaGenerationHandlerImpl(boolean ignoreErrors, SchemaService.INamespaceCallback namespaceCallback) {
this.ignoreErrors = ignoreErrors;
this.namespaceCallback = namespaceCallback;
}
public void startRefTraversal(String refName) {
}
public void endRefTraversal(String refName) {
}
public void startSchemaConstruction(String ns, String prefix) {
if (this.namespaceCallback != null) {
this.namespaceCallback.notify(ns, prefix);
}
}
public void startPropertyConstruction(String ns, String localName, String prefix) {
if (this.namespaceCallback != null) {
this.namespaceCallback.notify(ns, prefix);
}
}
public boolean ignoreErrorInConstructingProperty(String ns, String localName, RNGParseException ex) {
this.printErrorReport("Encountered error for : (" + localName + " , " + ns + "). Error message is " + ex.getMessage());
return this.ignoreErrors;
}
private void printErrorReport(String message) {
StringBuilder str = new StringBuilder();
this.LOG.log(Level.WARNING, str.append(message).toString());
}
}