code
stringlengths
73
34.1k
label
stringclasses
1 value
private boolean checkPlugin(final String currentPlugin) { final Features pluginFeatures = pluginTable.get(currentPlugin); final Iterator<PluginRequirement> iter = pluginFeatures.getRequireListIter(); // check whether dependcy is satisfied while (iter.hasNext()) { boolean anyP...
java
private void mergePlugins() { final Element root = pluginsDoc.createElement(ELEM_PLUGINS); pluginsDoc.appendChild(root); if (!descSet.isEmpty()) { final URI b = new File(ditaDir, CONFIG_DIR + File.separator + "plugins.xml").toURI(); for (final File descFile : descSet) { ...
java
private Element parseDesc(final File descFile) { try { parser.setPluginDir(descFile.getParentFile()); final Element root = parser.parse(descFile.getAbsoluteFile()); final Features f = parser.getFeatures(); final String id = f.getPluginId(); validatePlu...
java
private void validatePlugin(final Features f) { final String id = f.getPluginId(); if (!ID_PATTERN.matcher(id).matches()) { final String msg = "Plug-in ID '" + id + "' doesn't follow syntax rules."; throw new IllegalArgumentException(msg); } final List<String> ver...
java
static String getValue(final Map<String, Features> featureTable, final String extension) { final List<String> buf = new ArrayList<>(); for (final Features f : featureTable.values()) { final List<String> v = f.getFeature(extension); if (v != null) { buf.addAll(v); ...
java
public static <T> List<T> toList(final NodeList nodes) { final List<T> res = new ArrayList<>(nodes.getLength()); for (int i = 0; i < nodes.getLength(); i++) { res.add((T) nodes.item(i)); } return res; }
java
public static String getPrefix(final String qname) { final int sep = qname.indexOf(':'); return sep != -1 ? qname.substring(0, sep) : DEFAULT_NS_PREFIX; }
java
public static List<Element> getChildElements(final Element elem, final DitaClass cls, final boolean deep) { final NodeList children = deep ? elem.getElementsByTagName("*") : elem.getChildNodes(); final List<Element> res = new ArrayList<>(children.getLength()); for (int i = 0; i < children.getLen...
java
public static Optional<Element> getChildElement(final Element elem, final String ns, final String name) { final NodeList children = elem.getChildNodes(); for (int i = 0; i < children.getLength(); i++) { final Node child = children.item(i); if (child.getNodeType() == Node.ELEMENT_...
java
public static Optional<Element> getChildElement(final Element elem, final DitaClass cls) { final NodeList children = elem.getChildNodes(); for (int i = 0; i < children.getLength(); i++) { final Node child = children.item(i); if (cls.matches(child)) { return Option...
java
public static List<Element> getChildElements(final Element elem, final String ns, final String name) { final NodeList children = elem.getChildNodes(); final List<Element> res = new ArrayList<>(children.getLength()); for (int i = 0; i < children.getLength(); i++) { final Node child =...
java
public static List<Element> getChildElements(final Element elem, final DitaClass cls) { return getChildElements(elem, cls, false); }
java
public static List<Element> getChildElements(final Element elem, final boolean deep) { final NodeList children = deep ? elem.getElementsByTagName("*") : elem.getChildNodes(); final List<Element> res = new ArrayList<>(children.getLength()); for (int i = 0; i < children.getLength(); i++) { ...
java
public static Element getElementNode(final Element element, final DitaClass classValue) { final NodeList list = element.getChildNodes(); for (int i = 0; i < list.getLength(); i++) { final Node node = list.item(i); if (node.getNodeType() == Node.ELEMENT_NODE) { fin...
java
public static String getText(final Node root) { if (root == null) { return ""; } else { final StringBuilder result = new StringBuilder(1024); if (root.hasChildNodes()) { final NodeList list = root.getChildNodes(); for (int i = 0; i < li...
java
public static Element searchForNode(final Element root, final String searchKey, final String attrName, final DitaClass classValue) { if (root == null) { return null; } final Queue<Element> queue = new LinkedList<>(); queue.offer(root); ...
java
public static void addOrSetAttribute(final AttributesImpl atts, final String uri, final String localName, final String qName, final String type, final String value) { final int i = atts.getIndex(qName); if (i != -1) { atts.setAttribute(i, uri, localName, qName, type, value); ...
java
public static void removeAttribute(final AttributesImpl atts, final String qName) { final int i = atts.getIndex(qName); if (i != -1) { atts.removeAttribute(i); } }
java
public static String getStringValue(final Element element) { final StringBuilder buf = new StringBuilder(); final NodeList children = element.getChildNodes(); for (int i = 0; i < children.getLength(); i++) { final Node n = children.item(i); switch (n.getNodeType()) { ...
java
public void transform(final URI input, final List<XMLFilter> filters) throws DITAOTException { assert input.isAbsolute(); if (!input.getScheme().equals("file")) { throw new IllegalArgumentException("Only file URI scheme supported: " + input); } transform(new File(input), fil...
java
public static void close(final Source input) throws IOException { if (input != null && input instanceof StreamSource) { final StreamSource s = (StreamSource) input; final InputStream i = s.getInputStream(); if (i != null) { i.close(); } else { ...
java
public static void close(final Result result) throws IOException { if (result != null && result instanceof StreamResult) { final StreamResult r = (StreamResult) result; final OutputStream o = r.getOutputStream(); if (o != null) { o.close(); } else ...
java
public static XMLReader getXMLReader() throws SAXException { XMLReader reader; if (System.getProperty(SAX_DRIVER_PROPERTY) != null) { return XMLReaderFactory.createXMLReader(); } try { Class.forName(SAX_DRIVER_DEFAULT_CLASS); reader = XMLReaderFactory....
java
public static DocumentBuilder getDocumentBuilder() { DocumentBuilder builder; try { builder = factory.newDocumentBuilder(); } catch (final ParserConfigurationException e) { throw new RuntimeException(e); } if (Configuration.DEBUG) { builder = n...
java
public static String getCascadeValue(final Element elem, final String attrName) { Element current = elem; while (current != null) { final Attr attr = current.getAttributeNode(attrName); if (attr != null) { return attr.getValue(); } final No...
java
public static Stream<Element> ancestors(final Element element) { final Stream.Builder<Element> builder = Stream.builder(); for (Node current = element.getParentNode(); current != null; current = current.getParentNode()) { if (current.getNodeType() == Node.ELEMENT_NODE) { buil...
java
public AbstractPipelineModule createModule(final Class<? extends AbstractPipelineModule> moduleClass) throws DITAOTException { try { return moduleClass.newInstance(); } catch (final Exception e) { final MessageBean msgBean = MessageUtils.getMessage("DOTJ005F", moduleC...
java
public static synchronized CatalogResolver getCatalogResolver() { if (catalogResolver == null) { final CatalogManager manager = new CatalogManager(); manager.setIgnoreMissingProperties(true); manager.setUseStaticCatalog(false); // We'll use a private catalog. mana...
java
public void setup(final LinkedHashMap<URI, URI> changeTable, final Map<URI, URI> conflictTable, final Element rootTopicref, final ChunkFilenameGenerator chunkFilenameGenerator) { this.changeTable = changeTable; this.rootTopicref = rootTopicref; this.co...
java
URI generateOutputFile(final URI ref) { final FileInfo srcFi = job.getFileInfo(ref); final URI newSrc = srcFi.src.resolve(generateFilename()); final URI tmp = tempFileNameScheme.generateTempFileName(newSrc); if (job.getFileInfo(tmp) == null) { job.add(new FileInfo.Builder() ...
java
Element createTopicMeta(final Element topic) { final Document doc = rootTopicref.getOwnerDocument(); final Element topicmeta = doc.createElement(MAP_TOPICMETA.localName); topicmeta.setAttribute(ATTRIBUTE_NAME_CLASS, MAP_TOPICMETA.toString()); // iterate the node. if (topic != nu...
java
String getFirstTopicId(final File ditaTopicFile) { assert ditaTopicFile.isAbsolute(); if (!ditaTopicFile.isAbsolute()) { return null; } final StringBuilder firstTopicId = new StringBuilder(); final TopicIdParser parser = new TopicIdParser(firstTopicId); try { ...
java
void writeStartDocument(final Writer output) throws SAXException { try { output.write(XML_HEAD); } catch (IOException e) { throw new SAXException(e); } }
java
void writeProcessingInstruction(final Writer output, final String name, final String value) throws SAXException { try { output.write(LESS_THAN); output.write(QUESTION); output.write(name); if (value != null) { output.write(STRING_BLANK)...
java
private void insertAfter(final URI hrefValue, final StringBuffer parentResult, final CharSequence tmpContent) { int insertpoint = parentResult.lastIndexOf("</"); final int end = parentResult.indexOf(">", insertpoint); if (insertpoint == -1 || end == -1) { logger.error(MessageUtils.g...
java
private void writeToContentChunk(final String tmpContent, final URI outputFileName, final boolean needWriteDitaTag) throws IOException { assert outputFileName.isAbsolute(); logger.info("Writing " + outputFileName); try (OutputStreamWriter ditaFileOutput = new OutputStreamWriter(new FileOutputStr...
java
public static String getString (final String key, final Locale msgLocale) { /*read message resource file.*/ ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME, msgLocale); try { return RESOURCE_BUNDLE.getString(key); } catch (final MissingResourceException ...
java
public boolean findTopicId(final File absolutePathToFile, final String id) { if (!absolutePathToFile.exists()) { return false; } try { //load the file final DocumentBuilder builder = XMLUtils.getDocumentBuilder(); builder.setEntityResolver(Catalog...
java
private Element searchForKey(final Element root, final String key, final String tagName) { if (root == null || StringUtils.isEmptyString(key)) { return null; } final Queue<Element> queue = new LinkedList<>(); queue.offer(root); while (!queue.isEmpty()) { ...
java
public void writeMapToXML(final Map<String, Set<String>> m) { final File outputFile = new File(job.tempDir, FILE_NAME_PLUGIN_XML); if (m == null) { return; } final Properties prop = new Properties(); for (Map.Entry<String, Set<String>> entry : m.entrySet()) { ...
java
SubjectScheme getSubjectScheme(final Element root) { subjectSchemeReader.reset(); logger.debug("Loading subject schemes"); final List<Element> subjectSchemes = toList(root.getElementsByTagName("*")); subjectSchemes.stream() .filter(SUBJECTSCHEME_ENUMERATIONDEF::matches) ...
java
List<FilterUtils> combineFilterUtils(final Element topicref, final List<FilterUtils> filters, final SubjectScheme subjectSchemeMap) { return getChildElement(topicref, DITAVAREF_D_DITAVALREF) .map(ditavalRef -> getFilterUtils(ditavalRef).refine(subjectSche...
java
private FilterUtils getFilterUtils(final Element ditavalRef) { final URI href = toURI(ditavalRef.getAttribute(ATTRIBUTE_NAME_HREF)); final URI tmp = currentFile.resolve(href); final FileInfo fi = job.getFileInfo(tmp); final URI ditaval = fi.src; return filterCache.computeIfAbsent...
java
FilterUtils getFilterUtils(final URI ditaval) { logger.info("Reading " + ditaval); ditaValReader.filterReset(); ditaValReader.read(ditaval); flagImageSet.addAll(ditaValReader.getImageList()); relFlagImagesSet.addAll(ditaValReader.getRelFlagImageList()); Map<FilterUtils.Fi...
java
public static XMLGrammarPool getGrammarPool() { XMLGrammarPool pool = grammarPool.get(); if (pool == null) { try { pool = new XMLGrammarPoolImplUtils(); grammarPool.set(pool); } catch (final Exception e) { System.out.println("Failed...
java
private static String correct(String url) { // Fix for bad URLs containing UNC paths // If the url is a UNC file url it must be specified like: // file:////<PATH>... if (url.startsWith("file://") // A url like file:///<PATH> refers to a local file so it must not be // modified. && !url.s...
java
private static String getUserInfo(String url) { String userInfo = null; int startIndex = Integer.MIN_VALUE; int nextSlashIndex = Integer.MIN_VALUE; int endIndex = Integer.MIN_VALUE; try { // The user info start index should be the first index of "//". startIndex = url.indexOf("//"); ...
java
private static String extractUser(String userInfo) { if (userInfo == null) { return null; } int index = userInfo.lastIndexOf(':'); if (index == -1) { return userInfo; } else { return userInfo.substring(0, index); } }
java
private static String extractPassword(String userInfo) { if (userInfo == null) { return null; } String password = ""; int index = userInfo.lastIndexOf(':'); if (index != -1 && index < userInfo.length() - 1) { // Extract password from the URL. password = userInfo.substring(index + 1...
java
private static URL clearUserInfo(String systemID) { try { URL url = new URL(systemID); // Do not clear user info on "file" urls 'cause on Windows the drive will // have no ":"... if (!"file".equals(url.getProtocol())) { return attachUserInfo(url, null, null); } return url...
java
private static URL attachUserInfo(URL url, String user, char[] password) throws MalformedURLException { if (url == null) { return null; } if ((url.getAuthority() == null || "".equals(url.getAuthority())) && !"jar".equals(url.getProtocol())) { return url; } StringBuilder bu...
java
private static String correctUser(String user) { if (user != null && user.trim().length() > 0 && (false || user.indexOf('%') == -1)) { String escaped = escapeSpecialAsciiAndNonAscii(user); StringBuilder totalEscaped = new StringBuilder(); for (int i = 0; i < escaped.length(); i++) { ...
java
private static char[] correctPassword(char[] password) { if (password != null && new String(password).indexOf('%') == -1) { String escaped = escapeSpecialAsciiAndNonAscii(new String(password)); StringBuilder totalEscaped = new StringBuilder(); for (int i = 0; i < escaped.length(); i++) { c...
java
private void read() throws IOException { lastModified = jobFile.lastModified(); if (jobFile.exists()) { try (final InputStream in = new FileInputStream(jobFile)) { final XMLReader parser = XMLUtils.getXMLReader(); parser.setContentHandler(new JobHandler(prop, ...
java
public Map<String, String> getProperties() { final Map<String, String> res = new HashMap<>(); for (final Map.Entry<String, Object> e: prop.entrySet()) { if (e.getValue() instanceof String) { res.put(e.getKey(), (String) e.getValue()); } } return Co...
java
public Object setProperty(final String key, final String value) { return prop.put(key, value); }
java
public URI getInputMap() { // return toURI(getProperty(INPUT_DITAMAP_URI)); return files.values().stream() .filter(fi -> fi.isInput) .map(fi -> getInputDir().relativize(fi.src)) .findAny() .orElse(null); }
java
public void setInputMap(final URI map) { assert !map.isAbsolute(); setProperty(INPUT_DITAMAP_URI, map.toString()); // Deprecated since 2.2 setProperty(INPUT_DITAMAP, toFile(map).getPath()); }
java
public void setInputDir(final URI dir) { assert dir.isAbsolute(); setProperty(INPUT_DIR_URI, dir.toString()); // Deprecated since 2.2 if (dir.getScheme().equals("file")) { setProperty(INPUT_DIR, new File(dir).getAbsolutePath()); } }
java
public Map<File, FileInfo> getFileInfoMap() { final Map<File, FileInfo> ret = new HashMap<>(); for (final Map.Entry<URI, FileInfo> e: files.entrySet()) { ret.put(e.getValue().file, e.getValue()); } return Collections.unmodifiableMap(ret); }
java
public Collection<FileInfo> getFileInfo(final Predicate<FileInfo> filter) { return files.values().stream() .filter(filter) .collect(Collectors.toList()); }
java
public FileInfo getFileInfo(final URI file) { if (file == null) { return null; } else if (files.containsKey(file)) { return files.get(file); } else if (file.isAbsolute() && file.toString().startsWith(tempDirURI.toString())) { final URI relative = getRelativePa...
java
public FileInfo getOrCreateFileInfo(final URI file) { assert file.getFragment() == null; URI f = file.normalize(); if (f.isAbsolute()) { f = tempDirURI.relativize(f); } FileInfo i = getFileInfo(file); if (i == null) { i = new FileInfo(f); ...
java
public void setOutterControl(final String control) { prop.put(PROPERTY_OUTER_CONTROL, OutterControl.valueOf(control.toUpperCase()).toString()); }
java
public boolean crawlTopics() { if (prop.get(PROPERTY_LINK_CRAWLER) == null) { return true; } return prop.get(PROPERTY_LINK_CRAWLER).toString().equals(ANT_INVOKER_EXT_PARAM_CRAWL_VALUE_TOPIC); }
java
public File getOutputDir() { if (prop.containsKey(PROPERTY_OUTPUT_DIR)) { return new File(prop.get(PROPERTY_OUTPUT_DIR).toString()); } return null; }
java
public URI getInputFile() { // if (prop.containsKey(PROPERTY_INPUT_MAP_URI)) { // return toURI(prop.get(PROPERTY_INPUT_MAP_URI).toString()); // } // return null; return files.values().stream() .filter(fi -> fi.isInput) .map(fi -> fi.src) ...
java
public void setInputFile(final URI inputFile) { assert inputFile.isAbsolute(); prop.put(PROPERTY_INPUT_MAP_URI, inputFile.toString()); // Deprecated since 2.1 if (inputFile.getScheme().equals("file")) { prop.put(PROPERTY_INPUT_MAP, new File(inputFile).getAbsolutePath()); ...
java
public TempFileNameScheme getTempFileNameScheme() { final TempFileNameScheme tempFileNameScheme; try { final String cls = Optional .ofNullable(getProperty("temp-file-name-scheme")) .orElse(configuration.get("temp-file-name-scheme")); tempFi...
java
public static IndexEntry[] processIndexString(final String theIndexMarkerString, final List<Node> contents) { final IndexEntryImpl indexEntry = createIndexEntry(theIndexMarkerString, contents, null, false); final StringBuffer referenceIDBuf = new StringBuffer(); referenceIDBuf.append(indexEntry....
java
public static String normalizeTextValue(final String theString) { if (null != theString && theString.length() > 0) { return theString.replaceAll("[\\s\\n]+", " ").trim(); } return theString; }
java
public void setTempdir(final File tempdir) { this.tempDir = tempdir.getAbsoluteFile(); attrs.put(ANT_INVOKER_PARAM_TEMPDIR, tempdir.getAbsolutePath()); }
java
@Override public void execute() throws BuildException { initialize(); final Job job = getJob(tempDir, getProject()); try { for (final ModuleElem m : modules) { m.setProject(getProject()); m.setLocation(getLocation()); final Pipelin...
java
public static Job getJob(final File tempDir, final Project project) { Job job = project.getReference(ANT_REFERENCE_JOB); if (job != null && job.isStale()) { project.log("Reload stale job configuration reference", Project.MSG_VERBOSE); job = null; } if (job == null...
java
public static MessageBean getMessage(final String id, final String... params) { if (!msgs.containsKey(id)) { throw new IllegalArgumentException("Message for ID '" + id + "' not found"); } final String msg = MessageFormat.format(msgs.getString(id), (Object[]) params); MessageB...
java
protected void insertRelaxDefaultsComponent() { if (fRelaxDefaults == null) { fRelaxDefaults = new RelaxNGDefaultsComponent(resolver); addCommonComponent(fRelaxDefaults); fRelaxDefaults.reset(this); } XMLDocumentSource prev = fLastComponent; fLastComponent = fRelaxDefaults; ...
java
public void reset() { targetFile = null; title = null; defaultTitle = null; inTitleElement = false; termStack.clear(); topicIdStack.clear(); indexTermSpecList.clear(); indexSeeSpecList.clear(); indexSeeAlsoSpecList.clear(); indexSortAsSpecL...
java
private IndexTermTarget genTarget() { final IndexTermTarget target = new IndexTermTarget(); String fragment; if (topicIdStack.peek() == null) { fragment = null; } else { fragment = topicIdStack.peek(); } if (title != null) { target.se...
java
private void updateIndexTermTargetName() { if (defaultTitle == null) { defaultTitle = targetFile; } for (final IndexTerm indexterm : indexTermList) { updateIndexTermTargetName(indexterm); } }
java
private void updateIndexTermTargetName(final IndexTerm indexterm) { final int targetSize = indexterm.getTargetList().size(); final int subtermSize = indexterm.getSubTerms().size(); for (int i = 0; i<targetSize; i++) { final IndexTermTarget target = indexterm.getTargetList().get(i); ...
java
private static String trimSpaceAtStart(final String temp, final String termName) { if (termName != null && termName.charAt(termName.length() - 1) == ' ') { if (temp.charAt(0) == ' ') { return temp.substring(1); } } return temp; }
java
@Override public AbstractPipelineOutput execute(final AbstractPipelineInput input) throws DITAOTException { final String transtype = input.getAttribute(ANT_INVOKER_EXT_PARAM_TRANSTYPE); // change to xml property final ChunkMapReader mapReader = new ChunkMapReader(); mapReader.setLogg...
java
private boolean hasChanges(final Map<URI, URI> changeTable) { if (changeTable.isEmpty()) { return false; } for (Map.Entry<URI, URI> e : changeTable.entrySet()) { if (!e.getKey().equals(e.getValue())) { return true; } } return fa...
java
private boolean isEclipseMap(final URI mapFile) throws DITAOTException { final DocumentBuilder builder = getDocumentBuilder(); Document doc; try { doc = builder.parse(mapFile.toString()); } catch (final SAXException | IOException e) { throw new DITAOTException("Fa...
java
private void updateRefOfDita(final Map<URI, URI> changeTable, final Map<URI, URI> conflictTable) { final TopicRefWriter topicRefWriter = new TopicRefWriter(); topicRefWriter.setLogger(logger); topicRefWriter.setJob(job); topicRefWriter.setChangeTable(changeTable); topicRefWriter....
java
public void addTerm(final IndexTerm term) { int i = 0; final int termNum = termList.size(); for (; i < termNum; i++) { final IndexTerm indexTerm = termList.get(i); if (indexTerm.equals(term)) { return; } // Add targets when same t...
java
public void sort() { if (IndexTerm.getTermLocale() == null || IndexTerm.getTermLocale().getLanguage().trim().length() == 0) { IndexTerm.setTermLocale(new Locale(LANGUAGE_EN, COUNTRY_US)); } /* * Sort all the terms recursively */ ...
java
public void outputTerms() throws DITAOTException { StringBuilder buff = new StringBuilder(outputFileRoot); AbstractWriter abstractWriter = null; if (indexClass != null && indexClass.length() > 0) { //Instantiate the class value Class<?> anIndexClass; try { ...
java
boolean skipUnlockedNavtitle(final Element metadataContainer, final Element checkForNavtitle) { if (!TOPIC_TITLEALTS.matches(metadataContainer) || !TOPIC_NAVTITLE.matches(checkForNavtitle)) { return false; } else if (checkForNavtitle.getAttributeNodeNS(DITA_OT_NS, ATTRIBUTE_N...
java
private List<Element> getNewChildren(final DitaClass cls, final Document doc) { final List<Element> res = new ArrayList<>(); if (metaTable.containsKey(cls.matcher)) { metaTable.get(cls.matcher); final NodeList list = metaTable.get(cls.matcher).getChildNodes(); for (in...
java
private void createTopicStump(final URI newFile) { try (final OutputStream newFileWriter = new FileOutputStream(new File(newFile))) { final XMLStreamWriter o = XMLOutputFactory.newInstance().createXMLStreamWriter(newFileWriter, UTF8); o.writeStartDocument(); o.writeProcessing...
java
private void readProcessingInstructions(final Document doc) { final NodeList docNodes = doc.getChildNodes(); for (int i = 0; i < docNodes.getLength(); i++) { final Node node = docNodes.item(i); if (node.getNodeType() == Node.PROCESSING_INSTRUCTION_NODE) { final Pr...
java
private void processNavitation(final Element topicref) { // create new map's root element final Element root = (Element) topicref.getOwnerDocument().getDocumentElement().cloneNode(false); // create navref element final Element navref = topicref.getOwnerDocument().createElement(MAP_NAVREF...
java
private void generateStumpTopic(final Element topicref) { final URI result = getResultFile(topicref); final URI temp = tempFileNameScheme.generateTempFileName(result); final URI absTemp = job.tempDir.toURI().resolve(temp); final String name = getBaseName(new File(result).getName()); ...
java
private void createChildTopicrefStubs(final List<Element> topicrefs) { if (!topicrefs.isEmpty()) { for (final Element currentElem : topicrefs) { final String href = getValue(currentElem, ATTRIBUTE_NAME_HREF); final String chunk = getValue(currentElem,ATTRIBUTE_NAME_CH...
java
public Map<URI, URI> getChangeTable() { for (final Map.Entry<URI, URI> e : changeTable.entrySet()) { assert e.getKey().isAbsolute(); assert e.getValue().isAbsolute(); } return Collections.unmodifiableMap(changeTable); }
java
public Map<URI, URI> getConflicTable() { for (final Map.Entry<URI, URI> e : conflictTable.entrySet()) { assert e.getKey().isAbsolute(); assert e.getValue().isAbsolute(); } return conflictTable; }
java
@Override public void getResult(final ContentHandler buf) throws SAXException { for (final Value value: valueSet) { final String[] tokens = value.value.split("[/\\\\]", 2); buf.startElement(NULL_NS_URI, "import", "import", XMLUtils.EMPTY_ATTRIBUTES); buf.startElement(NULL...
java
@Override public void setAttribute(final String name, final String value) { hash.put(name, value); }
java
@Override public String getAttribute(final String name) { String value; value = hash.get(name); return value; }
java