本文整理汇总了Java中com.cyc.kb.Relation类的典型用法代码示例。如果您正苦于以下问题:Java Relation类的具体用法?Java Relation怎么用?Java Relation使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Relation类属于com.cyc.kb包,在下文中一共展示了Relation类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addArgIsa
import com.cyc.kb.Relation; //导入依赖的package包/类
@Override
public Relation addArgIsa(int argPos, KBCollection col, Context ctx) throws KBTypeException, CreateException {
if (argPos == 1) {
((OntProperty)this.getCore()).addRange(((KBCollectionImpl)col).getCore());
} else if (argPos == 2) {
((OntProperty)this.getCore()).addDomain(((KBCollectionImpl)col).getCore());
} else {
throw new UnsupportedOperationException("argPos > 1 is not supported in this version.");
}
return this;
}
示例2: getRelationContext
import com.cyc.kb.Relation; //导入依赖的package包/类
@Override
public Context getRelationContext(Relation relation) {
if (getRelationContexts().get(relation) != null) {
return getRelationContexts().get(relation);
}
return getRelationContext();
}
示例3: addArgGenl
import com.cyc.kb.Relation; //导入依赖的package包/类
@Override
public Relation addArgGenl(int argPos, String colStr, String ctxStr) throws KBTypeException, CreateException {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
示例4: addInterArgDifferent
import com.cyc.kb.Relation; //导入依赖的package包/类
@Override
public Relation addInterArgDifferent(Integer argPosM, Integer argPosN, Context ctx) throws KBTypeException, CreateException {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
示例5: setArity
import com.cyc.kb.Relation; //导入依赖的package包/类
@Override
public Relation setArity(int arityValue) throws KBTypeException, CreateException {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
示例6: SimpleContextMap
import com.cyc.kb.Relation; //导入依赖的package包/类
public SimpleContextMap(Context collectionContext, Context defaultRelationContext, Map<Relation, Context> relationContexts) {
super(UV_MT, INFERENCE_PSC);
this.collectionContext = collectionContext;
this.defaultRelationContext = defaultRelationContext;
this.relationContexts = relationContexts;
}
示例7: getRelationContexts
import com.cyc.kb.Relation; //导入依赖的package包/类
public Map<Relation, Context> getRelationContexts() {
return this.relationContexts;
}
示例8: wrapped
import com.cyc.kb.Relation; //导入依赖的package包/类
@Override
protected abstract Relation wrapped();
示例9: addArgIsa
import com.cyc.kb.Relation; //导入依赖的package包/类
@Override
public Relation addArgIsa(int argPos, KbCollection col, Context ctx)
throws KbTypeException, CreateException {
return wrapped().addArgIsa(argPos, col, ctx);
}
示例10: addArgGenl
import com.cyc.kb.Relation; //导入依赖的package包/类
@Override
public Relation addArgGenl(int argPos, KbCollection col, Context ctx)
throws KbTypeException, CreateException {
return wrapped().addArgGenl(argPos, col, ctx);
}
示例11: addInterArgDifferent
import com.cyc.kb.Relation; //导入依赖的package包/类
@Override
public Relation addInterArgDifferent(Integer argPosM, Integer argPosN, Context ctx)
throws KbTypeException, CreateException {
return wrapped().addInterArgDifferent(argPosM, argPosN, ctx);
}
示例12: setArity
import com.cyc.kb.Relation; //导入依赖的package包/类
@Override
public Relation setArity(int arityValue) throws KbTypeException, CreateException {
return wrapped().setArity(arityValue);
}
示例13: get
import com.cyc.kb.Relation; //导入依赖的package包/类
/**
* Get the <code>Relation</code> with the name <code>nameOrId</code>. Throws exceptions if there
* is no KB term by that name, or if it is not already an instance of #$Relation.
*
* @param nameOrId the string representation or the HLID of the #$Relation
*
* @return a new Relation
*
* @throws KbTypeException
* @throws CreateException
*/
@Override
Relation get(String nameOrId) throws KbTypeException, CreateException;
示例14: findOrCreate
import com.cyc.kb.Relation; //导入依赖的package包/类
/**
* Find or create a <code>Relation</code> object named <code>nameOrId</code>. If no object exists
* in the KB with the name <code>nameOrId</code>, one will be created, and it will be asserted to
* be an instance of <code>#$Relation</code>. If there is already an object in the KB called
* <code>nameOrId</code>, and it is already a <code>#$Relation</code>, it will be returned. If it
* is not already a <code>#$Relation</code>, but can be made into one by addition of assertions to
* the KB, such assertions will be made, and the object will be returned. If the object in the KB
* cannot be turned into a <code>#$Relation</code> by adding assertions (i.e. some existing
* assertion prevents it from being a <code>#$Relation</code>), a
* <code>KbTypeConflictException</code>will be thrown.
*
* @param nameOrId the string representation or the HLID of the #$Relation
*
* @return a new Relation
*
* @throws KbTypeException
* @throws CreateException
*/
@Override
Relation findOrCreate(String nameOrId) throws CreateException, KbTypeException;
示例15: get
import com.cyc.kb.Relation; //导入依赖的package包/类
/**
* Builds a sentence based on <code>pred</code> and other <code>args</code>. Note that
* <code>args</code> should be KbObjects,
* {@link java.lang.String Strings}, {@link java.lang.Number Numbers}, or
* {@link java.util.Date Dates}. This constructor also handles {@link java.util.List Lists} and
* {@link java.util.Set Sets} (and Lists of Lits or Sets of Lists, etc.) of those supported
* objects.
*
* @param pred the first argument of the formula
* @param args the other arguments of the formula in the order they appear in the list
*
* @return a Sentence object
*
* @throws KbTypeException is thrown if the built cycObject is not a instance
* of CycFormulaSentence. This should never happen.
* @throws com.cyc.kb.exception.CreateException
*/
Sentence get(Relation pred, Object... args) throws KbTypeException, CreateException;