idman.p3p.element
Class DataElement

java.lang.Object
  |
  +--idman.p3p.element.DataElement

public class DataElement
extends java.lang.Object

Describes the data to be transferred or inferred.
See P3P-Specification
URI reference, where the fragment identifier part denotes the name of a data element/set, and the URI part denotes the corresponding data schema.
<!ELEMENT DATA (#PCDATA | CATEGORIES)*>
<!ATTLIST DATA
ref %URI; #REQUIRED
optional (yes | no) "no" >

Since:
17.06.2002
Version:
$Id: DataElement.java,v 1.7 2003/11/13 16:24:32 tk4 Exp $
Author:
Sven Doering

Constructor Summary
DataElement(boolean optional, java.lang.String ref, java.lang.String value, idman.p3p.element.CategoryElement[] categories)
          Creates the DataElement.
 
Method Summary
 idman.p3p.element.CategoryElement[] getCategories()
          Returns the categories.
 java.lang.String getRef()
          Returns the ref-String.
 java.lang.String getValue()
          Returns the value-String.
 boolean isOptional()
          Returns if dataelement is optional.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataElement

public DataElement(boolean optional,
                   java.lang.String ref,
                   java.lang.String value,
                   idman.p3p.element.CategoryElement[] categories)
            throws java.lang.Exception
Creates the DataElement. For standard schema data use the data-classes.getAllNameValuePairs() or getAllMarkedDataElementNames() e.g. ... new DataElement(false, "business.name", "Sap", null); value OR categories must be null.

Parameters:
optional - Data may be left blank
ref - Name of the data
value - Value of the data
categories - Categories of the data
Method Detail

getRef

public java.lang.String getRef()
Returns the ref-String.

Returns:
String ref

getValue

public java.lang.String getValue()
Returns the value-String.

Returns:
String value

isOptional

public boolean isOptional()
Returns if dataelement is optional.

Returns:
boolean true, if element is optional; false otherwise

getCategories

public idman.p3p.element.CategoryElement[] getCategories()
Returns the categories.

Returns:
Category[] categories


Copyright © 2003 DRIM Team. All Rights Reserved.