/** * Creates a new ConceptClass with the given id, fullname and description. * Adds the new ConceptClass to the list of ConceptClasses of this graph. * * @param id * id of the new ConceptClass * @param fullname * fullname of the new ConceptClass * @param description * description of the new ConceptClass * @return ConceptClass * @throws NullValueException * if any parameter is null. * @throws EmptyStringException * if id parameter is an empty string. * @throws UnsupportedOperationException * for read-only graphs */ public ConceptClass createConceptClass(String id, String fullname, String description) throws NullValueException, EmptyStringException, UnsupportedOperationException { return md.createConceptClass(id, fullname, description, null); }
/** * Creates a new ConceptClass with the given id, description and parent * ConceptClass. Adds the new ConceptClass to the list of ConceptClasses of * this graph. * * @param id * id of the new ConceptClass * @param fullname * fullname of the new ConceptClass * @param description * description of the new ConceptClass * @param specialisationOf * parent ConceptClass of the new ConceptClass * @return new ConceptClass * @throws NullValueException * if any parameter is null. * @throws EmptyStringException * if id parameter is an empty string. * @throws UnsupportedOperationException * for read-only graphs */ public ConceptClass createConceptClass(String id, String fullname, String description, ConceptClass specialisationOf) throws NullValueException, EmptyStringException, UnsupportedOperationException { return md.createConceptClass(id, fullname, description, specialisationOf); }
public synchronized ConceptClass getConceptClass ( String id, String fullName, String description, ConceptClass specialisationOf ) { return this.cacheGet ( ConceptClass.class, id, () -> this.graph.getMetaData ().createConceptClass ( id, fullName, description, specialisationOf ) ); }
ccQTL = graph.getMetaData().getConceptClass("QTL"); if (ccQTL == null) { ccQTL = graph.getMetaData().createConceptClass("QTL", "QTL", "Quantitative Trait Loci", null);
if (selection.length() > 0) { ConceptClass cc = aog.getMetaData().getConceptClass(selection); aog.getMetaData().createConceptClass(id.getText(), fullname.getText(), description.getText(), cc); } else { aog.getMetaData().getFactory().createConceptClass(id.getText(), fullname.getText(), description.getText());
/** * @param ccs * @param omd * copy from MetaData * @param nomd * copy to MetaData */ private void copyConceptClasses(Iterable<ConceptClass> ccs, ONDEXGraphMetaData omd, ONDEXGraphMetaData nomd) { // "specializations_of"s that occur before there specialization HashSet<ConceptClass> ccDependencyNotResolved = new HashSet<ConceptClass>(); for (ConceptClass cc : ccs) { ConceptClass ccSpec = cc.getSpecialisationOf(); ConceptClass newCCSpec = null; if (ccSpec != null) { newCCSpec = nomd.getConceptClass(ccSpec.getId()); if (newCCSpec == null) { ccDependencyNotResolved.add(cc); continue; } } if (!nomd.checkConceptClass(cc.getId())) nomd.createConceptClass(cc.getId(), cc.getFullname(), cc .getDescription(), newCCSpec); } // recursively resolve specialisations if (ccDependencyNotResolved.size() > 0) { copyConceptClasses(ccDependencyNotResolved, omd, nomd); } }
CLIQUE_CC); if (clique_cc == null) { clique_cc = graph.getMetaData().createConceptClass(CLIQUE_CC, CLIQUE_CC, "A complete subgraph of a undirected graph", null);