public interface XMLObject extends XMLStructure
Object
元在
W3C Recommendation for XML-Signature Syntax and Processing定义。一个
XMLObject
可以包含任何数据,包括可选的MIME类型,ID,和编码属性。XML架构定义的定义是:
<element name="Object" type="ds:ObjectType"/>
<complexType name="ObjectType" mixed="true">
<sequence minOccurs="0" maxOccurs="unbounded">
<any namespace="##any" processContents="lax"/>
</sequence>
<attribute name="Id" type="ID" use="optional"/>
<attribute name="MimeType" type="string" use="optional"/>
<attribute name="Encoding" type="anyURI" use="optional"/>
</complexType>
一
XMLObject
实例可以通过调用类方法创建的
XMLSignatureFactory
newXMLObject
;例如:
xmlsignaturefactory FAC = xmlsignaturefactory getInstance(DOM);列表内容=集合。singletonlist(FAC。newmanifest(参考)));XMLObject对象=工厂。newxmlobject(内容,“object-1”,null,null);
注意这个类命名为XMLObject
而不是Object
避免命名冲突与现有的java.lang.Object
类。
XMLSignatureFactory.newXMLObject(List, String, String, String)
Modifier and Type | Method and Description |
---|---|
List |
getContent()
|
String |
getEncoding()
返回该
XMLObject 编码URI。
|
String |
getId()
返回该
XMLObject ID。
|
String |
getMimeType()
返回该
XMLObject MIME类型。
|
isFeatureSupported
static final String TYPE
List getContent()
XMLObject
的
XMLStructure
s一
unmodifiable list
,代表任何命名空间的元素。
如果有代表XMLStructure
类型的公共类,它是这个类的一个实例恢复(例如:一个SignatureProperties
元素将作为SignatureProperties
实例返回)。
XMLStructure
s的一个不可修改的列表(可能为空而不
null
)
String getId()
XMLObject
ID。
null
如果不指定)
String getMimeType()
XMLObject
MIME类型,MIME类型是可选属性,描述了数据在这个
XMLObject
(独立编码)。
null
如果不指定)
String getEncoding()
XMLObject
编码URI,URI标识编码对象的编码方法。
null
如果不指定)
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.