Examples of CategoryNode


Examples of edu.harvard.wcfia.yoshikoder.dictionary.CategoryNode

                    //
                }
            }
            String desc = attributes.getValue("desc");
           
            CategoryNode cn = new CategoryNodeImpl(name, d, desc);
            if (isRoot){   
              stack.push(cn);
                dict.setDictionaryRoot(cn);
              isRoot = false
            } else {
View Full Code Here

Examples of edu.harvard.wcfia.yoshikoder.dictionary.CategoryNode

            if (!style.equals("041204")) //$NON-NLS-1$
                throw new SAXException(Messages.getString("wrongFormat")); //$NON-NLS-1$
       
        } else if (qName.equals("category")){ //$NON-NLS-1$
           
            CategoryNode newcat = new CategoryNodeImpl("Nameless"); //$NON-NLS-1$
            if (stack.size()==0){ // this is root
                dict.setDictionaryRoot(newcat);
            } else {
                CategoryNode cparent = (CategoryNode)stack.peek();
                try {
                    dict.addCategory(newcat, cparent);
                } catch (DuplicateException de){
                    throw new SAXException(de);
                }
            }
            stack.push(newcat);
            inPattern = false;
            
        } else if (qName.equals("pattern")){ //$NON-NLS-1$
            PatternNode newpat = new PatternNodeImpl("Nameless"); //$NON-NLS-1$
            CategoryNode cparent = (CategoryNode)stack.peek();
            try {
                dict.addPattern(newpat, cparent);
            } catch (DuplicateException de){
                throw new SAXException(de);
            }   
View Full Code Here

Examples of edu.harvard.wcfia.yoshikoder.dictionary.CategoryNode

            } catch (NumberFormatException nfe){
                throw new SAXException(nfe);
            }
           
        } else if (qName.equals("comment")){ //$NON-NLS-1$
            CategoryNode node = (CategoryNode)stack.peek();
            node.setDescription(sb.toString());
           
        } else if (qName.equals("category")){ //$NON-NLS-1$
          stack.pop();
     
        } else if (qName.equals("pattern")){ //$NON-NLS-1$
View Full Code Here

Examples of edu.harvard.wcfia.yoshikoder.dictionary.CategoryNode

        dict.setName(newname);
       
        BufferedReader in = new BufferedReader(new StringReader(s));
        String line;
        int ii=0;
        CategoryNode cat = null; // the current category
        int lineNumber = 0;
        try {
            while ((line = in.readLine()) != null) {
                lineNumber++;
                String trimmed = line.trim().toLowerCase();
View Full Code Here

Examples of edu.harvard.wcfia.yoshikoder.dictionary.CategoryNode

    public void actionPerformed(ActionEvent e) {
        final YKDocument doc = yoshikoder.getSelectedDocument();
        if (doc == null) return;
       
        Node n = yoshikoder.getSelectedNode();
        CategoryNode cnode = null;
        if (n instanceof CategoryNode)
          cnode = (CategoryNode)n;
        else // patternnode
          cnode = (CategoryNode)n.getParent();
        final CategoryNode catnode = cnode;
       
        TaskWorker tworker = new TaskWorker(yoshikoder){
            YKDictionaryReportDialog dia;
          protected void doWork() throws Exception {
                TokenizationCache tcache = yoshikoder.getTokenizationCache();
View Full Code Here

Examples of edu.harvard.wcfia.yoshikoder.dictionary.CategoryNode

   
    public EntryFrequencyMap(YKDictionary dict, TokenList tl){
        nodeToCount = new HashMap<Node,Integer>();
        tokenTotal = tl.size();
       
        CategoryNode root = dict.getDictionaryRoot();
        collectPatterns(root, tl);
    }
View Full Code Here

Examples of org.apache.cocoon.components.treeprocessor.CategoryNode

    }

    public void linkNode() throws Exception {

        if (this.callNode != null) {
            CategoryNode resources = CategoryNodeBuilder.getCategoryNode(this.treeBuilder, "resources");

            if (resources == null) {
                String msg = "This sitemap contains no resources. Cannot redirect at " +
                    this.callNode.getLocation();
                throw new ConfigurationException(msg);
View Full Code Here

Examples of org.apache.cocoon.components.treeprocessor.CategoryNode

    }

    public void linkNode() throws Exception {

        if (this.callNode != null) {
            CategoryNode resources = CategoryNodeBuilder.getCategoryNode(this.treeBuilder, "resources");

            if (resources == null) {
                String msg = "This sitemap contains no resources. Cannot redirect at " +
                    this.callNode.getLocation();
                getLogger().error(msg);
View Full Code Here

Examples of org.apache.cocoon.components.treeprocessor.CategoryNode

        return this.node;
    }

    public void linkNode() throws Exception {
        CategoryNode resources = CategoryNodeBuilder.getCategoryNode(this.treeBuilder, "resources");

        if (resources == null) {
            String msg = "This sitemap contains no resources. Cannot call at " + this.node.getLocation();
            getLogger().error(msg);
            throw new ConfigurationException(msg);
View Full Code Here

Examples of org.apache.cocoon.components.treeprocessor.CategoryNode

    public void linkNode()
        throws Exception
    {
      if (resourceName != null) {
        // We have a <map:call resource="..."/>
        CategoryNode resources
            = CategoryNodeBuilder.getCategoryNode(treeBuilder, "resources");

        if (resources == null)
            throw new ConfigurationException("This sitemap contains no resources. Cannot call at " + node.getLocation());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.