⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 d_normalisationtable.java

📁 normkit is a set of tools supporting ontology learning. from xml,xsd to rdfs.
💻 JAVA
字号:
package it.itc.ectrl.normkit.common;

import java.util.*;
import it.itc.ectrl.normkit.common.NormalisationException;
import org.w3c.dom.Node;


 /**
 * NormalisationTable provides mechanisms to access and manipulate the Normalisation Entries existing in the normalisation process.
 * @author Oliver Fodor (fodor@itc.it)
 **/

public class D_NormalisationTable {

    Set m_setTranslationInformations = new HashSet();

    public D_NormalisationEntry add( int intDTMXMLNode, String strURIInstance, String strURINodeBridge ) throws Exception {

        D_NormalisationEntry ti = new D_NormalisationEntry( intDTMXMLNode, strURIInstance, strURINodeBridge );

        m_setTranslationInformations.add( ti );

        return ti;
    }


    public void clear() {

        m_setTranslationInformations.clear();

    }

    public Iterator iterator() {

        return m_setTranslationInformations.iterator();

    }


    public D_NormalisationEntry getD_NormalisationEntry( int intDTMXMLNode ) throws NormalisationException {

        D_NormalisationEntry tiBest = null;

        Iterator it = m_setTranslationInformations.iterator();
        for(; it.hasNext(); )
        {
            D_NormalisationEntry ti = (D_NormalisationEntry) it.next();

            if( intDTMXMLNode == ti.getDTMTranslatedXMLNode()) {
                tiBest = ti;
                return tiBest;
            }
        }

        throw new NormalisationException("Normalisation entry for DTM node " + intDTMXMLNode + " doesn't exist.");

    }

    public D_NormalisationEntry getD_NormalisationEntry( String strURIInstance ) throws NormalisationException {

        D_NormalisationEntry tiBest = null;

        Iterator it = m_setTranslationInformations.iterator();
        for(; it.hasNext(); )
        {
            D_NormalisationEntry ti = (D_NormalisationEntry) it.next();

            if( strURIInstance.equals(ti.getURITranslatedInstance())) {
                tiBest = ti;
                return tiBest;
            }
        }

        throw new NormalisationException("Normalisation entry for entity " + strURIInstance + " doesn't exist.");
    }

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -