MetaDataMerger.java 文件源码

java
阅读 20 收藏 0 点赞 0 评论 0

项目:neoscada 作者:
public MetaDataMerger ( final String label, final boolean compressed ) throws Exception
{
    this.doc = createDocument ();

    final XPathFactory xpf = XPathFactory.newInstance ();
    final XPath xp = xpf.newXPath ();
    this.isCategoryPathExpression = xp.compile ( "properties/property[@name='org.eclipse.equinox.p2.type.category']/@value" );

    final ProcessingInstruction pi = this.doc.createProcessingInstruction ( "metadataRepository", "" );
    pi.setData ( "version=\"1.1.0\"" );
    this.doc.appendChild ( pi );

    this.r = this.doc.createElement ( "repository" );
    this.doc.appendChild ( this.r );
    this.r.setAttribute ( "name", label );
    this.r.setAttribute ( "type", "org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository" );
    this.r.setAttribute ( "version", "1" );

    this.p = this.doc.createElement ( "properties" );
    this.r.appendChild ( this.p );

    addProperty ( this.p, "p2.compressed", "" + compressed );
    addProperty ( this.p, "p2.timestamp", "" + System.currentTimeMillis () );

    this.u = this.doc.createElement ( "units" );
    this.r.appendChild ( this.u );
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号