public DynamicOccurrencePredicate(TopicMapIF topicmap, LocatorIF base, TopicIF type) { super(type, base); this.topicmap = topicmap; index = (ClassInstanceIndexIF) topicmap.getIndex("net.ontopia.topicmaps.core.index.ClassInstanceIndexIF"); occindex = (OccurrenceIndexIF) topicmap.getIndex("net.ontopia.topicmaps.core.index.OccurrenceIndexIF"); }
public PumpPredicate(TopicMapIF topicmap, List subclauses, int limit, Variable valuevar, Variable objectvar, Object literal, boolean equals, boolean bigger) { this.index = (OccurrenceIndexIF) topicmap.getIndex("net.ontopia.topicmaps.core.index.OccurrenceIndexIF"); this.subclauses = subclauses; this.limit = limit; this.valuevar = valuevar; this.objectvar = objectvar; this.literal = literal; this.equals = equals; this.bigger = bigger; }
private NameIndexIF getNameIndex(TopicMapIF topicmap) { return (NameIndexIF) topicmap .getIndex("net.ontopia.topicmaps.core.index.NameIndexIF"); }
public DynamicAssociationPredicate(TopicMapIF topicmap, LocatorIF base, TopicIF type) { super(type, base); this.topicmap = topicmap; index = (ClassInstanceIndexIF) topicmap.getIndex("net.ontopia.topicmaps.core.index.ClassInstanceIndexIF"); }
@Override public void setTopicMap(TopicMapIF topicMap) { this.topicMap = topicMap; // initialize useful indexes scopeIndex = (ScopeIndexIF) topicMap.getIndex("net.ontopia.topicmaps.core.index.ScopeIndexIF"); instanceIndex = (ClassInstanceIndexIF) topicMap.getIndex("net.ontopia.topicmaps.core.index.ClassInstanceIndexIF"); }
public LiteralIndexImpl(TopicMapImpl topicMap) { this.topicMap = topicMap; occurrenceIndex = (OccurrenceIndexIF) topicMap.getWrapped().getIndex( "net.ontopia.topicmaps.core.index.OccurrenceIndexIF"); nameIndex = (NameIndexIF) topicMap.getWrapped().getIndex( "net.ontopia.topicmaps.core.index.NameIndexIF"); }
public TypeInstanceIndexImpl(TopicMapImpl topicMap) { this.topicMap = topicMap; this.classInstanceIndex = (ClassInstanceIndexIF) topicMap.getWrapped() .getIndex("net.ontopia.topicmaps.core.index.ClassInstanceIndexIF"); }
private SearcherIF getSearcher(TopicMapIF topicmap) { try { return (SearcherIF)topicmap .getIndex("net.ontopia.infoset.fulltext.core.SearcherIF"); } catch (OntopiaUnsupportedException e) { throw new OntopiaRuntimeException(e); } }
public ScopedIndexImpl(TopicMapImpl topicMap) { this.topicMap = topicMap; this.wrapped = (ScopeIndexIF) topicMap.getWrapped() .getIndex("net.ontopia.topicmaps.core.index.ScopeIndexIF"); }
protected static void renameTopics(TopicMapIF topicmap, String oldName, String newName) { NameIndexIF nix = (NameIndexIF)topicmap.getIndex(NameIndexIF.class.getName()); Iterator<TopicNameIF> names = nix.getTopicNames(oldName).iterator(); while (names.hasNext()) { TopicNameIF tn = names.next(); tn.setValue(newName); } }
protected static void renameTopics(TopicMapIF topicmap, String oldName, String newName) { NameIndexIF nix = (NameIndexIF)topicmap.getIndex(NameIndexIF.class.getName()); Iterator<TopicNameIF> names = nix.getTopicNames(oldName).iterator(); while (names.hasNext()) { TopicNameIF tn = names.next(); tn.setValue(newName); } }
@SuppressWarnings("unchecked") protected <I extends IndexIF> I getIndex(Class<I> indexClass) { try { if (store != null) { return (I) getTopicMap().getIndex(indexClass.getName()); } else { return null; } } catch (OntopiaUnsupportedException e) { throw OntopiaRestErrors.INDEX_NOT_SUPPORTED.build(e, indexClass.getSimpleName()); } } }
private void init() { typeix = (ClassInstanceIndexIF) topicmap.getIndex( "net.ontopia.topicmaps.core.index.ClassInstanceIndexIF"); locality = controller.getDefaultLocality(); objectsByType = new ArrayList(); objectTypeIndex = new ArrayList(); nodesByType = new ArrayList(); nodeTypeIndex = new ArrayList(); setPanelBackgroundColour(configman.getPanelBackgroundColour()); }
public static void removeNullTopic(TopicMapIF topicmap) { TopicIF topic = topicmap.getTopicBySubjectIdentifier(nullPSI); if (topic != null) { if (topic.getReified() != null) return; ClassInstanceIndexIF cindex = (ClassInstanceIndexIF)topicmap.getIndex(ClassInstanceIndexIF.class.getName()); if (cindex.usedAsType(topic)) return; ScopeIndexIF sindex = (ScopeIndexIF)topicmap.getIndex(ScopeIndexIF.class.getName()); if (sindex.usedAsTheme(topic)) return; topic.remove(); } }
@Override protected void setUp() { topicmap = makeTopicMap(); index = (NameIndexIF) topicmap.getIndex("net.ontopia.topicmaps.core.index.NameIndexIF"); }
private AssociationIF getAssociationOfType(TopicIF type) { TopicMapIF topicmap = type.getTopicMap(); ClassInstanceIndexIF index = (ClassInstanceIndexIF) topicmap.getIndex("net.ontopia.topicmaps.core.index.ClassInstanceIndexIF"); return index.getAssociations(type).iterator().next(); }
protected Object setUp(String indexInterface) throws Exception { super.setUp(); _ix = topicmap.getIndex("net.ontopia.topicmaps.core.index." + indexInterface); assertTrue("Null " + indexInterface, _ix != null); return _ix; }
@Override protected void init() { super.init(); typeIndex = (ClassInstanceIndexIF) topicmap.getIndex( "net.ontopia.topicmaps.core.index.ClassInstanceIndexIF"); recentLoaded = getTopic(RECENT_LOADED); timestamp = getTopic(TIMESTAMP); rdfMappingFile = getTopic(RDF_MAPPING_FILE); tmDirectory = getTopic(TM_DIRECTORY); rdbmsDirectory = getTopic(RDBMS_DIRECTORY); configDirectory = getTopic(CONFIG_DIRECTORY); }