com.ptc.wvs.server.loader
Class EdFile
java.lang.Object
com.ptc.wvs.server.loader.EdFile
- public class EdFile
- extends Object
Method Summary |
String |
getCharset()
|
String |
getInputEdFile()
|
private Hashtable |
getListExistingContents(Representation rep)
|
String |
getOutputEdFile()
|
Vector |
getRefDocAppData()
|
String |
getRelativeOutputEdFile()
|
String |
getWriteCharset()
|
private void |
processEdFileAnnotation(DefaultMutableTreeNode n,
String name)
|
private void |
processEdFileComponent(DefaultMutableTreeNode n)
|
private void |
processEdFileComponentBoundingBox(DefaultMutableTreeNode n)
|
private void |
processEdFileComponentFromURL(DefaultMutableTreeNode n,
boolean deleteHtmldoc,
boolean deleteIgnoreOnMerge)
|
Representable |
processEdFileCopyTransform(Representable part,
int structureType)
put content URL knowlege in PublishUtils ****
private String processValueFromURL(String in)
{
//////////// this code requires knowlege of the content download URL from Windchill //////////////
StringTokenizer tok = new StringTokenizer(in, "?&=");
String ciRef = null;
while( tok.hasMoreTokens() ) {
if( tok.nextToken().equalsIgnoreCase(ApplicationData.APP_DATA_KEY) ) {
ciRef = Util.SandR(tok.nextToken(), "%3A", ":");
break;
}
}
// if have not got content item then leave URL as is
if( ciRef == null ) return in;
try {
ContentItem ci = (ContentItem)PublishUtils.getObjectFromRef("OR:"+ciRef);
if( ci != null && (ci instanceof ApplicationData) ) {
ApplicationData ad = (ApplicationData)ContentHelper.service.copyContentItem(toRep, ci);
return ad.getFileName();
}
} catch(Exception e) { e.printStackTrace(); return in; }
return in;
} |
void |
processEdFileFromURLs(Representation toRep,
Representable part,
int structureType,
ConfigSpec partConfigSpec,
boolean deleteHtmldoc)
|
void |
processEdFileFromURLs(Representation toRep,
Representable part,
int structureType,
ConfigSpec partConfigSpec,
boolean deleteHtmldoc,
boolean deleteIgnoreOnMerge)
|
private void |
processEdFileLookupProperty(Hashtable p,
String name)
|
private void |
processEdFileLookupPropertyFromURL(Hashtable p,
String name)
|
void |
processEdFileProperties(Representation toRep,
Properties ext,
Representable part,
Persistable doc)
|
void |
processEdFileProperties(Representation toRep,
Properties ext,
Representable part,
Persistable doc,
boolean ignoreonmerge)
|
private void |
processEdFileProperty(Hashtable p,
String name)
|
private void |
processEdFilePropertyFromURL(Hashtable p,
String name)
|
void |
processEdFileToURLs(Representation rep)
|
void |
processReadWrite()
|
private String |
processValueFromURL(String in)
|
void |
setCharset(String c)
|
void |
setInputDirectoryListing(String[] l)
|
void |
setInputEdFile(String filename)
|
void |
setOutputEdFile(String directory,
String filename)
|
void |
setWriteCharset(String c)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
tempExtension
public static String tempExtension
extentsExtension
public static String extentsExtension
saveExtension
public static String saveExtension
START_HIDE
private static final String START_HIDE
- See Also:
- Constant Field Values
END_HIDE
private static final String END_HIDE
- See Also:
- Constant Field Values
BLANK
private static final String BLANK
- See Also:
- Constant Field Values
wvsProperties
private static WVSProperties wvsProperties
VERBOSE
private static boolean VERBOSE
isCopyTransform
private static boolean isCopyTransform
isOverwriteTransform
private static boolean isOverwriteTransform
isCopyReferencedAndDescribingToRep
private static boolean isCopyReferencedAndDescribingToRep
epmPropGroup
private static String epmPropGroup
inputEdFile
private String inputEdFile
outputEdFile
private String outputEdFile
relativeOutputEdFile
private String relativeOutputEdFile
currentContents
private Hashtable currentContents
extents
private Properties extents
toRep
private Representation toRep
inputDirectoryListing
private String[] inputDirectoryListing
addedFiles
private HashMap addedFiles
inDocumentReference
private boolean inDocumentReference
inputStream
private InputStream inputStream
outputStream
private OutputStream outputStream
charset
private String charset
writeCharset
private String writeCharset
encoder
private EncodingConverter encoder
filenameIsEncoded
private boolean filenameIsEncoded
addToRefDocAppData
private boolean addToRefDocAppData
refDocAppData
private Vector refDocAppData
EdFile
public EdFile(InputStream is,
OutputStream os)
EdFile
public EdFile(InputStream is,
OutputStream os,
String charset)
EdFile
public EdFile(File edFile)
EdFile
public EdFile(File edFile,
String charset)
EdFile
public EdFile(String directory,
String filename)
EdFile
public EdFile(String directory,
String filename,
String charset)
getCharset
public String getCharset()
setCharset
public void setCharset(String c)
getWriteCharset
public String getWriteCharset()
setWriteCharset
public void setWriteCharset(String c)
setInputDirectoryListing
public void setInputDirectoryListing(String[] l)
setInputEdFile
public void setInputEdFile(String filename)
getInputEdFile
public String getInputEdFile()
setOutputEdFile
public void setOutputEdFile(String directory,
String filename)
getOutputEdFile
public String getOutputEdFile()
getRelativeOutputEdFile
public String getRelativeOutputEdFile()
processReadWrite
public void processReadWrite()
throws Exception
- Throws:
Exception
processEdFileToURLs
public void processEdFileToURLs(Representation rep)
throws Exception
- Throws:
Exception
processEdFileComponent
private void processEdFileComponent(DefaultMutableTreeNode n)
processEdFileProperty
private void processEdFileProperty(Hashtable p,
String name)
processEdFileLookupProperty
private void processEdFileLookupProperty(Hashtable p,
String name)
processEdFileAnnotation
private void processEdFileAnnotation(DefaultMutableTreeNode n,
String name)
getListExistingContents
private Hashtable getListExistingContents(Representation rep)
throws PropertyVetoException,
WTException
- Throws:
PropertyVetoException
WTException
processEdFileProperties
public void processEdFileProperties(Representation toRep,
Properties ext,
Representable part,
Persistable doc)
throws Exception
- Throws:
Exception
processEdFileProperties
public void processEdFileProperties(Representation toRep,
Properties ext,
Representable part,
Persistable doc,
boolean ignoreonmerge)
throws Exception
- Throws:
Exception
processEdFileComponentBoundingBox
private void processEdFileComponentBoundingBox(DefaultMutableTreeNode n)
getRefDocAppData
public Vector getRefDocAppData()
processEdFileFromURLs
public void processEdFileFromURLs(Representation toRep,
Representable part,
int structureType,
ConfigSpec partConfigSpec,
boolean deleteHtmldoc)
throws Exception
- Throws:
Exception
processEdFileFromURLs
public void processEdFileFromURLs(Representation toRep,
Representable part,
int structureType,
ConfigSpec partConfigSpec,
boolean deleteHtmldoc,
boolean deleteIgnoreOnMerge)
throws Exception
- Throws:
Exception
processEdFileComponentFromURL
private void processEdFileComponentFromURL(DefaultMutableTreeNode n,
boolean deleteHtmldoc,
boolean deleteIgnoreOnMerge)
processEdFilePropertyFromURL
private void processEdFilePropertyFromURL(Hashtable p,
String name)
processValueFromURL
private String processValueFromURL(String in)
processEdFileLookupPropertyFromURL
private void processEdFileLookupPropertyFromURL(Hashtable p,
String name)
processEdFileCopyTransform
public Representable processEdFileCopyTransform(Representable part,
int structureType)
throws Exception
- put content URL knowlege in PublishUtils ****
private String processValueFromURL(String in)
{
//////////// this code requires knowlege of the content download URL from Windchill //////////////
StringTokenizer tok = new StringTokenizer(in, "?&=");
String ciRef = null;
while( tok.hasMoreTokens() ) {
if( tok.nextToken().equalsIgnoreCase(ApplicationData.APP_DATA_KEY) ) {
ciRef = Util.SandR(tok.nextToken(), "%3A", ":");
break;
}
}
// if have not got content item then leave URL as is
if( ciRef == null ) return in;
try {
ContentItem ci = (ContentItem)PublishUtils.getObjectFromRef("OR:"+ciRef);
if( ci != null && (ci instanceof ApplicationData) ) {
ApplicationData ad = (ApplicationData)ContentHelper.service.copyContentItem(toRep, ci);
return ad.getFileName();
}
} catch(Exception e) { e.printStackTrace(); return in; }
return in;
}
- Throws:
Exception