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

📄 pathbridgeexec_rdf2xml.java

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

import java.util.Collection;

import it.itc.ectrl.normkit.common.NormMapModel.PathBridge;
import it.itc.ectrl.normkit.common.*;

/**
 * This class represents an execution of a Normalisation Bridge in the RDF->XML direction. Each instance of this class takes care for transformation of all RDFS property instances into XML data.
 * @author Oliver Fodor (fodor@itc.it)
 */
public class PathBridgeExec_RDF2XML {

    PathBridge m_pathbridge;

    D_Normalisation_RDF2XMLImpl m_d_norm;

    String m_fromInstance;

    public PathBridgeExec_RDF2XML(D_Normalisation_RDF2XMLImpl d_norm, PathBridge pathbridge, String strURIFromInstance)
    {
            m_d_norm = d_norm;
            m_pathbridge = pathbridge;
            m_fromInstance = strURIFromInstance;
    }

    public Collection getTranslatedPaths() throws NormalisationException
    {

        try {
            String pathQuery = "<" + m_pathbridge.getRelatedOPathProperty() + "> IN:1 {!" + m_fromInstance + "!}";

            Collection pathQueryResult = m_d_norm.getSourceModel().executeQuery(pathQuery);

            return pathQueryResult;

        } catch (Exception e) {
            e.printStackTrace();
            throw new NormalisationException("Exception executing PathBridge.", e);
        }

    }

    public String[] getPathSegments () {
        return m_pathbridge.getRelatedXPath().split("/");
    }

}

⌨️ 快捷键说明

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