elementtype2propertyrange.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.cnorm.XSModel.ElementDeclarationContext;
import it.itc.ectrl.normkit.cnorm.impl.C_NormalisationImpl;
/**
* Governs addition of a property domain to property extracted out of Element Declaration XML Schema component. The domain information is extracted from the parent of element declaration or reference in the XML Schema.
* @author Oliver Fodor (fodor@itc.it)
*/
public class ElementType2PropertyRange extends NormalisationHeuristic {
ElementDeclarationContext m_elementDeclaration;
public ElementType2PropertyRange(ElementDeclarationContext elementDeclaration, C_NormalisationImpl c_norm) {
super( c_norm );
m_elementDeclaration = elementDeclaration;
}
public void run() throws Exception {
runRangeInformationExtraction();
}
private void runRangeInformationExtraction() throws Exception {
int typeHashCode = m_elementDeclaration.getHashCodeOfElementsType();
String normalizedEntityURI = m_c_norm.getNormalizedEntityFirstURI(typeHashCode);
if (normalizedEntityURI != null) // just a doublecheck, maybe remove this line
m_c_norm.addPropertyRangeToTargetModel(m_elementDeclaration.getHashCode(), normalizedEntityURI);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?