/** Constructor that specifies an explicit property file. */ public CatalogManager(String propertyFile) { this.propertyFile = propertyFile; debug = new Debug(); // Note that we don't setDebug() here; we do that lazily. Either the // user will set it explicitly, or we'll do it automagically if they // read from the propertyFile for some other reason. That way, there's // no attempt to read from the file before the caller has had a chance // to avoid it. }
/** * Handle unknown CatalogEntry types. * * <p>This method exists to allow subclasses to deal with unknown * entry types.</p> */ public void unknownEntry(Vector strings) { if (strings != null && strings.size() > 0) { String keyword = (String) strings.elementAt(0); catalogManager.debug.message(2, "Unrecognized token parsing catalog", keyword); } }
/** * Returns the namespace URI for the namespace to which the * element belongs. * * @param element The element. * @return The namespace URI associated with the namespace of the * element, or null if no namespace declaration exists for it. */ public static String getNamespaceURI(Element element) { String prefix = getPrefix(element); return getNamespaceURI(element, prefix); } }
/** * Set the current verbosity. */ public void setVerbosity (int verbosity) { this.verbosity = new Integer(verbosity); debug.setDebug(verbosity); }
/** Constructor */ public XParseError(boolean errors, boolean warnings) { showErrors = errors; showWarnings = warnings; try { URL url = FileURL.makeURL("basename"); baseURI = url.toString(); } catch (MalformedURLException mue) { // nop; } }
catalogCwd = base; default_override = catalogManager.getPreferPublic(); catalogManager.debug.message(DEBUG_NORMAL, "Parse catalog: " + fileName); catalogManager.debug.message(DEBUG_NORMAL, "Unable to access " + base + ex.getMessage()); break; catalogManager.debug.message(DEBUG_NORMAL, "Parse failed for " + fileName + ce.getMessage()); if (ce.getExceptionType() == CatalogException.PARSE_FAILED)
/** Constructor. */ public CatalogManager() { debug = new Debug(); // Note that we don't setDebug() here; we do that lazily. Either the // user will set it explicitly, or we'll do it automagically if they // read from the propertyFile for some other reason. That way, there's // no attempt to read from the file before the caller has had a chance // to avoid it. }
/** * Returns the namespace URI for the namespace to which the * element belongs. * * @param element The element. * @return The namespace URI associated with the namespace of the * element, or null if no namespace declaration exists for it. */ public static String getNamespaceURI(Element element) { String prefix = getPrefix(element); return getNamespaceURI(element, prefix); } }
/** * Constructor that specifies an explicit property file. * @param propertyFileName */ public OASISCatalogManager(String propertyFileName) { super(propertyFileName); if (DEBUG_LEVEL != null) { this.debug.setDebug(Integer.parseInt(DEBUG_LEVEL)); } }
/** Constructor */ public XParseError(boolean errors, boolean warnings) { showErrors = errors; showWarnings = warnings; try { URL url = FileURL.makeURL("basename"); baseURI = url.toString(); } catch (MalformedURLException mue) { // nop; } }
public boolean checkAttributes (Attributes atts, String attName) { if (atts.getValue(attName) == null) { debug.message(1, "Error: required attribute " + attName + " missing."); return false; } else { return true; } }
/** Constructor. */ public CatalogManager() { debug = new Debug(); // Note that we don't setDebug() here; we do that lazily. Either the // user will set it explicitly, or we'll do it automagically if they // read from the propertyFile for some other reason. That way, there's // no attempt to read from the file before the caller has had a chance // to avoid it. }
/** * Returns the namespace URI for the namespace to which the * element belongs. * * @param element The element. * @return The namespace URI associated with the namespace of the * element, or null if no namespace declaration exists for it. */ public static String getNamespaceURI(Element element) { String prefix = getPrefix(element); return getNamespaceURI(element, prefix); } }
/** Constructor that specifies an explicit property file. */ public CatalogManager(String propertyFile) { this.propertyFile = propertyFile; debug = new Debug(); // Note that we don't setDebug() here; we do that lazily. Either the // user will set it explicitly, or we'll do it automagically if they // read from the propertyFile for some other reason. That way, there's // no attempt to read from the file before the caller has had a chance // to avoid it. }
/** * Handle unknown CatalogEntry types. * * <p>This method exists to allow subclasses to deal with unknown * entry types.</p> */ public void unknownEntry(Vector strings) { if (strings != null && strings.size() > 0) { String keyword = (String) strings.elementAt(0); catalogManager.debug.message(2, "Unrecognized token parsing catalog", keyword); } }
/** Constructor that specifies an explicit property file. */ public CatalogManager(String propertyFile) { this.propertyFile = propertyFile; debug = new Debug(); // Note that we don't setDebug() here; we do that lazily. Either the // user will set it explicitly, or we'll do it automagically if they // read from the propertyFile for some other reason. That way, there's // no attempt to read from the file before the caller has had a chance // to avoid it. }
/** Constructor. */ public CatalogManager() { debug = new Debug(); // Note that we don't setDebug() here; we do that lazily. Either the // user will set it explicitly, or we'll do it automagically if they // read from the propertyFile for some other reason. That way, there's // no attempt to read from the file before the caller has had a chance // to avoid it. }