当前位置: 首页>>代码示例>>Java>>正文


Java Relation类代码示例

本文整理汇总了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;
}
 
开发者ID:vijayrajak,项目名称:JenaKBClient,代码行数:12,代码来源:RelationImpl.java

示例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();
}
 
开发者ID:cycorp,项目名称:model-generator-suite,代码行数:8,代码来源:SimpleContextMap.java

示例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.
}
 
开发者ID:vijayrajak,项目名称:JenaKBClient,代码行数:5,代码来源:RelationImpl.java

示例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.
}
 
开发者ID:vijayrajak,项目名称:JenaKBClient,代码行数:5,代码来源:RelationImpl.java

示例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.
}
 
开发者ID:vijayrajak,项目名称:JenaKBClient,代码行数:5,代码来源:RelationImpl.java

示例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;
}
 
开发者ID:cycorp,项目名称:model-generator-suite,代码行数:7,代码来源:SimpleContextMap.java

示例7: getRelationContexts

import com.cyc.kb.Relation; //导入依赖的package包/类
public Map<Relation, Context> getRelationContexts() {
  return this.relationContexts;
}
 
开发者ID:cycorp,项目名称:model-generator-suite,代码行数:4,代码来源:SimpleContextMap.java

示例8: wrapped

import com.cyc.kb.Relation; //导入依赖的package包/类
@Override
protected abstract Relation wrapped();
 
开发者ID:cycorp,项目名称:api-suite,代码行数:3,代码来源:RelationWrapper.java

示例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);
}
 
开发者ID:cycorp,项目名称:api-suite,代码行数:6,代码来源:RelationWrapper.java

示例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);
}
 
开发者ID:cycorp,项目名称:api-suite,代码行数:6,代码来源:RelationWrapper.java

示例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);
}
 
开发者ID:cycorp,项目名称:api-suite,代码行数:6,代码来源:RelationWrapper.java

示例12: setArity

import com.cyc.kb.Relation; //导入依赖的package包/类
@Override
public Relation setArity(int arityValue) throws KbTypeException, CreateException {
  return wrapped().setArity(arityValue);
}
 
开发者ID:cycorp,项目名称:api-suite,代码行数:5,代码来源:RelationWrapper.java

示例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;
 
开发者ID:cycorp,项目名称:api-suite,代码行数:14,代码来源:RelationService.java

示例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;
 
开发者ID:cycorp,项目名称:api-suite,代码行数:21,代码来源:RelationService.java

示例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;
 
开发者ID:cycorp,项目名称:api-suite,代码行数:19,代码来源:SentenceService.java


注:本文中的com.cyc.kb.Relation类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。