/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2006 Sun Microsystems Inc. All Rights Reserved
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at opensso/legal/CDDLv1.0.txt.
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* $Id: DSTQueryItem.java,v 1.2 2008/06/25 05:47:13 qcheng Exp $
*
*/
/**
* The class <code>DSTQueryItem</code> is the wrapper for one query item
* for Data service.
* The following schema fragment specifies the expected content within the
* <code>DSTQueryItem</code> object.
* <pre>
* <element name="QueryItem" maxOccurs="unbounded">
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="Select"
* type="{urn:liberty:id-sis-pp:2003-08}SelectType"/>
* </sequence>
* <attribute name="itemID"
* type="{urn:liberty:id-sis-pp:2003-08}IDType" />
* <attribute name="changedSince"
* type="{http://www.w3.org/2001/XMLSchema}dateTime" />
* <attribute name="includeCommonAttributes"
* type="{http://www.w3.org/2001/XMLSchema}boolean" />
* <attribute name="id"
* type="{http://www.w3.org/2001/XMLSchema}ID" />
* </restriction>
* </complexContent>
* </complexType>
* </element>
* </pre>
*
* @supported.all.api
*/
public class DSTQueryItem {
private boolean includeCommonAttribute;
/**
* Constructor
* @param select specifies the data the query should return
* @param serviceNS service Name space
*/
this.nameSpaceURI = serviceNS;
}
/**
* Constructor
* @param select specifies the data the query should return
* @param includeCommonAttribute if true, query response will
* contains common attributes (attribute id and modification
* time)
* @param changedSince Only match entries changed after the specified
* date
* @param serviceNS service Name space
*/
boolean includeCommonAttribute,
this.changedSince = changedSince;
this.nameSpaceURI = serviceNS;
}
/**
* Constructor
* @param element <code>DOM</code> Element
* @throws DSTException
*/
}
}
if(nameSpaceURI == null) {
}
}
try {
} catch(ParseException ex) {
"DSTQueryItem(element): date can not be parsed.", ex);
}
}
nameSpaceURI, "Select");
" or more than one select found.");
throw new DSTException(
}
throw new DSTException(
}
}
/**
* Returns data selection string
* @return String
*/
return select;
}
/**
* Gets <code>itemID</code> attribute
* @return String
*/
return itemID;
}
/**
* Sets <code>itemID</code> attribute
* @param itemID item ID to be set
*/
}
/**
* Gets id attribute.
*
* @return id attribute.
*/
return id;
}
/**
* Sets id attribute
* @param id id attribute to be set
*/
}
/**
* Checks include common attribute for the <code>DST</code> query item.
* @return boolean
*/
public boolean isIncludeCommonAttributes() {
return includeCommonAttribute;
}
/**
* Gets changed since attribute
* @return Date
*/
return changedSince;
}
/**
* Gets the name space.
* @return Name space.
*/
return nameSpaceURI;
}
/**
* Sets the name space.
*
* @param nameSpace Name space URI.
*/
this.nameSpaceURI = nameSpace;
}
/**
* Sets the name space prefix.
* @param prefix Name space prefix.
*/
}
/**
* Gets the name space prefix.
* @return String Name space prefix.
*/
return prefix;
}
/**
* Creates a String representation of this object.
* By default name space name is prepended to the element name
* @return String A string containing the valid XML for this element
*/
return toString(true, false);
}
/**
* Creates a String representation of this object.
* @param includeNS if true prepends all elements by their Name space prefix
* @param declareNS if true includes the Name space within the
* generated.
* @return String A string containing the valid XML for this element
*/
return "";
}
if(includeNS) {
}
}
"not defined");
return "";
}
}
if(includeCommonAttribute) {
} else {
}
}
if (changedSince != null) {
.append("\"");
}
if(declareNS) {
}
}
// prefix is already defined.
return select;
}
while(st.hasMoreTokens()) {
}
}
}