001: /*
002: * JFolder, Copyright 2001-2006 Gary Steinmetz
003: *
004: * Distributable under LGPL license.
005: * See terms of license at gnu.org.
006: */
007:
008: package org.jfolder.common.tagging;
009:
010: //base classes
011: import java.io.ByteArrayInputStream;
012: import java.io.ByteArrayOutputStream;
013: import java.io.File;
014: import java.io.FileInputStream;
015: import java.io.IOException;
016: import java.util.ArrayList;
017: import java.util.HashMap;
018: import java.util.zip.ZipOutputStream;
019: import org.w3c.dom.Document;
020: import org.w3c.dom.Node;
021:
022: //project specific classes
023: import org.jfolder.common.UnexpectedSystemException;
024: import org.jfolder.common.files.BaseVirtualFileSystemHolder;
025: import org.jfolder.common.files.VirtualFileSystemDirectory;
026: import org.jfolder.common.files.VirtualFileSystemFile;
027: import org.jfolder.common.files.VirtualFileSystemHelper;
028: import org.jfolder.common.files.VirtualFileSystemHolder;
029: import org.jfolder.common.files.VirtualFileSystemRoot;
030: import org.jfolder.common.files.memory.MemoryFileSystemRootHelper;
031: import org.jfolder.common.tagging.ConceptTagPreferencesHelper;
032: import org.jfolder.common.utils.misc.MiscHelper;
033:
034: //other classes
035:
036: public class ConceptRollupV1Tag extends ConceptRollupTag {
037:
038: private final static String NAMESPACES = "namespaces";
039: private final static String MAIN = "main";
040: private final static String DOCS = "docs";
041: private final static String CENTRAL_ARCHIVE = "central_archive";
042: private final static String RCTH = "rcth";
043: private final static String LOCAL_FILES = "local_files";
044: //
045: private final static String LOCAL_FILE_PREFIX = RootConceptTagHolder.FILE_PREFIX;
046: private final static String LOCAL_DIRECTORY_PREFIX = RootConceptTagHolder.DIR_PREFIX;
047:
048: public void bubba() {
049: throw UnexpectedSystemException.unknownState();
050: }
051:
052: public ConceptRollupV1Tag() {
053: //
054: this .ctsh = new ConceptTagSetHolder(getPreferencesHandle());
055: ConceptTagProperties ctProps = ConceptTagProperties
056: .newInstance(new String[0]);
057: this .ctsh
058: .registerConceptTag(
059: ConceptTagPreferencesHelper.CTP_PREF_NS__RCTH_ROLLUP__V1_BASE,
060: ConceptTagPreferencesHelper.CTP_PREF_ROOT_LOCAL_NAME__COMMON,
061: ConceptRollupV1Tag.class.getName(), ctProps);
062: //
063: this .validateOnlyMode = false;
064: //
065: this .ctf = new ConceptTagFlags();
066: }
067:
068: protected final static RootConceptTagHolder getRollupInstance(
069: ConceptTagPreferences inCtp) {
070:
071: RootConceptTagHolder outValue = null;
072:
073: //
074: Class rollupClass = MiscHelper
075: .getClassByName(ConceptRollupV1Tag.class.getName());
076: ConceptRollupV1Tag rollupCtp = (ConceptRollupV1Tag) MiscHelper
077: .newInstance(rollupClass);
078: //
079: outValue = ConceptTagHelper.getRootHolder((Node) null,
080: rollupCtp);
081: //
082: ConceptRollupV1Tag rollupFirstCt = (ConceptRollupV1Tag) outValue
083: .getFirstChildConceptTag();
084: rollupFirstCt.setDescribedPreferencesHandle(inCtp
085: .getPreferencesHandle());
086:
087: return outValue;
088: }
089:
090: ////////////////////////////////////////////////////////
091: public byte[] getRollup(RootConceptTagHolder inRcth,
092: String inPassword) {
093:
094: try {
095: byte outValue[] = null;
096:
097: if (inPassword != null) {
098: throw UnexpectedSystemException.notImplemented();
099: } else {
100: //
101: VirtualFileSystemRoot fsr = MemoryFileSystemRootHelper
102: .newInstance();
103: //
104: String ps = inRcth.getXMLRepresentation();
105: VirtualFileSystemFile primeFsf = fsr.createFile(
106: "prime.xml", MiscHelper.fromStringToBytes(ps));
107: //
108: ConceptTagPreferences ctp = new ConceptRollupV1Tag();
109: RootConceptTagHolder rollupRcth = getRollupInstance(inRcth
110: .getPreferences());
111: //
112: String ds = rollupRcth.getXMLRepresentation();
113: VirtualFileSystemFile directivesFsf = fsr.createFile(
114: "directivesV1.xml", MiscHelper
115: .fromStringToBytes(ds));
116: //
117: VirtualFileSystemDirectory namespacesFsd = fsr
118: .createDirectory(NAMESPACES);
119:
120: //
121: if (inRcth.isFileSystemPresent()) {
122: //FileSystemRoot rcthFsr = inRcth.getFileSystem();
123: //rcthFsr.copy(namespacesFsd);
124: ArrayList rcthNamespaces = inRcth
125: .getRootHolderNamespaceList();
126: for (int i = 0; i < rcthNamespaces.size(); i++) {
127: String nextRcthNamespace = (String) rcthNamespaces
128: .get(i);
129: ArrayList rcthIndexes = inRcth
130: .getRootHolderList(nextRcthNamespace);
131: for (int j = 0; j < rcthIndexes.size(); j++) {
132: RootConceptTagHolder nextRcth = (RootConceptTagHolder) rcthIndexes
133: .get(j);
134: //
135: addArchivedRootHolder(namespacesFsd,
136: nextRcthNamespace, nextRcth);
137:
138: }
139: }
140: //
141: //
142: VirtualFileSystemDirectory mainFsd = namespacesFsd
143: .getOrCreateLocalDirectory(MAIN);
144: VirtualFileSystemDirectory docsFsd = mainFsd
145: .getOrCreateLocalDirectory(DOCS);
146: VirtualFileSystemDirectory localFilesFsd = docsFsd
147: .getOrCreateLocalDirectory(LOCAL_FILES);
148: //
149: BaseVirtualFileSystemHolder.copyDirectory(inRcth
150: .getLocalFilesDirectory(), localFilesFsd);
151: }
152: //
153:
154: //
155: VirtualFileSystemRoot zipVfsr = MemoryFileSystemRootHelper
156: .newInstance();
157: fsr.copyTo(zipVfsr);
158: VirtualFileSystemHelper
159: .pruneEmptyNestedDirectories(zipVfsr);
160: //
161: ByteArrayOutputStream baos = new ByteArrayOutputStream();
162: ZipOutputStream zos = new ZipOutputStream(baos);
163: //
164: zipVfsr.zip(zos);
165: //
166: //File outputDir = new File(".\\MacroOutput");
167: //outputDir.mkdir();
168: //MiscHelper.deleteFileOrDirectory(outputDir);
169: //outputDir.mkdir();
170: //VirtualFileSystemHelper.writeFileSystem(outputDir, fsr);
171: //
172: zos.finish();
173: //
174: zos.flush();
175: baos.flush();
176: //
177: outValue = baos.toByteArray();
178: //
179: zos.close();
180: baos.close();
181: }
182:
183: return outValue;
184: } catch (IOException ioe) {
185: throw new UnexpectedSystemException(ioe);
186: }
187: }
188:
189: private final static void addArchivedRootHolder(
190: VirtualFileSystemDirectory inFsd, String inNamespace,
191: RootConceptTagHolder inRcth) {
192: //
193:
194: VirtualFileSystemDirectory mainFsd = inFsd
195: .getOrCreateLocalDirectory(MAIN);
196: VirtualFileSystemDirectory centralArchiveFsd = mainFsd
197: .getOrCreateLocalDirectory(CENTRAL_ARCHIVE);
198: VirtualFileSystemDirectory rcthFsd = centralArchiveFsd
199: .getOrCreateLocalDirectory(RCTH);
200: VirtualFileSystemDirectory namespaceFsd = rcthFsd
201: .getOrCreateLocalDirectory(inNamespace);
202: VirtualFileSystemDirectory indexFsd = namespaceFsd
203: .getOrCreateLocalDirectory(namespaceFsd
204: .getLocalDirectories().size()
205: + "");
206: //
207: byte content[] = ConceptRollupTag.getRollupFromList(inRcth,
208: null);
209: indexFsd.createFile("rollup.zip", content);
210: }
211:
212: ////////////////////////////////////////////////////
213: public RootConceptTagHolder getRootHolder(byte inContent[]) {
214:
215: try {
216: RootConceptTagHolder outValue = null;
217:
218: //
219: VirtualFileSystemRoot fsr = MemoryFileSystemRootHelper
220: .newInstance();
221:
222: //
223: ByteArrayInputStream bais = new ByteArrayInputStream(
224: inContent);
225: fsr.unzip(bais);
226: bais.close();
227:
228: //process here
229: if (fsr.isFilePresent("directivesV1.xml")
230: && fsr.isFilePresent("prime.xml")) {
231: //
232: VirtualFileSystemFile directivesFsf = fsr
233: .getFile("directivesV1.xml");
234: VirtualFileSystemFile primeFsf = fsr
235: .getFile("prime.xml");
236: VirtualFileSystemDirectory namespacesFsd = fsr
237: .getOrCreateLocalDirectory(NAMESPACES);
238: //
239: ByteArrayInputStream directivesBais = new ByteArrayInputStream(
240: directivesFsf.getContent());
241: RootConceptTagHolder rollupRcth = ConceptTagHelper
242: .getRootHolder(directivesBais, this );
243: directivesBais.close();
244:
245: //
246: if (!rollupRcth.isErrorPresent()) {
247:
248: ConceptTag rollupCt = rollupRcth
249: .getFirstChildConceptTag();
250: ConceptRollupV1Tag rollup = (ConceptRollupV1Tag) rollupCt;
251: outValue = processDirectives(rollup, primeFsf,
252: namespacesFsd);
253: }
254: }
255:
256: return outValue;
257: } catch (IOException ioe) {
258: throw new UnexpectedSystemException(ioe);
259: }
260:
261: }
262:
263: private RootConceptTagHolder processDirectives(
264: ConceptRollupV1Tag inRollup,
265: VirtualFileSystemFile inPrimeFsf,
266: VirtualFileSystemDirectory inNamespacesFsd) {
267:
268: RootConceptTagHolder outValue = null;
269:
270: //
271: VirtualFileSystemDirectory mainFsd = inNamespacesFsd
272: .getOrCreateLocalDirectory(MAIN);
273:
274: //
275: VirtualFileSystemDirectory docsFsd = mainFsd
276: .getOrCreateLocalDirectory(DOCS);
277: VirtualFileSystemDirectory localFilesFsd = docsFsd
278: .getOrCreateLocalDirectory(LOCAL_FILES);
279: //
280: VirtualFileSystemRoot rcthMsr = MemoryFileSystemRootHelper
281: .newInstance();
282: VirtualFileSystemHolder docsVsh = rcthMsr.createDirectory(DOCS);
283: VirtualFileSystemDirectory localFilesVsh = docsVsh
284: .createDirectory(LOCAL_FILES);
285: //
286: BaseVirtualFileSystemHolder.copyDirectory(localFilesFsd,
287: localFilesVsh);
288: String rcthCtpHandle = inRollup.getDescribedPreferencesHandle();
289: ConceptTagPreferences rcthCtp = ConceptTagPreferencesHelper
290: .getPreferencesFromHandle(rcthCtpHandle);
291: //
292: ByteArrayInputStream bais = new ByteArrayInputStream(inPrimeFsf
293: .getContent());
294: //
295: outValue = ConceptTagHelper.getRootHolder(bais, rcthCtp,
296: rcthMsr);
297: //
298: //
299:
300: //
301: //loadLocalFiles(outValue, localFilesFsd, new ArrayList());
302:
303: //////////
304: VirtualFileSystemDirectory centralArchiveFsd = mainFsd
305: .getOrCreateLocalDirectory(CENTRAL_ARCHIVE);
306: VirtualFileSystemDirectory rcthFsd = centralArchiveFsd
307: .getOrCreateLocalDirectory(RCTH);
308: ArrayList rcthNamespacesList = rcthFsd.getLocalDirectories();
309: for (int i = 0; i < rcthNamespacesList.size(); i++) {
310: String nextNamespaceName = (String) rcthNamespacesList
311: .get(i);
312: VirtualFileSystemDirectory nextNamespaceFsd = rcthFsd
313: .getDirectory(nextNamespaceName);
314: //
315: ArrayList rcthIndexList = nextNamespaceFsd
316: .getLocalDirectories();
317: for (int j = 0; j < rcthIndexList.size(); j++) {
318: String nextIndexName = (String) rcthIndexList.get(i);
319: VirtualFileSystemDirectory nextIndexFsd = nextNamespaceFsd
320: .getDirectory(nextIndexName);
321: //
322: VirtualFileSystemFile nextRollupFsf = nextIndexFsd
323: .getFile("rollup.zip");
324: RootConceptTagHolder nextArchivedRcth = ConceptRollupTag
325: .getRootHolderFromList(nextRollupFsf
326: .getContent());
327: //
328: outValue.addRootHolder(nextArchivedRcth);
329: }
330: }
331:
332: //ArrayList localFilesList = localFilesFsd.getLocalDirectories();
333: //
334: //for (int i = 0; i < localFilesList.size(); i++) {
335: //
336: //}
337:
338: //
339: //if (true) {
340: // throw UnexpectedSystemException.notImplemented();
341: //}
342:
343: return outValue;
344: }
345:
346: //private final static void loadLocalFiles(RootConceptTagHolder inRcth,
347: // VirtualSystemDirectory inCurrentDir, ArrayList inCurrentDirName) {
348: // //
349: // ArrayList localDirNames = inCurrentDir.getLocalDirectories();
350: // for (int i = 0; i < localDirNames.size(); i++) {
351: // String nextDirName = (String)localDirNames.get(i);
352: // VirtualSystemDirectory nextDir =
353: // inCurrentDir.getDirectory(nextDirName);
354: // String nextRealDirName = nextDir.getName();
355: // nextRealDirName = nextRealDirName.substring(
356: // LOCAL_DIRECTORY_PREFIX.length(), nextRealDirName.length());
357: // //
358: // inCurrentDirName.add(nextRealDirName);
359: // loadLocalFiles(inRcth, nextDir, inCurrentDirName);
360: // inCurrentDirName.remove(inCurrentDirName.size() - 1);
361: // }
362: // //
363: // ArrayList localFileNames = inCurrentDir.getLocalFiles();
364: // for (int i = 0; i < localFileNames.size(); i++) {
365: //
366: // String nextFileName = (String)localFileNames.get(i);
367: // VirtualSystemFile nextFile = inCurrentDir.getFile(nextFileName);
368: // String nextRealFileName = nextFile.getName();
369: // nextRealFileName = nextRealFileName.substring(
370: // LOCAL_FILE_PREFIX.length(), nextRealFileName.length());
371: // //
372: // ArrayList localFilesPath = new ArrayList();
373: // for (int j = 0; j < inCurrentDirName.size(); j++) {
374: // localFilesPath.add(
375: // RootConceptTagHolder.DIR_PREFIX
376: // + inCurrentDirName.get(j));
377: // }
378: // //
379: // VirtualSystemDirectory baseLocalFilesDir =
380: // inRcth.getLocalFilesDirectory();
381: // VirtualSystemHolder targetDir =
382: // baseLocalFilesDir.getOrCreateAbsoluteDirectory(
383: // BaseVirtualSystemHolder.parseDirectoryArray(
384: // localFilesPath));
385: // targetDir.createFile(
386: // RootConceptTagHolder.FILE_PREFIX + nextRealFileName,
387: // nextFile.getContent());
388: // //inRcth.addLocalFile(
389: // // inCurrentDirName, nextRealFileName, nextFile.getContent());
390: // //
391: // }
392: //}
393:
394: //InitializeConceptTagContext
395: public void nonImmediateValidation() {
396: }
397:
398: //constraint "preferences-handle";
399: private final static String PREFERENCES_HANDLE_CTCON = "preferences-handle";
400: private final static String PREFERENCES_HANDLE_TITLE = "Preferences Handle";
401: private final static String PREFERENCES_HANDLE_SHORT_DESCRIPTION = "Preferences Handle";
402:
403: private ConceptTagCharacteristic preferencesHandleCtchar = null;
404:
405: //ConceptTag
406: public void initialize(InitializeConceptTagContext inIctc) {
407: //
408: ConceptTagConstraintHolder rootCtconh = ConceptTagConstraintHolder
409: .newInstance(inIctc);
410: //
411: //constrain "preferences-handle"
412: ConceptTagConstraint preferencesHandleCtcon = ConceptTagConstraint
413: .newInstance(PREFERENCES_HANDLE_CTCON, rootCtconh);
414: preferencesHandleCtcon.setTitle(PREFERENCES_HANDLE_TITLE);
415: preferencesHandleCtcon
416: .setShortDescription(PREFERENCES_HANDLE_SHORT_DESCRIPTION);
417: //
418: StaticConceptTagConstraintContext preferencesHandleSctcc = StaticConceptTagConstraintContext
419: .newInstance(preferencesHandleCtcon);
420: //
421: inIctc.initialize();
422: //
423: this .preferencesHandleCtchar = preferencesHandleCtcon
424: .getCharacteristic();
425: //
426: }
427:
428: public void appraise(AppraiseConceptTagContext inCtic) {
429: //throw UnexpectedSystemException.notImplemented();
430: }
431:
432: //
433: private void setDescribedPreferencesHandle(String inHandle) {
434: //if (true) {
435: // throw new UnexpectedSystemException(
436: // "this.preferencesHandleCtchar = "
437: // + this.preferencesHandleCtchar);
438: //}
439: if (this .preferencesHandleCtchar.getValueLength() > 0) {
440: this .preferencesHandleCtchar
441: .replaceValueAndRemoveLocalFiles(0, inHandle);
442: } else {
443: this .preferencesHandleCtchar.addValue(0, inHandle);
444: }
445: }
446:
447: private String getDescribedPreferencesHandle() {
448:
449: String outValue = null;
450:
451: if (this .preferencesHandleCtchar.getValueLength() > 0) {
452: outValue = this .preferencesHandleCtchar.getValueAsString(0,
453: null);
454: }
455:
456: return outValue;
457: }
458:
459: //ConceptTagPreferences
460: //private final static String CMT_BASE_NAMESPACE =
461: // "http://www.jfolder.org/dtds/apps/concept/rollup/";
462: //
463: //private final static String CMT_NAMESPACE_V1 =
464: // CMT_BASE_NAMESPACE + "v1/";
465: //private final static String CMT_NAMESPACE_V1_BASE =
466: // CMT_NAMESPACE_V1 + "base.dtd";
467: //private final static String CMT_NAMESPACE_V1_CORE =
468: // CMT_NAMESPACE_V1 + "core.dtd";
469: //private final static String CMT_NAMESPACE_V1_RETURNABLE =
470: // CMT_NAMESPACE_V1 + "returnable.dtd";
471:
472: //private final static String CMT_NAME_V1_TEXT = "text";
473: //private final static String CMT_NAME_V1_COMPOUND = "compound";
474: //
475: //private final static String CMT_ATTR_V1_CONSTRAINT = "constraint";
476: //
477: //private final static String CMT_HANDLE_CONJUCTION = "$";
478: //
479: //private final static String ROOT_CONSTRAINT = "root";
480: //
481: //private final static String UNCONSTRAINED_SYMBOL = "@";
482:
483: //
484: private ConceptTagFlags ctf = null;
485:
486: //
487: public ConceptTagFlags getFlags() {
488: return this .ctf;
489: }
490:
491: //
492: private ConceptTagSetHolder ctsh = null;
493: //
494: private boolean validateOnlyMode = false;
495: //
496: private RootConceptTagHolder rcth = null;
497:
498: //
499: public void setRootHolder(RootConceptTagHolder inRcth) {
500: if (this .rcth != null) {
501: throw new UnexpectedSystemException("Already set");
502: } else {
503: this .rcth = inRcth;
504: }
505: }
506:
507: public RootConceptTagHolder getRootHolder() {
508: return this .rcth;
509: }
510:
511: //protected ConfigInstanceTagPreferences() {
512: // //
513: // this.ctsh = new ConceptTagSetHolder();
514: // ConceptTagProperties ctProps = ConceptTagProperties.newInstance(
515: // new String[0], new String[0], new String[0],
516: // false, false, false, false);
517: // this.ctsh.registerTag(CMT_NAMESPACE_V1_CORE, "config-manager",
518: // "org.jfolder.config.instance.v1.RootConfigInstanceTag", ctProps);
519: // //
520: // this.validateOnlyMode = false;
521: //}
522: //
523: public void initialize(ConceptTagCallContext inCtcc) {
524: //throw UnexpectedSystemException.notImplemented();
525: //
526: }
527:
528: //
529: public boolean isStaticUsed() {
530: return true;
531: }
532:
533: public String getStaticNamespace() {
534: return ConceptTagPreferencesHelper.CTP_PREF_NS__COMMON_COMPONENTS__V1;
535: }
536:
537: public String getStaticName() {
538: return ConceptTagPreferencesHelper.CTP_PREF_STATIC_LOCAL_NAME__COMMON;
539: }
540:
541: //
542: public boolean isCompoundUsed() {
543: return true;
544: }
545:
546: public String getCompoundNamespace() {
547: return ConceptTagPreferencesHelper.CTP_PREF_NS__COMMON_COMPONENTS__V1;
548: }
549:
550: public String getCompoundName() {
551: return ConceptTagPreferencesHelper.CTP_PREF_COMPOUND_LOCAL_NAME__COMMON;
552: }
553:
554: //
555: public boolean isNonTerminalCharacterDataStripped() {
556: return true;
557: }
558:
559: //
560: public boolean isConstraintUsed() {
561: return true;
562: }
563:
564: public String getConstraintNamespace() {
565: return ConceptTagPreferencesHelper.CTP_PREF_NS__COMMON_COMPONENTS__V1;
566: }
567:
568: public String getConstraintName() {
569: return ConceptTagPreferencesHelper.CTP_PREF_CONSTRAINT_LOCAL_NAME__COMMON;
570: }
571:
572: //
573: public boolean isStyleUsed() {
574: return false;
575: }
576:
577: public String getStyleNamespace() {
578: return null;
579: }
580:
581: public String getStyleName() {
582: return null;
583: }
584:
585: //
586: public boolean isUnconstrainedAllowed() {
587: return false;
588: }
589:
590: public String getUnconstrainedSymbol() {
591: return ConceptTagPreferencesHelper.CTP_PREF_UNCONSTRAINED_SYMBOL_COMMON;
592: }
593:
594: //
595: public String getRootConstraint() {
596: return ConceptTagPreferencesHelper.CTP_PREF_ROOT_CONSTRAINT__COMMON;
597: }
598:
599: public String getRootHandle() {
600: return (getRootConstraint() + getHandleConjunction() + "0");
601: }
602:
603: //
604: public String getHandleConjunction() {
605: return ConceptTagPreferencesHelper.CTP_PREF_HANDLE_CONJUNCTION__COMMON;
606: }
607:
608: //
609: public ConceptTagSetHolder getSetHolder() {
610:
611: ConceptTagSetHolder outValue = null;
612:
613: outValue = this .ctsh;
614:
615: return outValue;
616: }
617:
618: public ConceptTagMenuBranch getMenuBase() {
619: throw UnexpectedSystemException.notImplemented();
620: }
621:
622: //
623: public String getRootClassName() {
624: return (this .getClass().getName());
625: }
626:
627: //
628: public InitializeConceptTagContext getInitializeContext() {
629: //throw UnexpectedSystemException.notImplemented();
630: return this ;
631: }
632:
633: public DetermineClassConceptTagContext getReturnClassContext() {
634: throw UnexpectedSystemException.notImplemented();
635: }
636:
637: public DetermineValueAndClassConceptTagContext getDetermineValueAndClassContext() {
638: throw UnexpectedSystemException.notImplemented();
639: }
640:
641: //
642: public ConceptTag createUnknownConceptTag(String inNs, String inName) {
643:
644: throw new UnexpectedSystemException(
645: "Unknown Concept Rollup Tag - " + "Namespace = ('"
646: + inNs + "'), Name = ('" + inName + "')");
647: }
648:
649: public HashMap getDefaultNamespaceAssignments() {
650: return new HashMap();
651: }
652:
653: public String getAttributeConstraintName() {
654: return ConceptTagPreferencesHelper.CTP_PREF_ATTRIBUTE_LOCAL_NAME__COMMON;
655: }
656:
657: public String getStyleConstraintName() {
658: return ConceptTagPreferencesHelper.CTP_PREF_STYLE_LOCAL_NAME__COMMON;
659: }
660:
661: //
662: public void setValidateOnlyMode(boolean inMode) {
663: this .validateOnlyMode = inMode;
664: }
665:
666: public boolean isValidateOnlyMode() {
667: return this .validateOnlyMode;
668: }
669:
670: //
671: public boolean isAttributeAndStyleForbidden() {
672: return true;
673: }
674:
675: //public boolean isGeneralContentForbidden() {
676: // return true;
677: //}
678: //
679: public void correctForSpecialCharactersAndElements(Document inDoc) {
680: //no corrections needed
681: }
682:
683: //
684:
685: //
686: public boolean isFileSystemPresent() {
687: return false;
688: }
689:
690: //
691: public String getPreferencesHandle() {
692: return ConceptTagPreferencesHelper.CTP_PREF_HANDLE__RCTH_ROLLUP;
693: }
694:
695: //
696: public StudioConceptTagCreParInfoContextHolder getCreationParameters() {
697:
698: StudioConceptTagCreParInfoContextHolder outValue = null;
699: outValue = StudioConceptTagCreParInfoContextHolder
700: .newInstance(getSetHolder());
701: return outValue;
702: }
703: }
|