本文整理匯總了Java中org.dom4j.Attribute.getStringValue方法的典型用法代碼示例。如果您正苦於以下問題:Java Attribute.getStringValue方法的具體用法?Java Attribute.getStringValue怎麽用?Java Attribute.getStringValue使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.dom4j.Attribute
的用法示例。
在下文中一共展示了Attribute.getStringValue方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: initialise
import org.dom4j.Attribute; //導入方法依賴的package包/類
public void initialise(Element element, NamespacePrefixResolver nspr, PermissionModel permissionModel)
{
Attribute recipientAttribute = element.attribute(RECIPIENT);
if (recipientAttribute != null)
{
recipient = recipientAttribute.getStringValue();
}
else
{
recipient = null;
}
Attribute accessAttribute = element.attribute(ACCESS);
if (accessAttribute != null)
{
if (accessAttribute.getStringValue().equalsIgnoreCase(ALLOW))
{
access = AccessStatus.ALLOWED;
}
else if (accessAttribute.getStringValue().equalsIgnoreCase(DENY))
{
access = AccessStatus.DENIED;
}
else
{
throw new PermissionModelException("The default permission must be deny or allow");
}
}
else
{
access = AccessStatus.DENIED;
}
Element permissionReferenceElement = element.element(PERMISSION_REFERENCE);
QName typeQName = QName.createQName(permissionReferenceElement.attributeValue(TYPE), nspr);
String name = permissionReferenceElement.attributeValue(NAME);
permissionReference = PermissionReferenceImpl.getPermissionReference(typeQName, name);
}
示例2: initialise
import org.dom4j.Attribute; //導入方法依賴的package包/類
public void initialise(Element element, NamespacePrefixResolver nspr, PermissionModel permissionModel)
{
Attribute nodeRefAttribute = element.attribute(NODE_REF);
if(nodeRefAttribute != null)
{
nodeRef = new NodeRef(nodeRefAttribute.getStringValue());
}
Attribute inheritFromParentAttribute = element.attribute(INHERIT_FROM_PARENT);
if(inheritFromParentAttribute != null)
{
inheritPermissionsFromParent = Boolean.parseBoolean(inheritFromParentAttribute.getStringValue());
}
else
{
inheritPermissionsFromParent = true;
}
// Node Permissions Entry
for (Iterator npit = element.elementIterator(NODE_PERMISSION); npit.hasNext(); /**/)
{
Element permissionEntryElement = (Element) npit.next();
ModelPermissionEntry permissionEntry = new ModelPermissionEntry(nodeRef);
permissionEntry.initialise(permissionEntryElement, nspr, permissionModel);
permissionEntries.add(permissionEntry);
}
}
示例3: initialise
import org.dom4j.Attribute; //導入方法依賴的package包/類
public void initialise(Element element, NamespacePrefixResolver nspr, PermissionModel permissionModel)
{
Attribute authorityAttribute = element.attribute(AUTHORITY);
if(authorityAttribute != null)
{
authority = authorityAttribute.getStringValue();
}
Attribute permissionAttribute = element.attribute(PERMISSION);
if(permissionAttribute != null)
{
permissionReference = permissionModel.getPermissionReference(null, permissionAttribute.getStringValue());
}
}