attribute2property.java

来自「normkit is a set of tools supporting ont」· Java 代码 · 共 40 行

JAVA
40
字号
package it.itc.ectrl.normkit.cnorm.heuristics;

import oracle.xml.parser.schema.*;

import it.itc.ectrl.normkit.common.*;
import it.itc.ectrl.normkit.cnorm.XSModel.AttributeDeclaration;
import it.itc.ectrl.normkit.cnorm.impl.C_NormalisationImpl;

/**
 * Governs creation of a RDFS property out of Attribute Declaration XML Schema component.
 * @author Oliver Fodor (fodor@itc.it)
 */
public class Attribute2Property extends NormalisationHeuristic {

    AttributeDeclaration m_attributeDeclaration;

    public Attribute2Property(AttributeDeclaration attributeDeclaration, C_NormalisationImpl c_norm) {

        super( c_norm );
        m_attributeDeclaration = attributeDeclaration;
    }

    public void run() throws Exception {

        runLiteralPropertyExtraction();

    }


    private void runLiteralPropertyExtraction() throws Exception {

        String newPropertyLabel = m_attributeDeclaration.getName();

        m_c_norm.addPropertyToTargetModel(m_attributeDeclaration.getHashCode(), newPropertyLabel);

        m_c_norm.addPropertyRangeToTargetModel(m_attributeDeclaration.getHashCode(), CNOVocabulary.URI_RDFS_LITERAL);

    }

}

⌨️ 快捷键说明

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