Transforms an {@link AbstractConcept} into an {@link au.csiro.snorocket.core.model.AbstractConcept}.

@param c The concept in the ontology model format.
@return The concept in the internal model format.
972790
private au.csiro.snorocket.core.model.AbstractConcept transformConcept(Concept c) {
        if(c.equals(au.csiro.ontology.model.NamedConcept.TOP_CONCEPT)) {
            return new au.csiro.snorocket.core.model.Concept(IFactory.TOP_CONCEPT);
        } else if(c.equals(au.csiro.ontology.model.NamedConcept.BOTTOM_CONCEPT)) {
            return new au.csiro.snorocket.core.model.Concept(IFactory.BOTTOM_CONCEPT);
        } else if(c instanceof au.csiro.ontology.model.NamedConcept) {
            return new au.csiro.snorocket.core.model.Concept(
                    factory.getConcept(((au.csiro.ontology.model.NamedConcept) c).getId()));
        } else if(c instanceof au.csiro.ontology.model.Conjunction) {
            Concept[] modelCons = ((au.csiro.ontology.model.Conjunction)c).getConcepts();
            au.csiro.snorocket.core.model.AbstractConcept[] cons = 
                    new au.csiro.snorocket.core.model.AbstractConcept[modelCons.length];
            for(int i = 0; i < modelCons.length; i++) {
                cons[i] = transformConcept(modelCons[i]);
            }
            return new Conjunction(cons);
        } else if(c instanceof au.csiro.ontology.model.Datatype) {
            au.csiro.ontology.model.Datatype dt = (au.csiro.ontology.model.Datatype) c;
            return new Datatype(factory.getFeature(((NamedFeature) dt.getFeature()).getId()), dt.getOperator(),
                    transformLiteral(dt.getLiteral()));
        } else if(c instanceof au.csiro.ontology.model.Existential) {
            au.csiro.ontology.model.Existential e = (au.csiro.ontology.model.Existential) c;
            return new Existential(factory.getRole(((NamedRole) e.getRole()).getId()), 
                    transformConcept(e.getConcept())); 
        } else {
            throw new RuntimeException("Unexpected AbstractConcept "+c.getClass().getName());
        }
    }
695360
public static InternalNode<?> createInternalNode(InternalNode<?> n, Class<?> clsDataType) throws MIDDException {
        return createInternalNode(n.getID(), n.getState(), clsDataType);
    }
650762
public SeaGlassContext getContext(JComponent c, int state) {
        return SeaGlassContext.getContext(SeaGlassContext.class, c, SeaGlassLookAndFeel.getRegion(c), style, state);
    }
1063963
public static Tree CCtransform(Tree t) {
    boolean notDone = true;
    while (notDone) {
      Tree cc = findCCparent(t, t);
      if (cc != null) {
        t = cc;
      } else {
        notDone = false;
      }
    }
    return t;
  }
1048406
public TrieNode getContinuation(char c) {
    return ((Optional<TrieNode>) getChild(c)).orElseGet(() -> {
      TrieNode godparent = godparent();
      if (null == godparent) return null;
      return godparent.getContinuation(c);
    });
  }
192055
public static <T> Predicate<T> in(final Collection<T> c) {
    return new Predicate<T>() {
      @Override
      public boolean apply(T obj) {
        return c.contains(obj);
      }
    };
  }
1097394
public MappedClass addMappedClass(final Class c) {

        MappedClass mappedClass = mappedClasses.get(c.getName());
        if (mappedClass == null) {
            mappedClass = new MappedClass(c, this);
            return addMappedClass(mappedClass, true);
        }
        return mappedClass;
    }
354247
@NonNull
  public static CqlIdentifier fromInternal(@NonNull String internal) {
    Preconditions.checkNotNull(internal, "internal must not be null");
    return new CqlIdentifier(internal);
  }
521411
private String toSQLClause(ExistsCriteria c, ClassDescriptor cld)
    {
        StringBuffer buf = new StringBuffer();
        Query subQuery = (Query) c.getValue();

        buf.append(c.getClause());
        buf.append(" (");

        // If it's a proper call
        if (cld != null)
        {
            buf.append(
                getPreparedSelectStatement(
                    subQuery,
                    cld.getRepository().getDescriptorFor(subQuery.getSearchClass())));

            // Otherwise it's most likely a call to toString()
        }
        else
        {
            buf.append(subQuery);
        }

        buf.append(")");
        return buf.toString();
    }
382096
public static final Atom[] getAllAtomArray(Chain c) {
		List<Atom> atoms = new ArrayList<Atom>();

		for (Group g : c.getAtomGroups()) {
			if (g.isWater())
				continue;
			for (Atom a : g.getAtoms()) {
				atoms.add(a);
			}
		}
		return atoms.toArray(new Atom[atoms.size()]);
	}
1187939
public static String getDescriptor(final Class<?> c) {
		StringBuilder sb = new StringBuilder();
        getDescriptor(sb, c);
        return sb.toString();
    }
1333067
private void connectOccs(final CLClause c) {
        assert this.dense;
        for (int i = 0; i < c.lits().size(); i++) { addOcc(c.lits().get(i), c); }
    }
945404
protected String asSQLClause(SelectionCriteria c, ClassDescriptor cld)
    {
        if (c instanceof FieldCriteria)
            return toSQLClause((FieldCriteria) c, cld);

        if (c instanceof NullCriteria)
            return toSQLClause((NullCriteria) c);

        if (c instanceof BetweenCriteria)
            return toSQLClause((BetweenCriteria) c, cld);

        if (c instanceof InCriteria)
            return toSQLClause((InCriteria) c);

        if (c instanceof SqlCriteria)
            return toSQLClause((SqlCriteria) c);

        if (c instanceof ExistsCriteria)
            return toSQLClause((ExistsCriteria) c, cld);

        return toSQLClause(c, cld);
    }
1148465
public static Map<String, Object> cmd(String c) {
		HashMap<String, Object> r = new HashMap<>();
		r.put("cmd", c.toUpperCase());
		return r;
	}
1217351
private CLClause reduceClause(final CLClause c) {
        int lit;
        int i;
        for (i = 0; i < c.lits().size(); i++) {
            lit = c.lits().get(i);
            if (val(lit) < 0) { break; }
        }
        if (i == c.lits().size()) { return c; }
        assert this.addedlits.empty();
        for (i = 0; i < c.lits().size(); i++) {
            lit = c.lits().get(i);
            if (val(lit) >= 0) { this.addedlits.push(lit); }
        }
        final boolean redundant = c.redundant();
        final int glue = c.glue();
        deleteClause(c);
        final CLClause res = newClause(redundant, glue);
        this.addedlits.clear();
        return res;
    }
543340
public Iterator<Compound> toRootOrder(final Compound c) {
        return new Iterator<Compound>() {

            Compound curr;
            TreeNode n = node(c);
            Compound parent = c;

            public boolean hasNext() {
                return !n.isRoot();
            }

            public Compound next() {
                if (hasNext()) {
                    curr = parent;
                    parent = n.parent;
                    n = node(n.parent);
                    return curr;
                } else {
                    throw new NoSuchElementException();
                }
            }

            public void remove() {
                throw new UnsupportedOperationException();
            }
        };
    }
699967
public String form( char c ) {
        if (fmt != 'c') {
            throw new java.lang.IllegalArgumentException();
        }

        String r = "" + c;

        return pad(r);
    }