throws IOException, NoSuchVariableException { if (!((ServerMethods) bt).isProject()) return; boolean moreToRead = true; while (moreToRead) { moreToRead = ((ServerMethods) bt).read(datasetName, specialO); if(!((ServerMethods)bt).isRead()) // make sure data is in memory, but don't read it twice! ((ServerMethods) bt).read(datasetName, specialO); toASCII(bt, pw);
ct.setProject(true, false); bt.setProject(true, true);
/** * Print the constrained <code>DDS</code> on the given * <code>PrintWriter</code>. * * @param os the <code>PrintWriter</code> to use for output. */ public void printConstrained(PrintWriter os) { os.println("Dataset {"); for (Enumeration e = getVariables(); e.hasMoreElements();) { BaseType bt = (BaseType) e.nextElement(); // System.err.println("check: "+bt.getLongName()+" = "+((ServerMethods) bt).isProject()); ServerMethods sm = (ServerMethods) bt; if(sm.isProject()) { bt.printDecl(os, " ", true, true); } } os.print("} "); if (getEncodedName() != null) os.print(getEncodedName()); os.println(";"); }
DInt32 i = getFactory().newDInt32(s); i.setValue((int) intvalue); ((ServerMethods) i).setRead(true); ((ServerMethods) i).setProject(true); subclause = getClauseFactory().newValueClause(i, false); DString s = getFactory().newDString(text); s.setValue(text); ((ServerMethods) s).setRead(true); ((ServerMethods) s).setProject(true); subclause = getClauseFactory().newValueClause(s, false);
for (int i = 0; i < length; i++) { ServerMethods sm = (ServerMethods) ((BaseTypePrimitiveVector) vals).getValue(i); sm.serialize(dataset, sink, ce, specialO);
/** * Set the Read property. A normal variable is read using the * <code>read()</code> method. Once read the <em>Read</em> property is * <code>true</code>. Use this function to manually set the property * value. By default this property is false. * * @param state <code>true</code> if the variable has been read, * <code>false</code> otherwise. * @see #isRead() * @see #read(String, Object) */ public void setAllReadFlags(boolean state) { ReadMe = state; for (Enumeration e = varTemplate.elements(); e.hasMoreElements();) { ServerMethods sm = (ServerMethods) e.nextElement(); //System.out.println("Setting Read Flag for "+((BaseType)sm).getName()+" to "+state); sm.setRead(state); } }
if (((ServerMethods) bt).isProject()) {
ServerMethods sm = (ServerMethods) ((BaseTypePrimitiveVector) vals).getValue(i); sm.serialize(dataset, sink, ce, specialO);
if (((ServerMethods) bt).isProject()) { if (!firstPass) os.print(", ");
/** * Set the state of this variable's projection. <code>true</code> means * that this variable is part of the current projection as defined by * the current constraint expression, otherwise the current projection * for this variable should be <code>false</code>. * * @param state <code>true</code> if the variable is part of the current * projection, <code>false</code> otherwise. * @param all If <code>true</code>, set the Project property of all the * members (and their children, and so on). * @see CEEvaluator */ @Override public void setProject(boolean state, boolean all) { super.setProject(state,all); if (all) for (Enumeration e = vars.elements(); e.hasMoreElements();) { ServerMethods sm = (ServerMethods) e.nextElement(); sm.setProject(state, all); } }
boolean ctormarked(BaseType bt) { if (!(bt instanceof DConstructor)) return false; try { DConstructor ctor = (DConstructor) bt; for (int i = 0; i < ctor.getVarCount(); i++) { BaseType var = ctor.getVar(i); if (!((ServerMethods) var).isProject()) return false; } } catch (NoSuchVariableException nsve) { return false; } return true; }
DAPNode dn = (DAPNode) bts.pop(); ServerMethods ct = (ServerMethods) dn; ct.setProject(true, false); bt.setProject(true, true);
/** * Set the state of this variable's projection. <code>true</code> means * that this variable is part of the current projection as defined by * the current constraint expression, otherwise the current projection * for this variable should be <code>false</code>. * * @param state <code>true</code> if the variable is part of the current * projection, <code>false</code> otherwise. * @param all If <code>true</code>, set the Project property of all the * members (and their children, and so on). * @see CEEvaluator */ @Override public void setProject(boolean state, boolean all) { setProjected(state); if (all) for (Enumeration e = varTemplate.elements(); e.hasMoreElements();) { ServerMethods sm = (ServerMethods) e.nextElement(); sm.setProject(state); } }
/** * Set the state of this variable's projection. <code>true</code> means * that this variable is part of the current projection as defined by * the current constraint expression, otherwise the current projection * for this variable should be <code>false</code>. * * @param state <code>true</code> if the variable is part of the current * projection, <code>false</code> otherwise. * @param all If <code>true</code>, set the Project property of all the * members (and their children, and so on). * @see CEEvaluator */ @Override public void setProject(boolean state, boolean all) { setProjected(state); if (all) { // System.out.println("SDGrid:setProject: Blindly setting Project"); ((SDArray) arrayVar).setProject(state); for (Enumeration e = mapVars.elements(); e.hasMoreElements();) { ServerMethods sm = (ServerMethods) e.nextElement(); sm.setProject(state); } } }