📄 complextype2class.java
字号:
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.ComplexTypeDefinition;
import it.itc.ectrl.normkit.cnorm.impl.C_NormalisationImpl;
/**
* Governs creation of a RDFS class out of Complex Type Definition XML Schema component.
* @author Oliver Fodor (fodor@itc.it)
*/
public class ComplexType2Class extends NormalisationHeuristic {
ComplexTypeDefinition m_complexType;
String m_label;
public ComplexType2Class(ComplexTypeDefinition complexType, C_NormalisationImpl c_norm) throws Exception {
super( c_norm );
m_complexType = complexType;
}
public void run() throws Exception {
runConceptExtraction();
}
private void runConceptExtraction() throws Exception {
m_label = m_complexType.getName();
if (m_complexType.isSimple() || m_complexType.isMixed()) {
if (m_label == null) m_label = m_complexType.getParentsName();
m_c_norm.addSubtreeToTargetModel(m_complexType.getHashCode(), m_label);
//System.out.println("simple or mixed : " + m_label);
}
/*
m_c_norm.addPropertyToTargetModel(m_complexType.getHashCode()+99999999, m_label + "_value");
m_c_norm.addPropertyRangeToTargetModel(m_complexType.getHashCode()+99999999, CNOVocabulary.URI_RDFS_LITERAL);
String normalizedEntityURI = m_c_norm.getNormalizedEntityURI(m_complexType.getHashCode());
m_c_norm.addPropertyDomainToTargetModel(m_complexType.getHashCode()+99999999, normalizedEntityURI);
//m_c_norm.addEntryToCNormTable(m_complexType.getHashCode()+99999999, CNOVocabulary.URI_RDFS_LITERAL);
}
else if (m_complexType.isMixed())
m_c_norm.addEntryToCNormTable(m_complexType.getHashCode(), CNOVocabulary.URI_RDFS_LITERAL);
*/
else {
if (m_label == null) m_label = m_complexType.getParentsName() + "_class";
m_c_norm.addConceptToTargetModel(m_complexType.getHashCode(), m_label);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -