Examples of TMLMetadataInfo


Examples of de.innovationgate.wga.model.TMLMetadataInfo

        try {
          if(!_metadataFile.isSynchronized(IResource.DEPTH_ZERO)){
            _metadataFile.refreshLocal(IResource.DEPTH_ZERO, new NullProgressMonitor());
          }
          reader = new InputStreamReader(_metadataFile.getContents(), _fileEncoding);
          TMLMetadataInfo metaData = (TMLMetadataInfo) xstream.fromXML(reader);
          directAccess = metaData.isDirectAccess();
          cacheable = metaData.isCacheable();
          description = metaData.getDescription();
          category = metaData.getCategory();
        } catch (CoreException e) {
          IOException ioe = new IOException("Unable to read metadata file of tml resource '" + _tmlFile.getLocation() + "'.");
          ioe.setStackTrace(e.getStackTrace());
          throw ioe;
        } finally {
View Full Code Here

Examples of de.innovationgate.wga.model.TMLMetadataInfo

          ioe.setStackTrace(e.getStackTrace());
          throw ioe;
       
      }   
    } else {     
      TMLMetadataInfo metaData = new TMLMetadataInfo();
      metaData.setDirectAccess(directAccess);
      metaData.setDescription(description);
      metaData.setCacheable(cacheable);
      metaData.setCategory(category);
      XStream xstream = new XStream(new DomDriver());
      xstream.alias(TMLMetadataInfo.XSTREAM_ALIAS, TMLMetadataInfo.class);
      Writer writer = null;
      try {
        if (!_metadataFolder.exists()) {
View Full Code Here

Examples of de.innovationgate.wga.model.TMLMetadataInfo

    return metadataFolder.getFile(tmlfile.getName().substring(0, tmlfile.getName().length() - tmlfile.getFileExtension().length()) + "metadata.xml");
  }

  public static TMLMetadataInfo getMetaDataInfo(IFile tmlFile) {
    WGADesignStructureHelper helper = new WGADesignStructureHelper(tmlFile);
    TMLMetadataInfo metaData = new TMLMetadataInfo();

    try {
      WGADesignConfigurationModel wgaDesignConfig = helper.createModel();
      metaData.setDirectAccess(wgaDesignConfig.isDirectAccessDefault());
    } catch (IOException e) {
      Activator.getDefault().logError("Cannot load WGADesignConfig", e);
    }

    if (getMetadataFile(tmlFile).exists()) {
      TMLFileMetadataModel metaDataFile = new TMLFileMetadataModel(tmlFile);
      metaData.setDirectAccess(metaDataFile.isDirectAccess());
    }

    BufferedReader reader = null;
    try {
      reader = new BufferedReader(new InputStreamReader(tmlFile.getContents()));
      String readLine = null;
      readLine = reader.readLine();
      while (readLine != null && readLine.startsWith("##MDSET ")) {
        try {
        metaData.processDesignHeader(readLine);
                }
                catch (Exception e) {
                    Activator.getDefault().logError("Unable to process design metadata header '" + readLine + "' in file '" + tmlFile.getLocation().toString() + "'.", e);
                }
        readLine = reader.readLine();
View Full Code Here

Examples of de.innovationgate.wga.model.TMLMetadataInfo

public class TMLMetadata extends DesignMetadata {
  
   public TMLMetadata() {
       super();
       _info = new TMLMetadataInfo();
   }
View Full Code Here

Examples of de.innovationgate.wga.model.TMLMetadataInfo

       _info = new TMLMetadataInfo();
   }
  
   public TMLMetadata(WGTMLModule mod) throws WGAPIException {
       super(mod);
       _info = new TMLMetadataInfo();
       setDirectAccess(mod.isDirectAccessAllowed());
       setCacheable(mod.isCacheable());
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.